Skip to content

Commit

Permalink
Merge pull request #33 from hotwax/order-routing-screens
Browse files Browse the repository at this point in the history
Order routing screens
  • Loading branch information
dixitdeepak authored Jul 24, 2024
2 parents 24946dd + 23322f9 commit 35e9aea
Show file tree
Hide file tree
Showing 14 changed files with 131 additions and 119 deletions.
6 changes: 5 additions & 1 deletion MoquiConf.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- No copyright or license for configuration file, details here are not considered a creative work. -->
<moqui-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd">

<default-property name="webapp_require_session_token" value="false"/>
<default-property name="default.brokering.user" value=""/>
<screen-facade>
<screen location="component://webroot/screen/webroot/apps.xml" >
<subscreens-item name="OrderRouting" menu-title="Order Routing" menu-index="10" location="component://order-routing/screen/OrderRoutingGroup.xml" menu-include="true"/>
</screen>
</screen-facade>
</moqui-conf>
11 changes: 11 additions & 0 deletions entity/OrderRoutingViewEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,15 @@ under the License.
<exclude field="sequenceNum"/>
</alias-all>
</view-entity>

<view-entity entity-name="OrderRoutingGroupJobRun" package="co.hotwax.order.routing">
<member-entity entity-alias="ORGRP" entity-name="co.hotwax.order.routing.OrderRoutingGroup"/>
<member-entity entity-alias="SJR" entity-name="moqui.service.job.ServiceJobRun" join-from-alias="ORGRP">
<key-map field-name="jobName"/>
</member-entity>
<alias-all entity-alias="ORGRP">
<exclude field="jobName"/>
</alias-all>
<alias-all entity-alias="SJR"/>
</view-entity>
</entities>
4 changes: 2 additions & 2 deletions screen/OrderRoutingGroup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
default-menu-title="Routing Group" default-menu-index="1" default-menu-include="false">

<subscreens default-item="OrderRoutingGroupList"/>
<subscreens default-item="OrderRoutingGroups"/>
<widgets>
<subscreens-panel id="RoutingGroupPanel" type="popup"/>
<subscreens-panel id="OrderRoutingGroupPanel" type="popup"/>
</widgets>
</screen>
66 changes: 0 additions & 66 deletions screen/OrderRoutingGroup/OrderRouting/OrderRoutingList.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ 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-include="false">

<subscreens default-item="JobRunList"/>
default-menu-title="Order Routing Group Runs" default-menu-index="2">

<subscreens default-item="OrderRoutingGroupRunList"/>
<widgets>
<subscreens-panel id="JobRunsPanel" type="popup"/>
<subscreens-panel id="OrderRoutingGroupRunsPanel" type="popup"/>
</widgets>
</screen>
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,44 @@
<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">

<parameter name="routingGroupId" required="true"/>
<transition name="orderRoutingGroup"><default-response url="../../OrderRoutingGroupDetail"/></transition>
<parameter name="routingGroupId"/>
<transition name="orderRoutingGroup"><default-response url="../../OrderRoutingGroups/OrderRoutingGroupDetail"/></transition>
<transition name="jobRunDetail"><default-response url="//system/ServiceJob/JobRuns/JobRunDetail"/></transition>
<transition name="serviceJobDetail">
<default-response url="//system/ServiceJob/Jobs/ServiceJobDetail"/></transition>
<transition name="userAccountDetail"><default-response url="//system/Security/UserAccount/UserAccountDetail"/></transition>
<actions>
<entity-find-one entity-name="co.hotwax.order.routing.OrderRoutingGroup" value-field="orderRoutingGroup" cache="true"/>
<set field="jobName" from="orderRoutingGroup.jobName"/>
</actions>
<widgets>
<form-list name="JobRunList" list="jobRunList" skip-form="true" header-dialog="true">
<entity-find entity-name="moqui.service.job.ServiceJobRun" list="jobRunList" use-clone="true">
<search-form-inputs default-order-by="-startTime">
</search-form-inputs>
<entity-find entity-name="co.hotwax.order.routing.OrderRoutingGroupJobRun" list="jobRunList">
<search-form-inputs default-order-by="-startTime"/>
<econdition field-name="routingGroupId" from="routingGroupId" ignore-if-empty="true"/>
<select-field field-name="groupName,errors,messages"/>
</entity-find>
<field name="jobRunId"><header-field show-order-by="true"><text-find size="10" hide-options="true"/></header-field>
<default-field><link url="jobRunDetail" text="${jobRunId}" link-type="anchor"/></default-field></field>
<field name="orderRoutingId">
<header-field show-order-by="true" title="Group Name"/>
<default-field><link url="orderRoutingGroup" text="${orderRoutingGroup.groupName?:orderRoutingGroup.routingGroupId}" link-type="anchor"/></default-field></field>
<field name="jobName">
<field name="routingGroupId">
<header-field show-order-by="true">
<drop-down allow-empty="true" allow-multiple="true">
<entity-options key="${routingGroupId}" text="${groupName?:routingGroupId} [${routingGroupId}]">
<entity-find entity-name="co.hotwax.order.routing.OrderRoutingGroup" cache="true"/>
</entity-options>
</drop-down>
</header-field>
<default-field><link url="orderRoutingGroup" text="${groupName?:routingGroupId}" link-type="anchor" parameter-map="[routingGroupId: routingGroupId]"/></default-field>
</field>
<field name="productStoreId">
<header-field show-order-by="true">
<drop-down allow-empty="true" allow-multiple="true">
<entity-options key="${productStoreId}" text="${storeName?:productStoreId} [${productStoreId}]">
<entity-find entity-name="org.apache.ofbiz.product.store.ProductStore" cache="true"/>
</entity-options>
</drop-down>
</header-field>
<default-field>
<display-entity entity-name="org.apache.ofbiz.product.store.ProductStore" text="${storeName} [${productStoreId}]"/>
</default-field>
</field>
<!--<field name="jobName">
<header-field show-order-by="case-insensitive">
<drop-down allow-empty="true">
<entity-options key="${jobName}" text="${jobName}">
Expand All @@ -34,18 +50,12 @@
</drop-down>
</header-field>
<default-field><link url="serviceJobDetail" text="${jobName}" link-type="anchor" url-type="screen"/></default-field>
</field>
</field>-->
<field name="userId"><header-field title="User"><text-find size="10" hide-options="true"/></header-field><default-field>
<display-entity entity-name="moqui.security.UserAccount" text="${username} - ${userFullName}"/>
<link url="userAccountDetail" text="${userId}" link-type="anchor" condition="userId"/>
</default-field></field>

