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}&emplPositionIdReportingFrom=${emplPositionIdReportingFrom}&fromDate=${fromDate}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/> + <hyperlink target="deleteEmplPositionReportingStruct?emplPositionIdReportingTo=${emplPositionIdReportingTo}&emplPositionIdManagedBy=${emplPositionIdManagedBy}&fromDate=${fromDate}&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}&emplPositionIdManagedBy=${emplPositionIdManagedBy}&fromDate=${fromDate}&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> |
Free forum by Nabble | Edit this page |