refactor: handle status

This commit is contained in:
Thanaphon Frappet 2024-12-18 11:49:26 +07:00
parent fa9b59680f
commit ed6a0cee3d
6 changed files with 23 additions and 15 deletions

View file

@ -164,7 +164,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
list: { url: string; imgFile: File | null; name: string }[];
},
) {
const { image, status, ...payload } = data;
const { image, ...payload } = data;
const res = await api.post<ProductCreate>('/product', {
...payload,
@ -271,7 +271,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
list: { url: string; imgFile: File | null; name: string }[];
},
) {
const { image, status, ...payload } = data;
const { image, ...payload } = data;
const res = await api.post<ServiceCreate & { imageUploadUrl: string }>(
'/service',

View file

@ -232,6 +232,7 @@ export interface ProductGroupCreate {
code: string;
shared?: boolean;
registeredBranchId: string;
status?: Status;
}
export interface ProductGroupUpdate {