@@ -610,7 +641,12 @@ import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
-import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
+import type {
+ ResponseItems,
+ TypeFile,
+} from "@/modules/06_retirement/interface/response/Main";
+
+import type { QTableProps } from "quasar";
const $q = useQuasar();
const route = useRoute();
@@ -671,6 +707,37 @@ const actionPass = ref(false);
const reasonReign = ref("");
const dateBreak = ref(null);
+const rows = ref([]);
+const columns = ref([
+ {
+ name: "no",
+ align: "left",
+ label: "ลำดับ",
+ sortable: true,
+ field: "no",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+ {
+ name: "fileName",
+ align: "left",
+ label: "ชื่อไฟล์",
+ sortable: true,
+ field: "fileName",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+ {
+ name: "btnMicrosoft",
+ align: "right",
+ label: "ปุ่ม",
+ sortable: true,
+ field: "btnMicrosoft",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+]);
+
const closeModal = () => (modal.value = false);
const openModal = () => (modal.value = true);
@@ -700,9 +767,18 @@ const fetchData = async (id: string) => {
.get(config.API.resingByid(id))
.then((res: any) => {
const data = res.data.result;
- console.log(data);
- dataDetail.value = data;
+ // console.log(data);
+ let list: TypeFile[] = [];
+ if (data.docs.length > 0) {
+ data.docs.map((doc: TypeFile) => {
+ list.push({
+ pathName: doc.pathName ?? "",
+ fileName: doc.fileName ?? "",
+ });
+ });
+ }
+ dataDetail.value = data;
organizationPositionOld.value = data.organizationPositionOld ?? "";
positionTypeOld.value = data.positionTypeOld ?? "";
positionLevelOld.value = data.positionLevelOld ?? "";
diff --git a/src/modules/06_retirement/interface/response/Main.ts b/src/modules/06_retirement/interface/response/Main.ts
index cbdd08356..97cc3c02f 100644
--- a/src/modules/06_retirement/interface/response/Main.ts
+++ b/src/modules/06_retirement/interface/response/Main.ts
@@ -30,4 +30,9 @@ interface ResponseItems {
datetext: string | null;
}
-export type { resMain, ResponseItems };
+interface TypeFile {
+ fileName: string;
+ pathName: string;
+}
+
+export type { resMain, ResponseItems, TypeFile };