diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 4ae31925..9c22ef78 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -932,7 +932,10 @@ async function submitService() { formDataProductService.value.registeredBranchId = null; } - await createService(formDataProductService.value); + const res = await createService(formDataProductService.value); + if (res) { + stat.value[2].count = stat.value[2].count + 1; + } totalService.value = totalService.value + 1; productAndServiceTab.value = 'service'; } @@ -949,6 +952,7 @@ async function submitService() { if (productAndServiceTab.value === 'service') { await fetchListOfService(); } + flowStore.rotate(); clearFormService(); } @@ -1445,7 +1449,6 @@ watch(inputSearchProductAndService, async () => { -
+ + + + - -
{ + - -
- {{ $t('service') }} -
-
- +
-
- {{ $t('product') }} -
- - + {{ $t('product') }} +
+
+
{ v-if=" { product: tbControl.product.fieldSelected, - + service: tbControl.service.fieldSelected, }[productAndServiceTab].includes( { product: 'productName', service: 'serviceName' }[ @@ -2466,7 +2467,6 @@ watch(inputSearchProductAndService, async () => { { { { + if (props.row.type === 'product') { + deleteTypeOfProduct(props.row.id); + } + if (props.row.type === 'service') { + deleteServiceById(props.row.id); + } } - } - " - + " > { :edit="!(formDataProductService.status === 'INACTIVE')" height="95vh" :isEdit="infoServiceEdit" - :title="$t('service', { msg: formDataProductService.name })" + :title="$t('service')" :tabs-list="serviceTab" v-model:modal="dialogServiceEdit" v-model:current-tab="currentServiceTab"