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;
|
formDataProductService.value.productTypeId = currentIdType.value;
|
||||||
|
|
||||||
if (dialogService.value) {
|
if (dialogService.value) {
|
||||||
const res = await createService(formDataProductService.value);
|
await createService(formDataProductService.value);
|
||||||
if (res) {
|
totalService.value = totalService.value + 1;
|
||||||
await fetchListOfService();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialogServiceEdit.value) {
|
if (dialogServiceEdit.value) {
|
||||||
const res = await editService(currentIdService.value, {
|
await editService(currentIdService.value, {
|
||||||
...formDataProductService.value,
|
...formDataProductService.value,
|
||||||
status: statusToggle.value
|
status: statusToggle.value
|
||||||
? formDataProductService.value.status
|
? formDataProductService.value.status
|
||||||
: 'INACTIVE',
|
: 'INACTIVE',
|
||||||
});
|
});
|
||||||
if (res) {
|
}
|
||||||
|
|
||||||
|
if (productAndServiceTab.value === 'all') {
|
||||||
|
await fetchListOfProductAndService();
|
||||||
|
}
|
||||||
|
if (productAndServiceTab.value === 'service') {
|
||||||
await fetchListOfService();
|
await fetchListOfService();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
totalService.value = totalService.value + 1;
|
|
||||||
clearFormService();
|
clearFormService();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -806,7 +808,13 @@ async function submitProduct() {
|
||||||
}
|
}
|
||||||
totalProduct.value = totalProduct.value + 1;
|
totalProduct.value = totalProduct.value + 1;
|
||||||
clearFormProduct();
|
clearFormProduct();
|
||||||
|
|
||||||
|
if (productAndServiceTab.value === 'all') {
|
||||||
|
await fetchListOfProductAndService();
|
||||||
|
}
|
||||||
|
if (productAndServiceTab.value === 'product') {
|
||||||
await fetchListOfProduct(currentIdType.value);
|
await fetchListOfProduct(currentIdType.value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submitGroup() {
|
async function submitGroup() {
|
||||||
|
|
@ -1003,7 +1011,7 @@ watch(currentPageService, async () => {
|
||||||
:label="$t('addService')"
|
:label="$t('addService')"
|
||||||
external-label
|
external-label
|
||||||
label-position="left"
|
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"
|
padding="xs"
|
||||||
icon="mdi-folder-multiple-plus"
|
icon="mdi-folder-multiple-plus"
|
||||||
@click="
|
@click="
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue