svn commit: r1821028 [3/3] - in /ofbiz/ofbiz-framework/trunk/applications: content/template/content/ content/template/website/ product/config/ product/groovyScripts/facility/facility/ product/widget/facility/ workeffort/minilang/workeffort/

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

svn commit: r1821028 [3/3] - in /ofbiz/ofbiz-framework/trunk/applications: content/template/content/ content/template/website/ product/config/ product/groovyScripts/facility/facility/ product/widget/facility/ workeffort/minilang/workeffort/

jleroux@apache.org
Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy?rev=1821028&r1=1821027&r2=1821028&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacility.groovy Fri Jan 12 20:06:03 2018
@@ -20,9 +20,6 @@
 
 findResult = from("Facility").queryList()
 findResultSize = findResult.size()
-if (findResultSize == 0) {
-    context.showScreen = "none"
-}
 if (findResultSize == 1) {
     context.showScreen = "one"
     context.facility = findResult.get(0)

Modified: ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=1821028&r1=1821027&r2=1821028&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml Fri Jan 12 20:06:03 2018
@@ -31,6 +31,7 @@ under the License.
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
+                        <label style="h3" text="${uiLabelMap.ProductOnlyOneFacility}"/>
                         <section>
                             <condition>
                                 <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/>
@@ -38,40 +39,6 @@ under the License.
                             <widgets>
                                 <section>
                                     <condition>
-                                        <if-compare field="showScreen" value="none" operator="equals"/>
-                                    </condition>
-                                    <widgets>
-                                        <section>
-                                            <condition>
-                                                <if-service-permission service-name="facilityGenericPermission" main-action="CREATE"/>
-                                            </condition>
-                                            <widgets>
-                                                <include-menu name="FacilityTabBar" location="component://product/widget/facility/FacilityMenus.xml"/>
-                                                <section>
-                                                    <widgets>
-                                                        <container style="button-bar">
-                                                            <link target="/workeffort/control/calendar" text="${uiLabelMap.CommonViewCalendar}" style="buttontext" url-mode="inter-app">
-                                                                <parameter param-name="facilityId"/>
-                                                                <parameter param-name="externalLoginKey" from-field="parameters.externalLoginKey"/>
-                                                            </link>
-                                                        </container>
-                                                        <label style="h1">${uiLabelMap.ProductEditFacility} ${facility.facilityName} [${facilityId}]</label>
-                                                        <platform-specific><html><html-template location="component://product/template/facility/EditFacility.ftl"/></html></platform-specific>
-                                                    </widgets>
-                                                    <fail-widgets>
-                                                        <label style="h1">${uiLabelMap.ProductNewFacility}"</label>
-                                                        <platform-specific><html><html-template location="component://product/template/facility/EditFacility.ftl"/></html></platform-specific>
-                                                    </fail-widgets>
-                                                </section>
-                                            </widgets>
-                                            <fail-widgets>
-                                                <label style="h3">${uiLabelMap.ProductFacilityViewPermissionError}</label>
-                                            </fail-widgets>
-                                        </section>
-                                    </widgets>
-                                </section>
-                                <section>
-                                    <condition>
                                         <if-compare field="showScreen" value="one" operator="equals"/>
                                     </condition>
                                     <actions>

Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml?rev=1821028&r1=1821027&r2=1821028&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml Fri Jan 12 20:06:03 2018
@@ -453,8 +453,10 @@ under the License.
         <!-- If we already have a new contactMechId don't update ContactMech -->
         <if-empty field="parameters.newContactMechId">
             <log level="info" message="Calling map procs"/>
+            <call-map-processor xml-resource="component://party/minilang/contact/ContactMechMapProcs.xml"
+                processor-name="updateContactMech" in-map-name="parameters" out-map-name="context"/>
+            <to-string field="context.contactMechId"/>
             <log level="info" message="Calling generic updateContactMech method"/>
-            <set-service-fields service-name="updateContactMech" map="parameters" to-map="context"/>
             <call-service service-name="updateContactMech" in-map-name="context">
                 <default-message property="PartyContactMechanismSuccessfullyUpdated" resource="PartyUiLabels"/>
                 <result-to-field result-name="contactMechId" field="newWorkEffortContactMech.contactMechId"/>
@@ -479,7 +481,7 @@ under the License.
     <simple-method method-name="createWorkEffortPostalAddress" short-description="Create a PostalAddress for WorkEffort">
         <make-value entity-name="WorkEffortContactMech" value-field="newValue"/>
         <log level="info" message="Creating postal address"/>
-        <if-not-empty field="parameters.partyId">
+        <if-not-empty field="parameters.addToParty">
             <call-map-processor xml-resource="component://party/minilang/contact/PartyContactMechMapProcs.xml"
                 processor-name="postalAddress" in-map-name="parameters" out-map-name="context"/>
             <call-service service-name="createPartyPostalAddress" in-map-name="context">
@@ -488,7 +490,8 @@ under the License.
             </call-service>
             <log level="info" message="Party ContactMech created"/>
             <else>
-                <set-service-fields service-name="createPostalAddress" map="parameters" to-map="context"/>
+                <call-map-processor xml-resource="component://party/minilang/contact/ContactMechMapProcs.xml"
+                    processor-name="postalAddress" in-map-name="parameters" out-map-name="context"/>
                 <call-service in-map-name="context" service-name="createPostalAddress">
                     <default-message resource="PartyUiLabels" property="PartyPostalAddressSuccessfullyCreated"/>
                     <result-to-field result-name="contactMechId" field="newValue.contactMechId"/>
@@ -509,30 +512,28 @@ under the License.
 
     <simple-method method-name="updateWorkEffortPostalAddress" short-description="Update a PostalAddress for WorkEffort">
         <make-value entity-name="WorkEffortContactMech" value-field="newValue"/>
-        <set-service-fields service-name="updatePostalAddress" map="parameters" to-map="context"/>
+        <call-map-processor xml-resource="component://party/minilang/contact/ContactMechMapProcs.xml"
+                processor-name="postalAddress" in-map-name="parameters" out-map-name="context"/>
         <call-service in-map-name="context" service-name="updatePostalAddress">
             <default-message resource="PartyUiLabels" property="PartyPostalAddressSuccessfullyUpdated"/>
             <result-to-field result-name="contactMechId" field="newValue.contactMechId"/>
-            <result-to-field result-name="oldContactMechId" field="oldContactMechId"/>
         </call-service>
         <call-map-processor xml-resource="component://workeffort/minilang/workeffort/WorkflowMapProcessors.xml"
                 processor-name="workEffortContactMech" in-map-name="parameters" out-map-name="context2"/>
         <set from-field="newValue.contactMechId"  field="context2.newContactMechId"/>
         <set field="context2.contactMechTypeId" value="POSTAL_ADDRESS"/>
-        <set field="context2.fromDate" from-field="parameters.fromDate"/>
         <log level="info" message="Copied id to context2: ${context2.newContactMechId}"/>
         <call-service in-map-name="context2" service-name="updateWorkEffortContactMech">
             <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyUpdated"/>
         </call-service>
         <field-to-request field="newValue.contactMechId" request-name="contactMechId"/>
         <field-to-result field="newValue.contactMechId" result-name="contactMechId"/>
-        <field-to-result field="oldContactMechId" result-name="oldContactMechId"/>
     </simple-method>
 
     <simple-method method-name="createWorkEffortTelecomNumber" short-description="Create a TelecomNumber for WorkEffort">
         <make-value entity-name="WorkEffortContactMech" value-field="newValue"/>
         <log level="info" message="Creating telecom number"/>
-        <if-not-empty field="parameters.partyId">
+        <if-not-empty field="parameters.addToParty">
             <call-map-processor xml-resource="component://party/minilang/contact/PartyContactMechMapProcs.xml"
                 processor-name="telecomNumber" in-map-name="parameters" out-map-name="context"/>
             <call-service service-name="createPartyTelecomNumber" in-map-name="context">
@@ -541,7 +542,8 @@ under the License.
             </call-service>
             <log level="info" message="Party ContactMech created"/>
             <else>
-                <set-service-fields service-name="createTelecomNumber" map="parameters" to-map="context"/>
+                <call-map-processor xml-resource="component://party/minilang/contact/ContactMechMapProcs.xml"
+                    processor-name="telecomNumber" in-map-name="parameters" out-map-name="context"/>
                 <call-service in-map-name="context" service-name="createTelecomNumber">
                     <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyCreated"/>
                     <result-to-field result-name="contactMechId" field="newValue.contactMechId"/>
@@ -561,18 +563,17 @@ under the License.
 
     <simple-method method-name="updateWorkEffortTelecomNumber" short-description="Update a TelecomNumber for WorkEffort">
         <make-value entity-name="WorkEffortContactMech" value-field="newValue"/>
-        <set-service-fields service-name="updateTelecomNumber" map="parameters" to-map="context"/>
+        <call-map-processor xml-resource="component://party/minilang/contact/ContactMechMapProcs.xml"
+                processor-name="telecomNumber" in-map-name="parameters" out-map-name="context"/>
         <call-service in-map-name="context" service-name="updateTelecomNumber">
             <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyUpdated"/>
             <result-to-field result-name="contactMechId" field="newValue.contactMechId"/>
-            <result-to-field result-name="oldContactMechId" field="oldContactMechId"/>
         </call-service>
 
         <call-map-processor xml-resource="component://workeffort/minilang/workeffort/WorkflowMapProcessors.xml"
                 processor-name="workEffortContactMech" in-map-name="parameters" out-map-name="context2"/>
         <set from-field="newValue.contactMechId"  field="context2.newContactMechId"/>
         <set field="context2.contactMechTypeId" value="TELECOM_NUMBER"/>
-        <set field="context2.fromDate" from-field="parameters.fromDate"/>
         <log level="info" message="Copied id to context2: ${context2.newContactMechId}"/>
         <call-service in-map-name="context2" service-name="updateWorkEffortContactMech">
             <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyUpdated"/>
@@ -580,11 +581,12 @@ under the License.
         <log level="info" message="Setting result id: ${newValue.contactMechId}"/>
         <field-to-request field="newValue.contactMechId" request-name="contactMechId"/>
         <field-to-result field="newValue.contactMechId" result-name="contactMechId"/>
-        <field-to-result field="oldContactMechId" result-name="oldContactMechId"/>
     </simple-method>
 
     <simple-method method-name="createWorkEffortEmailAddress" short-description="Create an email address for WorkEffort">
-        <set-service-fields service-name="createWorkEffortContactMech" map="parameters" to-map="cwecmMap"/>
+        <call-map-processor xml-resource="component://workeffort/minilang/workeffort/WorkflowMapProcessors.xml"
+            processor-name="emailAddress" in-map-name="parameters" out-map-name="cwecmMap"/>
+        <check-errors/>
         <set field="cwecmMap.contactMechTypeId" value="EMAIL_ADDRESS"/>
         <call-service service-name="createWorkEffortContactMech" in-map-name="cwecmMap">
             <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyCreated"/>
@@ -593,7 +595,9 @@ under the License.
         </call-service>
     </simple-method>
     <simple-method method-name="updateWorkEffortEmailAddress" short-description="Update an email address for WorkEffort">
-        <set-service-fields service-name="createWorkEffortContactMech" map="parameters" to-map="uwecmMap"/>
+        <call-map-processor xml-resource="component://workeffort/minilang/workeffort/WorkflowMapProcessors.xml"
+            processor-name="emailAddress" in-map-name="parameters" out-map-name="uwecmMap"/>
+        <check-errors/>
         <set field="uwecmMap.contactMechTypeId" value="EMAIL_ADDRESS"/>
         <call-service service-name="updateWorkEffortContactMech" in-map-name="uwecmMap">
             <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyUpdated"/>