From 52b337bce7ed4725a392db35802c61c2ac366069 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 19 Apr 2024 11:45:07 +0530 Subject: [PATCH 01/22] Improved: UI to remove the block button to fab button for saving changes(#197) --- src/views/BrokeringQuery.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index 6d10f1f..9e29084 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -10,7 +10,6 @@ - {{ translate("Save changes") }} @@ -259,13 +258,19 @@ + + + + + + From 8d2f7dc8f25c46c13f9e00c2c5a7bdb167d39842 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 25 Apr 2024 17:29:42 +0530 Subject: [PATCH 12/22] Improved: app version in package and lock file for patch release(v1.2.1) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a4ed432..2c4e7d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "order-routing-rules", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "order-routing-rules", - "version": "1.2.0", + "version": "1.2.1", "dependencies": { "@capacitor/android": "^2.4.7", "@capacitor/core": "^2.4.7", diff --git a/package.json b/package.json index 4fe6de6..4a2b531 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "order-routing-rules", - "version": "1.2.0", + "version": "1.2.1", "private": true, "description": "An Ionic project", "scripts": { From ebf073a47c1fa6e997c4c9ed876500bef060fa92 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 26 Apr 2024 18:48:28 +0530 Subject: [PATCH 13/22] Fixed: case to handle the case when enum data is missing for specific type Added empty state in option selection modal when the enum data is missing Added check to display the code if the enum label is missing --- src/components/AddInventoryFilterOptionsModal.vue | 7 +++++-- src/components/AddOrderRouteFilterOptions.vue | 7 +++++-- src/views/BrokeringQuery.vue | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/AddInventoryFilterOptionsModal.vue b/src/components/AddInventoryFilterOptionsModal.vue index 48130d8..9c3753f 100644 --- a/src/components/AddInventoryFilterOptionsModal.vue +++ b/src/components/AddInventoryFilterOptionsModal.vue @@ -9,7 +9,10 @@ - +
+

{{ translate(`Failed to fetch ${props.label?.toLowerCase()} options`) }}

+
+ {{ condition.description || condition.enumCode }} @@ -66,7 +69,7 @@ const associatedOptions = { IIP_PROXIMITY: { enum: "IIP_MSMNT_SYSTEM", defaultVa onMounted(() => { inventoryRuleConditions.value = props.ruleConditions ? JSON.parse(JSON.stringify(props.ruleConditions)) : {} - enumerations.value = Object.values(enums.value[props.parentEnumId]).filter((enumeration: any) => !hiddenOptions.includes(enumeration.enumId)) + enumerations.value = enums.value[props.parentEnumId] ? Object.values(enums.value[props.parentEnumId]).filter((enumeration: any) => !hiddenOptions.includes(enumeration.enumId)) : [] }) function checkFilters() { diff --git a/src/components/AddOrderRouteFilterOptions.vue b/src/components/AddOrderRouteFilterOptions.vue index a173721..1f6b913 100644 --- a/src/components/AddOrderRouteFilterOptions.vue +++ b/src/components/AddOrderRouteFilterOptions.vue @@ -9,8 +9,11 @@ - - +
+

{{ translate(`Failed to fetch ${$props.label?.toLowerCase()} options`) }}

+
+ + {{ sort.description || sort.enumCode }} diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index 1f799cb..1b44ee1 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -793,7 +793,7 @@ function getSelectedValue(options: any, enumerations: any, parameter: string) { function getLabel(parentType: string, code: string) { const enumerations = enums.value[parentType] - const enumInfo: any = Object.values(enumerations).find((enumeration: any) => enumeration.enumCode === code) + const enumInfo: any = enumerations ? Object.values(enumerations).find((enumeration: any) => enumeration.enumCode === code) : null return enumInfo?.description } From 676cf56354ee13f6387f79b5ab77e2feb007af79 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 26 Apr 2024 18:57:35 +0530 Subject: [PATCH 14/22] Improved: locale file to include static text --- src/locales/en.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/locales/en.json b/src/locales/en.json index ea01790..202b698 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -48,6 +48,8 @@ "Failed to create brokering run": "Failed to create brokering run", "Failed to create inventory rule": "Failed to create inventory rule", "Failed to create order routing": "Failed to create order routing", + "Failed to fetch filter options": "Failed to fetch filter options", + "Failed to fetch sort options": "Failed to fetch sort options", "Failed to update group information": "Failed to update group information", "Failed to update group status": "Failed to update group status", "Failed to schedule service": "Failed to schedule service", From 4993d4b5fd3f3333ac782464c938b24a5c8c5742 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 26 Apr 2024 19:08:05 +0530 Subject: [PATCH 15/22] Improved: check for finding the enum data before fetching the value --- src/views/BrokeringQuery.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index 1b44ee1..27d6813 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -770,7 +770,7 @@ function getPromiseDateValue() { } function getFilterValue(options: any, enums: any, parameter: string) { - return options?.[enums[parameter].code] + return enums[parameter] ? options?.[enums[parameter].code] : undefined } function getSelectedValue(options: any, enumerations: any, parameter: string) { From 63fafdb2eee1adc775a9e7e1f368673e4d387d28 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 29 Apr 2024 12:41:36 +0530 Subject: [PATCH 16/22] Fixed: issue in reordering the inventory rules --- src/store/modules/orderRouting/actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/modules/orderRouting/actions.ts b/src/store/modules/orderRouting/actions.ts index 67f6f17..23bb8a5 100644 --- a/src/store/modules/orderRouting/actions.ts +++ b/src/store/modules/orderRouting/actions.ts @@ -164,13 +164,14 @@ const actions: ActionTree = { }, async fetchCurrentOrderRouting({ dispatch }, orderRoutingId) { - let currentRoute = {} + let currentRoute = {} as any try { const resp = await OrderRoutingService.fetchOrderRouting(orderRoutingId); if(!hasError(resp) && resp.data) { currentRoute = resp.data + currentRoute["rules"] = sortSequence(currentRoute["rules"]) } else { throw resp.data } From 7f6c7286aa4c42292440cd44550f9560089fcb00 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 29 Apr 2024 12:51:10 +0530 Subject: [PATCH 17/22] Fixed: condition to add a null check before sorting rules --- src/store/modules/orderRouting/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/orderRouting/actions.ts b/src/store/modules/orderRouting/actions.ts index 23bb8a5..96a8a51 100644 --- a/src/store/modules/orderRouting/actions.ts +++ b/src/store/modules/orderRouting/actions.ts @@ -171,7 +171,7 @@ const actions: ActionTree = { if(!hasError(resp) && resp.data) { currentRoute = resp.data - currentRoute["rules"] = sortSequence(currentRoute["rules"]) + currentRoute["rules"] = currentRoute["rules"]?.length ? sortSequence(currentRoute["rules"]) : [] } else { throw resp.data } From 273eaf0a1707a01c14d60db0ac311119359d8866 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 10 May 2024 11:10:55 +0530 Subject: [PATCH 18/22] Improved: UI for back feature from the query page(#124) Removed the back button feature from the chip Added header with a standard back button and displayed routing name inside the header Added default href for back button to move to the group details page --- src/views/BrokeringQuery.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index 27d6813..a9dbe65 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -1,5 +1,13 @@