refactor: add default img admin
This commit is contained in:
parent
287d73a1a5
commit
a830118021
2 changed files with 16 additions and 10 deletions
BIN
public/img-admin.png
Normal file
BIN
public/img-admin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
|
|
@ -37,6 +37,7 @@ import SideMenu from 'src/components/SideMenu.vue';
|
||||||
import ImageUploadDialog from 'src/components/ImageUploadDialog.vue';
|
import ImageUploadDialog from 'src/components/ImageUploadDialog.vue';
|
||||||
import FormAddress from 'src/components/02_personnel-management/FormAddress.vue';
|
import FormAddress from 'src/components/02_personnel-management/FormAddress.vue';
|
||||||
import DialogForm from 'src/components/DialogForm.vue';
|
import DialogForm from 'src/components/DialogForm.vue';
|
||||||
|
import { getRole } from 'src/services/keycloak';
|
||||||
|
|
||||||
const { locale, t } = useI18n();
|
const { locale, t } = useI18n();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -1167,16 +1168,19 @@ watch(
|
||||||
margin-bottom: var(--size-2);
|
margin-bottom: var(--size-2);
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
{{ console.log(props.row) }}
|
||||||
<div class="branch-card__icon">
|
<div class="branch-card__icon">
|
||||||
<q-avatar size="md">
|
<q-avatar size="md">
|
||||||
<q-img
|
<q-img
|
||||||
:ratio="1"
|
:ratio="1"
|
||||||
:src="
|
:src="
|
||||||
props.row.profileImageUrl
|
props.row.userRole.includes('system')
|
||||||
? props.row.profileImageUrl
|
? '/img-admin.png'
|
||||||
: props.row.gender === 'male'
|
: props.row.profileImageUrl
|
||||||
? '/no-img-man.png'
|
? props.row.profileImageUrl
|
||||||
: '/no-img-female.png'
|
: props.row.gender === 'male'
|
||||||
|
? '/no-img-man.png'
|
||||||
|
: '/no-img-female.png'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #error>
|
<template #error>
|
||||||
|
|
@ -1407,11 +1411,13 @@ watch(
|
||||||
$i18n.locale === 'en-US'
|
$i18n.locale === 'en-US'
|
||||||
? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim()
|
? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim()
|
||||||
: `${props.row.firstName} ${props.row.lastName}`.trim(),
|
: `${props.row.firstName} ${props.row.lastName}`.trim(),
|
||||||
img: props.row.profileImageUrl
|
img: props.row.userRole.includes('system')
|
||||||
? props.row.profileImageUrl
|
? '/img-admin.png'
|
||||||
: props.row.gender === 'male'
|
: props.row.profileImageUrl
|
||||||
? '/no-img-man.png'
|
? props.row.profileImageUrl
|
||||||
: '/no-img-female.png',
|
: props.row.gender === 'male'
|
||||||
|
? '/no-img-man.png'
|
||||||
|
: '/no-img-female.png',
|
||||||
male: props.row.gender === 'male',
|
male: props.row.gender === 'male',
|
||||||
female: props.row.gender === 'female',
|
female: props.row.gender === 'female',
|
||||||
detail: [
|
detail: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue