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} 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 = () => { - {/* */} +