Author: jacopoc
Date: Thu Jun 10 06:52:49 2010
New Revision: 953226
URL: http://svn.apache.org/viewvc?rev=953226&view=rev
Log:
Refactored code to display dependent/mandatory production runs in the overview
page to be more consistent with the production run's assoc page.
Removed:
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl
Modified:
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
Modified:
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=953226&r1=953225&r2=953226&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
(original)
+++
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
Thu Jun 10 06:52:49 2010
@@ -83,6 +83,25 @@ under the License.
<set field="viewSize" from-field="parameters.VIEW_SIZE"
type="Integer" default-value="500"/>
<script
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy"/>
<script
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy"/>
+
+ <set field="productionRunId"
from-field="parameters.productionRunId"/>
+ <entity-one entity-name="WorkEffort"
value-field="productionRun">
+ <field-map field-name="workEffortId"
from-field="productionRunId"/>
+ </entity-one>
+ <!-- Find all the work efforts that must be completed before
this one. -->
+ <entity-condition entity-name="WorkEffortAssoc"
list="mandatoryWorkEfforts">
+ <condition-list>
+ <condition-expr field-name="workEffortIdTo"
from-field="productionRunId"/>
+ <condition-expr field-name="workEffortAssocTypeId"
value="WORK_EFF_PRECEDENCY"/>
+ </condition-list>
+ </entity-condition>
+ <!-- Find all the work efforts that are dependent from this
one. -->
+ <entity-condition entity-name="WorkEffortAssoc"
list="dependentWorkEfforts">
+ <condition-list>
+ <condition-expr field-name="workEffortIdFrom"
from-field="productionRunId"/>
+ <condition-expr field-name="workEffortAssocTypeId"
value="WORK_EFF_PRECEDENCY"/>
+ </condition-list>
+ </entity-condition>
</actions>
<widgets>
<decorator-screen name="CommonJobshopDecorator"
location="${parameters.commonJobshopDecorator}">
@@ -90,10 +109,27 @@ under the License.
<screenlet
title="${uiLabelMap.ManufacturingProductionRunId} ${productionRunId}"
navigation-menu-name="ProductionRunStatusAction">
<include-menu name="ProductionRunStatusTabBar"
location="component://manufacturing/widget/manufacturing/ManufacturingMenus.xml"/>
<include-form name="UpdateProductionRun"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
- <platform-specific>
- <html><html-template
location="component://manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl"/></html>
- </platform-specific>
</screenlet>
+ <section>
+ <condition>
+ <not><if-empty
field="mandatoryWorkEfforts"/></not>
+ </condition>
+ <widgets>
+ <screenlet
title="${uiLabelMap.ManufacturingMandatoryWorkEfforts}">
+ <include-form name="mandatoryWorkEfforts"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ </screenlet>
+ </widgets>
+ </section>
+ <section>
+ <condition>
+ <not><if-empty
field="dependentWorkEfforts"/></not>
+ </condition>
+ <widgets>
+ <screenlet
title="${uiLabelMap.ManufacturingDependentWorkEfforts}">
+ <include-form name="dependentWorkEfforts"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ </screenlet>
+ </widgets>
+ </section>
<screenlet
title="${uiLabelMap.ManufacturingOrderItems}">
<include-form name="ListProductionRunOrderItems"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
</screenlet>
@@ -126,6 +162,25 @@ under the License.
<script
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy"/>
<script
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy"/>
+
+ <set field="productionRunId"
from-field="parameters.productionRunId"/>
+ <entity-one entity-name="WorkEffort"
value-field="productionRun">
+ <field-map field-name="workEffortId"
from-field="productionRunId"/>
+ </entity-one>
+ <!-- Find all the work efforts that must be completed before
this one. -->
+ <entity-condition entity-name="WorkEffortAssoc"
list="mandatoryWorkEfforts">
+ <condition-list>
+ <condition-expr field-name="workEffortIdTo"
from-field="productionRunId"/>
+ <condition-expr field-name="workEffortAssocTypeId"
value="WORK_EFF_PRECEDENCY"/>
+ </condition-list>
+ </entity-condition>
+ <!-- Find all the work efforts that are dependent from this
one. -->
+ <entity-condition entity-name="WorkEffortAssoc"
list="dependentWorkEfforts">
+ <condition-list>
+ <condition-expr field-name="workEffortIdFrom"
from-field="productionRunId"/>
+ <condition-expr field-name="workEffortAssocTypeId"
value="WORK_EFF_PRECEDENCY"/>
+ </condition-list>
+ </entity-condition>
</actions>
<widgets>
<decorator-screen name="CommonJobshopDecorator"
location="${parameters.commonJobshopDecorator}">
@@ -155,14 +210,29 @@ under the License.
</screenlet>
</widgets>
</section>
- <screenlet
title="${uiLabelMap.ManufacturingAssociatedProductionRuns}">
- <platform-specific>
- <html><html-template
location="component://manufacturing/webapp/manufacturing/jobshopmgt/associatedProductionRuns.ftl"/></html>
- </platform-specific>
- </screenlet>
<screenlet
title="${uiLabelMap.ManufacturingInventoryItemsProduced}">
<include-form
name="ListProductionRunInventoryItems"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
</screenlet>
+ <section>
+ <condition>
+ <not><if-empty
field="mandatoryWorkEfforts"/></not>
+ </condition>
+ <widgets>
+ <screenlet
title="${uiLabelMap.ManufacturingMandatoryWorkEfforts}">
+ <include-form name="mandatoryWorkEfforts"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ </screenlet>
+ </widgets>
+ </section>
+ <section>
+ <condition>
+ <not><if-empty
field="dependentWorkEfforts"/></not>
+ </condition>
+ <widgets>
+ <screenlet
title="${uiLabelMap.ManufacturingDependentWorkEfforts}">
+ <include-form name="dependentWorkEfforts"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ </screenlet>
+ </widgets>
+ </section>
<screenlet
title="${uiLabelMap.ManufacturingOrderItems}">
<include-form name="ListProductionRunOrderItems"
location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
</screenlet>