From ea6874c0db2d3629ac97bcff1505abdd1715be9a Mon Sep 17 00:00:00 2001 From: pablone Date: Fri, 21 Feb 2025 07:24:11 +0100 Subject: [PATCH] feat: refs #6896 add dashIfEmpty filter for medical center name in WorkerMedical component --- src/pages/Worker/Card/WorkerMedical.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/Worker/Card/WorkerMedical.vue b/src/pages/Worker/Card/WorkerMedical.vue index b3a599af7..c04f6496b 100644 --- a/src/pages/Worker/Card/WorkerMedical.vue +++ b/src/pages/Worker/Card/WorkerMedical.vue @@ -3,6 +3,7 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import VnTable from 'components/VnTable/VnTable.vue'; +import { dashIfEmpty } from 'src/filters'; const tableRef = ref(); const { t } = useI18n(); const route = useRoute(); @@ -44,9 +45,12 @@ const columns = [ create: true, component: 'select', attrs: { - url: 'centers', + url: 'medicalCenters', fields: ['id', 'name'], }, + format: (row, dashIfEmpty) => { + return dashIfEmpty(row.center?.name); + }, }, { align: 'left',