Skip to content

Commit

Permalink
Merge pull request #36 from hotwax/34-add-attempted-order-item-and-br…
Browse files Browse the repository at this point in the history
…okered-order-item-count-in-orderroutingrun-result

Improved screen menu title, added valition to avoid missing records e…
  • Loading branch information
dixitdeepak authored Jul 26, 2024
2 parents 9bbef98 + 046cee5 commit 8905b33
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 21 deletions.
4 changes: 0 additions & 4 deletions data/SetupData.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-facade-xml type="ext-seed">
<moqui.screen.SubscreensItem screenLocation="component://webroot/screen/webroot/apps.xml"
subscreenName="OrderRouting" subscreenLocation="component://order-routing/screen/OrderRoutingGroup.xml"
menuTitle="Order Routing Setup" menuIndex="9" menuInclude="Y"/>

<artifactGroups artifactGroupId="ORDER_ROUTE_APP" description="Order routing app">
<artifacts artifactName="component://order-routing/screen/OrderRoutingGroup.xml" artifactTypeEnumId="AT_XML_SCREEN" inheritAuthz="Y"/>
<!-- Full permissions for the ADMIN user group -->
Expand Down
2 changes: 1 addition & 1 deletion screen/OrderRoutingGroup/OrderRoutingGroupRuns.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing Group Runs" default-menu-index="2">
default-menu-title="Routing Group Runs" default-menu-index="2">

<subscreens default-item="OrderRoutingGroupRunList"/>
<widgets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-include="false" standalone="true">
default-menu-include="false" standalone="true" default-menu-title="Group Runs">

<parameter name="routingGroupId"/>
<transition name="orderRoutingGroup"><default-response url="../../OrderRoutingGroups/OrderRoutingGroupDetail"/></transition>
Expand Down
3 changes: 2 additions & 1 deletion screen/OrderRoutingGroup/OrderRoutingGroups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing Groups" default-menu-index="1">
default-menu-title="Routing Groups" default-menu-index="1">

<parameter name="routingGroupId"/>
<subscreens default-item="OrderRoutingGroupList"/>
<widgets>
<subscreens-panel id="OrderRoutingGroupListPanel" type="popup"/>
Expand Down
4 changes: 2 additions & 2 deletions screen/OrderRoutingGroup/OrderRoutingGroups/OrderRouting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing" default-menu-index="0" default-menu-include="false">

default-menu-title="Routing" default-menu-index="0" default-menu-include="false">
<parameter name="orderRoutingId"/>
<subscreens default-item="OrderRoutingDetail"/>
<widgets>
<subscreens-panel id="OrderRoutingPanel" type="popup"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing" default-menu-index="1" default-menu-include="false">
default-menu-title="${orderRouting?orderRouting.routingName:''} :${orderRoutingId}" default-menu-index="1" default-menu-include="false">

<parameter name="orderRoutingId" required="true"/>

<transition name="orderRoutingGroup">
<default-response url="../../OrderRoutingGroupDetail"/>
</transition>
Expand Down Expand Up @@ -43,8 +42,13 @@
</transition>
<transition name="routingRunList"><default-response url="../../../OrderRoutingRuns/OrderRoutingRunList"/></transition>

<actions>
<pre-actions>
<entity-find-one entity-name="co.hotwax.order.routing.OrderRouting" value-field="orderRouting"/>
</pre-actions>
<actions>
<if condition="!orderRouting || !orderRoutingId">
<return message="No order routing found for ID ${orderRoutingId}" error="true"/>
</if>
<entity-find-one entity-name="co.hotwax.order.routing.OrderRoutingGroup" value-field="orderRoutingGroup">
<field-map field-name="routingGroupId" from="orderRouting.routingGroupId"/>
</entity-find-one>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing Rule" default-menu-index="1" default-menu-include="false">
default-menu-title="Routing rule" default-menu-index="1" default-menu-include="false">

<parameter name="routingRuleId" required="true"/>

Expand Down Expand Up @@ -36,9 +36,13 @@
<service-call name="update#co.hotwax.order.routing.OrderRoutingRule"/>
<default-response url="."/>
</transition>

<actions>
<pre-actions>
<entity-find-one entity-name="co.hotwax.order.routing.OrderRoutingRule" value-field="orderRoutingRule"/>
</pre-actions>
<actions>
<if condition="!orderRoutingRule || !routingRuleId">
<return message="No order routing group found for ID ${routingRuleId}" error="true"/>
</if>
<entity-find-one entity-name="co.hotwax.order.routing.OrderRouting" value-field="orderRouting">
<field-map field-name="orderRoutingId" from="orderRoutingRule.orderRoutingId"/>
</entity-find-one>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing Group" default-menu-index="1" default-menu-include="false">
default-menu-title="${orderRoutingGroup?orderRoutingGroup.groupName:''} : ${routingGroupId}" default-menu-index="1" default-menu-include="false">

<parameter name="routingGroupId" required="true"/>
<transition name="OrderRoutingGroupRuns"><default-response url="../../OrderRoutingGroupRuns/OrderRoutingGroupRunList"/></transition>
Expand Down Expand Up @@ -36,8 +36,13 @@
<service-call name="co.hotwax.order.routing.CommonServices.delete#OrderRouting"/>
<default-response url="."/>
</transition>
<actions>
<pre-actions>
<entity-find-one entity-name="co.hotwax.order.routing.OrderRoutingGroup" value-field="orderRoutingGroup"/>
</pre-actions>
<actions>
<if condition="!orderRoutingGroup || !routingGroupId">
<return message="No order routing group found for ID ${routingGroupId}" error="true"/>
</if>
<entity-find-one entity-name="moqui.service.job.ServiceJobRunLock" value-field="runLock">
<field-map field-name="jobName" from="orderRoutingGroup.jobName"/>
</entity-find-one>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing Groups" default-menu-index="1">
default-menu-title="Routing Groups" default-menu-index="1">

<transition name="orderRoutingGroup"><default-response url="../OrderRoutingGroupDetail"/></transition>
<transition name="createOrderRoutingGroup">
Expand Down
2 changes: 1 addition & 1 deletion screen/OrderRoutingGroup/OrderRoutingRuns.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing Runs" default-menu-index="3">
default-menu-title="Routing Runs" default-menu-index="3">

<subscreens default-item="OrderRoutingRunList"/>
<widgets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Order Routing Groups" default-menu-include="false">
default-menu-title="Routing Runs" default-menu-include="false">

<parameter name="routingGroupId"/>
<parameter name="orderRoutingId"/>
Expand Down
2 changes: 1 addition & 1 deletion service/co/hotwax/order/routing/OrderRoutingServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@

facilityAllocation = [];
def comments='';
def routingRuleName = "${orderRoutingGroup.groupName} [${orderRoutingGroup.routingGroupId}] : ${orderRouting.routingName} [${orderRouting.orderRoutingId}] : ${routingRule.ruleName} [${routingRule.routingRuleId}]"
def routingRuleName = "${orderRoutingGroup.groupName} : ${orderRouting.routingName} : ${routingRule.ruleName}]"
def suggestedFacilityIds = suggestedFulfillmentLocations.facilityId as Set
if (!routingRule.assignmentEnumId || 'ORA_SINGLE'.equals(routingRule.assignmentEnumId)) {
// SQL will not return results if items are not available at a single location.
Expand Down

0 comments on commit 8905b33

Please sign in to comment.