Commit 814afdd4 authored by holivier's avatar holivier

Add field ChangeDate for EditPayHistory

and correction in ListPayHistories and EmploymentMenu to retrieve fromDate form emplFromDate or fromDate depending from what is in parameters
parent 7bd98b4a
@@ -19,26 +19,56 @@
@@ -19,26 +19,61 @@
-->
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -43,8 +43,13 @@
+ <set-service-fields service-name="expirePayHistory" map="parameters" to-map="expirePayHistoryMap"/>
+ <call-service service-name="expirePayHistory" in-map-name="expirePayHistoryMap"/>
+ <set-service-fields service-name="createPayHistory" map="parameters" to-map="createPayHistoryMap"/>
+ <now-timestamp field="nowTimeStamp"/>
+ <set field="createPayHistoryMap.fromDate" from-field="nowTimeStamp"/>
+ <if-empty field="parameters.changeDate">
+ <now-timestamp field="nowTimeStamp"/>
+ <set field="createPayHistoryMap.fromDate" from-field="nowTimeStamp"/>
+ <else>
+ <set field="createPayHistoryMap.fromDate" from-field="parameters.changeDate"/>
+ </else>
+ </if-empty>
+ <call-service service-name="createPayHistory" in-map-name="createPayHistoryMap"/>
+ </else>
+ </if>
......@@ -57,7 +62,7 @@
<set-nonpk-fields map="parameters" value-field="newEntity"/>
<if-empty field="newEntity.fromDate">
<now-timestamp field="nowTimeStamp"/>
@@ -78,12 +108,24 @@
@@ -78,12 +113,24 @@
<call-service service-name="createPartyRelationship" in-map-name="partyRelationshipCtx"/>
</if-not-empty>
<field-to-result field="partyId"/>
......@@ -82,7 +87,7 @@
<field-map field-name="emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
<field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
</entity-and>
@@ -97,25 +139,33 @@
@@ -97,25 +144,33 @@
<set-pk-fields map="parameters" value-field="newEntity"/>
<if-empty field="newEntity.fromDate"><now-timestamp field="newEntity.fromDate"/></if-empty>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
......@@ -122,7 +127,7 @@
<make-value entity-name="EmplLeave" value-field="newEntity"/>
<set-pk-fields value-field="newEntity" map="parameters"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
@@ -192,13 +242,15 @@
@@ -192,13 +247,15 @@
<simple-method method-name="createSalaryStep" short-description="Create a Salary Step">
<make-value entity-name="SalaryStep" value-field="newEntity"/>
......
......@@ -25,7 +25,7 @@
<service name="updateEmployment" engine="entity-auto" default-entity-name="Employment" invoke="update" auth="true">
<description>Update an Employment</description>
<permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
@@ -243,17 +250,19 @@
@@ -243,17 +250,20 @@
<permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
......@@ -39,6 +39,7 @@
<permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
+ <attribute name="changeDate" mode="IN" type="Timestamp" optional="true"/>
+ <attribute name="fromDate" mode="OUT" type="Timestamp"/>
</service>
......@@ -46,7 +47,7 @@
<description>Delete Pay History</description>
<permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
@@ -568,21 +577,22 @@
@@ -568,21 +578,22 @@
<description>Update Valid EmplPositionTypeRate</description>
<permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
......
@@ -252,17 +252,27 @@
@@ -33,55 +33,58 @@
<menu-item name="PartyResume" title="${uiLabelMap.HumanResPartyResume}"><link target="FindPartyResumes"/></menu-item>
<menu-item name="Leave" title="${uiLabelMap.HumanResEmplLeave}"><link target="FindEmplLeaves"/></menu-item>
<menu-item name="GlobalHRSettings" title="${uiLabelMap.HumanResGlobalHRSettings}" selected-style="selected"><link target="globalHRSettings"/></menu-item>
</menu>
<menu name="EmploymentBar" default-menu-item-name="EditPartyBenefit" default-selected-style="selected"
type="simple" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="tabButtonItem">
+ <actions>
+ <set field="emplFromDate" from-field="parameters.emplFromDate" default-value="${parameters.fromDate}"/>
+ </actions>
<menu-item name="EditEmployment" title="${uiLabelMap.HumanResEmployment}">
<link target="EditEmployment" >
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditPartyBenefit" title="${uiLabelMap.HumanResEditPartyBenefit}">
<link target="EditPartyBenefits" >
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditPayrollPreference" title="${uiLabelMap.HumanResEditPayrollPreference}">
<link target="EditPayrollPreferences" >
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditPayHistory" title="${uiLabelMap.HumanResEditPayHistory}">
<link target="ListPayHistories" >
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditUnemploymentClaims" title="${uiLabelMap.HumanResEditUnemploymentClaim}">
<link target="EditUnemploymentClaims" >
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditAgreementEmploymentAppls" title="${uiLabelMap.HumanResAgreementEmploymentAppl}">
<link target="EditAgreementEmploymentAppls">
<parameter param-name="agreementId"/>
<parameter param-name="agreementItemSeqId"/>
@@ -252,17 +255,27 @@
default-menu-item-name="EditEmplPositionType" selected-menuitem-context-field-name="tabButtonItem2">
<menu-item name="EditEmplPositionType" title="${uiLabelMap.HumanResEmplPositionType}">
<link target="EditEmplPositionTypes">
......
......@@ -21,7 +21,7 @@
<field name="fromDate" use-when="employment!=null" title="${uiLabelMap.CommonFromDate}"><display default-value="${nowTimestamp}"/></field>
<field name="thruDate" use-when="employment!=null" title="${uiLabelMap.CommonThruDate}"><date-time/></field>
+ <!-- For PayHistory -->
+ <field name="amount" use-when="employment==null"><text/></field>
+ <field name="amount" use-when="employment==null" required-field="true"><text/></field>
+ <field name="comments" use-when="employment==null"><text/></field>
+ <field name="payGradeId" use-when="employment==null" title="${uiLabelMap.HumanResPayGradeID}"><lookup target-form-name="LookupPayGrade" size="20"/></field>
+ <field name="salaryStepSeqId" use-when="employment==null" title="${uiLabelMap.HumanResSalaryStepSeqId}"><lookup target-form-name="LookupSalaryStep" size="20"/></field>
......@@ -39,7 +39,7 @@
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
@@ -145,50 +158,72 @@
@@ -145,50 +158,74 @@
<field name="submitButton" use-when="employment==null" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
<field name="submitButton" use-when="employment!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
......@@ -47,6 +47,7 @@
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<actions>
- <entity-condition entity-name="PayHistory" filter-by-date="true">
+ <set field="emplFromDate" from-field="parameters.emplFromDate" default-value="${parameters.fromDate}"/>
+ <entity-condition entity-name="PayHistory">
<condition-list combine="and">
<condition-expr field-name="roleTypeIdFrom" operator="equals" from-field="parameters.roleTypeIdFrom"/>
......@@ -54,7 +55,7 @@
<condition-expr field-name="partyIdFrom" operator="equals" from-field="parameters.partyIdFrom"/>
<condition-expr field-name="partyIdTo" operator="equals" from-field="parameters.partyIdTo"/>
- <condition-expr field-name="fromDate" operator="equals" from-field="parameters.fromDate"/>
+ <condition-expr field-name="emplFromDate" operator="equals" from-field="parameters.fromDate"/>
+ <condition-expr field-name="emplFromDate" operator="equals" from-field="emplFromDate"/>
</condition-list>
+ <order-by field-name="fromDate"/>
</entity-condition>
......@@ -75,9 +76,8 @@
- <entity-order-by field-name="description"/>
- </entity-options>
- </drop-down>
+ <field name="fromDate" use-when="${groovy:thruDate != null}"><display/></field>
+ <field name="fromDate" use-when="${groovy:thruDate == null}">
+ <hyperlink description="${fromDate}" target="EditPayHistory" also-hidden="false">
+ <field name="editLink" title=" " widget-style="buttontext" use-when="${groovy:thruDate == null}">
+ <hyperlink description="${uiLabelMap.CommonEdit}" target="EditPayHistory">
+ <parameter param-name="roleTypeIdFrom"/>
+ <parameter param-name="roleTypeIdTo"/>
+ <parameter param-name="partyIdFrom"/>
......@@ -87,6 +87,8 @@
+ </hyperlink>
</field>
- <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
- <field name="deleteLink" title=" " widget-style="buttontext">
+ <field name="fromDate" ><display/></field>
+ <field name="thruDate"><display/></field>
+ <field name="amount"><display/></field>
+ <field name="periodTypeId" title="${uiLabelMap.FormFieldTitle_periodTypeId}"><display-entity entity-name="PeriodType"/></field>
......@@ -94,7 +96,7 @@
+ <field name="salaryStepSeqId" title="${uiLabelMap.HumanResSalaryStepSeqId}"><display/></field>
+ <field name="salaryStepSeqId" title="${uiLabelMap.HumanResSalaryStepSeqId}"><display/></field>
+ <field name="comments"><display/></field>
<field name="deleteLink" title=" " widget-style="buttontext">
+ <field name="deleteLink" title=" " widget-style="buttontext" use-when="${groovy:thruDate == null}">
<hyperlink description="${uiLabelMap.CommonDelete}" target="expirePayHistory">
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
......@@ -111,7 +113,8 @@
+ <field name="partyIdFrom" ><hidden/></field>
+ <field name="partyIdTo" ><hidden/></field>
+ <field name="emplFromDate" ><hidden/></field>
+ <field name="fromDate"><display/></field>
+ <field name="fromDate"><hidden/></field>
+ <field name="changeDate"><date-time/></field>
+ <field name="amount"><text/></field>
+ <field name="periodTypeId" title="${uiLabelMap.FormFieldTitle_periodTypeId}" position="2">
+ <drop-down allow-empty="false">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment