diff --git a/src/components/shared/select/SelectBranch.vue b/src/components/shared/select/SelectBranch.vue index 9bd092d2..5fe23b23 100644 --- a/src/components/shared/select/SelectBranch.vue +++ b/src/components/shared/select/SelectBranch.vue @@ -26,6 +26,7 @@ defineEmits<{ }>(); type ExclusiveProps = { + codeOnly?: boolean; selectFirstValue?: boolean; branchVirtual?: boolean; }; @@ -81,14 +82,15 @@ function setDefaultValue() { :option=" selectOptions.map((v) => { const ret = { - label: - `${branchVirtual ? $t('branch.card.branchVirtual') : ''}` + - ( - { - ['eng']: [v.nameEN, `(${v.code})`].join(' '), - ['tha']: [v.name, `(${v.code})`].join(' '), - } as const - )[$i18n.locale], + label: codeOnly + ? v.code + : `${branchVirtual ? $t('branch.card.branchVirtual') : ''}` + + ( + { + ['eng']: [v.nameEN, `(${v.code})`].join(' '), + ['tha']: [v.name, `(${v.code})`].join(' '), + } as const + )[$i18n.locale], value: v.id, }; return ret;