diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue index 7d29da232..0d80f43ce 100644 --- a/src/components/common/VnCard.vue +++ b/src/components/common/VnCard.vue @@ -24,7 +24,9 @@ const stateStore = useStateStore(); const route = useRoute(); const router = useRouter(); const url = computed(() => { - if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`; + if (props.baseUrl) { + return `${props.baseUrl}/${route.params.id}`; + } return props.customUrl; }); const searchRightDataKey = computed(() => { @@ -40,8 +42,10 @@ onBeforeMount(async () => { try { if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id }; await arrayData.fetch({ append: false, updateRouter: false }); - } catch (e) { - router.push({ name: 'WorkerList' }); + } catch { + const { matched: matches } = router.currentRoute.value; + const { path } = matches.at(-1); + router.push({ path: path.replace(/:id.*/, '') }); } }); diff --git a/src/pages/Item/Card/ItemCard.vue b/src/pages/Item/Card/ItemCard.vue index 1162327c1..2412f2bf9 100644 --- a/src/pages/Item/Card/ItemCard.vue +++ b/src/pages/Item/Card/ItemCard.vue @@ -12,7 +12,7 @@ import ItemListFilter from '../ItemListFilter.vue'; search-data-key="ItemList" :searchbar-props="{ url: 'Items/filter', - label: 'searchbar.labelr', + label: 'searchbar.label', info: 'searchbar.info', }" /> diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue index da6859d30..ef844824f 100644 --- a/src/pages/Item/Card/ItemDescriptor.vue +++ b/src/pages/Item/Card/ItemDescriptor.vue @@ -199,6 +199,7 @@ const openCloneDialog = async () => {