อัตรากำลังลูกจ้างประจำ ฯ => refactor code

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-25 15:00:26 +07:00
parent 7e2350eef8
commit 81e0a82b0e
18 changed files with 377 additions and 188 deletions

View file

@ -233,6 +233,7 @@ const activeBtn = () => {
*/
onMounted(async () => {
await fetchSys();
await fetchPermissionsSys();
if (keycloak.tokenParsed) {
await fetchroleUser(keycloak.tokenParsed.role);
@ -518,6 +519,21 @@ function fetchSys() {
messageError($q, err);
});
}
/**
* function fetch รายการเมนงหมด
*/
function fetchPermissionsSys() {
http
.get(config.API.orgPermissionsSys)
.then((res) => {
storeMenu.fetchDataPermission(res.data.result)
})
.catch((err) => {
messageError($q, err);
});
}
</script>
<!-- โครงเว -->