From 56f8cbe615de8996b100cab085716c45a62629fd Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 17 Sep 2024 11:37:44 +0200 Subject: [PATCH] fix: refs #7353 sales person filter and locale --- src/components/ui/VnFilterPanel.vue | 15 +++++++++++++-- src/pages/Monitor/Ticket/MonitorTicketFilter.vue | 11 ++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index cebdc4bbf..12525c7cc 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -6,7 +6,7 @@ import { useRoute } from 'vue-router'; import toDate from 'filters/toDate'; import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue'; -const { t } = useI18n(); +const { t, te } = useI18n(); const $props = defineProps({ modelValue: { type: Object, @@ -200,6 +200,11 @@ function sanitizer(params) { } return params; } + +function getLocale(label) { + const globalLocale = `globals.params.${label}`; + return te(globalLocale) ? t(globalLocale) : t(`params.${label}`); +}