mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
feat(FE-42): add Product API and form validation schema with product flags
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
import { Uom } from '@/types/api/master-data/uom';
|
||||
import { ProductCategory } from '@/types/api/master-data/product-category';
|
||||
import { Supplier } from '@/types/api/master-data/supplier';
|
||||
|
||||
export type BaseProduct = {
|
||||
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[];
|
||||
};
|
||||
|
||||
export type Product = BaseMetadata & BaseProduct;
|
||||
|
||||
export type CreateProductPayload = {
|
||||
name: string;
|
||||
brand: string;
|
||||
sku: string;
|
||||
uom_id: number;
|
||||
product_category_id: number;
|
||||
product_price: number;
|
||||
selling_price: number;
|
||||
tax: number;
|
||||
expiry_period: number;
|
||||
supplier_ids: number[];
|
||||
flags: string[];
|
||||
};
|
||||
|
||||
export type UpdateProductPayload = CreateProductPayload;
|
||||
Reference in New Issue
Block a user