From 5279bc91ef6420121885b7c4dcb44c977fa3970c Mon Sep 17 00:00:00 2001 From: Sibunnayak Date: Thu, 10 Oct 2024 18:13:27 +0530 Subject: [PATCH 1/2] pd table fixed --- .../principalDistributor.js | 66 ++++++++++--------- .../SalesCoOrdinators/SalesCoOrdinator.js | 4 +- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/src/views/PrincipalDistributors/principalDistributor.js b/src/views/PrincipalDistributors/principalDistributor.js index 5f4ed85..e72c559 100644 --- a/src/views/PrincipalDistributors/principalDistributor.js +++ b/src/views/PrincipalDistributors/principalDistributor.js @@ -208,24 +208,28 @@ const principalDistributor = () => {
- - - - - {/* */} - - - - - - + + + + + + + + + @@ -241,8 +245,8 @@ const principalDistributor = () => { - - + - {/* {loading1 && ( @@ -295,7 +300,7 @@ const principalDistributor = () => { _id={user?._id} setLoading1={setLoading1} /> */} - -
Unique Id SBUNameEmailProfile ImageDate RegisteredLast PurchaseOrdersMappingActionUnique IdSBUNameEmailDate RegisteredLast PurchaseOrdersMapping + Action +
{user.uniqueId} {user.SBU ? user.SBU : "N/A"} {user.name}{user.email} + {user.email} {new Date(user.createdAt).toLocaleString( "en-IN", { @@ -268,20 +272,21 @@ const principalDistributor = () => { ) : "No purchase"} + - + + @@ -311,7 +316,7 @@ const principalDistributor = () => { + {/* @@ -381,7 +386,7 @@ const principalDistributor = () => { > @@ -392,14 +397,15 @@ const principalDistributor = () => { - {/* */} + From 54b64f5b64c83824d372e2faefb861519a36cda7 Mon Sep 17 00:00:00 2001 From: Sibunnayak Date: Fri, 11 Oct 2024 11:41:09 +0530 Subject: [PATCH 2/2] invantory fixed --- src/views/Inventory/Inventory.js | 7 ++----- src/views/Inventory/SingleInventory.js | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/views/Inventory/Inventory.js b/src/views/Inventory/Inventory.js index 5084ef3..dee4892 100644 --- a/src/views/Inventory/Inventory.js +++ b/src/views/Inventory/Inventory.js @@ -33,15 +33,12 @@ const Inventory = () => { name: nameRef.current?.value || "", }, }); - + // console.log("response", response); const transformedData = response.data?.inventories?.map((entry) => ({ id: entry._id, uniqueId: entry.uniqueId, - tradeName: - entry.addedForData?.shippingAddress?.tradeName || - entry.addedForData?.trade_name || - "N/A", + tradeName: entry.tradeName || "N/A", designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "RD", products: entry.products.map((product) => ({ SKU: product.SKU, diff --git a/src/views/Inventory/SingleInventory.js b/src/views/Inventory/SingleInventory.js index f62f98c..a2121a9 100644 --- a/src/views/Inventory/SingleInventory.js +++ b/src/views/Inventory/SingleInventory.js @@ -140,7 +140,7 @@ const SingleInventory = () => { Trade Name:{" "} - {inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.trade_name} + {inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.kyc.trade_name}