svn commit: r739215 - in /ofbiz/trunk/applications/humanres: config/ entitydef/ script/org/ofbiz/humanres/ servicedef/ widget/ widget/forms/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r739215 - in /ofbiz/trunk/applications/humanres: config/ entitydef/ script/org/ofbiz/humanres/ servicedef/ widget/ widget/forms/

hansbak-2
Author: hansbak
Date: Fri Jan 30 09:14:36 2009
New Revision: 739215

URL: http://svn.apache.org/viewvc?rev=739215&view=rev
Log:
some corrections and the addition of a profile screenlet to show an overview of the employment information of a party (to be completed)

Modified:
    ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
    ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml
    ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml
    ofbiz/trunk/applications/humanres/widget/EmployeeScreens.xml
    ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
    ofbiz/trunk/applications/humanres/widget/forms/EmployeeForms.xml

Modified: ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml (original)
+++ ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml Fri Jan 30 09:14:36 2009
@@ -507,6 +507,9 @@
         <value xml:lang="it">Part of the Open For Business Family of Open Source Software</value>
         <value xml:lang="th">เป็นส่วนหนึ่งของธุรกิจแบบครอบครัวที่เป็นซอฟต์แวร์โอเพนซอส</value>
     </property>
+    <property key="HumanResCurrentEmploymentData">
+        <value xml:lang="en">Current Employment information</value>
+    </property>
     <property key="HumanResEditAgreementEmploymentAppl">
         <value xml:lang="en">Edit Agreement Employment Appl</value>
         <value xml:lang="fr">Modifier l'accord d'application d'emploi</value>

Modified: ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml Fri Jan 30 09:14:36 2009
@@ -300,6 +300,19 @@
         <key-map field-name="parentTypeId" rel-field-name="benefitTypeId"/>
       </relation>
     </entity>
+    <view-entity entity-name="BenefitTypeAndParty"
+      package-name="org.ofbiz.humanres.employment"
+      title="Benefit Type Entity">
+      <member-entity entity-alias="BT" entity-name="BenefitType"/>
+      <member-entity entity-alias="PB" entity-name="PartyBenefit"/>
+      <alias-all entity-alias="BT"/>
+      <alias-all entity-alias="PB">
+        <exclude field="benefitTypeId"/>
+      </alias-all>
+      <view-link entity-alias="BT" rel-entity-alias="PB">
+        <key-map field-name="benefitTypeId"/>
+      </view-link>
+    </view-entity>
     <entity entity-name="Employment"
             package-name="org.ofbiz.humanres.employment"
             title="Employment Entity">
@@ -675,9 +688,14 @@
       <member-entity entity-alias="EPF" entity-name="EmplPositionFulfillment"></member-entity>
       <alias-all entity-alias="EMPPOS"/>
       <alias name="employeePartyId" entity-alias="EPF" field="partyId"/>
+      <alias name="fromDate" entity-alias="EPF"/>
+      <alias name="thruDate" entity-alias="EPF"/>
       <view-link entity-alias="EMPPOS" rel-entity-alias="EPF">
         <key-map field-name="emplPositionId"/>
       </view-link>
+      <relation type="one" rel-entity-name="EmplPositionType">
+        <key-map field-name="emplPositionTypeId"/>
+      </relation>
     </view-entity>
   <entity entity-name="EmplPositionReportingStruct"
             package-name="org.ofbiz.humanres.position"

Modified: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Fri Jan 30 09:14:36 2009
@@ -693,4 +693,38 @@
         <entity-one entity-name="EmplLeaveType" value-field="lookedUpValue"/>        
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
+
+    <simple-method method-name="getCurrentPartyEmploymentData" short-description="Get all current employment information for a certain partyId">
+        <!-- party benefit -->
+        <entity-and entity-name="BenefitTypeAndParty" list="partyBenefitTypes" filter-by-date="true">
+            <field-map field-name="partyIdTo" from-field="parameters.partyId"/>
+        </entity-and>
+        <field-to-result field="partyBenefitTypes"/>
+        <!-- employment -->
+        <entity-and entity-name="Employment" list="employments" filter-by-date="true">
+            <field-map field-name="partyIdTo" from-field="parameters.partyId"/>
+        </entity-and>
+        <first-from-list entry="employment" list="employments"/>
+        <field-to-result field="employment"/>
+        <!-- position -->
+        <entity-and entity-name="EmplPositionAndFulfillment" list="emplPositionAndFulfillments" filter-by-date="true">
+            <field-map field-name="employeePartyId" from-field="parameters.partyId"/>
+            <field-map field-name="partyId" from-field="employment.partyIdFrom"/>
+        </entity-and>
+        <first-from-list entry="emplPositionAndFulfillment" list="emplPositionAndFulfillments"/>
+        <field-to-result field="emplPositionAndFulfillment" result-name="emplPosition"/>
+        <!-- position type -->
+        <get-related-one value-field="emplPositionAndFulfillment" relation-name="EmplPositionType" to-value-field="emplPositionType"/>
+        <field-to-result field="emplPositionType"/>
+        <!-- rate amount -->
+        <entity-one entity-name="PartyAcctgPreference" value-field="partyAcctgPreference">
+            <field-map field-name="partyId" from-field="employment.partyIdFrom"/>
+        </entity-one>
+        <entity-and entity-name="RateAmount" list="rateAmounts" filter-by-date="true">
+            <field-map field-name="emplPositionTypeId" from-field="emplPositionType.emplPositionTypeId"/>
+            <field-map field-name="rateCurrencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
+        </entity-and>
+        <first-from-list entry="rateAmount" list="rateAmounts"/>
+        <field-to-result field="rateAmount" result-name="emplPositionRateAmount"/>
+    </simple-method>
 </simple-methods>        

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Fri Jan 30 09:14:36 2009
@@ -709,10 +709,23 @@
     </service>
     
     <service name="deleteEmplLeaveType" engine="simple" default-entity-name="EmplLeaveType"
