svn commit: r654569 - in /ofbiz/trunk/applications/humanres: config/HumanResUiLabels.xml script/org/ofbiz/humanres/HumanResServices.xml webapp/humanres/WEB-INF/controller.xml widget/EmplPositionScreens.xml widget/forms/EmplPositionForms.xml

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

svn commit: r654569 - in /ofbiz/trunk/applications/humanres: config/HumanResUiLabels.xml script/org/ofbiz/humanres/HumanResServices.xml webapp/humanres/WEB-INF/controller.xml widget/EmplPositionScreens.xml widget/forms/EmplPositionForms.xml

mor-2
Author: mor
Date: Thu May  8 09:02:52 2008
New Revision: 654569

URL: http://svn.apache.org/viewvc?rev=654569&view=rev
Log:
Improve usability of Reporting Structure Screen in HR, Applied patch from OFBIZ-1661 (https://issues.apache.org/jira/browse/OFBIZ-1661)Santosh Malviya thanks for the patch, also thanks to Mridul Pathak for reviewing this patch

Modified:
    ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
    ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml
    ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml

Modified: ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml?rev=654569&r1=654568&r2=654569&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml (original)
+++ ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml Thu May  8 09:02:52 2008
@@ -348,6 +348,12 @@
         <value xml:lang="it">Anni di Esperienza</value>
         <value xml:lang="th">ประสบการณ์(ปี)</value>
     </property>
+    <property key="HumanResAddReportedToEmplPositionReportingStruct">
+        <value xml:lang="en">Add Empl Position Reporting Struct [Reported To ${parameters.emplPositionId}]</value>
+    </property>
+    <property key="HumanResAddReportsToEmplPositionReportingStruct">
+        <value xml:lang="en">Add Empl Position Reporting Struct [${parameters.emplPositionId} Reports To]</value>
+    </property>
     <property key="HumanResApplicationId">
         <value xml:lang="en">Application Id</value>
         <value xml:lang="it">Codice Applicazione</value>
@@ -500,6 +506,9 @@
         <value xml:lang="it">Codice Posizione Impiegato Stampato Da</value>
         <value xml:lang="th">ถึงรายงานรหัสตำแหน่งพนักงาน</value>
     </property>
+    <property key="HumanResEmplPostitionIdReportingToAndEmplPositionIdManagedByMustBeDiff">
+        <value xml:lang="en">emplPositionIdReportingTo and emplPositionIdManagedBy must be different</value>
+    </property>
     <property key="HumanResEmployeePosition">
         <value xml:lang="en">Employee Position</value>
         <value xml:lang="it">Posizione Impiegato</value>
@@ -535,6 +544,12 @@
         <value xml:lang="it">Lista Posizione Impiegato</value>
         <value xml:lang="th">รายการตำแหน่งพนักงาน</value>
     </property>
+    <property key="HumanResListEmplPositionsReportedTo">
+        <value xml:lang="en">List Employee Positions, Reported To [${parameters.emplPositionId}]</value>
+    </property>
+    <property key="HumanResListEmplPositionsReportsTo">
+        <value xml:lang="en">List Employee Positions, [${parameters.emplPositionId}]  Reports To</value>
+    </property>
     <property key="HumanResListEmploymentApps">
         <value xml:lang="en">List Employment Applications</value>
         <value xml:lang="it">Lista Applicazioni Impiegato</value>
@@ -935,7 +950,7 @@
         <value xml:lang="th">รายการตำแหน่งพนักงานที่ปฏิบัติภารกิจ</value>
     </property>
     <property key="PageTitleListEmplPositionReportingStructs">
-        <value xml:lang="en">ListEmplPositionReportingStructs</value>
+        <value xml:lang="en">List EmplPosition Reporting Structs</value>
         <value xml:lang="it">Lista Posizione Impiegato Struttura Stampe</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=654569&r1=654568&r2=654569&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Thu May  8 09:02:52 2008
@@ -389,7 +389,20 @@
             <now-timestamp-to-env env-name="nowTimeStamp"/>
             <set field="newEntity.fromDate" from-field="nowTimeStamp"/>
         </if-empty>
-        <create-value value-name="newEntity"/>        
+        <if>
+            <condition>
+                <if-compare-field field-name="parameters.emplPositionIdManagedBy" operator="not-equals" to-field-name="parameters.emplPositionIdReportingTo"/>
+            </condition>
+            <then>
+                <create-value value-name="newEntity"/>
+            </then>
+            <else>
+                <add-error>
+                    <fail-property property="HumanResEmplPostitionIdReportingToAndEmplPositionIdManagedByMustBeDiff" resource="HumanResUiLabels"/>
+                </add-error>
+                <check-errors/>
+            </else>
+        </if>        
     </simple-method>
 
     <simple-method method-name="updateEmplPositionReportingStruct" short-description="Update Employee Position Reporting Structure">

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=654569&r1=654568&r2=654569&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml Thu May  8 09:02:52 2008
@@ -448,16 +448,19 @@
         <security https="true" auth="true"/>
         <event type="service" invoke="createEmplPositionReportingStruct"/>
         <response name="success" type="view" value="EditEmplPositionReportingStructs"/>
+        <response name="error" type="view" value="EditEmplPositionReportingStructs"/>
     </request-map>
     <request-map uri="updateEmplPositionReportingStruct">
         <security https="true" auth="true"/>
         <event type="service" invoke="updateEmplPositionReportingStruct"/>
         <response name="success" type="view" value="EditEmplPositionReportingStructs"/>
+        <response name="error" type="view" value="EditEmplPositionReportingStructs"/>
     </request-map>
     <request-map uri="deleteEmplPositionReportingStruct">
         <security https="true" auth="true"/>
         <event type="service" invoke="deleteEmplPositionReportingStruct"/>
         <response name="success" type="view" value="EditEmplPositionReportingStructs"/>
+        <response name="error" type="view" value="EditEmplPositionReportingStructs"/>
     </request-map>
     <request-map uri="findValidResponsibilities">
         <security https="true" auth="true"/>

Modified: ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml?rev=654569&r1=654568&r2=654569&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml Thu May  8 09:02:52 2008
@@ -187,37 +187,37 @@
             <widgets>
                 <decorator-screen name="CommonEmplPositionDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <container style="screenlet">
-                            <container style="screenlet-title-bar">
-                                <container style="h3">
-                                    <label text="${uiLabelMap.PageTitleListEmplPositionReportingStructs}"/>
-                                </container>
-                            </container>
-                            <container style="screenlet-body">
-                                <section>
-                                    <widgets>
-                                        <container>
-                                             <link target="EditEmplPositionReportingStruct" text="${uiLabelMap.HumanResNewEmplPositionReportingStruct}" style="buttontext"/>
-                                        </container>
-                                        <include-form name="ListEmplPositionReportingStructs" location="component://humanres/widget/forms/EmplPositionForms.xml"/>
-                                    </widgets>
-                                </section>
-                            </container>
-                        </container>
-                        <container style="screenlet">
-                            <container style="screenlet-title-bar">
-                                <container style="h3">
-                                    <label text="${uiLabelMap.HumanResEditEmplPositionReportingStruct}"/>
-                                </container>
-                            </container>
-                            <container style="screenlet-body">
-                                <section>
-                                    <widgets>
-                                        <include-form name="EditEmplPositionReportingStruct" location="component://humanres/widget/forms/EmplPositionForms.xml"/>  
-                                    </widgets>
-                                </section>
-                            </container>
+                        <container>
+                            <label style="h1" text="${uiLabelMap.HumanResEditEmplPositionReportingStruct} ${uiLabelMap.CommonFor}: [${uiLabelMap.CommonId}:${parameters.emplPositionId}]"/>
                         </container>
+                        <screenlet title="${uiLabelMap.HumanResListEmplPositionsReportsTo}">
+                            <section>
+                                <widgets>
+                                    <include-form name="ListReportsToEmplPositionReportingStructs" location="component://humanres/widget/forms/EmplPositionForms.xml"/>
+                                </widgets>
+                            </section>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.HumanResAddReportsToEmplPositionReportingStruct}">
+                            <section>
+                                <widgets>
+                                    <include-form name="EditReportsToEmplPositionReportingStruct" location="component://humanres/widget/forms/EmplPositionForms.xml"/>  
+                                </widgets>
+                            </section>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.HumanResListEmplPositionsReportedTo}">
+                            <section>
+                                <widgets>
+                                    <include-form name="ListReportedToEmplPositionReportingStructs" location="component://humanres/widget/forms/EmplPositionForms.xml"/>
+                                </widgets>
+                            </section>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.HumanResAddReportedToEmplPositionReportingStruct}">
+                            <section>
+                                <widgets>
+                                    <include-form name="EditReportedToEmplPositionReportingStruct" location="component://humanres/widget/forms/EmplPositionForms.xml"/>
+                                </widgets>
+                            </section>
+                        </screenlet>
                     </decorator-section>
                 </decorator-screen>
             </widgets>

