diff --git a/src/stores/product-service/index.ts b/src/stores/product-service/index.ts index 7f1d8fb0..f8c5d9ae 100644 --- a/src/stores/product-service/index.ts +++ b/src/stores/product-service/index.ts @@ -40,7 +40,11 @@ const useProductServiceStore = defineStore('api-product-service', () => { } async function fetchListProductServiceType( - opts?: { query?: string; productGroupId?: string }, + opts?: { + query?: string; + productGroupId?: string; + status?: 'CREATED' | 'ACTIVE' | 'INACTIVE'; + }, flow?: { sessionId: string; refTransactionId: string; @@ -90,7 +94,7 @@ const useProductServiceStore = defineStore('api-product-service', () => { if (!res) return false; - if (res.status === 200) { + if (res.status === 201) { return res.data; } @@ -154,7 +158,7 @@ const useProductServiceStore = defineStore('api-product-service', () => { } async function fetchListProductService( - opts?: { query?: string }, + opts?: { query?: string; status?: 'CREATED' | 'ACTIVE' | 'INACTIVE' }, flow?: { sessionId: string; refTransactionId: string; @@ -234,7 +238,12 @@ const useProductServiceStore = defineStore('api-product-service', () => { // Product async function fetchListProduct( - opts?: { query?: string; page?: number; pageSize?: number }, + opts?: { + query?: string; + page?: number; + pageSize?: number; + productTypeId?: string; + }, flow?: { sessionId: string; refTransactionId: string; @@ -269,7 +278,7 @@ const useProductServiceStore = defineStore('api-product-service', () => { } async function createProduct(data: ProductCreate) { - const { code, ...payload } = data; + const { ...payload } = data; const res = await api.post('/product', { ...payload,