invantory fixed
This commit is contained in:
parent
5279bc91ef
commit
54b64f5b64
@ -33,15 +33,12 @@ const Inventory = () => {
|
|||||||
name: nameRef.current?.value || "",
|
name: nameRef.current?.value || "",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// console.log("response", response);
|
||||||
const transformedData =
|
const transformedData =
|
||||||
response.data?.inventories?.map((entry) => ({
|
response.data?.inventories?.map((entry) => ({
|
||||||
id: entry._id,
|
id: entry._id,
|
||||||
uniqueId: entry.uniqueId,
|
uniqueId: entry.uniqueId,
|
||||||
tradeName:
|
tradeName: entry.tradeName || "N/A",
|
||||||
entry.addedForData?.shippingAddress?.tradeName ||
|
|
||||||
entry.addedForData?.trade_name ||
|
|
||||||
"N/A",
|
|
||||||
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "RD",
|
designation: entry.addedFor === "PrincipalDistributor" ? "PD" : "RD",
|
||||||
products: entry.products.map((product) => ({
|
products: entry.products.map((product) => ({
|
||||||
SKU: product.SKU,
|
SKU: product.SKU,
|
||||||
|
@ -140,7 +140,7 @@ const SingleInventory = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
<strong>Trade Name:</strong>{" "}
|
<strong>Trade Name:</strong>{" "}
|
||||||
{inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.trade_name}
|
{inventoryDetails.addedForData.shippingAddress?.tradeName||inventoryDetails.addedForData.kyc.trade_name}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Loading…
Reference in New Issue
Block a user