fix: แก้ type
This commit is contained in:
parent
8b1fd91bdd
commit
987c82f5c4
2 changed files with 6 additions and 2 deletions
|
|
@ -105,7 +105,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
|
||||
async function editProductServiceType(
|
||||
groupId: string,
|
||||
data: ProductGroupUpdate & { productGroupId: string },
|
||||
data: Partial<ProductGroupUpdate & { productGroupId: string }>,
|
||||
) {
|
||||
const { code, ...payload } = data;
|
||||
|
||||
|
|
@ -210,7 +210,10 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
return false;
|
||||
}
|
||||
|
||||
async function editProductService(groupId: string, data: ProductGroupUpdate) {
|
||||
async function editProductService(
|
||||
groupId: string,
|
||||
data: Partial<ProductGroupUpdate>,
|
||||
) {
|
||||
const { code, ...payload } = data;
|
||||
|
||||
const res = await api.put<ProductGroupUpdate>(`/product-group/${groupId}`, {
|
||||
|
|
|
|||
|
|
@ -147,4 +147,5 @@ export interface ProductGroupUpdate {
|
|||
detail: string;
|
||||
name: string;
|
||||
code: string;
|
||||
status: Status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue