fix(03): namePrefix & fallback customer img

This commit is contained in:
puriphatt 2024-08-27 17:53:51 +07:00
parent b6890330fb
commit eb7d853788
2 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { ref, watch } from 'vue';
import { ref, watch, capitalize } from 'vue';
import { QSelect } from 'quasar';
import { selectFilterOptionRefMod } from 'stores/utils';
import { getRole } from 'src/services/keycloak';
@ -311,13 +311,15 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
dense
outlined
:disable="!readonly"
:readonly="readonly"
readonly
hide-bottom-space
class="col-12 col-md-2"
:label="$t('customer.form.prefixName')"
for="input-prefix-name"
:model-value="
namePrefix ? $t(`customer.form.prefix.${namePrefix}`) : '-'
readonly
? capitalize(namePrefix || '') || '-'
: capitalize(namePrefix || '')
"
/>