diff --git a/src/api/scholarship/api.scholarship.ts b/src/api/scholarship/api.scholarship.ts new file mode 100644 index 0000000..1bc081c --- /dev/null +++ b/src/api/scholarship/api.scholarship.ts @@ -0,0 +1,11 @@ +import env from "../index"; + +const development = `${env.API_URI}/development`; +const developmentScholarshipReport = `${env.API_URI}/development/report/scholarship`; +const developmentSalaryFile = `${env.API_URI}/salary/file`; + +export default { + developmentScholarshipReport, + developmentScholarship: `${development}/scholarship`, + developmentSalaryFile: (name: string, group: string, id: string) => `${developmentSalaryFile}/${name}/${group}/${id}`, +}; diff --git a/src/app.config.ts b/src/app.config.ts index 20be1e7..4d711c9 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -9,6 +9,7 @@ import message from "./api/api.message"; import evaluate from "./api/evaluate/api.evaluate"; import support from "./api/support/api.support"; import org from "./api/org/api.org"; +import scholarship from "./api/scholarship/api.scholarship"; const API = { ...testtest, @@ -19,6 +20,7 @@ const API = { ...appeal, ...support, ...org, + ...scholarship, }; export default { diff --git a/src/modules/01_dashboard/views/Dashboard.vue b/src/modules/01_dashboard/views/Dashboard.vue index 39e0fd0..600b514 100644 --- a/src/modules/01_dashboard/views/Dashboard.vue +++ b/src/modules/01_dashboard/views/Dashboard.vue @@ -81,6 +81,30 @@ const items = ref([ path: "/appeal-complain", active: false, }, + { + icon: "mdi-account-box-outline", + title: "ขอรับการประเมิน (KPI)", + sub: "ประเมินผลการปฏิบัติหน้าที่ราชการ", + color: "red-2", + path: "/KPI", + active: false, + }, + { + icon: "mdi-elevator", + title: "ทำการประเมิน (KPI)", + sub: "ประเมินผลการปฏิบัติหน้าที่ราชการ", + color: "red-2", + path: "/KPI-evaluator", + active: false, + }, + { + icon: "mdi-school", + title: "ทุนการศึกษา/ฝึกอบรม", + sub: "รายการทุนการศึกษา/ฝึกอบรม", + color: "teal-2", + path: "/scholarship", + active: false, + }, ]); onMounted(async () => { await fetchlistInbox(1); diff --git a/src/modules/03_retire/views/addRetire.vue b/src/modules/03_retire/views/addRetire.vue index 8090194..e38ae32 100644 --- a/src/modules/03_retire/views/addRetire.vue +++ b/src/modules/03_retire/views/addRetire.vue @@ -1,425 +1,584 @@ diff --git a/src/modules/08_KPI/components/Tab/01_Assessment.vue b/src/modules/08_KPI/components/Tab/01_Assessment.vue new file mode 100644 index 0000000..1d4c17e --- /dev/null +++ b/src/modules/08_KPI/components/Tab/01_Assessment.vue @@ -0,0 +1,84 @@ + + + diff --git a/src/modules/08_KPI/components/Tab/02_CommanderAbove.vue b/src/modules/08_KPI/components/Tab/02_CommanderAbove.vue new file mode 100644 index 0000000..d33dbfe --- /dev/null +++ b/src/modules/08_KPI/components/Tab/02_CommanderAbove.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/modules/08_KPI/components/Tab/03_CommanderAboveOneStep.vue b/src/modules/08_KPI/components/Tab/03_CommanderAboveOneStep.vue new file mode 100644 index 0000000..c60e299 --- /dev/null +++ b/src/modules/08_KPI/components/Tab/03_CommanderAboveOneStep.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/modules/08_KPI/components/Tab/04_File.vue b/src/modules/08_KPI/components/Tab/04_File.vue new file mode 100644 index 0000000..dd2618a --- /dev/null +++ b/src/modules/08_KPI/components/Tab/04_File.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/modules/08_KPI/components/Tab/Dialog/01_Dialog.vue b/src/modules/08_KPI/components/Tab/Dialog/01_Dialog.vue new file mode 100644 index 0000000..1314c8e --- /dev/null +++ b/src/modules/08_KPI/components/Tab/Dialog/01_Dialog.vue @@ -0,0 +1,288 @@ + + + + diff --git a/src/modules/08_KPI/components/Tab/Dialog/03_Dialog.vue b/src/modules/08_KPI/components/Tab/Dialog/03_Dialog.vue new file mode 100644 index 0000000..3efe102 --- /dev/null +++ b/src/modules/08_KPI/components/Tab/Dialog/03_Dialog.vue @@ -0,0 +1,122 @@ + + + + diff --git a/src/modules/08_KPI/components/Tab/Dialog/04_Dialog.vue b/src/modules/08_KPI/components/Tab/Dialog/04_Dialog.vue new file mode 100644 index 0000000..12aa2e5 --- /dev/null +++ b/src/modules/08_KPI/components/Tab/Dialog/04_Dialog.vue @@ -0,0 +1,297 @@ + + + + diff --git a/src/modules/08_KPI/components/Tab/Topic/01_Template.vue b/src/modules/08_KPI/components/Tab/Topic/01_Template.vue new file mode 100644 index 0000000..dfbb22f --- /dev/null +++ b/src/modules/08_KPI/components/Tab/Topic/01_Template.vue @@ -0,0 +1,206 @@ + + + diff --git a/src/modules/08_KPI/components/Tab/Topic/02_Template.vue b/src/modules/08_KPI/components/Tab/Topic/02_Template.vue new file mode 100644 index 0000000..8335cc1 --- /dev/null +++ b/src/modules/08_KPI/components/Tab/Topic/02_Template.vue @@ -0,0 +1,188 @@ + + + diff --git a/src/modules/08_KPI/interface/index/Main.ts b/src/modules/08_KPI/interface/index/Main.ts new file mode 100644 index 0000000..80143f3 --- /dev/null +++ b/src/modules/08_KPI/interface/index/Main.ts @@ -0,0 +1,8 @@ +interface DataOptions { + id:string + name:string +} + +export type { + DataOptions +} \ No newline at end of file diff --git a/src/modules/08_KPI/interface/request/index.ts b/src/modules/08_KPI/interface/request/index.ts new file mode 100644 index 0000000..b869e94 --- /dev/null +++ b/src/modules/08_KPI/interface/request/index.ts @@ -0,0 +1,22 @@ +interface FormProfile { + fullName: string; + prefix: string; + firstName: string; + lastName: string; + position: string; + type: string; + level: string; + status: string; + score: string; + + avartar:string +} + +interface FormDataAssigned{ + indicator:string + target:string + unit:string + weigth:string + definition:string +} +export type { FormProfile ,FormDataAssigned}; diff --git a/src/modules/08_KPI/router.ts b/src/modules/08_KPI/router.ts new file mode 100644 index 0000000..e0cc5c1 --- /dev/null +++ b/src/modules/08_KPI/router.ts @@ -0,0 +1,55 @@ +/** + * Router ขอโอน + */ + +const KPIPage = () => import("@/modules/08_KPI/views/main.vue"); +const FormPage = () => import("@/modules/08_KPI/views/form.vue"); +const KPIMainEvaluator = () => import("@/modules/08_KPI/views/mainEvaluator.vue"); + +export default [ + { + path: "/KPI", + name: "KPIMain", + component: KPIPage, + meta: { + Auth: true, + Key: [8], + }, + }, + { + path: "/KPI/add", + name: "KPIAdd", + component: FormPage, + meta: { + Auth: true, + Key: [8.1], + }, + }, + { + path: "/KPI/:id", + name: "KPIEdit", + component: FormPage, + meta: { + Auth: true, + Key: [8.2], + }, + }, + { + path: "/KPI-evaluator", + name: "KPIMainEvaluator", + component: KPIMainEvaluator, + meta: { + Auth: true, + Key: [8.3], + }, + }, + { + path: "/KPI-evaluator/:id", + name: "KPIEditEvaluator", + component: FormPage, + meta: { + Auth: true, + Key: [8.4], + }, + }, +]; diff --git a/src/modules/08_KPI/store.ts b/src/modules/08_KPI/store.ts new file mode 100644 index 0000000..7e9a157 --- /dev/null +++ b/src/modules/08_KPI/store.ts @@ -0,0 +1,7 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + +export const useKpiDataStore = defineStore("KPIDate", () => { + const tabMain = ref("1"); + return {tabMain}; +}); diff --git a/src/modules/08_KPI/views/TabMain.vue b/src/modules/08_KPI/views/TabMain.vue new file mode 100644 index 0000000..dd1eeba --- /dev/null +++ b/src/modules/08_KPI/views/TabMain.vue @@ -0,0 +1,86 @@ + + + \ No newline at end of file diff --git a/src/modules/08_KPI/views/form.vue b/src/modules/08_KPI/views/form.vue new file mode 100644 index 0000000..9750935 --- /dev/null +++ b/src/modules/08_KPI/views/form.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/modules/08_KPI/views/main.vue b/src/modules/08_KPI/views/main.vue new file mode 100644 index 0000000..e92b50b --- /dev/null +++ b/src/modules/08_KPI/views/main.vue @@ -0,0 +1,245 @@ + + + + diff --git a/src/modules/08_KPI/views/mainEvaluator.vue b/src/modules/08_KPI/views/mainEvaluator.vue new file mode 100644 index 0000000..8c5911d --- /dev/null +++ b/src/modules/08_KPI/views/mainEvaluator.vue @@ -0,0 +1,255 @@ + + + + diff --git a/src/modules/09_scholarship/components/Dialog/DialogReturn.vue b/src/modules/09_scholarship/components/Dialog/DialogReturn.vue new file mode 100644 index 0000000..68bc4f5 --- /dev/null +++ b/src/modules/09_scholarship/components/Dialog/DialogReturn.vue @@ -0,0 +1,327 @@ + + diff --git a/src/modules/09_scholarship/interface/index/Main.ts b/src/modules/09_scholarship/interface/index/Main.ts new file mode 100644 index 0000000..80143f3 --- /dev/null +++ b/src/modules/09_scholarship/interface/index/Main.ts @@ -0,0 +1,8 @@ +interface DataOptions { + id:string + name:string +} + +export type { + DataOptions +} \ No newline at end of file diff --git a/src/modules/09_scholarship/interface/request/index.ts b/src/modules/09_scholarship/interface/request/index.ts new file mode 100644 index 0000000..8b76853 --- /dev/null +++ b/src/modules/09_scholarship/interface/request/index.ts @@ -0,0 +1,132 @@ +interface FormsSholarship { + profileId: string; + rank: string; //ยศ + prefix: string; //คำนำหน้าชื่อ + firstName: string; //ชื่อ + lastName: string; //นามสกุล + citizenId: string; //เลขประจำตัวประชาชน + position: string; //ตำแหน่ง + posExecutive: string; //ชื่อตำแหน่งทางการบริหาร + posLevelId: string | null; //ไอดีระดับตำแหน่ง + posTypeId: string | null; //ไอดีประเภทตำแหน่ง + org: string; + rootId: string | null; + root: string; + orgRootShortName: string; + orgRevisionId: string | null; + guarantorRank: string; //ยศ(ผู้ค้ำ) + guarantorPrefix: string; //คำนำหน้าชื่อ(ผู้ค้ำ) + guarantorFirstName: string; //ชื่อ(ผู้ค้ำ) + guarantorLastName: string; //นามสกุล(ผู้ค้ำ) + guarantorCitizenId: string; //เลขประจำตัวประชาชน(ผู้ค้ำ) + guarantorPosition: string; //ตำแหน่ง(ผู้ค้ำ) + guarantorPosExecutive: string; //ชื่อตำแหน่งทางการบริหาร(ผู้ค้ำ) + guarantorOrg: string; + guarantorRootId: string | null; + guarantorRoot: string; + guarantorOrgRootShortName: string; + guarantorOrgRevisionId: string | null; + posLevelguarantorId: string | null; //ไอดีระดับตำแหน่ง(ผู้ค้ำ) + posTypeguarantorId: string | null; //ไอดีประเภทตำแหน่ง(ผู้ค้ำ) + scholarshipYear: number | null; //ปีงบประมาณที่ได้รับทุน + budgetSource: string; //แหล่งงบประมาณ + budgetApprove: number | string | null; //งบประมาณที่ได้รับอนุมัติตลอดหลักสูตร + bookNo: string; //เลขที่หนังสืออนุมัติ + bookNoDate: Date | null; //ลงวันที่(หนังสือ) + bookApproveDate: Date | null; //หนังสืออนุมัติเมื่อวันที่ + useOfficialTime: boolean; //ใช้เวลาราชการ + changeDetail: string; //เปลี่ยนแปลงรายละเอียด + scholarshipType: string; //เลือกประเภททุน + fundType: string; //ประเภททุน + contractNo: string; //เลขที่สัญญา + contractDate: Date | null; //ลงวันที่(เลขที่สัญญา) + reportBackNo: string; //เลขที่หนังสือรายงานตัวกลับ + reportBackNoDate: Date | null; //ลงวันที่(เลขที่หนังสือรายงานตัวกลับ) + reportBackDate: Date | null; //รายงานตัวกลับวันที่ + degreeLevel: string; //ระดับปริญญา + course: string; //หลักสูตรการศึกษา/หลักสูตรการฝึกอบรม + field: string; //สาขาวิชา/สาขา + faculty: string; //คณะ + educationalInstitution: string; //สถาบันการศึกษา/สถาบันการศึกษา_หน่วยงานผู้จัดการฝึกอบรม/สถานที่ไปศึกษาดูงานในประเทศ + startDate: Date | null; //วันเริ่มต้นการศึกษา/วันเริ่มต้นการฝึกอบรม/วันเริ่มต้นการศึกษาดูงานในประเทศ + endDate: Date | null; //วันสิ้นสุดการศึกษา/วันสิ้นสุดการฝึกอบรม/วันสิ้นสุดการศึกษาดูงานในประเทศ + studyPlace: string; //สถานที่ไปศึกษาดูงาน + studyTopic: string; //หัวข้อการไปศึกษาดูงาน/หัวข้อการไปศึกษาดูงานในประเทศ + studyStartDate: Date | null; //วันเริ่มต้นการศึกษาดูงาน + studyEndDate: Date | null; //วันสิ้นสุดการศึกษาดูงาน + studyCountry: string; //ประเทศที่เดินทางไปศึกษาดูงาน + studyAbroadTopic: string; //หัวข้อการไปศึกษาดูงานต่างประเทศ + studyAbroadStartDate: Date | null; //วันเริ่มต้นการศึกษาดูงานต่างประเทศ + studyAbroadEndDate: Date | null; //วันสิ้นสุดการศึกษาดูงานต่างประเทศ + totalPeriod: string; //รวมระยะเวลาในการศึกษา/รวมระยะเวลาในการฝึกอบรม + planType: string; // INPLAN ในแผนฯ, OUTPLAN นอกแผนฯ + isNoUseBudget: boolean; // + } + + interface DataSholarship { + rank: string; //ยศ + prefix: string; //คำนำหน้าชื่อ + firstName: string; //ชื่อ + lastName: string; //นามสกุล + citizenId: string; //เลขประจำตัวประชาชน + position: string; //ตำแหน่ง + posExecutive: string; //ชื่อตำแหน่งทางการบริหาร + posLevelId: string; //ไอดีระดับตำแหน่ง + posTypeId: string; //ไอดีประเภทตำแหน่ง + posTypeName: string; //ไอดีระดับตำแหน่ง + posLevelName: string; //ไอดีประเภทตำแหน่ง + org: string; + guarantorRank: string; //ยศ(ผู้ค้ำ) + guarantorPrefix: string; //คำนำหน้าชื่อ(ผู้ค้ำ) + guarantorFirstName: string; //ชื่อ(ผู้ค้ำ) + guarantorLastName: string; //นามสกุล(ผู้ค้ำ) + guarantorCitizenId: string; //เลขประจำตัวประชาชน(ผู้ค้ำ) + guarantorPosition: string; //ตำแหน่ง(ผู้ค้ำ) + guarantorPosExecutive: string; //ชื่อตำแหน่งทางการบริหาร(ผู้ค้ำ) + guarantorOrg: string; + guarantorRootId: string | null; + guarantorRoot: string; + guarantorOrgRootShortName: string; + guarantorOrgRevisionId: string | null; + posLevelguarantorId: string; //ไอดีระดับตำแหน่ง(ผู้ค้ำ) + posTypeguarantorId: string; //ไอดีประเภทตำแหน่ง(ผู้ค้ำ) + posTypeguarantorName: string; //ไอดีระดับตำแหน่ง(ผู้ค้ำ) + posLevelguarantorName: string; //ไอดีประเภทตำแหน่ง(ผู้ค้ำ) + scholarshipYear: number | null; //ปีงบประมาณที่ได้รับทุน + budgetSource: string; //แหล่งงบประมาณ + budgetApprove: number | null; //งบประมาณที่ได้รับอนุมัติตลอดหลักสูตร + bookNo: string; //เลขที่หนังสืออนุมัติ + bookNoDate: Date | null; //ลงวันที่(หนังสือ) + bookApproveDate: Date | null; //หนังสืออนุมัติเมื่อวันที่ + useOfficialTime: boolean; //ใช้เวลาราชการ + changeDetail: string; //เปลี่ยนแปลงรายละเอียด + scholarshipType: string; //เลือกประเภททุน + fundType: string; //ประเภททุน + contractNo: string; //เลขที่สัญญา + contractDate: Date | null; //ลงวันที่(เลขที่สัญญา) + reportBackNo: string; //เลขที่หนังสือรายงานตัวกลับ + reportBackNoDate: Date | null; //ลงวันที่(เลขที่หนังสือรายงานตัวกลับ) + reportBackDate: Date | null; //รายงานตัวกลับวันที่ + degreeLevel: string; //ระดับปริญญา + course: string; //หลักสูตรการศึกษา/หลักสูตรการฝึกอบรม + field: string; //สาขาวิชา/สาขา + faculty: string; //คณะ + educationalInstitution: string; //สถาบันการศึกษา/สถาบันการศึกษา_หน่วยงานผู้จัดการฝึกอบรม/สถานที่ไปศึกษาดูงานในประเทศ + startDate: Date | null; //วันเริ่มต้นการศึกษา/วันเริ่มต้นการฝึกอบรม/วันเริ่มต้นการศึกษาดูงานในประเทศ + endDate: Date | null; //วันสิ้นสุดการศึกษา/วันสิ้นสุดการฝึกอบรม/วันสิ้นสุดการศึกษาดูงานในประเทศ + studyPlace: string; //สถานที่ไปศึกษาดูงาน + studyTopic: string; //หัวข้อการไปศึกษาดูงาน/หัวข้อการไปศึกษาดูงานในประเทศ + studyStartDate: Date | null; //วันเริ่มต้นการศึกษาดูงาน + studyEndDate: Date | null; //วันสิ้นสุดการศึกษาดูงาน + studyCountry: string; //ประเทศที่เดินทางไปศึกษาดูงาน + studyAbroadTopic: string; //หัวข้อการไปศึกษาดูงานต่างประเทศ + studyAbroadStartDate: Date | null; //วันเริ่มต้นการศึกษาดูงานต่างประเทศ + studyAbroadEndDate: Date | null; //วันสิ้นสุดการศึกษาดูงานต่างประเทศ + totalPeriod: string; //รวมระยะเวลาในการศึกษา/รวมระยะเวลาในการฝึกอบรม + status: string; + planType: string; // INPLAN ในแผนฯ, OUTPLAN นอกแผนฯ + isNoUseBudget: boolean; // ไม่ใช้งบประมาณ + } + + export type { FormsSholarship,DataSholarship }; + \ No newline at end of file diff --git a/src/modules/09_scholarship/router.ts b/src/modules/09_scholarship/router.ts new file mode 100644 index 0000000..ca4af1c --- /dev/null +++ b/src/modules/09_scholarship/router.ts @@ -0,0 +1,26 @@ +/** + * Router ขอโอน + */ + +const scholarshipPage = () => import("@/modules/09_scholarship/views/main.vue"); +const scholarshipDetail = () => import('@/modules/09_scholarship/views/detail.vue') +export default [ + { + path: "/scholarship", + name: "scholarshipMain", + component: scholarshipPage, + meta: { + Auth: true, + Key: [9], + }, + }, + { + path: "/scholarship/:id", + name: "scholarshipDetail", + component: scholarshipDetail, + meta: { + Auth: true, + Key: [9], + }, + }, +]; diff --git a/src/modules/09_scholarship/views/detail.vue b/src/modules/09_scholarship/views/detail.vue new file mode 100644 index 0000000..8fea0e5 --- /dev/null +++ b/src/modules/09_scholarship/views/detail.vue @@ -0,0 +1,2508 @@ + + diff --git a/src/modules/09_scholarship/views/main.vue b/src/modules/09_scholarship/views/main.vue new file mode 100644 index 0000000..5ab249b --- /dev/null +++ b/src/modules/09_scholarship/views/main.vue @@ -0,0 +1,363 @@ + + + + diff --git a/src/router/index.ts b/src/router/index.ts index d0f7fcb..c3b8dbb 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,6 +11,8 @@ import ModuleLeave from "@/modules/05_leave/router"; import ModuEvaluate from "@/modules/06_evaluate/router"; import ModuAppealComplain from "@/modules/07_appealComplain/router"; import ModuleSupport from "@/modules/00_support/router"; +import ModuleKPI from "@/modules/08_KPI/router"; +import ModuleScholarship from "@/modules/09_scholarship/router"; // TODO: ใช้หรือไม่? import keycloak from "@/plugins/keycloak"; @@ -47,6 +49,8 @@ const router = createRouter({ ...ModuEvaluate, ...ModuAppealComplain, ...ModuleSupport, + ...ModuleKPI, + ...ModuleScholarship, ], }, ], diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index a091e50..5b92180 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -988,7 +988,7 @@ export const useCounterMixin = defineStore("mixin", () => { * @param endDate วันสิ้นสุด format MM-DD-YYYY" * @returns ผลการคำนวน ปี เดือน วัน ในรูปแบบ 1 ปี 10 เดือน 5 วัน */ - function calculateDurationYmd(startDate: string, endDate: string) { + function calculateDurationYmd(startDate: any, endDate: any) { if (startDate && endDate) { const start = new Date(startDate); const end = new Date(endDate); diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 5de1a24..5035a60 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -90,7 +90,7 @@ const fetchlistNotification = async (index: number, type: string) => { const doLogout = () => { $q.dialog({ title: "ยืนยันการออกจากระบบ", - message: `ต้องการออกจากระบบใช้หรือไม่?`, + message: `ต้องการออกจากระบบใช่หรือไม่?`, cancel: "ยกเลิก", ok: "ยืนยัน", persistent: true,