refactor: refs #8246 modified addressFk field to use dashIfEmpty filter
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2025-01-13 14:58:47 +01:00
parent 6cc400a975
commit 4826b681ce
1 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import { useRouter } from 'vue-router';
import { computed, ref } from 'vue'; import { computed, ref } from 'vue';
import axios from 'axios'; import axios from 'axios';
import { toCurrency } from 'src/filters'; import { dashIfEmpty, toCurrency } from 'src/filters';
import { toTimeFormat } from 'src/filters/date'; import { toTimeFormat } from 'src/filters/date';
import { useVnConfirm } from 'composables/useVnConfirm'; import { useVnConfirm } from 'composables/useVnConfirm';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
@ -173,9 +173,7 @@ function showValidAddresses(row) {
if (isValid) if (isValid)
return `${row.address?.nickname}, return `${row.address?.nickname},
${row.address?.postcode?.town?.name} (${row.address?.province?.name})`; ${row.address?.postcode?.town?.name} (${row.address?.province?.name})`;
else return '-';
} }
return '-';
} }
</script> </script>
@ -207,7 +205,7 @@ function showValidAddresses(row) {
:right-search="false" :right-search="false"
> >
<template #column-addressFk="{ row }"> <template #column-addressFk="{ row }">
{{ showValidAddresses(row) }} {{ dashIfEmpty(showValidAddresses(row)) }}
</template> </template>
<template #more-create-dialog="{ data }"> <template #more-create-dialog="{ data }">
<VnSelect <VnSelect