refactor: add default img admin
This commit is contained in:
parent
a830118021
commit
a4b7df62eb
3 changed files with 8 additions and 3 deletions
|
|
@ -8,9 +8,12 @@ import { getName, getRealm, getRole, isLoggedIn } from 'src/services/keycloak';
|
|||
|
||||
const $q = useQuasar();
|
||||
|
||||
const userImage = ref<string>('');
|
||||
const filterRole = ref<string[]>();
|
||||
|
||||
defineProps<{
|
||||
userImage?: string;
|
||||
}>();
|
||||
|
||||
const inputFile = document.createElement('input');
|
||||
inputFile.type = 'file';
|
||||
inputFile.accept = 'image/*';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { ref, onMounted, watch } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { getUserId, getUsername, logout } from 'src/services/keycloak';
|
||||
import { getUserId, getUsername, logout, getRole } from 'src/services/keycloak';
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
|
@ -455,6 +455,9 @@ onMounted(async () => {
|
|||
canvasModal = true;
|
||||
}
|
||||
"
|
||||
:user-image="
|
||||
getRole()?.includes('system') ? '/img-admin.png' : ' '
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ 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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue