refactor: misc
This commit is contained in:
parent
c22e3a4c52
commit
18efaa48b6
10 changed files with 214 additions and 68 deletions
|
|
@ -19,6 +19,7 @@ import useMyBranchStore from 'stores/my-branch';
|
|||
|
||||
const useMyBranch = useMyBranchStore();
|
||||
const { fetchListMyBranch } = useMyBranch;
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
interface NotificationButton {
|
||||
item: string;
|
||||
|
|
@ -52,6 +53,7 @@ const filterUnread = ref(false);
|
|||
const unread = ref<number>(1);
|
||||
// const filterRole = ref<string[]>();
|
||||
const userImage = ref<string>();
|
||||
const userGender = ref('');
|
||||
const canvasRef = ref();
|
||||
const currentLanguage = ref<string>('ไทย');
|
||||
const language: {
|
||||
|
|
@ -169,9 +171,12 @@ onMounted(async () => {
|
|||
|
||||
if (user === 'admin') return;
|
||||
if (uid) {
|
||||
const res = await userStore.fetchById(uid);
|
||||
userImage.value = `${apiBaseUrl}/user/${uid}/image`;
|
||||
|
||||
if (res && res.profileImageUrl) userImage.value = res.profileImageUrl;
|
||||
const res = await userStore.fetchById(uid);
|
||||
if (res && res.gender) {
|
||||
userGender.value = res.gender;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -455,8 +460,9 @@ onMounted(async () => {
|
|||
}
|
||||
"
|
||||
:user-image="
|
||||
getRole()?.includes('system') ? '/img-admin.png' : ' '
|
||||
getRole()?.includes('system') ? '/img-admin.png' : userImage
|
||||
"
|
||||
:gender="userGender"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue