refacrot: (03) edit path

This commit is contained in:
Net 2024-07-24 14:32:14 +07:00
parent 999fe6a30e
commit 0bd2c0b3a0

View file

@ -1413,7 +1413,16 @@ async function fetchListStatsEmployeeGender() {
onMounted(async () => {
utilsStore.currentTitle.title = 'customerManagement';
utilsStore.currentTitle.path = [{ text: 'customerManagementCaption' }];
utilsStore.currentTitle.path = [
{
text: 'customerManagementCaption',
handler: () => {
isMainPage.value = true;
currentCustomerUrlImage.value = null;
clearForm();
},
},
];
modeView.value = $q.screen.lt.md ? true : false;
const resultStats = await getStatsCustomer();
@ -1560,6 +1569,27 @@ watch(
if (v) modeView.value = true;
},
);
watch(isMainPage, () => {
const tmp: typeof utilsStore.currentTitle.path = [
{
text: 'customerManagementCaption',
handler: () => {
isMainPage.value = true;
currentCustomerUrlImage.value = null;
clearForm();
},
},
];
if (isMainPage.value === false) {
tmp.push({
text: currentCustomerName.value || '',
});
}
utilsStore.currentTitle.path = tmp;
});
</script>
<template>
@ -1982,6 +2012,7 @@ watch(
const { branch, ...payload } = props.row;
currentCustomer = payload;
isMainPage = false;
}
"