fix: แก้ไขสินค้า และ บริการ ไม่อัปเดต
This commit is contained in:
parent
0bc0c2efa9
commit
018edf688b
1 changed files with 19 additions and 11 deletions
|
|
@ -763,24 +763,26 @@ async function submitService() {
|
|||
formDataProductService.value.productTypeId = currentIdType.value;
|
||||
|
||||
if (dialogService.value) {
|
||||
const res = await createService(formDataProductService.value);
|
||||
if (res) {
|
||||
await fetchListOfService();
|
||||
}
|
||||
await createService(formDataProductService.value);
|
||||
totalService.value = totalService.value + 1;
|
||||
}
|
||||
|
||||
if (dialogServiceEdit.value) {
|
||||
const res = await editService(currentIdService.value, {
|
||||
await editService(currentIdService.value, {
|
||||
...formDataProductService.value,
|
||||
status: statusToggle.value
|
||||
? formDataProductService.value.status
|
||||
: 'INACTIVE',
|
||||
});
|
||||
if (res) {
|
||||
await fetchListOfService();
|
||||
}
|
||||
}
|
||||
totalService.value = totalService.value + 1;
|
||||
|
||||
if (productAndServiceTab.value === 'all') {
|
||||
await fetchListOfProductAndService();
|
||||
}
|
||||
if (productAndServiceTab.value === 'service') {
|
||||
await fetchListOfService();
|
||||
}
|
||||
|
||||
clearFormService();
|
||||
}
|
||||
|
||||
|
|
@ -806,7 +808,13 @@ async function submitProduct() {
|
|||
}
|
||||
totalProduct.value = totalProduct.value + 1;
|
||||
clearFormProduct();
|
||||
await fetchListOfProduct(currentIdType.value);
|
||||
|
||||
if (productAndServiceTab.value === 'all') {
|
||||
await fetchListOfProductAndService();
|
||||
}
|
||||
if (productAndServiceTab.value === 'product') {
|
||||
await fetchListOfProduct(currentIdType.value);
|
||||
}
|
||||
}
|
||||
|
||||
async function submitGroup() {
|
||||
|
|
@ -1003,7 +1011,7 @@ watch(currentPageService, async () => {
|
|||
:label="$t('addService')"
|
||||
external-label
|
||||
label-position="left"
|
||||
style="color: white; background-color: hsla(var(--blue-11-hsl))"
|
||||
style="color: white; background-color: hsla(var(--orange-6-hsl))"
|
||||
padding="xs"
|
||||
icon="mdi-folder-multiple-plus"
|
||||
@click="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue