fix insignia
This commit is contained in:
parent
dd43246ebe
commit
0fd3e8e893
3 changed files with 10 additions and 5 deletions
|
|
@ -44,9 +44,11 @@ const props = defineProps({
|
|||
const avatar = ref<string>("");
|
||||
const fullName = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
const isSkeleton = ref<boolean>(false);
|
||||
|
||||
/** function เรียกข้อมูลส่วนตัว*/
|
||||
function fetchInformation() {
|
||||
isSkeleton.value = false;
|
||||
http
|
||||
.get(config.API.orgProfileById(profileId.value, props.employeeClass))
|
||||
.then(async (res) => {
|
||||
|
|
@ -63,6 +65,7 @@ function fetchInformation() {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
isSkeleton.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -76,9 +79,6 @@ async function fetchProfile(id: string, avatarName: string) {
|
|||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
||||
.then(async (res) => {
|
||||
avatar.value = res.data.downloadUrl;
|
||||
})
|
||||
.catch(() => {
|
||||
avatar.value = avatarMain;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -124,12 +124,14 @@ watch(
|
|||
style="object-fit: cover"
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
src="@/assets/avatar_user.jpg"
|
||||
class="bg-grey-3"
|
||||
style="object-fit: cover"
|
||||
/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="q-mt-md text-subtitle2 text-bold"
|
||||
style="font-size: 18px"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue