svn commit: r659946 - in /ofbiz/trunk/applications/humanres: config/ script/org/ofbiz/humanres/ servicedef/ webapp/humanres/WEB-INF/ 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: r659946 - in /ofbiz/trunk/applications/humanres: config/ script/org/ofbiz/humanres/ servicedef/ webapp/humanres/WEB-INF/ widget/ widget/forms/

ashish-18
Author: ashish
Date: Sun May 25 02:48:50 2008
New Revision: 659946

URL: http://svn.apache.org/viewvc?rev=659946&view=rev
Log:
Applied patch from JIRA issue OFBIZ-1659.
Added support for Salary Step with Pay Grade.
Now we can use the amount field from SalaryStep for handling
the salary of Employee.

Thanks Awdesh Parihar for your patch.

Modified:
    ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml
    ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
    ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
    ofbiz/trunk/applications/humanres/widget/Menus.xml
    ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml

Modified: ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml?rev=659946&r1=659945&r2=659946&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml (original)
+++ ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml Sun May 25 02:48:50 2008
@@ -357,9 +357,6 @@
     <property key="HumanResAddPartyQual">
         <value xml:lang="en">Add Party Qualification</value>
     </property>
-    <property key="HumanResAddPayGrade">
-        <value xml:lang="en">Add Pay Grade</value>
-    </property>
     <property key="HumanResAddPerfNote">
         <value xml:lang="en">Add Performance Note</value>
     </property>
@@ -457,6 +454,9 @@
         <value xml:lang="it">Aggiorna Abilità Soggetto</value>
         <value xml:lang="th">แก้ไขกลุ่มทักษะ</value>
     </property>
+    <property key="HumanResEditPayGrade">
+        <value xml:lang="en">Add/Update Pay Grade</value>
+    </property>
     <property key="HumanResEditPayHistory">
         <value xml:lang="en">Pay Histories</value>
     </property>
@@ -467,7 +467,7 @@
         <value xml:lang="en">PerfReview Items</value>
     </property>
     <property key="HumanResEditSalaryStep">
-        <value xml:lang="en">Edit Salary Step</value>
+        <value xml:lang="en">Salary Steps</value>
         <value xml:lang="it">Aggiorna Passi Salario</value>
         <value xml:lang="th">แก้ไขขั้นเงินเดือน</value>
     </property>
@@ -545,6 +545,9 @@
     <property key="HumanResFindPartySkill">
         <value xml:lang="en">Find Party Skills</value>
     </property>
+    <property key="HumanResFindPayGrade">
+        <value xml:lang="en">Find Pay Grade</value>
+    </property>
     <property key="HumanResFindPerfReview">
         <value xml:lang="en">Find Performance Review</value>
     </property>
@@ -586,7 +589,7 @@
         <value xml:lang="th">รายการกลุ่มทักษะ</value>
     </property>
     <property key="HumanResListPayGrade">
-        <value xml:lang="en">List Pay Grade</value>
+        <value xml:lang="en">List Pay Grades</value>
         <value xml:lang="it">Lista Grado Paga</value>
         <value xml:lang="th">รายการระดับการจ่าย</value>
     </property>

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=659946&r1=659945&r2=659946&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Sun May 25 02:48:50 2008
@@ -254,7 +254,12 @@
     <simple-method method-name="createPayGrade" short-description="Create a Pay Grade">
         <make-value entity-name="PayGrade" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <sequenced-id-to-env sequence-name="PayGrade" env-name="newEntity.payGradeId"/>
+        <if-not-empty field-name="parameters.payGradeId">
+            <set field="newEntity.payGradeId" from-field="parameters.payGradeId"/>
+        <else>
+            <sequenced-id-to-env sequence-name="PayGrade" env-name="newEntity.payGradeId"/>
+        </else>
+        </if-not-empty>
         <field-to-result field-name="newEntity.payGradeId" result-name="payGradeId"/>
         <create-value value-name="newEntity"/>
     </simple-method>

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=659946&r1=659945&r2=659946&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Sun May 25 02:48:50 2008
@@ -269,7 +269,8 @@
         <description>Create a Pay Grade</description>
         <!-- permission-service service-name="humanResManagerPermission" main-action="CREATE"/> -->
         <auto-attributes mode="INOUT" include="pk" optional="true"/>
-        <auto-attributes mode="IN" include="nonpk" optional="true"/>        
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+        <override name="payGradeName" optional="false"/>
     </service>
     
     <service name="updatePayGrade" engine="simple" default-entity-name="PayGrade"

Modified: ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml?rev=659946&r1=659945&r2=659946&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml Sun May 25 02:48:50 2008
@@ -304,24 +304,33 @@
         <event type="service" invoke="deletePayrollPreference"/>
         <response name="success" type="view" value="EditPayrollPreferences"/>
     </request-map>