Modified: ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml?rev=654569&r1=654568&r2=654569&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml Thu May  8 09:02:52 2008
@@ -105,30 +105,62 @@
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
     </form>
     
-    <form name="ListEmplPositionReportingStructs" type="list" target="updateEmplPositionReportingStruct" title="" paginate-target="findEmplPositionReportingStructs"
+    <form name="ListReportsToEmplPositionReportingStructs" type="list" target="updateEmplPositionReportingStruct" title="" paginate-target="EditReportsToEmplPositionReportingStruct"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>
-            <entity-condition entity-name="EmplPositionReportingStruct"/>
+            <entity-condition entity-name="EmplPositionReportingStruct" list-name="emplPositionReportingStructList">
+                <condition-expr field-name="emplPositionIdManagedBy" env-name="parameters.emplPositionId"/>
+                <order-by field-name="emplPositionIdManagedBy"/>
+            </entity-condition>
         </actions>
         <auto-fields-service service-name="updateEmplPositionReportingStruct"/>        
-        <field name="emplPositionIdReportingTo" title="${uiLabelMap.HumanResEmplPositionIdReportingTo}"><display /></field>        
-        <field name="emplPositionIdReportingFrom" title="${uiLabelMap.HumanResEmplPositionIdReportingFrom}"><display /></field>
-        <field name="fromDate" title="fromDate"><display /></field>
+        <field name="emplPositionId"><hidden value="${parameters.emplPositionId}"/></field>
+        <field name="emplPositionIdReportingTo"><display/></field>        
+        <field name="emplPositionIdManagedBy"><display/></field>
+        <field name="fromDate"><display/></field>
+        <field name="comments"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/> </field>
         <field name="deleteLink" title="${uiLabelMap.CommonDelete}" widget-style="buttontext">
