svn commit: r523253 - in /ofbiz/trunk/applications/manufacturing: webapp/manufacturing/WEB-INF/actions/jobshopmgt/ webapp/manufacturing/jobshopmgt/ widget/manufacturing/

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

svn commit: r523253 - in /ofbiz/trunk/applications/manufacturing: webapp/manufacturing/WEB-INF/actions/jobshopmgt/ webapp/manufacturing/jobshopmgt/ widget/manufacturing/

jacopoc
Author: jacopoc
Date: Wed Mar 28 02:48:53 2007
New Revision: 523253

URL: http://svn.apache.org/viewvc?view=rev&rev=523253
Log:
Misc cleanups and improvements to the production run screens.

Added:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh
      - copied, changed from r523248, ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl
      - copied unchanged from r523248, ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl
Removed:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl
Modified:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml

Copied: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh (from r523248, ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh?view=diff&rev=523253&p1=ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh&r1=523248&p2=ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh&r2=523253
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh Wed Mar 28 02:48:53 2007
@@ -84,45 +84,5 @@
             productionRunFixedAssetsData.addAll(taskFixedAssets);
         }
         context.put("productionRunFixedAssetsData", productionRunFixedAssetsData);
-
-
-
-        actionForm = request.getParameter("actionForm");
-        if (UtilValidate.isEmpty(actionForm)) {
-            actionForm = "beforeActionProductionRun";
-        }
-        context.put("actionForm",actionForm);
-        //---------------
-        // Routing tasks
-        //---------------
-        // routingTask add sub-screen
-        if (actionForm.equals("AddRoutingTask")){
-            Map routingTaskData =UtilMisc.toMap("workEffortParentId",productionRunId);
-            HtmlFormWrapper editPrRoutingTaskWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "AddProductionRunRoutingTask", request, response);
-//            editPrRoutingTaskWrapper.putInContext("routingTaskData", routingTaskData);
-//            editPrRoutingTaskWrapper.putInContext("actionForm", "addRoutingTask");
-//            editPrRoutingTaskWrapper.putInContext("actionIsAdd", "Y");
-            context.put("editPrRoutingTaskWrapper",editPrRoutingTaskWrapper);
-        }
-        // routingTask update sub-screen
-        routingTaskId = request.getParameter("routingTaskId");
-        if (routingTaskId != null  && (actionForm.equals("UpdateRoutingTask") || actionForm.equals("EditRoutingTask"))){
-            GenericValue routingTask = delegator.findByPrimaryKey("WorkEffort", UtilMisc.toMap("workEffortId", routingTaskId));
-            Map routingTaskData = routingTask.getAllFields();
-            if (routingTask.getDouble("estimatedSetupMillis") != null)
-                routingTaskData.put("estimatedSetupMillis",routingTask.getDouble("estimatedSetupMillis").toString());
-            else
-                routingTaskData.put("estimatedSetupMillis", "0");
-            if (routingTask.getDouble("estimatedMilliSeconds") != null)
-                routingTaskData.put("estimatedMilliSeconds",routingTask.getDouble("estimatedMilliSeconds").toString());
-            else
-                routingTaskData.put("estimatedMilliSeconds", "0");
-            HtmlFormWrapper editPrRoutingTaskWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "updateProductionRunRoutingTask", request, response);
-            editPrRoutingTaskWrapper.putInContext("routingTask", routingTaskData);
-//            editPrRoutingTaskWrapper.putInContext("actionForm", "UpdateRoutingTask");
-//            editPrRoutingTaskWrapper.putInContext("actionIsAdd", "null");
-            context.put("editPrRoutingTaskWrapper",editPrRoutingTaskWrapper);
-            context.put("routingTaskId",routingTaskId);
-        }
     }
 }

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl?view=diff&rev=523253&r1=523252&r2=523253
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl Wed Mar 28 02:48:53 2007
@@ -17,43 +17,6 @@
 under the License.
 -->
 
