diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 8aad0666..cedb4faf 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -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; +});