invantory fixed
This commit is contained in:
parent
5279bc91ef
commit
54b64f5b64
@ -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,
|
||||
|
@ -140,7 +140,7 @@ const SingleInventory = () => {
|
||||
</Typography>
|
||||
<Typography>
|
||||
<strong>Trade Name:</strong>{" "}
|
||||
{inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.trade_name}
|
||||
{inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.kyc.trade_name}
|
||||
</Typography>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
Loading…
Reference in New Issue
Block a user