chore(04): clean unuse
This commit is contained in:
parent
00e2d516b3
commit
07c989d4e6
1 changed files with 0 additions and 356 deletions
|
|
@ -562,28 +562,6 @@ async function fetchListOfOptionBranch() {
|
||||||
currentMyBranch.value?.id || '';
|
currentMyBranch.value?.id || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function fetchListType() {
|
|
||||||
// const res = await fetchListProductServiceType({
|
|
||||||
// page: currentPageType.value,
|
|
||||||
// pageSize: pageSizeType.value,
|
|
||||||
// query: !!inputSearch.value ? inputSearch.value : undefined,
|
|
||||||
// productGroupId: currentIdGrop.value,
|
|
||||||
// status:
|
|
||||||
// currentStatus.value === 'All'
|
|
||||||
// ? undefined
|
|
||||||
// : currentStatus.value === 'ACTIVE'
|
|
||||||
// ? 'ACTIVE'
|
|
||||||
// : 'INACTIVE',
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if (res) {
|
|
||||||
// currentPageType.value = res.page;
|
|
||||||
// totalType.value = res.total;
|
|
||||||
// maxPageType.value = Math.ceil(res.total / pageSizeType.value);
|
|
||||||
// productType.value = res.result;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function fetchListGroups() {
|
async function fetchListGroups() {
|
||||||
const res = await fetchListProductService({
|
const res = await fetchListProductService({
|
||||||
page: currentPageGroup.value,
|
page: currentPageGroup.value,
|
||||||
|
|
@ -691,28 +669,6 @@ async function fetchListOfService() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function submitType() {
|
|
||||||
// if (drawerInfo.value) {
|
|
||||||
// await editProductServiceType(currentIdType.value, {
|
|
||||||
// ...formDataGroup.value,
|
|
||||||
// productGroupId: currentIdGrop.value,
|
|
||||||
// });
|
|
||||||
// drawerInfo.value = false;
|
|
||||||
// } else {
|
|
||||||
// dialogInputForm.value = false;
|
|
||||||
// const res = await createProductServiceType(
|
|
||||||
// currentIdGrop.value,
|
|
||||||
// formDataGroup.value,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// if (res) {
|
|
||||||
// stat.value[1].count = stat.value[1].count + 1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// await fetchListType();
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function toggleStatusProduct(id: string, status: Status) {
|
async function toggleStatusProduct(id: string, status: Status) {
|
||||||
const res = await editProduct(id, {
|
const res = await editProduct(id, {
|
||||||
status: status === 'INACTIVE' ? 'ACTIVE' : 'INACTIVE',
|
status: status === 'INACTIVE' ? 'ACTIVE' : 'INACTIVE',
|
||||||
|
|
@ -732,15 +688,6 @@ async function toggleStatusService(id: string, status: Status) {
|
||||||
await alternativeFetch();
|
await alternativeFetch();
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
}
|
}
|
||||||
// async function toggleStatusType(id: string, status: Status) {
|
|
||||||
// const res = await editProductServiceType(id, {
|
|
||||||
// status: status === 'INACTIVE' ? 'ACTIVE' : 'INACTIVE',
|
|
||||||
// });
|
|
||||||
// if (res) currentStatusGroupType.value = res.status;
|
|
||||||
|
|
||||||
// await fetchListType();
|
|
||||||
// flowStore.rotate();
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function toggleStatusGroup(id: string, status: Status) {
|
async function toggleStatusGroup(id: string, status: Status) {
|
||||||
const res = await editProductService(id, {
|
const res = await editProductService(id, {
|
||||||
|
|
@ -861,11 +808,6 @@ async function deleteProductById(productId?: string) {
|
||||||
message: t('dialog.message.confirmDelete'),
|
message: t('dialog.message.confirmDelete'),
|
||||||
action: async () => {
|
action: async () => {
|
||||||
if (editByTree.value !== undefined) {
|
if (editByTree.value !== undefined) {
|
||||||
// if (editByTree.value === 'type') {
|
|
||||||
// // Product Type
|
|
||||||
// await deleteProductServiceType(productId ?? currentIdType.value);
|
|
||||||
// await fetchListType();
|
|
||||||
// }
|
|
||||||
if (editByTree.value === 'group') {
|
if (editByTree.value === 'group') {
|
||||||
// Product Group
|
// Product Group
|
||||||
const res = await deleteProductService(
|
const res = await deleteProductService(
|
||||||
|
|
@ -881,11 +823,6 @@ async function deleteProductById(productId?: string) {
|
||||||
editByTree.value = undefined;
|
editByTree.value = undefined;
|
||||||
drawerInfo.value = false;
|
drawerInfo.value = false;
|
||||||
} else {
|
} else {
|
||||||
// if (productMode.value === 'type') {
|
|
||||||
// // Product Type
|
|
||||||
// await deleteProductServiceType(productId ?? currentIdType.value);
|
|
||||||
// await fetchListType();
|
|
||||||
// }
|
|
||||||
if (productMode.value === 'group') {
|
if (productMode.value === 'group') {
|
||||||
// Product Group
|
// Product Group
|
||||||
const res = await deleteProductService(
|
const res = await deleteProductService(
|
||||||
|
|
@ -1160,7 +1097,6 @@ async function submitProduct() {
|
||||||
formDataProduct.value.productGroupId = currentIdGrop.value;
|
formDataProduct.value.productGroupId = currentIdGrop.value;
|
||||||
if (profileFileImg.value) {
|
if (profileFileImg.value) {
|
||||||
formDataProduct.value.image = profileFileImg.value;
|
formDataProduct.value.image = profileFileImg.value;
|
||||||
// formDataProduct.value.image = imageProduct.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialogProduct.value) {
|
if (dialogProduct.value) {
|
||||||
|
|
@ -1352,25 +1288,6 @@ async function enterGroup(
|
||||||
if (toService) await enterNext('service');
|
if (toService) await enterNext('service');
|
||||||
else productMode.value = 'group';
|
else productMode.value = 'group';
|
||||||
|
|
||||||
// await fetchListType();
|
|
||||||
// productMode.value = 'type';
|
|
||||||
// flowStore.rotate();
|
|
||||||
// if (
|
|
||||||
// expandedTree.value.length > 1 &&
|
|
||||||
// expandedTree.value[expandedTree.value.length - 1] !== id
|
|
||||||
// ) {
|
|
||||||
// console.log(1);
|
|
||||||
// expandedTree.value.pop();
|
|
||||||
// expandedTree.value.push(id);
|
|
||||||
// } else {
|
|
||||||
// console.log(2);
|
|
||||||
// expandedTree.value.push(id);
|
|
||||||
// }
|
|
||||||
// currentIdType.value = id;
|
|
||||||
// productMode.value = 'service';
|
|
||||||
// productAndServiceTab.value = 'service';
|
|
||||||
// currentStatusList.value.push(status);
|
|
||||||
|
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1388,7 +1305,6 @@ async function enterNext(type: 'service' | 'product') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'service') {
|
if (type === 'service') {
|
||||||
console.log('service');
|
|
||||||
productMode.value = 'service';
|
productMode.value = 'service';
|
||||||
productAndServiceTab.value = 'service';
|
productAndServiceTab.value = 'service';
|
||||||
currentIdType.value = 'type';
|
currentIdType.value = 'type';
|
||||||
|
|
@ -1408,28 +1324,6 @@ async function enterNext(type: 'service' | 'product') {
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function enterType(id: string, name: string, status: Status) {
|
|
||||||
// if (
|
|
||||||
// expandedTree.value.length > 1 &&
|
|
||||||
// expandedTree.value[expandedTree.value.length - 1] !== id
|
|
||||||
// ) {
|
|
||||||
// expandedTree.value.pop();
|
|
||||||
// expandedTree.value.push(id);
|
|
||||||
// } else {
|
|
||||||
// expandedTree.value.push(id);
|
|
||||||
// }
|
|
||||||
// pathTypeName.value = name;
|
|
||||||
// currentIdType.value = id;
|
|
||||||
// productMode.value = 'service';
|
|
||||||
// productAndServiceTab.value = 'service';
|
|
||||||
// currentStatusList.value.push(status);
|
|
||||||
|
|
||||||
// await fetchListOfProduct();
|
|
||||||
// await fetchListOfService();
|
|
||||||
|
|
||||||
// flowStore.rotate();
|
|
||||||
// }
|
|
||||||
|
|
||||||
function handleStatus() {
|
function handleStatus() {
|
||||||
let tempValue = false;
|
let tempValue = false;
|
||||||
|
|
||||||
|
|
@ -1446,8 +1340,6 @@ function handleHold(node: ProductGroup & { type: string }) {
|
||||||
if ($q.screen.gt.xs) return;
|
if ($q.screen.gt.xs) return;
|
||||||
holdDialog.value = true;
|
holdDialog.value = true;
|
||||||
currentNode.value = node;
|
currentNode.value = node;
|
||||||
// return function (props: unknown) {
|
|
||||||
// };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
@ -1546,9 +1438,6 @@ watch(currentStatus, async () => {
|
||||||
if (productMode.value === 'group') {
|
if (productMode.value === 'group') {
|
||||||
await fetchListGroups();
|
await fetchListGroups();
|
||||||
}
|
}
|
||||||
// else {
|
|
||||||
// await fetchListType();
|
|
||||||
// }
|
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1557,11 +1446,6 @@ watch(inputSearch, async () => {
|
||||||
await fetchListGroups();
|
await fetchListGroups();
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (productMode.value === 'type') {
|
|
||||||
// await fetchListType();
|
|
||||||
// flowStore.rotate();
|
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(inputSearchProductAndService, async () => {
|
watch(inputSearchProductAndService, async () => {
|
||||||
|
|
@ -1610,22 +1494,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<!-- <q-fab-action
|
|
||||||
v-if="productMode === 'type'"
|
|
||||||
id="btn-add-product-type"
|
|
||||||
:label="$t('productService.type.addTitle')"
|
|
||||||
external-label
|
|
||||||
label-position="left"
|
|
||||||
style="color: white; background-color: hsla(var(--purple-11-hsl))"
|
|
||||||
padding="xs"
|
|
||||||
icon="mdi-folder-multiple-plus-outline"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
clearFormGroup();
|
|
||||||
dialogInputForm = true;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
></q-fab-action> -->
|
|
||||||
<q-fab-action
|
<q-fab-action
|
||||||
v-if="productMode === 'product'"
|
v-if="productMode === 'product'"
|
||||||
:label="$t('productService.product.addTitle')"
|
:label="$t('productService.product.addTitle')"
|
||||||
|
|
@ -1730,8 +1598,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
async (v: (typeof treeProductTypeAndGroup)[number]) => {
|
async (v: (typeof treeProductTypeAndGroup)[number]) => {
|
||||||
if (v.type === 'group') {
|
if (v.type === 'group') {
|
||||||
if (currentIdGrop !== v.id) {
|
if (currentIdGrop !== v.id) {
|
||||||
// filterStat.push('group');
|
|
||||||
// currentStatusList = [];
|
|
||||||
await enterGroup(v.id, v.name, v.status);
|
await enterGroup(v.id, v.name, v.status);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -2015,13 +1881,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
@click="
|
@click="
|
||||||
async () => {
|
async () => {
|
||||||
filterStat.push(productMode);
|
filterStat.push(productMode);
|
||||||
// if (productMode === 'type') {
|
|
||||||
// await enterType(
|
|
||||||
// props.row.id,
|
|
||||||
// props.row.name,
|
|
||||||
// props.row.status,
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
await enterGroup(
|
await enterGroup(
|
||||||
props.row.id,
|
props.row.id,
|
||||||
|
|
@ -2130,16 +1989,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
flat
|
flat
|
||||||
@click.stop="
|
@click.stop="
|
||||||
() => {
|
() => {
|
||||||
// if (productMode === 'type') {
|
|
||||||
// editByTree = 'type';
|
|
||||||
// currentStatusProduct =
|
|
||||||
// props.row.status === 'INACTIVE';
|
|
||||||
// clearFormGroup();
|
|
||||||
// currentIdType = props.row.id;
|
|
||||||
// assignFormDataGroup(props.row);
|
|
||||||
// isEdit = false;
|
|
||||||
// drawerInfo = true;
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
editByTree = 'group';
|
editByTree = 'group';
|
||||||
currentStatusProduct =
|
currentStatusProduct =
|
||||||
|
|
@ -2160,16 +2009,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
:idName="props.row.name"
|
:idName="props.row.name"
|
||||||
@view="
|
@view="
|
||||||
() => {
|
() => {
|
||||||
// if (productMode === 'type') {
|
|
||||||
// editByTree = 'type';
|
|
||||||
// currentStatusProduct =
|
|
||||||
// props.row.status === 'INACTIVE';
|
|
||||||
// clearFormGroup();
|
|
||||||
// currentIdType = props.row.id;
|
|
||||||
// assignFormDataGroup(props.row);
|
|
||||||
// isEdit = false;
|
|
||||||
// drawerInfo = true;
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
editByTree = 'group';
|
editByTree = 'group';
|
||||||
currentStatusProduct =
|
currentStatusProduct =
|
||||||
|
|
@ -2184,14 +2023,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
"
|
"
|
||||||
@edit="
|
@edit="
|
||||||
() => {
|
() => {
|
||||||
// if (productMode === 'type') {
|
|
||||||
// editByTree = 'type';
|
|
||||||
// clearFormGroup();
|
|
||||||
// currentIdType = props.row.id;
|
|
||||||
// assignFormDataGroup(props.row);
|
|
||||||
// isEdit = true;
|
|
||||||
// drawerInfo = true;
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
editByTree = 'group';
|
editByTree = 'group';
|
||||||
clearFormGroup();
|
clearFormGroup();
|
||||||
|
|
@ -2205,9 +2036,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
"
|
"
|
||||||
@delete="
|
@delete="
|
||||||
() => {
|
() => {
|
||||||
// if (productMode === 'type') {
|
|
||||||
// deleteProductById(props.row.id);
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
deleteProductById(props.row.id);
|
deleteProductById(props.row.id);
|
||||||
}
|
}
|
||||||
|
|
@ -2228,7 +2056,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
|
|
||||||
<template v-slot:item="props">
|
<template v-slot:item="props">
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
<div class="col-12 col-md-6 col-lg-4">
|
||||||
<!-- :isType="productMode === 'type'" -->
|
|
||||||
<ProductCardComponent
|
<ProductCardComponent
|
||||||
:count-product="props.row._count.product"
|
:count-product="props.row._count.product"
|
||||||
:count-type="props.row._count.type"
|
:count-type="props.row._count.type"
|
||||||
|
|
@ -2255,16 +2082,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
"
|
"
|
||||||
@viewCard="
|
@viewCard="
|
||||||
() => {
|
() => {
|
||||||
// if (productMode === 'type') {
|
|
||||||
// editByTree = 'type';
|
|
||||||
// currentStatusProduct =
|
|
||||||
// props.row.status === 'INACTIVE';
|
|
||||||
// clearFormGroup();
|
|
||||||
// currentIdType = props.row.id;
|
|
||||||
// assignFormDataGroup(props.row);
|
|
||||||
// isEdit = false;
|
|
||||||
// drawerInfo = true;
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
editByTree = 'group';
|
editByTree = 'group';
|
||||||
currentStatusProduct =
|
currentStatusProduct =
|
||||||
|
|
@ -2279,13 +2096,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
"
|
"
|
||||||
@updateCard="
|
@updateCard="
|
||||||
() => {
|
() => {
|
||||||
// if (productMode === 'type') {
|
|
||||||
// clearFormGroup();
|
|
||||||
// currentIdType = props.row.id;
|
|
||||||
// assignFormDataGroup(props.row);
|
|
||||||
// isEdit = true;
|
|
||||||
// drawerInfo = true;
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
clearFormGroup();
|
clearFormGroup();
|
||||||
assignFormDataGroup(props.row);
|
assignFormDataGroup(props.row);
|
||||||
|
|
@ -2298,9 +2108,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
"
|
"
|
||||||
@deleteCard="
|
@deleteCard="
|
||||||
() => {
|
() => {
|
||||||
// if (productMode === 'type') {
|
|
||||||
// deleteProductById(props.row.id);
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
deleteProductById(props.row.id);
|
deleteProductById(props.row.id);
|
||||||
}
|
}
|
||||||
|
|
@ -2309,13 +2116,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
@on-click="
|
@on-click="
|
||||||
async () => {
|
async () => {
|
||||||
filterStat.push(productMode);
|
filterStat.push(productMode);
|
||||||
// if (productMode === 'type') {
|
|
||||||
// await enterType(
|
|
||||||
// props.row.id,
|
|
||||||
// props.row.name,
|
|
||||||
// props.row.status,
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
await enterGroup(
|
await enterGroup(
|
||||||
props.row.id,
|
props.row.id,
|
||||||
|
|
@ -2396,70 +2196,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div
|
|
||||||
v-if="productMode === 'type'"
|
|
||||||
class="row justify-between items-center q-px-md q-py-sm full-width"
|
|
||||||
>
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="row items-center">
|
|
||||||
<div
|
|
||||||
class="app-text-muted q-mr-sm"
|
|
||||||
v-if="$q.screen.gt.sm"
|
|
||||||
>
|
|
||||||
{{ $t('general.recordPerPage') }}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<q-btn-dropdown
|
|
||||||
dense
|
|
||||||
unelevated
|
|
||||||
:label="pageSizeType"
|
|
||||||
class="bordered q-pl-md"
|
|
||||||
>
|
|
||||||
<q-list>
|
|
||||||
<q-item
|
|
||||||
v-for="v in [10, 30, 50, 100, 500, 1000]"
|
|
||||||
:key="v"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
async () => {
|
|
||||||
pageSizeType = v;
|
|
||||||
await fetchListType();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>{{ v }}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-btn-dropdown>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-4 row justify-center app-text-muted">
|
|
||||||
{{
|
|
||||||
$t('general.recordsPage', {
|
|
||||||
resultcurrentPage: productType?.length,
|
|
||||||
total: totalType,
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div class="col-4 row justify-end">
|
|
||||||
<PaginationComponent
|
|
||||||
v-model:current-page="currentPageType"
|
|
||||||
v-model:max-page="maxPageType"
|
|
||||||
:fetch-data="
|
|
||||||
async () => {
|
|
||||||
await fetchListType();
|
|
||||||
flowStore.rotate();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -2598,66 +2334,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="surface-2 bordered-b q-px-md">
|
|
||||||
<q-tabs
|
|
||||||
dense
|
|
||||||
v-model="productAndServiceTab"
|
|
||||||
active-color="info"
|
|
||||||
align="left"
|
|
||||||
>
|
|
||||||
<q-tab
|
|
||||||
id="tab-service"
|
|
||||||
name="service"
|
|
||||||
class="text-capitalize"
|
|
||||||
@click="
|
|
||||||
async () => {
|
|
||||||
currentPageServiceAndProduct = 1;
|
|
||||||
inputSearchProductAndService = '';
|
|
||||||
currentStatus = 'All';
|
|
||||||
// await fetchListOfService();
|
|
||||||
flowStore.rotate();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="row"
|
|
||||||
:class="
|
|
||||||
productAndServiceTab === 'service'
|
|
||||||
? 'text-bold'
|
|
||||||
: 'app-text-muted'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ $t('productService.service.title') }}
|
|
||||||
</div>
|
|
||||||
</q-tab>
|
|
||||||
<q-tab
|
|
||||||
id="tab-product"
|
|
||||||
name="product"
|
|
||||||
class="text-capitalize"
|
|
||||||
@click="
|
|
||||||
async () => {
|
|
||||||
currentPageServiceAndProduct = 1;
|
|
||||||
inputSearchProductAndService = '';
|
|
||||||
currentStatus = 'All';
|
|
||||||
// await fetchListOfProduct();
|
|
||||||
flowStore.rotate();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="row"
|
|
||||||
:class="
|
|
||||||
productAndServiceTab === 'product'
|
|
||||||
? 'text-bold'
|
|
||||||
: 'app-text-muted'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ $t('productService.product.title') }}
|
|
||||||
</div>
|
|
||||||
</q-tab>
|
|
||||||
</q-tabs>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
(productAndServiceTab === 'product' &&
|
(productAndServiceTab === 'product' &&
|
||||||
|
|
@ -3337,17 +3013,11 @@ watch([currentStatusList, productMode], async () => {
|
||||||
if (editByTree === 'group') {
|
if (editByTree === 'group') {
|
||||||
submitGroup();
|
submitGroup();
|
||||||
}
|
}
|
||||||
// if (editByTree === 'type') {
|
|
||||||
// submitType();
|
|
||||||
// }
|
|
||||||
editByTree = undefined;
|
editByTree = undefined;
|
||||||
} else {
|
} else {
|
||||||
if (productMode === 'group') {
|
if (productMode === 'group') {
|
||||||
submitGroup();
|
submitGroup();
|
||||||
}
|
}
|
||||||
// if (productMode === 'type') {
|
|
||||||
// submitType();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
|
@ -4468,15 +4138,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
if (!currentNode) return;
|
if (!currentNode) return;
|
||||||
|
|
||||||
await fetchListOfOptionBranch();
|
await fetchListOfOptionBranch();
|
||||||
// if (currentNode.type === 'type') {
|
|
||||||
// editByTree = 'type';
|
|
||||||
// currentStatusProduct = currentNode.status === 'INACTIVE';
|
|
||||||
// clearFormGroup();
|
|
||||||
// currentIdType = currentNode.id;
|
|
||||||
// assignFormDataGroup(currentNode);
|
|
||||||
// isEdit = false;
|
|
||||||
// drawerInfo = true;
|
|
||||||
// }
|
|
||||||
if (currentNode.type === 'group') {
|
if (currentNode.type === 'group') {
|
||||||
editByTree = 'group';
|
editByTree = 'group';
|
||||||
currentStatusProduct = currentNode.status === 'INACTIVE';
|
currentStatusProduct = currentNode.status === 'INACTIVE';
|
||||||
|
|
@ -4506,13 +4167,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
() => {
|
() => {
|
||||||
if (!currentNode) return;
|
if (!currentNode) return;
|
||||||
editByTree = currentNode.type as 'type' | 'group';
|
editByTree = currentNode.type as 'type' | 'group';
|
||||||
// if (currentNode.type === 'type') {
|
|
||||||
// clearFormGroup();
|
|
||||||
// currentIdType = currentNode.id;
|
|
||||||
// assignFormDataGroup(currentNode);
|
|
||||||
// isEdit = true;
|
|
||||||
// drawerInfo = true;
|
|
||||||
// }
|
|
||||||
if (currentNode.type === 'group') {
|
if (currentNode.type === 'group') {
|
||||||
clearFormGroup();
|
clearFormGroup();
|
||||||
assignFormDataGroup(currentNode);
|
assignFormDataGroup(currentNode);
|
||||||
|
|
@ -4566,16 +4220,6 @@ watch([currentStatusList, productMode], async () => {
|
||||||
@click="
|
@click="
|
||||||
async () => {
|
async () => {
|
||||||
if (!currentNode) return;
|
if (!currentNode) return;
|
||||||
// if (currentNode.type === 'type') {
|
|
||||||
// triggerChangeStatus(
|
|
||||||
// currentNode.id,
|
|
||||||
// currentNode.status,
|
|
||||||
// currentNode.type,
|
|
||||||
// );
|
|
||||||
// currentNode.status === 'ACTIVE'
|
|
||||||
// ? (currentNode.status = 'INACTIVE')
|
|
||||||
// : (currentNode.status = 'ACTIVE');
|
|
||||||
// }
|
|
||||||
if (currentNode.type === 'group') {
|
if (currentNode.type === 'group') {
|
||||||
triggerChangeStatus(
|
triggerChangeStatus(
|
||||||
currentNode.id,
|
currentNode.id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue