From 2f6fc0fe8d3e5d386c9f085fdb55be8d55ab9287 Mon Sep 17 00:00:00 2001 From: jlpereira Date: Tue, 6 Jun 2023 10:55:37 -0300 Subject: [PATCH] Redirect to valid name. Fix #11 --- src/components/Autocomplete/AutocompleteOtu.global.vue | 4 ++-- src/modules/otus/views/Index.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Autocomplete/AutocompleteOtu.global.vue b/src/components/Autocomplete/AutocompleteOtu.global.vue index 361af95..c94f40d 100644 --- a/src/components/Autocomplete/AutocompleteOtu.global.vue +++ b/src/components/Autocomplete/AutocompleteOtu.global.vue @@ -22,11 +22,11 @@ const props = defineProps({ } }) -const loadOtu = ({ id }) => { +const loadOtu = ({ id, otu_valid_id }) => { router.push({ name: 'otus-id-overview', params: { - id + id: otu_valid_id || id } }) } diff --git a/src/modules/otus/views/Index.vue b/src/modules/otus/views/Index.vue index d7436bb..8686f3e 100644 --- a/src/modules/otus/views/Index.vue +++ b/src/modules/otus/views/Index.vue @@ -118,11 +118,11 @@ async function loadInitialData() { }) } -function loadOtu({ id }) { +function loadOtu({ id, otu_valid_id }) { router.push({ name: 'otus-id-overview', params: { - id + id: otu_valid_id || id } }) }