feat(FE-218,212,213): implement PurchaseOrderDetail component and update related types

This commit is contained in:
rstubryan
2025-11-18 14:30:09 +07:00
parent edd59598f9
commit e8dd4f3759
5 changed files with 102 additions and 388 deletions
@@ -206,15 +206,13 @@ const PurchaseOrderAcceptApprovalForm = ({
if (initialValues?.items) {
return initialValues.items.map((item) => ({
value: item.id,
label: `${item.product.name} (${item.quantity} ${item.product.uom.name})`,
label: `${item.product.name} (${item.quantity} ${item.product.uom?.name || 'unit'})`,
id: item.id,
quantity: item.quantity,
product: {
name: item.product.name,
product_category: item.product.product_category,
uom: {
name: item.product.uom.name,
},
uom: item.product.uom,
},
warehouse: {
name: item.warehouse?.name || '',
@@ -44,7 +44,7 @@ const PurchaseOrderStaffApprovalForm = ({
product: {
name: string;
type?: string;
uom: {
uom?: {
name: string;
};
};
@@ -170,15 +170,13 @@ const PurchaseOrderStaffApprovalForm = ({
if (initialValues?.items) {
return initialValues.items.map((item) => ({
value: item.id,
label: `${item.product.name} (${item.quantity} ${item.product.uom.name})`,
label: `${item.product.name} (${item.quantity} ${item.product.uom?.name || 'unit'})`,
id: item.id,
quantity: item.quantity,
product: {
name: item.product.name,
product_category: item.product.product_category,
uom: {
name: item.product.uom.name,
},
uom: item.product.uom,
},
warehouse: {
name: item.warehouse?.name || '',