From 2295cb6c09f10d6530da8d16f041be518f9349bb Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Fri, 3 Jan 2025 12:39:19 +0530 Subject: [PATCH] Improved: route for hard counts, highlighting the tab for count details page, persisting detail when moving back from settings to count(#580) --- src/components/Menu.vue | 2 +- src/router/index.ts | 2 +- src/views/Count.vue | 2 +- src/views/Tabs.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 0bbd41b9..2b3bfa86 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -68,7 +68,7 @@ export default defineComponent({ url: "/draft", iosIcon: createOutline, mdIcon: createOutline, - childRoutes: ["/draft/", "/bulkUpload", "/hard-count", "/hard-count-detail"], + childRoutes: ["/draft/", "/bulkUpload", "/hard-count"], meta: { permissionId: "APP_DRAFT_VIEW" } diff --git a/src/router/index.ts b/src/router/index.ts index cf97d0cc..2a559270 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -84,7 +84,7 @@ const routes: Array = [ } }, { - path: 'hard-count-detail/:id', + path: 'count-detail/hard/:id', name: 'HardCountDetail', component: HardCountDetail, props: true, diff --git a/src/views/Count.vue b/src/views/Count.vue index 8498c992..f394ea28 100644 --- a/src/views/Count.vue +++ b/src/views/Count.vue @@ -229,7 +229,7 @@ async function segmentChanged(value) { } function navigateToStoreView(count) { - router.push((count.countTypeEnumId === "HARD_COUNT" && count.statusId === "INV_COUNT_ASSIGNED") ? `/tabs/hard-count-detail/${count.inventoryCountImportId}` : `/tabs/count-detail/${count.inventoryCountImportId}`); + router.push((count.countTypeEnumId === "HARD_COUNT" && count.statusId === "INV_COUNT_ASSIGNED") ? `/tabs/count-detail/hard/${count.inventoryCountImportId}` : `/tabs/count-detail/${count.inventoryCountImportId}`); } function getStatusIdForCountsToBeFetched() { diff --git a/src/views/Tabs.vue b/src/views/Tabs.vue index c476bd8a..522aec02 100644 --- a/src/views/Tabs.vue +++ b/src/views/Tabs.vue @@ -3,7 +3,7 @@ - + {{ translate("Counts") }}