svn commit: r659814 - in /ofbiz/trunk/applications/humanres: script/org/ofbiz/humanres/HumanResServices.xml script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml servicedef/services.xml widget/EmploymentScreens.xml widget/forms/EmploymentForms.xml

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

svn commit: r659814 - in /ofbiz/trunk/applications/humanres: script/org/ofbiz/humanres/HumanResServices.xml script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml servicedef/services.xml widget/EmploymentScreens.xml widget/forms/EmploymentForms.xml

mor-2
Author: mor
Date: Sat May 24 06:08:33 2008
New Revision: 659814

URL: http://svn.apache.org/viewvc?rev=659814&view=rev
Log:
cleanup in createEmployee service. Now this service calls a simple method createPersonRoleAndContactMechs which is more generic which  is also done in other services like createLead, createContact in sfa

Removed:
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml
Modified:
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml
    ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
    ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml

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=659814&r1=659813&r2=659814&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Sat May 24 06:08:33 2008
@@ -515,25 +515,8 @@
     </simple-method>
     
     <simple-method method-name="createEmployee" short-description="Create New Employee">
-        <if-not-empty field-name="generalAddressLine1" map-name="parameters">
-            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="postalAddressGeneral" in-map-name="parameters" out-map-name="partyPostalAddressCtx"/>                  
-        </if-not-empty>
-        <if-not-empty field-name="workContactNumber" map-name="parameters">
-            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="workPhoneNumber" in-map-name="parameters" out-map-name="workTelecomCtx"/>            
-        </if-not-empty>
-        <if-not-empty field-name="mobileContactNumber" map-name="parameters">
-            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="mobileNumber" in-map-name="parameters" out-map-name="mobileTelecomCtx"/>            
-        </if-not-empty>
-        <if-not-empty field-name="otherEmail" map-name="parameters">
-            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="otherEmail" in-map-name="parameters" out-map-name="partyEmailCtx"/>            
-        </if-not-empty>
-        <check-errors/>
-        
-        <set field="partyTypeId" value="PERSON"/>
         <set field="parameters.roleTypeId" value="EMPLOYEE"/>
         <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
-        <field-to-result field-name="partyId"/>
-        
         <if-not-empty field-name="parameters.partyIdFrom">
             <set field="partyRelationshipCtx.partyId" from-field="partyId"/>
             <set field="partyRelationshipCtx.partyIdFrom" from-field="parameters.partyIdFrom"/>
@@ -548,39 +531,7 @@
             </if-empty>
             <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipCtx"/>
         </if-not-empty>
-        
-        <if-not-empty field-name="generalAddressLine1" map-name="parameters">
-            <set field="partyPostalAddressCtx.partyId" from-field="partyId"/>
-            <set field="partyPostalAddressCtx.contactMechPurposeTypeId" value="GENERAL_LOCATION"/>
-            <call-service service-name="createPartyPostalAddress" in-map-name="partyPostalAddressCtx">
-                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
-            </call-service>    
-        </if-not-empty>                      
-        
-        <if-not-empty field-name="workContactNumber" map-name="parameters">
-            <set field="workTelecomCtx.partyId" from-field="partyId"/>
-            <set field="workTelecomCtx.contactMechPurposeTypeId" value="PHONE_WORK"/>  
-            <call-service service-name="createPartyTelecomNumber" in-map-name="workTelecomCtx">
-                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
-            </call-service>
-        </if-not-empty>
-
-        <if-not-empty field-name="mobileContactNumber" map-name="parameters">
-            <set field="mobileTelecomCtx.partyId" from-field="partyId"/>
-            <set field="mobileTelecomCtx.contactMechPurposeTypeId" value="PHONE_MOBILE"/>  
-            <call-service service-name="createPartyTelecomNumber" in-map-name="mobileTelecomCtx">
-                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
-            </call-service>
-        </if-not-empty>
-        
-        <if-not-empty field-name="otherEmail" map-name="parameters">
-            <set field="partyEmailCtx.partyId" from-field="partyId"/>
-            <set field="partyEmailCtx.contactMechPurposeTypeId" value="OTHER_EMAIL"/>
-            <call-service service-name="createPartyEmailAddress" in-map-name="partyEmailCtx">
-                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
-            </call-service>  
-        </if-not-empty>                  
-        
+        <field-to-result field-name="partyId"/>
     </simple-method>
     
     <!-- Responsibility Types -->

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=659814&r1=659813&r2=659814&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Sat May 24 06:08:33 2008
@@ -563,25 +563,10 @@
         <auto-attributes entity-name="TelecomNumber" mode="IN" optional="true">
             <exclude field-name="contactMechId"/>
         </auto-attributes>
