refactor: add default img admin

This commit is contained in:
Net 2024-08-07 14:14:25 +07:00
parent 287d73a1a5
commit a830118021
2 changed files with 16 additions and 10 deletions

BIN
public/img-admin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -37,6 +37,7 @@ import SideMenu from 'src/components/SideMenu.vue';
import ImageUploadDialog from 'src/components/ImageUploadDialog.vue';
import FormAddress from 'src/components/02_personnel-management/FormAddress.vue';
import DialogForm from 'src/components/DialogForm.vue';
import { getRole } from 'src/services/keycloak';
const { locale, t } = useI18n();
const $q = useQuasar();
@ -1167,16 +1168,19 @@ watch(
margin-bottom: var(--size-2);
"
>
{{ console.log(props.row) }}
<div class="branch-card__icon">
<q-avatar size="md">
<q-img
:ratio="1"
:src="
props.row.profileImageUrl
? props.row.profileImageUrl
: props.row.gender === 'male'
? '/no-img-man.png'
: '/no-img-female.png'
props.row.userRole.includes('system')
? '/img-admin.png'
: props.row.profileImageUrl
? props.row.profileImageUrl
: props.row.gender === 'male'
? '/no-img-man.png'
: '/no-img-female.png'
"
>
<template #error>
@ -1407,11 +1411,13 @@ watch(
$i18n.locale === 'en-US'
? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim()
: `${props.row.firstName} ${props.row.lastName}`.trim(),
img: props.row.profileImageUrl
? props.row.profileImageUrl
: props.row.gender === 'male'
? '/no-img-man.png'
: '/no-img-female.png',
img: props.row.userRole.includes('system')
? '/img-admin.png'
: props.row.profileImageUrl
? props.row.profileImageUrl
: props.row.gender === 'male'
? '/no-img-man.png'
: '/no-img-female.png',
male: props.row.gender === 'male',
female: props.row.gender === 'female',
detail: [