updated structure organization fact
This commit is contained in:
parent
760d467d0d
commit
41359b8c81
4 changed files with 35 additions and 5 deletions
|
|
@ -80,6 +80,7 @@ const formData = reactive<FormDataAgency>({
|
|||
orgLevel: "",
|
||||
orgLevelSub: "",
|
||||
responsibility: "",
|
||||
isOfficer: false,
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -90,7 +91,7 @@ const formData = reactive<FormDataAgency>({
|
|||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const type = store.checkLevel(level.value);
|
||||
const type = await store.checkLevel(level.value);
|
||||
const nameId =
|
||||
level.value === 0
|
||||
? "orgRevisionId"
|
||||
|
|
@ -121,6 +122,7 @@ function onSubmit() {
|
|||
[nameId]: rootId,
|
||||
responsibility:
|
||||
formData.responsibility != null ? formData.responsibility : "",
|
||||
isOfficer: formData.isOfficer,
|
||||
};
|
||||
|
||||
//เพิ่มข้อมูล
|
||||
|
|
@ -187,6 +189,7 @@ function closeClear() {
|
|||
formData.orgFax = "";
|
||||
formData.orgLevel = "";
|
||||
formData.responsibility = "";
|
||||
formData.isOfficer = false;
|
||||
props.close?.();
|
||||
}
|
||||
|
||||
|
|
@ -304,6 +307,7 @@ watch(
|
|||
formData.orgLevel = props.dataNode.orgTreeRank;
|
||||
formData.orgLevelSub = props.dataNode.orgTreeRankSub;
|
||||
formData.responsibility = props.dataNode.responsibility;
|
||||
formData.isOfficer = props.dataNode.isOfficer ?? false;
|
||||
orgLevelOption.value =
|
||||
props.dataNode.orgTreeRank === "DEPARTMENT"
|
||||
? orgLevelOptionMain.value
|
||||
|
|
@ -485,6 +489,22 @@ watch(
|
|||
rows="4"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
(actionType === 'ADD' && props.dataNode?.orgLevel === 0) ||
|
||||
(actionType === 'EDIT' && props.dataNode?.orgLevel === 1)
|
||||
"
|
||||
class="col-12"
|
||||
>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="formData.isOfficer"
|
||||
label="สกจ."
|
||||
class="q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
|
|
|
|||
|
|
@ -377,6 +377,7 @@ watch(
|
|||
<div class="row q-col-gutter-sm q-pl-sm">
|
||||
<div class="col-2" v-if="store.typeOrganizational === 'draft'">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrOwnership == 'OWNER'"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
@ -389,7 +390,12 @@ watch(
|
|||
</div>
|
||||
|
||||
<div
|
||||
:class="store.typeOrganizational === 'draft' ? 'col-10' : 'col-12'"
|
||||
:class="
|
||||
store.typeOrganizational === 'draft' &&
|
||||
checkPermission($route)?.attrOwnership == 'OWNER'
|
||||
? 'col-10'
|
||||
: 'col-12'
|
||||
"
|
||||
>
|
||||
<q-input dense outlined v-model="filter" label="ค้นหา">
|
||||
<template v-slot:append>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ interface FormDataAgency {
|
|||
orgLevel: string;
|
||||
orgLevelSub: string;
|
||||
responsibility: string;
|
||||
isOfficer?: boolean;
|
||||
}
|
||||
|
||||
interface FormDataPosition {
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ onMounted(async () => {
|
|||
<strong>{{ date2Thai(store.orgPublishDate) }}</strong>
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="checkPermission($route)?.attrOwnership == 'OWNER'"
|
||||
dense
|
||||
class="q-px-md"
|
||||
color="indigo-9"
|
||||
|
|
@ -257,7 +257,10 @@ onMounted(async () => {
|
|||
"
|
||||
/>
|
||||
<q-btn-dropdown
|
||||
v-if="itemHistory.length !== 0"
|
||||
v-if="
|
||||
checkPermission($route)?.attrOwnership == 'OWNER' &&
|
||||
itemHistory.length > 0
|
||||
"
|
||||
dense
|
||||
class="q-px-md"
|
||||
color="blue"
|
||||
|
|
@ -283,7 +286,7 @@ onMounted(async () => {
|
|||
</q-btn-group>
|
||||
|
||||
<q-btn-dropdown
|
||||
v-if="checkPermission($route)?.attrIsCreate"
|
||||
v-if="checkPermission($route)?.attrOwnership == 'OWNER'"
|
||||
dense
|
||||
unelevated
|
||||
class="q-px-md"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue