diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue index 58cb12708..e836badec 100644 --- a/src/components/common/VnCard.vue +++ b/src/components/common/VnCard.vue @@ -20,6 +20,8 @@ const props = defineProps({ searchUrl: { type: String, default: undefined }, searchbarLabel: { type: String, default: '' }, searchbarInfo: { type: String, default: '' }, + searchCustomRouteRedirect: { type: String, default: undefined }, + searchRedirect: { type: Boolean, default: false }, }); const stateStore = useStateStore(); @@ -62,6 +64,8 @@ watchEffect(() => { :url="props.searchUrl" :label="props.searchbarLabel" :info="props.searchbarInfo" + :custom-route-redirect-name="searchCustomRouteRedirect" + :redirect="searchRedirect" /> diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue index 6451fe00c..1abbb78bf 100644 --- a/src/pages/Zone/Card/ZoneCard.vue +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -5,38 +5,29 @@ import { computed } from 'vue'; import VnCard from 'components/common/VnCard.vue'; import ZoneDescriptor from './ZoneDescriptor.vue'; -import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; - -import { useStateStore } from 'stores/useStateStore'; const { t } = useI18n(); -const stateStore = useStateStore(); const route = useRoute(); const routeName = computed(() => route.name); +const customRouteRedirectName = computed(() => { + if (routeName.value === 'ZoneLocations') return null; + return routeName.value; +}); const searchBarDataKeys = { ZoneWarehouses: 'ZoneWarehouses', ZoneSummary: 'ZoneSummary', + ZoneLocations: 'ZoneLocations', }; diff --git a/src/pages/Zone/Card/ZoneLocationsTree.vue b/src/pages/Zone/Card/ZoneLocationsTree.vue index 0940e071d..df3f8ef25 100644 --- a/src/pages/Zone/Card/ZoneLocationsTree.vue +++ b/src/pages/Zone/Card/ZoneLocationsTree.vue @@ -1,18 +1,25 @@