@@ -285,6 +290,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
{{ col.label }}
+
@@ -321,6 +327,11 @@ const paginationLabel = (start: string, end: string, total: string) => {
{{ props.row.insigniaLevel }}
+
+
+ เหตุผลการลบ
+
+
diff --git a/src/modules/07_insignia/components/2_Manage/listManage.vue b/src/modules/07_insignia/components/2_Manage/listManage.vue
index 224a65e43..83a957592 100644
--- a/src/modules/07_insignia/components/2_Manage/listManage.vue
+++ b/src/modules/07_insignia/components/2_Manage/listManage.vue
@@ -13,13 +13,14 @@ import tab1 from "@/modules/07_insignia/components/2_Manage/Tab1.vue";
import tab2 from "@/modules/07_insignia/components/2_Manage/Tab2.vue";
import tab3 from "@/modules/07_insignia/components/2_Manage/Tab3.vue";
import tab4 from "@/modules/07_insignia/components/2_Manage/Tab4.vue";
+import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
import keycloak from "@/plugins/keycloak";
const roleUser = ref("admin");
const DataStore = useInsigniaDataStore();
const mixin = useCounterMixin();
-const { messageError, date2Thai, showLoader, hideLoader, dialogMessage } =
+const { messageError, dialogConfirm, showLoader, hideLoader, success } =
mixin;
const router = useRouter();
const $q = useQuasar(); //ใช้ noti quasar
@@ -156,6 +157,8 @@ const changround = async () => {
// // }
// // console.log(data);
// };
+const requestNote = ref("")
+const requestStatus = ref("")
const fecthInsigniaByOc = async (
roundId: string,
ocId: string,
@@ -163,11 +166,14 @@ const fecthInsigniaByOc = async (
status: string
) => {
showLoader();
- console.log("ocId===>", ocId);
+ // console.log("ocId===>", ocId);
await http
.get(config.API.insigniaList(roundId, ocId, role, status))
.then(async (res) => {
// console.log(res);
+ requestNote.value = res.data.result.requestNote;
+ requestStatus.value = res.data.result.requestStatus;
+
await DataStore.fetchData(res.data.result.items);
})
.catch((err) => {
@@ -179,6 +185,84 @@ const fecthInsigniaByOc = async (
hideLoader();
});
};
+
+const sendToDirector = async () => {
+ dialogConfirm(
+ $q,
+ async () => {
+ showLoader();
+ await http
+ .get(config.API.insigniaSendToDirector(round.value, DataStore.agency))
+ .then(async () => {
+ success($q, "บันทึกสำเร็จ");
+ await fecthInsigniaByOc(round.value, DataStore.agency, "officer", tab.value);
+ })
+ .catch((err) => {
+ // console.log(err);
+ messageError($q, err);
+ })
+ .finally(() => {
+ hideLoader();
+ });
+ });
+};
+
+const modalPopupBackToEdit = ref(false);
+const popupBackToEdit = async () => {
+ modalPopupBackToEdit.value = true;
+}
+const closeModalPopupBackToEdit = async () => {
+ modalPopupBackToEdit.value = false;
+}
+
+const backToEdit = async (reason: string) => {
+ dialogConfirm(
+ $q,
+ async () => {
+ showLoader();
+ await http
+ .put(config.API.insigniaDirectorBackToEdit(round.value, DataStore.agency), {
+ reason: reason
+ })
+ .then(async () => {
+ success($q, "บันทึกสำเร็จ");
+ await fecthInsigniaByOc(round.value, DataStore.agency, "officer", tab.value);
+ })
+ .catch((err) => {
+ // console.log(err);
+ messageError($q, err);
+ })
+ .finally(() => {
+ closeModalPopupBackToEdit()
+ hideLoader();
+ });
+ },
+ 'ยืนยันการตีกลับ',
+ 'ต้องการยืนยันการตีกลับใช่หรือไม่?');
+};
+
+const directorApproved = async () => {
+ dialogConfirm(
+ $q,
+ async () => {
+ showLoader();
+ await http
+ .get(config.API.insigniaDirectorApproved(round.value, DataStore.agency))
+ .then(async () => {
+ success($q, "บันทึกสำเร็จ");
+ await fecthInsigniaByOc(round.value, DataStore.agency, "officer", tab.value);
+ })
+ .catch((err) => {
+ // console.log(err);
+ messageError($q, err);
+ })
+ .finally(() => {
+ hideLoader();
+ });
+ },
+ 'ยืนยันการอนุมัติ',
+ 'ต้องการยืนยันการอนุมัติใช่หรือไม่?');
+};
@@ -188,106 +272,73 @@ const fecthInsigniaByOc = async (
+
+
+ หมายเหตุ ตีกลับ {{ requestNote }}
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+