refactor(FE): Refactor product flags to support single flag and

sub-flags
This commit is contained in:
rstubryan
2026-02-27 14:57:45 +07:00
parent 16f2f2bc06
commit a4378ebd04
4 changed files with 81 additions and 24 deletions
+6 -2
View File
@@ -15,7 +15,10 @@ export type BaseProduct = {
uom: Uom;
product_category: ProductCategory;
suppliers: (BaseSupplier & { price: number })[];
flags: string[];
flag: string;
sub_flag?: string;
sub_flags?: string[];
flags?: string[];
};
export type Product = BaseMetadata & BaseProduct;
@@ -34,7 +37,8 @@ export type CreateProductPayload = {
supplier_id: number;
price: number;
}[];
flags: string[];
flag: string;
sub_flags?: string[];
};
export type UpdateProductPayload = CreateProductPayload;