<field name="hasError">
<header-field>
<drop-down allow-empty="true"><option key="Y"/><option key="N"/></drop-down>
</header-field>
<default-field><display/></default-field>
</field>
<field name="startTime">
<header-field show-order-by="true"><date-period/></header-field>
<default-field><display format="yyyy-MM-dd HH:mm:ss"/></default-field>
Expand All @@ -58,6 +68,15 @@
<conditional-field condition="endTime &amp;&amp; startTime">
<display text="${(groovy.time.TimeCategory.minus(endTime, startTime))}"/></conditional-field>
</field>
<field name="hasError">
<header-field>
<drop-down allow-empty="true"><option key="Y"/><option key="N"/></drop-down>
</header-field>
<default-field><display/></default-field>
</field>
<field name="message">
<default-field><display text="${errors?:messages}"/></default-field>
</field>
<field name="findButton">
<header-field title="Find"><submit/></header-field><default-field>
<display text=" "/></default-field>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a
This software is in the public domain under CC0 1.0 Universal plus a
Grant of Patent License.
To the extent possible under law, the author(s) have dedicated all
Expand All @@ -13,10 +13,10 @@ 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 Rule" default-menu-index="5" default-menu-include="false">
default-menu-title="Order Routing Groups" default-menu-index="1">

<subscreens default-item="OrderRoutingRuleDetail"/>
<subscreens default-item="OrderRoutingGroupList"/>
<widgets>
<subscreens-panel id="OrderRoutingRulePanel" type="popup"/>
<subscreens-panel id="OrderRoutingGroupListPanel" type="popup"/>
</widgets>
</screen>
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" default-menu-index="0" standalone="true" default-menu-include="false">
default-menu-title="Order Routing" default-menu-index="0" default-menu-include="false">

<subscreens default-item="OrderRoutingDetail"/>
<widgets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<service-call name="co.hotwax.order.routing.CommonServices.delete#OrderRoutingRule"/>
<default-response url="."/>
</transition>
<transition name="routingRunList"><default-response url="../OrderRoutingRunList"/></transition>
<transition name="routingRunList"><default-response url="../../../OrderRoutingRuns/OrderRoutingRunList"/></transition>

<actions>
<entity-find-one entity-name="co.hotwax.order.routing.OrderRouting" value-field="orderRouting"/>
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="Order Routing Rule" default-menu-index="1" default-menu-include="false">

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
default-menu-title="Order Routing Group" default-menu-index="1" default-menu-include="false">

<parameter name="routingGroupId" required="true"/>
<transition name="jobRunList"><default-response url="../JobRuns/JobRunList"/></transition>
<transition name="OrderRoutingGroupRuns"><default-response url="../../OrderRoutingGroupRuns/OrderRoutingGroupRunList"/></transition>
<transition name="serviceJobDetail">
<default-response url="//system/ServiceJob/Jobs/ServiceJobDetail"/></transition>
<transition name="routingRunList"><default-response url="../OrderRouting/OrderRoutingRunList"/></transition>
<transition name="routingRunList"><default-response url="../../OrderRoutingRuns/OrderRoutingRunList"/></transition>
<transition name="orderRoutingDetail"><default-response url="../OrderRouting/OrderRoutingDetail"/></transition>
<transition name="orderRoutingGroupSchedule">
<service-call name="co.hotwax.order.routing.OrderRoutingServices.store#OrderRoutingGroupSchedule"/>
Expand Down Expand Up @@ -84,7 +84,7 @@
<link url="runJob" text="Run now" confirmation="Are you sure to run order routing group now?" condition="serviceJob != null">
<parameter name="jobName" from="orderRoutingGroup.jobName"/>
</link>
<link url="jobRunList" text="Group Runs" parameter-map="[routingGroupId:orderRoutingGroup.routingGroupId]" condition="serviceJob != null"/>
<link url="OrderRoutingGroupRuns" text="Group Runs" parameter-map="[routingGroupId:orderRoutingGroup.routingGroupId]" condition="serviceJob != null"/>
</box-toolbar>
<box-body>
<section name="ScheduleJob">
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 Group List" default-menu-include="false">
default-menu-title="Order Routing Groups" default-menu-index="1">

<transition name="orderRoutingGroup"><default-response url="../OrderRoutingGroupDetail"/></transition>
<transition name="createOrderRoutingGroup">
Expand Down
22 changes: 22 additions & 0 deletions screen/OrderRoutingGroup/OrderRoutingRuns.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a
Grant of Patent License.
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any
warranty.
You should have received a copy of the CC0 Public Domain Dedication
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">

<subscreens default-item="OrderRoutingRunList"/>
<widgets>
<subscreens-panel id="OrderRoutingGroupListPanel" type="popup"/>
</widgets>
</screen>
Loading

0 comments on commit 35e9aea

Please sign in to comment.