-    <request-map uri="FindPayGrade">
+    <request-map uri="FindPayGrades">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FindPayGrades"/>
+        <response name="error" type="view" value="FindPayGrades"/>
+    </request-map>
+    <request-map uri="EditPayGrade">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditPayGrade"/>
+        <response name="error" type="view" value="EditPayGrade"/>
     </request-map>
     <request-map uri="createPayGrade">
         <security https="true" auth="true"/>
         <event type="service" invoke="createPayGrade"/>
-        <response name="success" type="view" value="EditPayGrade"/>
+        <response name="success" type="view" value="FindPayGrades"/>
+        <response name="error" type="view" value="EditPayGrade"/>
     </request-map>
     <request-map uri="updatePayGrade">
         <security https="true" auth="true"/>
         <event type="service" invoke="updatePayGrade"/>
         <response name="success" type="view" value="EditPayGrade"/>
+        <response name="error" type="view" value="EditPayGrade"/>
     </request-map>    
     <request-map uri="deletePayGrade">
         <security https="true" auth="true"/>
         <event type="service" invoke="deletePayGrade"/>
-        <response name="success" type="view" value="EditPayGrade"/>
+        <response name="success" type="view" value="FindPayGrades"/>
+        <response name="error" type="view" value="FindPayGrades"/>
     </request-map>
     <request-map uri="EditSalarySteps">
         <security https="true" auth="true"/>
@@ -699,4 +708,5 @@
     <view-map name="EditEmploymentApps" type="screen" page="component://humanres/widget/EmploymentScreens.xml#EditEmploymentApps"/>
     <view-map name="EditPartyResumes" type="screen" page="component://humanres/widget/EmploymentScreens.xml#EditPartyResumes"/>
     <view-map name="EditPerformanceNotes" type="screen" page="component://humanres/widget/EmploymentScreens.xml#EditPerformanceNotes"/>
+    <view-map name="FindPayGrades" type="screen" page="component://humanres/widget/EmploymentScreens.xml#FindPayGrades"/>
 </site-conf>

Modified: ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml?rev=659946&r1=659945&r2=659946&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml Sun May 25 02:48:50 2008
@@ -296,43 +296,29 @@
         </section>
     </screen>    
     <screen name="EditPayGrade">
-        <section>            
+        <section>
             <actions>
-                <set field="titleProperty" value="HumanResAddPayGrade"/>
+                <set field="titleProperty" value="HumanResEditPayGrade"/>
                 <set field="headerItem" value="PayGrade"/>
-                <set field="tabButtonItem" value="EditSalaryStep"/>
+                <set field="tabButtonItem" value="EditPayGrade"/>
                 <set field="payGradeId" from-field="parameters.payGradeId"/>
                 <entity-one entity-name="PayGrade" value-name="payGrade"/>
-            </actions>            
+            </actions>
             <widgets>
                 <decorator-screen name="CommonPayGradeDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.HumanResListPayGrade}">
+                        <screenlet title="${uiLabelMap.HumanResEditPayGrade}">
                             <section>
                                 <widgets>
-                                    <include-form name="ListPayGrades" location="component://humanres/widget/forms/EmploymentForms.xml"/>
+                                    <include-form name="EditPayGrade" location="component://humanres/widget/forms/EmploymentForms.xml"/>
                                 </widgets>
                             </section>
                         </screenlet>
-                        <container style="screenlet">
-                            <container style="screenlet-title-bar">
-                                <container style="h3">
-                                    <label text="${uiLabelMap.HumanResAddPayGrade}"/>
-                                </container>
-                            </container>
-                            <container style="screenlet-body">
-                                <section>
-                                    <widgets>
-                                        <include-form name="AddPayGrade" location="component://humanres/widget/forms/EmploymentForms.xml" />
-                                    </widgets>
-                                </section>
-                            </container>
-                        </container>
                     </decorator-section>
                 </decorator-screen>
-            </widgets>                              
+            </widgets>
         </section>
-    </screen>    
+    </screen>
     <screen name="EditSalarySteps">
         <section>
             <actions>
@@ -719,4 +705,44 @@
             </widgets>
         </section>
     </screen>
+    <screen name="FindPayGrades">
+        <section>
+            <actions>
+                <set field="titleProperty" value="HumanResFindPayGrade"/>
+                <set field="headerItem" value="PayGrade"/>
+                <set field="payGradeId" from-field="parameters.payGradeId"/>
+                <set field="payGradeCtx" from-field="parameters"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.HumanResFindPayGrade}">
+                            <section>
+                                <widgets>
+                                    <container style="button-bar">
+                                        <link target="EditPayGrade" text="${uiLabelMap.HumanResNewPayGrade}" style="buttontext"/>
+                                    </container>
+                                    <include-form name="FindPayGrades" location="component://humanres/widget/forms/EmploymentForms.xml"/>
+                                </widgets>
+                            </section>
+                        </screenlet>
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.HumanResListPayGrade}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <section>
+                                    <widgets>
+                                        <include-form name="ListPayGrades" location="component://humanres/widget/forms/EmploymentForms.xml" />
+                                    </widgets>
+                                </section>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/humanres/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/Menus.xml?rev=659946&r1=659945&r2=659946&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/Menus.xml Sun May 25 02:48:50 2008
@@ -31,7 +31,7 @@
         <menu-item name="Training" title="${uiLabelMap.HumanResTraining}"><link target="FindPersonTrainings"/></menu-item>
         <menu-item name="EmploymentApp" title="${uiLabelMap.HumanResEmploymentApp}"><link target="FindEmploymentApp"/></menu-item>
         <menu-item name="PartyResume" title="${uiLabelMap.HumanResPartyResume}"><link target="FindPartyResume"/></menu-item>