-<#-- Mandatory work efforts -->
-<#if mandatoryWorkEfforts?has_content>
-    <p>
-    ${uiLabelMap.ManufacturingMandatoryProductionRuns}:
-    <#list mandatoryWorkEfforts as mandatoryWorkEffortAssoc>
-        <#assign mandatoryWorkEffort = mandatoryWorkEffortAssoc.getRelatedOne("FromWorkEffort")>
-        <#if "PRUN_COMPLETED" == mandatoryWorkEffort.getString("currentStatusId") || "PRUN_CLOSED" == mandatoryWorkEffort.getString("currentStatusId")>
-            <a href="<@ofbizUrl>ProductionRunDeclaration?productionRunId=${mandatoryWorkEffort.workEffortId}</@ofbizUrl>" class="buttontext">${mandatoryWorkEffort.workEffortName}</a>&nbsp;
-        <#else>
-            <#if "PRUN_CREATED" == mandatoryWorkEffort.getString("currentStatusId")>
-                <a href="<@ofbizUrl>EditProductionRun?productionRunId=${mandatoryWorkEffort.workEffortId}</@ofbizUrl>" class="buttontext">${mandatoryWorkEffort.workEffortName}</a>[*]&nbsp;
-            <#else>
-                <a href="<@ofbizUrl>ProductionRunDeclaration?productionRunId=${mandatoryWorkEffort.workEffortId}</@ofbizUrl>" class="buttontext">${mandatoryWorkEffort.workEffortName}</a>[*]&nbsp;
-            </#if>
-        </#if>
-    </#list>
-    </p>
-</#if>
-<#-- Dependent work efforts -->
-<#if dependentWorkEfforts?has_content>
-    <p>
-    ${uiLabelMap.ManufacturingDependentProductionRuns}:
-    <#list dependentWorkEfforts as dependentWorkEffortAssoc>
-        <#assign dependentWorkEffort = dependentWorkEffortAssoc.getRelatedOne("ToWorkEffort")>
-        <#if "PRUN_COMPLETED" == dependentWorkEffort.currentStatusId || "PRUN_CLOSED" == dependentWorkEffort.currentStatusId>
-            <a href="<@ofbizUrl>ProductionRunDeclaration?productionRunId=${dependentWorkEffort.workEffortId}</@ofbizUrl>" class="buttontext">${dependentWorkEffort.workEffortName}</a>&nbsp;
-        <#else>
-            <#if "PRUN_CREATED" == dependentWorkEffort.getString("currentStatusId")>
-                <a href="<@ofbizUrl>EditProductionRun?productionRunId=${dependentWorkEffort.workEffortId}</@ofbizUrl>" class="buttontext">${dependentWorkEffort.workEffortName}</a>[*]&nbsp;
-            <#else>
-                <a href="<@ofbizUrl>ProductionRunDeclaration?productionRunId=${dependentWorkEffort.workEffortId}</@ofbizUrl>" class="buttontext">${dependentWorkEffort.workEffortName}</a>[*]&nbsp;
-            </#if>
-        </#if>
-    </#list>
-    </p>
-</#if>
-
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr valign="top">
         <#-- RoutingTask sub-screen  Update or Add  -->

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?view=diff&rev=523253&r1=523252&r2=523253
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml Wed Mar 28 02:48:53 2007
@@ -83,7 +83,7 @@
                 <set field="headerItem" value="jobshop"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="500"/>
-                <script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh"/>
+                <script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonJobshopDecorator">
@@ -100,7 +100,7 @@
                         </container>
                         <include-form name="UpdateProductionRun" location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
                         <platform-specific>
-                            <html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl"/></html>
+                            <html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl"/></html>
                         </platform-specific>
                         <container>
                             <label style="head2">${uiLabelMap.ManufacturingOrderItems}</label>
@@ -134,6 +134,7 @@
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="500"/>
 
+                <!--<script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.bsh"/>-->
                 <script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh"/>
             </actions>
             <widgets>
@@ -186,6 +187,9 @@
                         <include-form name="ListProductionRunOrderItems" location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
                         <platform-specific>
                             <html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl"/></html>
+                        </platform-specific>
+                        <platform-specific>
+                            <html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl"/></html>
                         </platform-specific>
                     </decorator-section>
                 </decorator-screen>