closed: edit positions in current org structure (#1418)

This commit is contained in:
Warunee Tamkoo 2025-08-21 10:36:16 +07:00
parent 8e56123e12
commit 7cb580060b
9 changed files with 85 additions and 31 deletions

View file

@ -61,7 +61,7 @@ async function fetchOrganizationActive() {
if (data.draftId) {
await fetchCheckIslock(data.draftId);
} else {
store.isLosck = false;
store.isLock = false;
}
if (data.activeName === null && data.draftName === null) {
@ -101,6 +101,9 @@ async function fetchHistory() {
? date2Thai(e.orgRevisionCreatedAt)
: "",
}));
// id
store.historyDnaOrgId = itemHistory.value[0].id;
})
.catch((err) => {
messageError($q, err);
@ -151,7 +154,7 @@ async function fetchCheckIslock(id: string) {
.get(config.API.orgIsLock + `/${id}`)
.then((res) => {
const data = res.data.result;
store.isLosck = data;
store.isLock = data;
})
.catch((e) => {
messageError($q, e);
@ -178,9 +181,9 @@ watch(
* งขอมลโครงสรางและรายการประวโครงสราง
*/
onMounted(async () => {
const type = localStorage.getItem('org_type') ?? "current";
const type = localStorage.getItem("org_type") ?? "current";
store.typeOrganizational = type;
localStorage.removeItem('org_type');
localStorage.removeItem("org_type");
await Promise.all([fetchOrganizationActive(), fetchHistory()]);
});
</script>
@ -331,7 +334,7 @@ onMounted(async () => {
<q-btn
v-if="
checkPermission($route)?.attrOwnership == 'OWNER' &&
!store.isLosck
!store.isLock
"
color="green-6"
dense