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
+19 -3
View File
@@ -1,4 +1,4 @@
import { BaseMetadata } from '@/types/api/api-general';
import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
import { Supplier } from '@/types/api/master-data/supplier';
import { Warehouse } from '@/types/api/master-data/warehouse';
import { Product } from '@/types/api/master-data/product';
@@ -6,11 +6,25 @@ import { ProductWarehouse } from '@/types/api/inventory/product-warehouse';
import { Area } from '@/types/api/master-data/area';
import { Location } from '@/types/api/master-data/location';
export type PurchaseItemProduct = {
id: number;
name: string;
flags?: string[];
uom?: {
name: string;
};
product_category?:
| {
name: string;
}
| string;
};
export type PurchaseItem = {
id: number;
purchase_id?: number;
product_id: number;
warehouse: Warehouse;
product: Product;
product: PurchaseItemProduct | Product;
product_warehouse: ProductWarehouse;
quantity: number;
qty: number;
@@ -22,6 +36,7 @@ export type PurchaseItem = {
received_date?: string | null;
travel_number?: string | null;
travel_number_docs?: string | null;
travel_document_path?: string | null;
vehicle_number?: string | null;
};
@@ -42,6 +57,7 @@ export type BasePurchase = {
location?: Location;
warehouse?: Warehouse;
items?: PurchaseItem[];
approval?: BaseApproval;
};
export type Purchase = BaseMetadata & BasePurchase;