Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2025-04-01 09:49:27 +07:00
commit e6748cfa57
2 changed files with 16 additions and 5 deletions

View file

@ -86,7 +86,11 @@ async function fetchProfile(id: string, avatarName: string) {
* function rediract ไปทะเบยนประว
*/
function redirecToRegistry() {
router.push(`/registry-officer${props.employeeClass}/${profileId.value}`);
router.push(
`/registry${props.employeeClass ? props.employeeClass : "-officer"}/${
profileId.value
}`
);
modal.value = false;
}
@ -228,5 +232,4 @@ watch(
</q-dialog>
</template>
<style scoped>
</style>
<style scoped></style>

View file

@ -233,7 +233,7 @@ const activeBtn = () => {
};
const isSsoToken = ref<boolean>(false);
const interval = ref<any>(null);
/**
* เมอเรมตนโปรแกรมให event resize และ function myEventHandler
* set function myEventHandler เพราะ state งไมเซ , state เซทเม หนาจอเร ขยบหนาจอ
@ -256,7 +256,12 @@ onMounted(async () => {
await fetchroleUser(user.role);
}
await fetchmsgNoread();
fetchmsgNoread();
// fetch noread noti every 15 seconds
interval.value = setInterval(() => {
fetchmsgNoread();
}, 15000);
myEventHandler(null, false);
window.addEventListener("resize", (e: any) => {
@ -271,6 +276,9 @@ onUnmounted(() => {
window.removeEventListener("resize", (e: any) => {
myEventHandler(e, true);
});
if (interval.value) {
clearInterval(interval.value);
}
});
/**