From 751ecc8eddea09b6e4ebbb150896c99f041de0cf Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Thu, 4 May 2023 14:43:51 +0530 Subject: [PATCH 1/2] Improved: Show old missing SKU value (#200) After a missing product has been mapped with a product in the system, the old value that caused the error should still be visible in the secondary text slot so that users can reconcile their data with the original uploaded data. --- src/components/PurchaseOrderDetail.vue | 3 ++- src/store/modules/order/actions.ts | 1 + src/store/modules/stock/actions.ts | 1 + src/views/InventoryReview.vue | 8 +++++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/PurchaseOrderDetail.vue b/src/components/PurchaseOrderDetail.vue index f5a0babe..c03287c9 100644 --- a/src/components/PurchaseOrderDetail.vue +++ b/src/components/PurchaseOrderDetail.vue @@ -29,7 +29,8 @@ - {{ item.pseudoId }} +

{{ item.pseudoId }}

+

{{ item.initialSKU }}

diff --git a/src/store/modules/order/actions.ts b/src/store/modules/order/actions.ts index 05e5bb52..76494a83 100644 --- a/src/store/modules/order/actions.ts +++ b/src/store/modules/order/actions.ts @@ -56,6 +56,7 @@ const actions: ActionTree = { let original = state.purchaseOrders.original as any; const unidentifiedItems = payload.unidentifiedItems.map((item: any) => { if(item.updatedSku) { + item.initialSKU = item.shopifyProductSKU; item.shopifyProductSKU = item.updatedSku; parsed[item.orderId] ? parsed[item.orderId].push(item) : parsed[item.orderId] = [item]; original[item.orderId] ? original[item.orderId].push(item) : original[item.orderId] = [item]; diff --git a/src/store/modules/stock/actions.ts b/src/store/modules/stock/actions.ts index 45151017..3c6d6ca5 100644 --- a/src/store/modules/stock/actions.ts +++ b/src/store/modules/stock/actions.ts @@ -58,6 +58,7 @@ const actions: ActionTree = { const parsed = state.items.parsed as any; const unidentifiedItems = payload.unidentifiedItems.map((item: any) => { if(item.updatedSku) { + item.initialSKU = item.shopifyProductSKU; item.shopifyProductSKU = item.updatedSku; parsed.push(item); state.items.original.push(item); diff --git a/src/views/InventoryReview.vue b/src/views/InventoryReview.vue index 9656c95f..a88d189c 100644 --- a/src/views/InventoryReview.vue +++ b/src/views/InventoryReview.vue @@ -49,8 +49,9 @@ - - {{ searchedProduct.pseudoId }} + +

{{ searchedProduct.pseudoId }}

+

{{ searchedProduct.initialSKU }}

@@ -102,7 +103,8 @@ - {{ item.pseudoId }} +

{{ item.pseudoId }}

+

{{ item.initialSKU }}

From 7097b62371c35aab0d959696eb02d0949db01759 Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Thu, 4 May 2023 14:47:18 +0530 Subject: [PATCH 2/2] Improved: added conditional check for initial SKU (#200) --- src/components/PurchaseOrderDetail.vue | 2 +- src/views/InventoryReview.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/PurchaseOrderDetail.vue b/src/components/PurchaseOrderDetail.vue index c03287c9..b4ff9cf8 100644 --- a/src/components/PurchaseOrderDetail.vue +++ b/src/components/PurchaseOrderDetail.vue @@ -30,7 +30,7 @@

{{ item.pseudoId }}

-

{{ item.initialSKU }}

+

{{ item.initialSKU }}

diff --git a/src/views/InventoryReview.vue b/src/views/InventoryReview.vue index a88d189c..09f86eb1 100644 --- a/src/views/InventoryReview.vue +++ b/src/views/InventoryReview.vue @@ -51,7 +51,7 @@

{{ searchedProduct.pseudoId }}

-

{{ searchedProduct.initialSKU }}

+

{{ searchedProduct.initialSKU }}

@@ -104,7 +104,7 @@

{{ item.pseudoId }}

-

{{ item.initialSKU }}

+

{{ item.initialSKU }}