diff --git a/src/modules/02_organizationalNew/components/DialogAddPosition.vue b/src/modules/02_organizationalNew/components/DialogAddPosition.vue
index dc16d3528..197a0144f 100644
--- a/src/modules/02_organizationalNew/components/DialogAddPosition.vue
+++ b/src/modules/02_organizationalNew/components/DialogAddPosition.vue
@@ -11,7 +11,6 @@ import config from "@/app.config";
import type {
DataOption,
FormPositionSelect,
- FormPositionSelectRef,
} from "@/modules/02_organizationalNew/interface/index/Main";
import type {
OptionType,
diff --git a/src/modules/02_organizationalNew/components/DialogFormDateTime.vue b/src/modules/02_organizationalNew/components/DialogFormDateTime.vue
index 74add7fa9..70ac8a855 100644
--- a/src/modules/02_organizationalNew/components/DialogFormDateTime.vue
+++ b/src/modules/02_organizationalNew/components/DialogFormDateTime.vue
@@ -70,10 +70,10 @@ function onSubmit() {
.put(config.API.orgSetDateTime(store.draftId as string), {
orgPublishDate: dateTime.value,
})
- .then((res) => {
- props.close?.();
- props.fetchActive();
- success($q, "บันทึกข้อมูลสำเร็จ");
+ .then(async () => {
+ await props.fetchActive();
+ await props.close?.();
+ await success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
@@ -91,9 +91,9 @@ function onClickPublish() {
showLoader();
http
.get(config.API.organizationPublishGet)
- .then((res) => {
- props.fetchActive();
- props.close?.();
+ .then(async () => {
+ await props.fetchActive();
+ await props.close?.();
})
.catch((e) => {
messageError($q, e);
diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue
index 34b900283..afaa27140 100644
--- a/src/modules/02_organizationalNew/components/DialogFormPosition.vue
+++ b/src/modules/02_organizationalNew/components/DialogFormPosition.vue
@@ -1,11 +1,14 @@
diff --git a/src/modules/02_organizationalNew/components/DialogNewStructure.vue b/src/modules/02_organizationalNew/components/DialogNewStructure.vue
index 7e1e01c44..4a42f44bf 100644
--- a/src/modules/02_organizationalNew/components/DialogNewStructure.vue
+++ b/src/modules/02_organizationalNew/components/DialogNewStructure.vue
@@ -4,8 +4,9 @@ import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
-import DialogHeader from "@/components/DialogHeader.vue";
-
+/**
+ * importType
+ */
import type {
FormDataNewStructure,
FormNewStructureRef,
@@ -13,18 +14,29 @@ import type {
HistoryType,
} from "@/modules/02_organizationalNew/interface/index/Main";
+/** importComponents*/
+import DialogHeader from "@/components/DialogHeader.vue";
+
+/**
+ * importStore
+ */
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organizationalNew/store/organizational";
+/**
+ * use
+ */
const $q = useQuasar();
const store = useOrganizational();
const { dialogConfirm, showLoader, success, hideLoader, messageError } =
useCounterMixin();
+/**
+ * props
+ */
const modal = defineModel("newStructure", { required: true });
const status = defineModel("status", { required: true });
const type = defineModel("type", { default: "NEW" });
-
const props = defineProps({
fetchActive: {
type: Function,
@@ -51,8 +63,6 @@ const typeOp = ref([
name: "ทำสำเนาโครงสร้าง ตำแหน่ง และคนครอง",
},
]);
-const orgRevisionOpMain = ref([]);
-const orgRevisionOp = ref([]);
const orgRevisionNameRef = ref