-             location="org/ofbiz/humanres/HumanResServices.xml" invoke="deleteEmplLeaveType" auth="true">
+        location="org/ofbiz/humanres/HumanResServices.xml" invoke="deleteEmplLeaveType" auth="true">
         <description>Delete Valid LeaveType</description>
         <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
-
+    
+    <service name="getCurrentPartyEmploymentData" engine="simple"
+        location="org/ofbiz/humanres/HumanResServices.xml" invoke="getCurrentPartyEmploymentData" auth="true">
+        <description>Delete Valid LeaveType</description>
+        <permission-service service-name="humanResManagerPermission" main-action="VIEW"/>
+        <attribute name="partyId" type="String" mode="IN"/>
+        <attribute name="partyBenefitTypes" type="java.util.List" mode="OUT" optional="true"/>
+        <attribute name="employment" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
+        <attribute name="emplPosition" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
+        <attribute name="emplPositionType" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
+        <attribute name="emplPositionRateType" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
+        <attribute name="emplPositionRateAmount" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
+    </service>
+    
 </services>
\ No newline at end of file

Modified: ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml Fri Jan 30 09:14:36 2009
@@ -61,7 +61,9 @@
             <widgets>
                 <decorator-screen name="EmployeeDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-form name="ListEmplPositionsParty" location="component://humanres/widget/forms/EmplPositionForms.xml"/>
+                        <screenlet title="${uiLabelMap.HumanResEmployeePosition}" tab-menu-name="ListEmplPositionsParty">
+                            <include-form name="ListEmplPositionsParty" location="component://humanres/widget/forms/EmplPositionForms.xml"/>
+                        </screenlet>
                     </decorator-section>
                 </decorator-screen>
             </widgets>

Modified: ofbiz/trunk/applications/humanres/widget/EmployeeScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmployeeScreens.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/EmployeeScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/EmployeeScreens.xml Fri Jan 30 09:14:36 2009
@@ -120,12 +120,11 @@
                                             <include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="contactsAndAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
-                                            <include-screen name="LoyaltyPoints" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                         </container>
                                         <container style="profile-right">
+                                            <include-screen name="CurrentEmploymentData" location="component://humanres/widget/EmployeeScreens.xml"/>
                                             <include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="Attributes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
-                                            <include-screen name="Subscriptions" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                         </container>
@@ -291,4 +290,16 @@
             </widgets>
         </section>
     </screen>    
+    <screen name="CurrentEmploymentData">
+        <section>
+            <actions>
+                <service service-name="getCurrentPartyEmploymentData" auto-field-map="true" result-map="employmentData"/>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.HumanResCurrentEmploymentData}">
+                    <include-form name="CurrentEmploymentData" location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml Fri Jan 30 09:14:36 2009
@@ -92,14 +92,13 @@
         <section>
             <actions>
                 <set field="titleProperty" value="HumanResEditEmployment"/>
-                <set field="headerItem" value="Employment"/>
-                <set field="tabButtonItem" value="ListEmployments"/>
+                <set field="tabButtonItem" value="ListEmployment"/>
                 <set field="employmentCtx.partyIdTo" from-field="parameters.partyId"/>
             </actions>
             <widgets>
                 <decorator-screen name="EmployeeDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.HumanResEditEmployment}" navigation-form-name="ListEmploymentsPerson">
+                        <screenlet title="${uiLabelMap.HumanResEmployment}" navigation-form-name="ListEmploymentsPerson">
                             <include-form name="ListEmploymentsPerson" location="component://humanres/widget/forms/EmploymentForms.xml"/>
                         </screenlet>
                     </decorator-section>

Modified: ofbiz/trunk/applications/humanres/widget/forms/EmployeeForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/EmployeeForms.xml?rev=739215&r1=739214&r2=739215&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/EmployeeForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/EmployeeForms.xml Fri Jan 30 09:14:36 2009
@@ -218,6 +218,18 @@
         <field name="fromDate"><display/></field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit/></field>  
     </form>
-    
+    <form name="CurrentEmploymentData" default-map-name="employmentData" type="single">
+        <field name="Company" entry-name="employment.partyIdFrom">
+            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ">
+                <sub-hyperlink target="/partymgr/control/viewprofile?partyId=${employmentData.employment.partyIdFrom}" description="[${employmentData.employment.partyIdFrom}]" target-type="inter-app"/>
+            </display-entity>
+        </field>
+        <field name="Position" entry-name="emplPositionType.emplPositionTypeId">
+            <hyperlink target="emplPositionView?emplPositionId=${employmentData.emplPosition.emplPositionId}" description="${employmentData.emplPositionType.description} [${employmentData.emplPosition.emplPositionId}]"/>
+        </field>
+        <field name="Salary" entry-name="emplPositionRateAmount.rateAmount">
+            <display type="currency" currency="${employmentData.emplPositionRateAmount.rateCurrencyUomId}"/>
+        </field>
+    </form>
 </forms>