mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +00:00
chore: update product type
This commit is contained in:
+12
-9
@@ -1,20 +1,20 @@
|
|||||||
import { BaseMetadata } from '@/types/api/api-general';
|
import { BaseMetadata } from '@/types/api/api-general';
|
||||||
import { Uom } from '@/types/api/master-data/uom';
|
import { Uom } from '@/types/api/master-data/uom';
|
||||||
import { ProductCategory } from '@/types/api/master-data/product-category';
|
import { ProductCategory } from '@/types/api/master-data/product-category';
|
||||||
import { Supplier } from '@/types/api/master-data/supplier';
|
import { BaseSupplier, Supplier } from '@/types/api/master-data/supplier';
|
||||||
|
|
||||||
export type BaseProduct = {
|
export type BaseProduct = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
brand: string;
|
brand: string;
|
||||||
sku: string;
|
sku?: string;
|
||||||
product_price: number;
|
product_price: number;
|
||||||
selling_price?: number;
|
selling_price?: number;
|
||||||
tax?: number;
|
tax?: number;
|
||||||
expiry_period: number;
|
expiry_period?: number;
|
||||||
uom: Uom;
|
uom: Uom;
|
||||||
product_category: ProductCategory;
|
product_category: ProductCategory;
|
||||||
suppliers: Supplier[];
|
suppliers: (BaseSupplier & { price: number })[];
|
||||||
flags: string[];
|
flags: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -23,14 +23,17 @@ export type Product = BaseMetadata & BaseProduct;
|
|||||||
export type CreateProductPayload = {
|
export type CreateProductPayload = {
|
||||||
name: string;
|
name: string;
|
||||||
brand: string;
|
brand: string;
|
||||||
sku: string;
|
sku?: string;
|
||||||
uom_id: number;
|
uom_id: number;
|
||||||
product_category_id: number;
|
product_category_id: number;
|
||||||
product_price: number;
|
product_price: number;
|
||||||
selling_price: number;
|
selling_price?: number;
|
||||||
tax: number;
|
tax?: number;
|
||||||
expiry_period: number;
|
expiry_period?: number;
|
||||||
supplier_ids: number[];
|
suppliers: {
|
||||||
|
supplier_id: number;
|
||||||
|
price: number;
|
||||||
|
}[];
|
||||||
flags: string[];
|
flags: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user