refactor: employee new img dialog

This commit is contained in:
puriphatt 2024-09-11 16:53:08 +07:00
parent 893b0a8c2a
commit 685ad0cc54
7 changed files with 254 additions and 57 deletions

View file

@ -95,7 +95,7 @@ watch(
name="mdi-passport"
style="background-color: var(--surface-3)"
/>
{{ $t(`${title}`) }}
{{ title }}
</div>
<div class="col-12 row q-col-gutter-sm">

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { calculateAge, dateFormat } from 'src/utils/datetime';
import { baseUrl } from 'src/stores/utils';
import PersonCard from 'components/shared/PersonCard.vue';
import KebabAction from '../shared/KebabAction.vue';
@ -121,7 +122,7 @@ defineEmits<{
<q-avatar size="md">
<q-img
:src="
props.row.profileImageUrl ||
`${baseUrl}/employee/${props.row.id}/image/${props.row.selectedImage}` ||
'/images/employee-avatar.png'
"
class="text-center"
@ -248,7 +249,10 @@ defineEmits<{
$i18n.locale === 'eng'
? `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim()
: `${props.row.firstName} ${props.row.lastName} `.trim(),
img: props.row.profileImageUrl || '/images/employee-avatar.png',
img:
`${baseUrl}/employee/${props.row.id}/image/${props.row.selectedImage}` ||
'/images/employee-avatar.png',
fallbackImg: '/images/employee-avatar.png',
male: props.row.gender === 'male',
female: props.row.gender === 'female',
detail: [

View file

@ -273,7 +273,7 @@ onMounted(() => {
'-' + ' ' + scope.opt.customer.lastName
}}
{{ $t('address') }}
{{ $t('general.address') }}
{{
$i18n.locale === 'eng'
? `${scope.opt.addressEN || ''} ${scope.opt.subDistrict.nameEN || ''} ${scope.opt.district.nameEN || ''} ${scope.opt.province.nameEN || ''}`