feat(FE-328-329-330): Adding Feature Inventory Product Stocks

This commit is contained in:
randy-ar
2025-12-04 02:05:34 +07:00
parent 873a4b308d
commit 3e07316678
12 changed files with 780 additions and 41 deletions
+45
View File
@@ -0,0 +1,45 @@
import { BaseMetadata } from '@/types/api/api-general';
import { ProductWarehouse } from '@/types/api/inventory/product-warehouse';
import { ProductCategory } from '@/types/api/master-data/product-category';
import { Supplier } from '@/types/api/master-data/supplier';
import { Uom } from '@/types/api/master-data/uom';
export type BaseInventoryProduct = {
id: number;
name: string;
brand: string;
sku: string;
product_price: number;
selling_price?: number;
tax?: number;
expiry_period?: number;
uom: Uom;
product_category: ProductCategory;
suppliers: Supplier[];
flags: string[];
product_warehouses?: ProductWarehouseStock[];
};
export type ProductWarehouseStock = {
id: number;
product_id: number;
warehouse_id: number;
warehouse_name: string;
location: Location | string;
current_stock: number;
stock_logs: StockLog[];
};
export type StockLog = {
id: number;
increase: number;
decrease: number;
loggable_type: string;
loggable_id: number;
notes: string;
product_warehouse_id: number;
created_by: number;
created_at: string;
};
export type InventoryProduct = BaseInventoryProduct & BaseMetadata;