closes #4834 create-worker-module #28
|
@ -2,6 +2,7 @@
|
|||
import { onMounted, computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import axios from 'axios';
|
||||
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
||||
|
||||
|
@ -18,8 +19,8 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const { t } = useI18n();
|
||||
const { getToken } = useSession();
|
||||
|
||||
const entityId = computed(() => {
|
||||
return $props.id || route.params.id;
|
||||
|
@ -67,13 +68,14 @@ function sipExtension() {
|
|||
}
|
||||
|
||||
function getWorkerAvatar() {
|
||||
return `/api/Images/user/160x160/${worker.value.user.id}/download`;
|
||||
const token = getToken();
|
||||
return `/api/Images/user/160x160/${worker.value.user.id}/download?access_token=${token}`;
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<card-descriptor v-if="worker" module="Worker" :data="worker" :description="worker.user.nickname">
|
||||
<template #body>
|
||||
<q-img :src="getWorkerAvatar()" class="q-mb-md" style="width: 100px; height: 100px" />
|
||||
<q-img :src="getWorkerAvatar()" class="q-mb-md" />
|
||||
<q-list>
|
||||
<q-item>
|
||||
<q-item-section side>
|
||||
|
|
Loading…
Reference in New Issue