-            <hyperlink target="deleteEmplPositionReportingStruct?emplPositionIdReportingTo=${emplPositionIdReportingTo}&amp;emplPositionIdReportingFrom=${emplPositionIdReportingFrom}&amp;fromDate=${fromDate}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+            <hyperlink target="deleteEmplPositionReportingStruct?emplPositionIdReportingTo=${emplPositionIdReportingTo}&amp;emplPositionIdManagedBy=${emplPositionIdManagedBy}&amp;fromDate=${fromDate}&amp;emplPositionId=${parameters.emplPositionId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
         </field>        
     </form>
-    <form name="EditEmplPositionReportingStruct" type="single" target="createEmplPositionReportingStruct" title=""
+    <form name="EditReportsToEmplPositionReportingStruct" type="single" target="createEmplPositionReportingStruct" title=""
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-service service-name="createEmplPositionReportingStruct"/>
-        <field name="emplPositionId"><hidden /></field>
-        <field name="emplPositionIdReportingTo" title="${uiLabelMap.HumanResEmplPositionIdReportingTo}" tooltip="${uiLabelMap.CommonRequired}"><lookup target-form-name="LookupEmplPosition"/></field>
-        <field name="emplPositionIdManagedBy" title="${uiLabelMap.HumanResEmplPositionIdManagedBy}" tooltip="${uiLabelMap.CommonRequired}"><lookup target-form-name="LookupEmplPosition"/></field>
-        <field name="fromDate" title="${uiLabelMap.CommonDate}" tooltip="${uiLabelMap.CommonRequired}"/>
+        <field name="emplPositionId"><hidden value="${parameters.emplPositionId}"/></field>
+        <field name="emplPositionIdReportingTo" tooltip="${uiLabelMap.CommonRequired}"><lookup target-form-name="LookupEmplPosition"/></field>
+        <field name="emplPositionIdManagedBy" tooltip="${uiLabelMap.CommonRequired}"><hidden value="${parameters.emplPositionId}"/></field>
+        <field name="fromDate" tooltip="${uiLabelMap.CommonRequired}"/>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
     </form>      
-    
+    <form name="ListReportedToEmplPositionReportingStructs" type="list" target="updateEmplPositionReportingStruct" title="" paginate-target="EditReportedToEmplPositionReportingStruct"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <actions>
+            <entity-condition entity-name="EmplPositionReportingStruct" list-name="emplPositionReportingStructList">
+                <condition-expr field-name="emplPositionIdReportingTo" env-name="parameters.emplPositionId"/>
+                <order-by field-name="emplPositionIdReportingTo"/>
+            </entity-condition>
+        </actions>
+        <auto-fields-service service-name="updateEmplPositionReportingStruct"/>
+        <field name="emplPositionId"><hidden value="${parameters.emplPositionId}"/></field>
+        <field name="emplPositionIdManagedBy"><display/></field>
+        <field name="emplPositionIdReportingTo"><display/></field>
+        <field name="fromDate"><display/></field>
+        <field name="comments"><text/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/> </field>
+        <field name="deleteLink" title="${uiLabelMap.CommonDelete}" widget-style="buttontext">
+            <hyperlink target="deleteEmplPositionReportingStruct?emplPositionIdReportingTo=${emplPositionIdReportingTo}&amp;emplPositionIdManagedBy=${emplPositionIdManagedBy}&amp;fromDate=${fromDate}&amp;emplPositionId=${parameters.emplPositionId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>
+    <form name="EditReportedToEmplPositionReportingStruct" type="single" target="createEmplPositionReportingStruct" title=""
+        header-row-style="header-row" default-table-style="basic-table">
+        <auto-fields-service service-name="createEmplPositionReportingStruct"/>
+        <field name="emplPositionId"><hidden value="${parameters.emplPositionId}"/></field>
+        <field name="emplPositionIdReportingTo"><hidden value="${parameters.emplPositionId}"/></field>
+        <field name="emplPositionIdManagedBy" tooltip="${uiLabelMap.CommonRequired}"><lookup target-form-name="LookupEmplPosition"/></field>
+        <field name="fromDate" tooltip="${uiLabelMap.CommonRequired}"/>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
+    </form>
     <form name="ListEmplPositionResponsibilities" type="list" target="updateEmplPositionResponsibility" title="" paginate-target="findEmplPositionResponsibilities"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>