-        <menu-item name="PayGrade" title="${uiLabelMap.HumanResPayGrade}"><link target="FindPayGrade"/></menu-item>
+        <menu-item name="PayGrade" title="${uiLabelMap.HumanResPayGrade}"><link target="FindPayGrades"/></menu-item>
         <menu-item name="PerfReview" title="${uiLabelMap.HumanResPerfReview}"><link target="FindPerfReview"/></menu-item>
         <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="col-right" selected-style="selected">
             <condition><not><if-empty field-name="userLogin"/></not></condition>
@@ -84,9 +84,12 @@
     </menu>
     <menu name="SalaryBar" default-menu-item-name="EditSalaryStep" default-selected-style="selected"
         type="simple" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="tabButtonItem">
+        <menu-item name="EditPayGrade" title="${uiLabelMap.HumanResPayGrade}">
+            <link target="EditPayGrade?payGradeId=${payGradeId}"/>
+        </menu-item>      
         <menu-item name="EditSalaryStep" title="${uiLabelMap.HumanResEditSalaryStep}">
             <link target="EditSalarySteps?payGradeId=${payGradeId}"/>
-        </menu-item>        
+        </menu-item>
     </menu>
     <menu name="SkillType" type="simple" id="app-navigation" default-selected-style="selected" selected-menuitem-context-field-name="tabButtonItem"/>
     

Modified: ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml?rev=659946&r1=659945&r2=659946&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml Sun May 25 02:48:50 2008
@@ -316,25 +316,33 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>        
     </form>
-    <form name="ListPayGrades" type="list" title="" target="updatePayGrade" paginate-target="FindPayGrade"
+    <form name="FindPayGrades" type="single" target="FindPayGrades" title=""
+        header-row-style="header-row" default-table-style="basic-table">
+        <auto-fields-service service-name="createPayGrade" default-field-type="find"/>
+        <field name="noConditionFind"><hidden value="Y"/></field>
+        <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="ListPayGrades" type="list" list-name="listIt" title="" target="updatePayGrade" paginate-target="FindPayGrade"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>
-            <entity-condition entity-name="PayGrade"><order-by field-name="payGradeId"/></entity-condition>
+            <service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
+                <field-map field-name="inputFields" env-name="payGradeCtx"/>
+                <field-map field-name="entityName" value="PayGrade"/>
+            </service>
         </actions>
-        <auto-fields-service default-field-type="display" service-name="updatePayGrade"/>      
-        <field name="payGradeId" title="${uiLabelMap.HumanResPayGradeID}"><display/></field>
-        <field name="payGradeName"><text/></field>
-        <field name="comments"><text/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
-        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
-            <hyperlink target="deletePayGrade?payGradeId=${payGradeId}" description="${uiLabelMap.CommonDelete}"/>
-        </field>          
+        <auto-fields-service default-field-type="display" service-name="updatePayGrade"/>
+        <field name="payGradeId" title="${uiLabelMap.HumanResPayGradeID}" widget-style="linktext">
+                <hyperlink also-hidden="true" target="EditPayGrade?payGradeId=${payGradeId}" target-type="plain" description="${payGradeId}"/>
+        </field>
     </form>
-    <form name="AddPayGrade" type="single" target="createPayGrade" title=""
-        header-row-style="header-row" default-table-style="basic-table">
-        <auto-fields-service service-name="createPayGrade"/>
-        <field name="payGradeId"><ignored/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>        
+    <form name="EditPayGrade" type="single" target="updatePayGrade" title=""
+        header-row-style="header-row" default-table-style="basic-table" default-map-name="payGrade">
+        <alt-target use-when="payGradeId==null" target="createPayGrade"/>
+        <auto-fields-service default-field-type="edit" service-name="createPayGrade"/>
+        <field use-when="payGrade!=null" name="payGradeId" widget-style="tabletext" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
+        <field use-when="payGrade==null" name="payGradeId"><text/></field>
+        <field name="payGradeName" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
     <form name="ListSalarySteps" type="list" title="" target="updateSalaryStep" paginate-target="findSalarySteps"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
@@ -505,4 +513,4 @@
          <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
         <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-</forms>
+</forms>
\ No newline at end of file