-        <attribute name="partyId" type="String" mode="OUT"/>
-        <attribute name="postalAddContactMechPurpTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="emailAddress" type="String" mode="IN" optional="true"/>
-        <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
-        <attribute name="generalAddressLine1" type="String" mode="IN" optional="true"/>
-        <attribute name="generalAddressLine2" type="String" mode="IN" optional="true"/>
-        <attribute name="generalCity" type="String" mode="IN" optional="true"/>
-        <attribute name="generalState" type="String" mode="IN" optional="true"/>  
-        <attribute name="generalCountry" type="String" mode="IN" optional="true"/>                                  
-        <attribute name="generalPostalCode" type="String" mode="IN" optional="true"/>
-        <attribute name="workCountryCode" type="String" mode="IN" optional="true"/>
-        <attribute name="workAreaCode" type="String" mode="IN" optional="true"/>
-        <attribute name="workContactNumber" type="String" mode="IN" optional="true"/>
-        <attribute name="workExtension" type="String" mode="IN" optional="true"/>
-        <attribute name="mobileCountryCode" type="String" mode="IN" optional="true"/>        
-        <attribute name="mobileAreaCode" type="String" mode="IN" optional="true"/>        
-        <attribute name="mobileContactNumber" type="String" mode="IN" optional="true"/>        
-        <attribute name="mobileExtension" type="String" mode="IN" optional="true"/>                                
-        <attribute name="otherEmail" type="String" mode="IN" optional="true"/>                                        
+        <attribute name="fromDate" type="String" mode="IN" optional="true"/>
+        <attribute name="postalAddContactMechPurpTypeId" type="String" mode="IN" optional="false"/>
+        <attribute name="partyId" type="String" mode="OUT"/>
     </service>
     
     <service name="createResponsibilityType" default-entity-name="ResponsibilityType" engine="simple"

Modified: ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml?rev=659814&r1=659813&r2=659814&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml Sat May 24 06:08:33 2008
@@ -475,6 +475,7 @@
             <actions>
                 <set field="titleProperty" value="PartyCreateNewEmployee"/>
                 <set field="headerItem" value="Employee"/>
+                <property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/>
             </actions>            
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml?rev=659814&r1=659813&r2=659814&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml Sat May 24 06:08:33 2008
@@ -431,11 +431,11 @@
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>        
     </form>
     <form name="CreateEmployee" type="single" target="createEmployee"
-        header-row-style="header-row" default-table-style="basic-table">
-        <field name="salutation" title="${uiLabelMap.CommonTitle}"><text/></field>
-        <field name="firstName" title="${uiLabelMap.PartyFirstName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30"/></field>
-        <field name="middleName" title="${uiLabelMap.PartyMiddleInitial}"><text/></field>
-        <field name="lastName" title="${uiLabelMap.PartyLastName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30"/></field>
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="salutation" title="${uiLabelMap.CommonTitle}"><text size="10" maxlength="30"/></field>
+        <field name="firstName" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
+        <field name="middleName" title="${uiLabelMap.PartyMiddleInitial}"><text size="4" maxlength="4"/></field>
+        <field name="lastName" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
         <field name="partyIdFrom" title="${uiLabelMap.OrderOrderEntryInternalOrganziation}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
             <drop-down allow-empty="true">
                 <entity-options entity-name="PartyRole" key-field-name="partyId" description="${partyId}">
@@ -467,46 +467,14 @@
                 </entity-options>
             </drop-down>
         </field>
-        <field name="generalAddress" title="${uiLabelMap.PartyGeneralCorrespondenceAddress}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
-        <field name="generalAddressLine1" title="${uiLabelMap.CommonAddress1}"><text size="30" maxlength="60"/></field>
-        <field name="generalAddressLine2" title="${uiLabelMap.CommonAddress2}"><text size="30" maxlength="60"/></field>        
-        <field name="generalCity" title="${uiLabelMap.CommonCity}"><text size="30" maxlength="60"/></field>
-        <field name="generalState" title="${uiLabelMap.CommonState}">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId} - ${geoName}">
-                    <entity-constraint name="geoTypeId" operator="in" value="STATE,PROVINCE"/>
-                    <entity-order-by field-name="geoId"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="generalPostalCode" title="${uiLabelMap.CommonZipPostalCode}"><text size="10" maxlength="30"/></field>
-        <field name="generalCountry" title="${uiLabelMap.CommonCountry}">
-            <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
-                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId}: ${geoName}">
-                    <entity-constraint name="geoTypeId" value="COUNTRY"/>
-                    <entity-order-by field-name="geoId"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="homePhone" title="${uiLabelMap.PartyHomePhone}" title-area-style="group-label"><display/></field>
+        <field name="phoneTitle" title="${uiLabelMap.PartyPrimaryPhone}" title-area-style="group-label"><display/></field>
         <field name="countryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
         <field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
         <field name="contactNumber" title="${uiLabelMap.PartyPhoneNumber}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="15" maxlength="15"/></field>
         <field name="extension" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
-        <field name="workPhone" title="${uiLabelMap.PartyContactWorkPhoneNumber}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
-        <field name="workCountryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
-        <field name="workAreaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
-        <field name="workContactNumber" title="${uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></field>
-        <field name="workExtension" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
-        <field name="mobilePhone" title="${uiLabelMap.PartyContactMobilePhoneNumber}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
-        <field name="mobileCountryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
-        <field name="mobileAreaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
-        <field name="mobileContactNumber" title="${uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></field>
-        <field name="mobileExtension" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
-        <field name="EmailAddress" title="${uiLabelMap.PartyEmailAddress}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
-        <field name="emailAddress" title="${uiLabelMap.PartyEmailAddress}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="60" maxlength="250"/></field>
-        <field name="otherEmail" title="${uiLabelMap.PartyOtherEmailAddress}"><text size="60" maxlength="250"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field>
+        <field name="emailAddressTitle" title="${uiLabelMap.PartyEmailAddress}" title-area-style="group-label"><display/></field>
+        <field name="emailAddress" title="${uiLabelMap.CommonEmail}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="50" maxlength="60"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>    
     <form name="FindEmploymentApps" type="single" target="FindEmploymentApp" header-row-style="header-row" default-table-style="basic-table" default-map-name="employmentApp">
         <actions>