แก้ลูกจ้าง

This commit is contained in:
setthawutttty 2024-11-07 14:51:21 +07:00
parent aa65b8165d
commit 7d75535d15
25 changed files with 942 additions and 892 deletions

View file

@ -15,7 +15,6 @@ const route = useRoute();
const router = useRouter();
const $q = useQuasar();
const profileImg = ref<string>("");
const dataStore = useDataStore();
const mixin = useCounterMixin();
@ -52,10 +51,11 @@ async function checkUser() {
.then(async (res) => {
const data = await res.data.result;
await dataStore.getData(data);
await dataStore.getProFileType();
if (data.avatarName) {
await getImg(data.profileId, data.avatarName);
} else {
profileImg.value = avatar;
dataStore.profileImg = avatar;
}
})
@ -83,7 +83,6 @@ function getImg(id: string, pathName: string) {
http
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
.then((res) => {
profileImg.value = res.data.downloadUrl;
dataStore.profileImg = res.data.downloadUrl;
})
.catch((e) => {
@ -471,7 +470,7 @@ function onInfo() {
<q-item dense v-close-popup class="q-pa-none q-pl-xs">
<q-item-section avatar class="q-pa-none" style="min-width: 30px">
<q-img
:src="profileImg"
:src="dataStore.profileImg"
class="border-100"
spinner-color="white"
style="height: 30px; max-width: 30px"