refactor: img fallback
This commit is contained in:
parent
ea7fa6df69
commit
88dd4d9333
1 changed files with 12 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import { storeToRefs } from 'pinia';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { QTableProps } from 'quasar';
|
||||
|
||||
import { baseUrl } from 'src/stores/utils';
|
||||
import useCustomerStore from 'stores/customer';
|
||||
import useFlowStore from 'stores/flow';
|
||||
import useOptionStore from 'stores/options';
|
||||
|
|
@ -248,6 +249,17 @@ watch([customerId, inputSearch, currentStatus], async () => {
|
|||
style="border-radius: 0 0 40px 40px; position: relative"
|
||||
>
|
||||
<q-avatar no-padding size="50px">
|
||||
<q-img
|
||||
:src="`${baseUrl}/customer/${customerId}/image`"
|
||||
class="full-height full-width"
|
||||
>
|
||||
<template #error>
|
||||
<q-img
|
||||
:src="`${customerType === 'CORP' ? '/images/customer-CORP-avartar.png' : '/images/customer-PERS-avartar.png'}`"
|
||||
/>
|
||||
</template>
|
||||
</q-img>
|
||||
|
||||
<img :src="currentCustomerUrlImage ?? '/no-profile.png'" />
|
||||
</q-avatar>
|
||||
</q-card-section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue