Compare commits

..

No commits in common. "cd4adcae2031f1353c2a2a82d55cf5433b0f6bda" and "0a0908987a0b3cdb267d497588545f6438b98aa1" have entirely different histories.

5 changed files with 52 additions and 13 deletions

View file

@ -464,9 +464,9 @@ function checkhideBtnAction(keycloakID: string) {
* งขอมลรายชอผใชงาน
*/
onMounted(async () => {
await fetchOrganizationActive();
const token = await tokenParsed();
tokenParsedData.value = token.role || [];
await fetchOrganizationActive();
});
</script>

View file

@ -295,6 +295,45 @@ async function fetchDataTree(id: string) {
const isSuperAdmin = tokenParsedData.value.includes("SUPER_ADMIN");
if (!isSuperAdmin) {
nodes.value = [];
} else {
nodes.value = [
{
labelName: "หน่วยงานทั้งหมด",
orgCode: "",
orgLevel: 0,
orgName: "",
orgRevisionId: "",
orgRootName: "",
orgTreeCode: "",
orgTreeFax: "",
orgTreeId: "",
orgTreeName: "หน่วยงานทั้งหมด",
orgTreeOrder: 0,
orgTreePhoneEx: "",
orgTreePhoneIn: "",
orgTreeRank: "",
orgTreeRankSub: "",
orgTreeShortName: "",
responsibility: "",
totalPosition: 0,
totalPositionCurrentUse: 0,
totalPositionCurrentVacant: 0,
totalPositionNextUse: 0,
totalPositionNextVacant: 0,
totalRootPosition: 0,
totalRootPositionCurrentUse: 0,
totalRootPositionCurrentVacant: 0,
totalRootPositionNextUse: 0,
totalRootPositionNextVacant: 0,
children: [] as NodeTree[],
isOfficer: false,
orgRootDnaId: "",
orgChild1DnaId: "",
orgChild2DnaId: "",
orgChild3DnaId: "",
orgChild4DnaId: "",
},
];
}
showLoader();
await http
@ -322,7 +361,7 @@ async function fetchDataTree(id: string) {
async function fetchDataTable(
id: string | null,
revisionId: string,
level: number,
level: number
) {
showLoader();
reqMaster.id = id === "" ? null : id;
@ -398,7 +437,7 @@ function onDeleteRole(id: string) {
await fetchDataTable(
reqMaster.id,
reqMaster.revisionId,
reqMaster.type,
reqMaster.type
);
success($q, "ลบข้อมูลสำเร็จ");
})
@ -410,7 +449,7 @@ function onDeleteRole(id: string) {
});
},
"ยืนยันการลบสิทธิ์",
"ต้องการยืนยันการลบสิทธิ์นี้หรือไม่ ?",
"ต้องการยืนยันการลบสิทธิ์นี้หรือไม่ ?"
);
}
@ -443,7 +482,7 @@ watch(
reqMaster.revisionId = "";
filter.value = "";
await fetchDataTree(id);
},
}
);
/** callblck function ทำการ fetch ข้อมูล Table เมื่อมีการเปลี่ยนหน้า*/
@ -474,9 +513,9 @@ function checkhideBtnAction(current_holderId: string) {
}
onMounted(async () => {
fetchOrganizationActive();
const token = await tokenParsed();
tokenParsedData.value = token.role || [];
await fetchOrganizationActive();
});
</script>
@ -649,7 +688,7 @@ onMounted(async () => {
fetchDataTable(
reqMaster.id,
reqMaster.revisionId,
reqMaster.type,
reqMaster.type
)
"
>
@ -736,7 +775,7 @@ onMounted(async () => {
onOpenModalPersonal(
store.typeOrganizational === 'draft'
? props.row.profileIdNextHolder
: props.row.profileIdCurrentHolder,
: props.row.profileIdCurrentHolder
)
"
>
@ -896,7 +935,7 @@ onMounted(async () => {
fetchDataTable(
reqMaster.id,
reqMaster.revisionId,
reqMaster.type,
reqMaster.type
)
"
></q-pagination>

View file

@ -235,14 +235,14 @@ watch(
() => qureyBody.pageSize,
() => {
fetchListPerson(true);
},
}
);
/** hook ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
onMounted(async () => {
await fetchOrg(); //
const token = await tokenParsed();
tokenParsedData.value = token?.role || [];
await fetchOrg(); //
});
</script>

View file

@ -437,9 +437,9 @@ watch(
);
onMounted(async () => {
fetchOrganizationActive();
const token = await tokenParsed();
tokenParsedData.value = token?.role || [];
await fetchOrganizationActive();
});
</script>

View file

@ -288,9 +288,9 @@ watch(
/** hook ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
onMounted(async () => {
await fatchOrg(); //
const token = await tokenParsed();
tokenParsedData.value = token?.role || [];
await fatchOrg(); //
});
</script>