diff --git a/src/api/appeal/api.appeal.ts b/src/api/appeal/api.appeal.ts
new file mode 100644
index 0000000..8da5fff
--- /dev/null
+++ b/src/api/appeal/api.appeal.ts
@@ -0,0 +1,12 @@
+import env from "../index"
+
+const appeal = `${env.API_URI}/discipline/complaint_appeal`
+const profile = `${env.API_URI}/profile/keycloak`
+
+export default {
+ profileBykeycloak:()=>`${profile}`,
+ appealMainList:(status: string, type: string, year: number, page: number, pageSize: number, keyword: string)=>`${appeal}/user?status=${status}&type=${type}&year=${year}&page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
+ appealAdd:()=>`${appeal}`,
+
+ appealByID:(id:string)=>`${appeal}/${id}`
+}
diff --git a/src/app.config.ts b/src/app.config.ts
index 03429af..e607537 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -1,10 +1,11 @@
/**ใช้รวมไฟล์ย่อยๆ ของ api แต่ละไฟล์ */
/** API Metadata */
-import testtest from "./api/test/api.test";
-import retirementResign from "./api/leave/api.leave";
-import placementTransfer from "./api/transfer/api.transfer";
-import message from "./api/api.message";
+import testtest from "./api/test/api.test"
+import retirementResign from "./api/leave/api.leave"
+import placementTransfer from "./api/transfer/api.transfer"
+import appeal from "./api/appeal/api.appeal"
+import message from "./api/api.message"
import evaluate from "./api/evaluate/api.evaluate";
const API = {
@@ -13,6 +14,7 @@ const API = {
...placementTransfer,
...message,
...evaluate,
+ ...appeal
};
export default {
diff --git a/src/modules/06_evaluate/components/Tab1.vue b/src/modules/06_evaluate/components/Tab1.vue
index 4267dd7..ab59551 100644
--- a/src/modules/06_evaluate/components/Tab1.vue
+++ b/src/modules/06_evaluate/components/Tab1.vue
@@ -128,8 +128,15 @@ onMounted(() => {
-
- ไปยัง ก.พ. เพื่อตรวจสอบข้อมูล
+
+ ตรวจสอบคุณสมบัติกับ ก.พ.
diff --git a/src/modules/07_appealComplain/interface/index/main.ts b/src/modules/07_appealComplain/interface/index/main.ts
new file mode 100644
index 0000000..cf8152e
--- /dev/null
+++ b/src/modules/07_appealComplain/interface/index/main.ts
@@ -0,0 +1,8 @@
+interface DataOption {
+ id:string
+ name:string
+}
+
+export type {
+ DataOption
+}
\ No newline at end of file
diff --git a/src/modules/07_appealComplain/interface/request/appeal.ts b/src/modules/07_appealComplain/interface/request/appeal.ts
new file mode 100644
index 0000000..5c30bc9
--- /dev/null
+++ b/src/modules/07_appealComplain/interface/request/appeal.ts
@@ -0,0 +1,14 @@
+interface MyObjectAppealRef {
+ type: object | null;
+ title: object | null;
+ description: object | null;
+ caseType: object | null;
+ caseNumber: object | null;
+
+ [key: string]: any;
+}
+
+
+export type {
+ MyObjectAppealRef
+}
\ No newline at end of file
diff --git a/src/modules/07_appealComplain/interface/response/mainType.ts b/src/modules/07_appealComplain/interface/response/mainType.ts
new file mode 100644
index 0000000..eb6dcd7
--- /dev/null
+++ b/src/modules/07_appealComplain/interface/response/mainType.ts
@@ -0,0 +1,68 @@
+interface FormType {
+ status: string
+ type: string
+ year: number
+}
+
+interface RowList {
+ id: string
+ title: string
+ description: string
+ status: string
+ type: string
+ year: number
+ caseType: string
+ caseNumber: string
+ fullname: string
+ citizenId: string
+ profileId: string
+ lastUpdatedAt: string | null
+}
+
+interface MainList {
+ id: string
+ title: string
+ description: string
+ status: string
+ type: string
+ year: number
+ caseType: string
+ caseNumber: string
+ fullname: string
+ citizenId: string
+ profileId: string
+ lastUpdatedAt: Date
+}
+
+interface EditDataList {
+ id: string
+ title: string
+ description: string
+ status: string
+ type: string
+ year: number
+ caseType: string
+ caseNumber: string
+ fullname: string
+ citizenId: string
+ profileId: string
+ lastUpdatedAt: string
+ historyStatus: object | null
+ disciplineComplaint_Appeal_Docs: object | null
+}
+
+interface HistoryStatusType {
+ status: string
+ createdAt: string
+}
+interface FileObType {
+ id: string
+ pathName: string
+ fileName: string
+}
+
+export type {
+ FormType, RowList, MainList, EditDataList,
+ HistoryStatusType,
+ FileObType
+}
\ No newline at end of file
diff --git a/src/modules/07_appealComplain/router.ts b/src/modules/07_appealComplain/router.ts
index 41d9493..3a9305c 100644
--- a/src/modules/07_appealComplain/router.ts
+++ b/src/modules/07_appealComplain/router.ts
@@ -4,6 +4,7 @@
const mainPage = () => import("@/modules/07_appealComplain/views/Main.vue");
const addPage = () => import("@/modules/07_appealComplain/views/Add.vue");
+const editPage = () => import("@/modules/07_appealComplain/views/Edit.vue");
export default [
{
@@ -27,7 +28,7 @@ export default [
{
path: "/appeal-complain/:id",
name: "appealComplainView",
- component: addPage,
+ component: editPage,
meta: {
Auth: true,
Key: [7],
diff --git a/src/modules/07_appealComplain/store.ts b/src/modules/07_appealComplain/store.ts
index 17af986..ca90ea4 100644
--- a/src/modules/07_appealComplain/store.ts
+++ b/src/modules/07_appealComplain/store.ts
@@ -1,5 +1,94 @@
import { defineStore } from "pinia";
+import { ref } from 'vue'
+import { useCounterMixin } from "@/stores/mixin";
+import type { DataOption } from "@/modules/07_appealComplain/interface/index/main";
+import type { QTableProps } from "quasar";
+import type { RowList, MainList } from '@/modules/07_appealComplain/interface/response/mainType'
export const useAppealComplainStore = defineStore("appealComplainStore", () => {
- return {};
+
+
+ const mixin = useCounterMixin()
+ const { date2Thai } = mixin
+
+ const rows = ref([]);
+ const visibleColumns = ref([]);
+ const columns = ref([]);
+
+ const typeOptions = ref([
+ { id: "APPEAL", name: "อุทธรณ์" },
+ { id: "COMPLAIN", name: "ร้องทุกข์" },
+ ]);
+
+ const statusOptions = ref([
+ { id: "ALL", name: "ทั้งหมด" },
+ { id: "NEW", name: "ใหม่" },
+ { id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
+ { id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
+ { id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
+ { id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
+ { id: "SUMMARY", name: "สรุปผลการพิจารณา" },
+ { id: "DONE", name: "ปิดคำร้อง" },
+ ]);
+
+ function fetchAppealComplain(data: MainList[]) {
+ let dataList: RowList[] = data.map((e: MainList) => ({
+ id: e.id,
+ profileId: e.profileId,
+ type: typeConvert(e.type),
+ title: e.title,
+ description: e.description,
+ year: e.year,
+ fullname: e.fullname,
+ citizenId: e.citizenId,
+ caseType: e.caseType,
+ caseNumber: e.caseNumber,
+ lastUpdatedAt: date2Thai(e.lastUpdatedAt),
+ status: statusTothai(e.status),
+ }));
+ rows.value = dataList;
+ }
+
+
+ const typeConvert = (val: string) => {
+ switch (val) {
+ case "APPEAL":
+ return "อุทธรณ์";
+ case "COMPLAIN":
+ return "ร้องทุกข์";
+ default:
+ return "-";
+ }
+ };
+
+ const statusTothai = (val: string) => {
+ switch (val) {
+ case "NEW":
+ return "ใหม่";
+ case "RECEIVE_DOC":
+ return "ได้รับเอกสารแล้ว";
+ case "RECEIVE_APPEAL":
+ return "รับอุทธรณ์/ร้องทุกข์";
+ case "NO_RECEIVE_APPEAL":
+ return "ไม่รับอุทธรณ์/ร้องทุกข์";
+ case "DIAGNOSTIC":
+ return "ตั้งองค์คณะวินิจฉัย";
+ case "SUMMARY":
+ return "สรุปผลการพิจารณา";
+ case "DONE":
+ return "ปิดคำร้อง";
+ default:
+ return "-";
+ }
+ };
+
+ return {
+ visibleColumns,
+ columns,
+ fetchAppealComplain,
+ rows,
+ typeOptions,
+ statusOptions
+
+ };
});
diff --git a/src/modules/07_appealComplain/views/Add.vue b/src/modules/07_appealComplain/views/Add.vue
index 30370b8..3ce3b26 100644
--- a/src/modules/07_appealComplain/views/Add.vue
+++ b/src/modules/07_appealComplain/views/Add.vue
@@ -1,205 +1,91 @@
-
-
-
-
-
เพิ่มเรื่องขอโอน
-
รายละเอียดเรื่องขอโอน
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ file.fileName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ เพิ่มอุทธรณ์/ร้องทุกข์
+
+
+
+
diff --git a/src/modules/07_appealComplain/views/Edit.vue b/src/modules/07_appealComplain/views/Edit.vue
new file mode 100644
index 0000000..edbc59b
--- /dev/null
+++ b/src/modules/07_appealComplain/views/Edit.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+ แก้ไขอุทธรณ์/ร้องทุกข์
+
+
+
+
+
diff --git a/src/modules/07_appealComplain/views/Form.vue b/src/modules/07_appealComplain/views/Form.vue
new file mode 100644
index 0000000..f9e63d6
--- /dev/null
+++ b/src/modules/07_appealComplain/views/Form.vue
@@ -0,0 +1,400 @@
+
+
+
+
diff --git a/src/modules/07_appealComplain/views/Main.vue b/src/modules/07_appealComplain/views/Main.vue
index 59f3605..4133f8b 100644
--- a/src/modules/07_appealComplain/views/Main.vue
+++ b/src/modules/07_appealComplain/views/Main.vue
@@ -1,42 +1,69 @@
+useA
@@ -179,55 +263,217 @@ const clickBack = () => {
-
-
-
+
+ เพิ่มการอุทธรณ์/ร้องทุกข์
-
- {{ props.rowIndex + 1 }}
-
-
- {{ props.row.date }}
-
-
- {{ props.row.position }}
-
-
- {{ props.row.noPos }}
-
-
- {{ props.row.level }}
-
-
- {{ props.row.salary }}
-
-
- {{ props.row.transfer }}
-
-
- {{ props.row.statustext }}
+
+
+
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ col.label }}
+
+
+
+
+
+
+
+ {{ props.rowIndex + 1 }}
+
+
+ {{ col.value }}
+
-
+
-
+
diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts
index 32d167a..b3e06e2 100644
--- a/src/stores/mixin.ts
+++ b/src/stores/mixin.ts
@@ -600,7 +600,7 @@ export const useCounterMixin = defineStore("mixin", () => {
title: title,
message: message,
icon: "warning",
- color: "warning",
+ color: "orange",
onlycancel: true,
},
});