From 7be96e3d19ea417de2fbebdfa66509c97e8f2279 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 15 Feb 2024 19:00:36 +0530 Subject: [PATCH 1/4] Fixed: issue when updating an empty description for the group(#101) --- src/views/BrokeringRoute.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/BrokeringRoute.vue b/src/views/BrokeringRoute.vue index 4492436..03ea16a 100644 --- a/src/views/BrokeringRoute.vue +++ b/src/views/BrokeringRoute.vue @@ -444,8 +444,9 @@ function getArchivedOrderRoutings() { } async function updateGroupDescription() { - // Do not update description, if the desc is unchanged, and we do not have routingGroupId, and description is left empty - if(props.routingGroupId && currentRoutingGroup.value.description !== description.value) { + // Do not update description, if the desc is unchanged, and we do not have routingGroupId + // Added conversion using `!!`, as if the group does not have a description then we get `undefined` and if the description entered by the user is left empty then `undefined != ''` is true and thus it makes an api call, even when description is unchanged in this case. + if(props.routingGroupId && (!!currentRoutingGroup.value.description != !!description.value)) { const routingGroupId = await updateRoutingGroup({ routingGroupId: props.routingGroupId, productStoreId: currentRoutingGroup.value.productStoreId, description: description.value }) if(routingGroupId) { await store.dispatch("orderRouting/setCurrentGroup", { ...currentRoutingGroup.value, description: description.value }) From 98c65ea883b7da4b35e79a398d9975a31ffbf1ab Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 15 Feb 2024 19:03:57 +0530 Subject: [PATCH 2/4] Improved: button text to have Add label when the desc for the group is missing(#101) --- src/locales/en.json | 1 + src/views/BrokeringRoute.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index 4f38fd9..f24becd 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -2,6 +2,7 @@ "A store repesents a company or a unique catalog of products. If your OMS is connected to multiple eCommerce stores sellling different collections of products, you may have multiple Product Stores set up in HotWax Commerce.": "A store repesents a company or a unique catalog of products. If your OMS is connected to multiple eCommerce stores sellling different collections of products, you may have multiple Product Stores set up in HotWax Commerce.", "Actions": "Actions", "Active": "Active", + "Add": "Add", "Add inventory rule": "Add inventory rule", "Allocated Items": "Allocated Items", "Allow partial allocation": "Allow partial allocation", diff --git a/src/views/BrokeringRoute.vue b/src/views/BrokeringRoute.vue index 03ea16a..d547135 100644 --- a/src/views/BrokeringRoute.vue +++ b/src/views/BrokeringRoute.vue @@ -63,7 +63,7 @@

{{ translate("Description") }}

- {{ translate(isDescUpdating ? "Save" : "Edit") }} + {{ translate(isDescUpdating ? "Save" : description ? "Edit" : "Add") }}
From 60669bb6014c6abe64839a1a278cc7d13869a280 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 16 Feb 2024 10:13:22 +0530 Subject: [PATCH 3/4] Improved: template to dispay the list header and radio options for product store filter(#101) --- src/views/BrokeringRuns.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/BrokeringRuns.vue b/src/views/BrokeringRuns.vue index 6d5c8a9..20fed70 100644 --- a/src/views/BrokeringRuns.vue +++ b/src/views/BrokeringRuns.vue @@ -20,13 +20,13 @@ From 28d85e71283793bfa943b39f7295a2faa353e034 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 16 Feb 2024 10:14:17 +0530 Subject: [PATCH 4/4] Improved: UI to display the group description in card only if available(#101) --- src/views/BrokeringRuns.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/BrokeringRuns.vue b/src/views/BrokeringRuns.vue index 20fed70..241f757 100644 --- a/src/views/BrokeringRuns.vue +++ b/src/views/BrokeringRuns.vue @@ -44,7 +44,7 @@ {{ group.groupName }} - + {{ group.description }}