ilscipio/scipio-erp

View on GitHub
applications/humanres/widget/forms/EmployeeForms.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->

<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
    <form name="NewEmployee" type="single" target="createEmployee"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="salutation" title="${uiLabelMap.CommonTitle}"><text size="10" maxlength="30"/></field>
        <field name="firstName" required-field="true"><text/></field>
        <field name="middleName" title="${uiLabelMap.PartyMiddleInitial}"><text size="4" maxlength="4"/></field>
        <field name="lastName" required-field="true"><text/></field>
        <field name="partyIdFrom" title="${uiLabelMap.OrderOrderEntryInternalOrganization}"><!-- SCIPIO: NOT required:  required-field="true" -->
            <drop-down allow-empty="true">
                <entity-options entity-name="PartyRoleNameDetail" key-field-name="partyId" description="${groupName}">
                    <entity-constraint name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO"/>
                </entity-options>
                <!--<option key="null" description="${uiLabelMap.HumanResEmplPartyIdFromNotSpecified}"/> SCIPIO: TODO: REVIEW: what was purpose, over sending empty? -->
            </drop-down>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><date-time/></field>
        <field name="permanentAddress" title="${uiLabelMap.OrderAddress}" title-area-style="group-label">
            <display description=" " also-hidden="false"/>
        </field>
        <field name="postalAddContactMechPurpTypeId"><hidden value="PRIMARY_LOCATION"/></field>
        <field name="address1" title="${uiLabelMap.CommonAddress1}" required-field="true"><text size="30" maxlength="60"/></field>
        <field name="address2" title="${uiLabelMap.CommonAddress2}"><text size="30" maxlength="60"/></field>
        <field name="city" title="${uiLabelMap.CommonCity}" required-field="true"><text size="30" maxlength="60"/></field>
        <field name="postalCode" title="${uiLabelMap.CommonZipPostalCode}" required-field="true"><text size="10" maxlength="30"/></field>
        <field name="countryGeoId" title="${uiLabelMap.CommonCountry}" required-field="true">
            <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName} - ${geoId}">
                    <entity-constraint name="geoTypeId" value="COUNTRY"/>
                    <entity-order-by field-name="geoName"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="stateProvinceGeoId" title="${uiLabelMap.CommonState}" required-field="false">
            <drop-down allow-empty="true"/><!-- SCIPIO: populate via ajax now -->
        </field>
        <field name="phoneTitle" title="${uiLabelMap.PartyPrimaryPhone}" title-area-style="group-label"><display/></field>
        <field name="countryCode" title="${uiLabelMap.CommonCountryCode}"><text size="4" maxlength="10"/></field>
        <field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
        <field name="contactNumber" title="${uiLabelMap.PartyPhoneNumber}" required-field="true"><text size="15" maxlength="15"/></field>
        <field name="extension" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
        <field name="emailAddressTitle" title="${uiLabelMap.PartyEmailAddress}" title-area-style="group-label"><display/></field>
        <field name="emailAddress" title="${uiLabelMap.CommonEmail}"><text size="50" maxlength="60"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonSave}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
    </form>
    <form name="AddEmployeeSkills" type="single" target="createEmployeeSkill" default-map-name="partySkill">
        <field name="partyId"><hidden/></field>
        <field name="skillTypeId" required-field="true">
            <drop-down>
                <entity-options description="${description}" entity-name="SkillType">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="yearsExperience"><text/></field>
        <field name="rating"><text/></field>
        <field name="skillLevel"><text/></field>
        <field name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>
    <form name="ListEmployeeSkills" type="list" list-name="listIt" use-row-submit="true" separate-columns="true" target="updateEmployeeSkill" paginate-target="FindPartySkills"
        odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="PartySkill">
                <condition-expr field-name="partyId" from-field="partyId"/>
                <order-by field-name="skillTypeId"/>
            </entity-condition>
        </actions>
        <auto-fields-service default-field-type="hidden" service-name="updatePartySkill"/>
        <field name="skillTypeId">
            <display-entity entity-name="SkillType" description="${description}"/>
        </field>
        <field name="yearsExperience"><text/></field>
        <field name="rating"><text/></field>
        <field name="skillLevel"><text/></field>
        <field name="deleteAction" title="${uiLabelMap.CommonDelete}" widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteEmployeeSkill" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="skillTypeId"/>
                <parameter param-name="partyId"/>
            </hyperlink>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
    </form>
    <form name="AddEmployeeQualification" type="single" target="createEmployeeQualification">
        <auto-fields-service service-name="createPartyQual"/>
        <field name="partyId"><hidden/></field>
        <field name="partyQualTypeId" required-field="true">
            <drop-down allow-empty="true">
                <entity-options description="${description}" key-field-name="partyQualTypeId" entity-name="PartyQualType">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}">
            <drop-down allow-empty="true">
                <entity-options description="${description}" key-field-name="statusId" entity-name="StatusItem">
                    <entity-constraint name="statusTypeId" operator="equals" value="PARTY_INV_STATUS"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="verifStatusId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" key-field-name="statusId" entity-name="StatusItem">
                    <entity-constraint name="statusTypeId" operator="equals" value="PARTYQUAL_VERIFY"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>
    <form name="ListEmployeeQualification" type="list" list-name="listIt" use-row-submit="true" separate-columns="true" target="updateEmployeeQualification" paginate-target="FindPartyQuals"
            odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="PartyQual">
                <condition-expr field-name="partyId" from-field="partyId"/>
                <order-by field-name="fromDate"/>
            </entity-condition>
        </actions>
        <auto-fields-service service-name="updatePartyQual"/>
        <field name="partyId"><hidden/></field>
        <field name="partyQualTypeId"><display-entity entity-name="PartyQualType" description="${description}"/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}" ><display/></field>
        <field name="qualificationDesc"><text/></field>
        <field name="title"><text/></field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}">
            <drop-down allow-empty="true">
                <entity-options description="${description}" key-field-name="statusId" entity-name="StatusItem">
                    <entity-constraint name="statusTypeId" operator="equals" value="PARTY_INV_STATUS"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="verifStatusId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" key-field-name="statusId" entity-name="StatusItem">
                    <entity-constraint name="statusTypeId" operator="equals" value="PARTYQUAL_VERIFY"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><hidden value="Y"/></field>
        <field name="deleteAction" title="${uiLabelMap.CommonDelete}" widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteEmployeeQualification" also-hidden="false" description="${uiLabelMap.CommonDelete}">
                <parameter param-name="partyId"/>
                <parameter param-name="partyQualTypeId"/>
                <parameter param-name="fromDate"/>
            </hyperlink>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonSubmit}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit/></field>
    </form>
    <form name="AddEmployeeTraining" type="single" target="createEmployeeTraining">
        <field name="partyId"><hidden/></field>
        <field name="trainingClassTypeId" required-field="true">
            <drop-down allow-empty="false">
                <entity-options description="${description}" entity-name="TrainingClassType">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}" ><date-time type="timestamp"/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2"><date-time type="timestamp"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>
    <form name="AddEmplLeave" type="single" target="createEmplLeave">
        <auto-fields-service service-name="updateEmplLeave" map-name="leaveApp"/>
        <field name="partyId"><hidden/></field>
        <field name="leaveTypeId" required-field="true">
            <drop-down allow-empty="true">
                <entity-options description="${description}" key-field-name="leaveTypeId" entity-name="EmplLeaveType"/>
            </drop-down>
        </field>
        <field name="emplLeaveReasonTypeId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" key-field-name="emplLeaveReasonTypeId" entity-name="EmplLeaveReasonType"/>
            </drop-down>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}" required-field="true"><date-time type="timestamp"></date-time></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2" required-field="true"><date-time type="timestamp"></date-time></field>
        <field name="leaveStatus"><hidden value="LEAVE_CREATED"/></field>
        <field name="approverPartyId" required-field="true"><lookup target-form-name="LookupPartyName"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>
    <form name="ListEmplLeaves" type="list" list-name="listIt" separate-columns="true" target="updateEmplLeave" paginate-target="FindEmplLeaves"
        odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="EmplLeave">
                <condition-expr field-name="partyId" from-field="partyId"/>
                <order-by field-name="fromDate"/>
            </entity-condition>
        </actions>
        <auto-fields-service service-name="updateEmplLeave"/>
        <field name="partyId"><hidden/></field>
        <field name="approverPartyId"><lookup target-form-name="LookupPartyName"/></field>
        <field name="leaveStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
        <field name="emplLeaveReasonTypeId"><display/></field>
        <field name="leaveTypeId"><display-entity description="${description}" entity-name="EmplLeaveType"/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}" ></field>
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></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" description="[${employmentData.employment.partyIdFrom}]" target-type="inter-app" link-style="${styles.link_nav_info_id}">
                    <parameter param-name="partyId" from-field="employmentData.employment.partyIdFrom"/>
                </sub-hyperlink>
            </display-entity>
        </field>
        <field name="position" entry-name="emplPositionType.emplPositionTypeId" widget-style="${styles.link_nav_info_desc} ${styles.action_view}">
            <hyperlink target="emplPositionView" description="${employmentData.emplPositionType.description} [${employmentData.emplPosition.emplPositionId}]">
                <parameter param-name="emplPositionId" from-field="employmentData.emplPosition.emplPositionId"/>
            </hyperlink>
        </field>
        <field name="salary" entry-name="emplPositionRateAmount.rateAmount">
            <display type="currency" currency="${employmentData.emplPositionRateAmount.rateCurrencyUomId}"/>
        </field>
    </form>
    <form name="PayrollHistoryList" type="list" list-name="payroll" extends="ListInvoices" extends-resource="component://accounting/widget/invoice/InvoiceForms.xml" paginate-target="PayrollHistory">
        <field name="invoiceId" widget-style="${styles.link_nav_info_id}" sort-field="true">
            <hyperlink description="${invoiceId}" target="/accounting/control/invoiceOverview" target-type="inter-app">
                <parameter param-name="invoiceId"/>
            </hyperlink>
        </field>
    </form>
</forms>