From d7a6c8d9bcbc8ad4a9b1e2b2c84b4c11f2712193 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Thu, 26 Sep 2024 17:30:58 +0700 Subject: [PATCH] =?UTF-8?q?UI=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=84=E0=B8=B3=E0=B8=A3=E0=B9=89=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=82=E0=B8=AD=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9E=E0=B8=B1=E0=B8=92=E0=B8=99?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=9A=E0=B8=B8=E0=B8=84?= =?UTF-8?q?=E0=B8=84=E0=B8=A5=20(Individual=20Development=20Plan)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/01_dashboard/views/Dashboard.vue | 9 +- .../14_IDP/component/DialogDevelop.vue | 358 +++++++++++ src/modules/14_IDP/interface/Main.ts | 51 ++ src/modules/14_IDP/router.ts | 17 + src/modules/14_IDP/store.ts | 29 + src/modules/14_IDP/views/main.vue | 561 ++++++++++++++++++ src/router/index.ts | 2 + 7 files changed, 1026 insertions(+), 1 deletion(-) create mode 100644 src/modules/14_IDP/component/DialogDevelop.vue create mode 100644 src/modules/14_IDP/interface/Main.ts create mode 100644 src/modules/14_IDP/router.ts create mode 100644 src/modules/14_IDP/store.ts create mode 100644 src/modules/14_IDP/views/main.vue diff --git a/src/modules/01_dashboard/views/Dashboard.vue b/src/modules/01_dashboard/views/Dashboard.vue index b847b1d..93a0bc9 100644 --- a/src/modules/01_dashboard/views/Dashboard.vue +++ b/src/modules/01_dashboard/views/Dashboard.vue @@ -106,6 +106,14 @@ const items = ref([ path: "/scholarship", active: false, }, + { + icon: "mdi-human-handsup", + title: "การพัฒนารายบุคคล", + sub: "Individual Development Plan", + color: "orange-3", + path: "/IDP", + active: false, + }, ]); /** @@ -122,7 +130,6 @@ const fetchlistInbox = async (index: number) => { totalInbox.value = res.data.result.total; let listItem: InboxDetail[] = []; if (data && data.length > 0) { - data.map((e: InboxList) => { listItem.push({ no: e.id ?? "", diff --git a/src/modules/14_IDP/component/DialogDevelop.vue b/src/modules/14_IDP/component/DialogDevelop.vue new file mode 100644 index 0000000..b69f1d4 --- /dev/null +++ b/src/modules/14_IDP/component/DialogDevelop.vue @@ -0,0 +1,358 @@ + + + + + diff --git a/src/modules/14_IDP/interface/Main.ts b/src/modules/14_IDP/interface/Main.ts new file mode 100644 index 0000000..7e3f83a --- /dev/null +++ b/src/modules/14_IDP/interface/Main.ts @@ -0,0 +1,51 @@ +interface DataOption { + id: string; + name: string; +} + +interface DataItemsDevelopment { + value: string; + label: string; +} + +interface FormDataIDP { + topic: string; + development: string[]; + otherAction: string; + otherPerson: string; + otherTraining: string; + developmentTarget: string; + developmentResults: string; + developmentReport: string; + document: File | null; +} + +interface RowsListMain { + id: string; + createdAt: string; + createdUserId: string; + lastUpdatedAt: string; + lastUpdateUserId: string; + createdFullName: string; + lastUpdateFullName: string; + profileId: string; + profileEmployeeId: string | null; + name: string; + target: string; + summary: number; + point: number; + achievement10: string; + achievement5: string; + achievement0: string; + isDevelopment70: boolean; + isDevelopment20: boolean; + isDevelopment10: boolean; + reasonDevelopment70: string; + reasonDevelopment20: string; + reasonDevelopment10: string; + kpiDevelopmentId: string; + status: string; + remark: string; +} + +export type { DataOption, RowsListMain, DataItemsDevelopment, FormDataIDP }; diff --git a/src/modules/14_IDP/router.ts b/src/modules/14_IDP/router.ts new file mode 100644 index 0000000..654998f --- /dev/null +++ b/src/modules/14_IDP/router.ts @@ -0,0 +1,17 @@ +/** + * Router การพัฒนา + */ + +const idpMain = () => import("@/modules/14_IDP/views/main.vue"); + +export default [ + { + path: "/idp", + name: "idpMain", + component: idpMain, + meta: { + Auth: true, + Key: [14], + }, + }, +]; diff --git a/src/modules/14_IDP/store.ts b/src/modules/14_IDP/store.ts new file mode 100644 index 0000000..7e16a5c --- /dev/null +++ b/src/modules/14_IDP/store.ts @@ -0,0 +1,29 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; +import type { DataOption } from "@/modules/10_registry/interface/index/Main"; + +export const useIndividualDevelopmentPlan = defineStore( + "individualDevelopmentPlan", + () => { + const optionStatus = ref([ + { id: "", name: "ทั้งหมด" }, + { id: "PENDING", name: "รอดำเนินการ" }, + { id: "COMPLETE", name: "ดำเนินการแก้ไขแล้ว" }, + { id: "REJECT", name: "ไม่อนุมัตการแก้ไข" }, + ]); + + function convertStatus(val: string) { + switch (val) { + case "PENDING": + return "รอดำเนินการ"; + case "COMPLETE": + return "ดำเนินการแก้ไขแล้ว"; + case "REJECT": + return "ไม่อนุมัตการแก้ไข"; + default: + return "-"; + } + } + return { convertStatus, optionStatus }; + } +); diff --git a/src/modules/14_IDP/views/main.vue b/src/modules/14_IDP/views/main.vue new file mode 100644 index 0000000..e28152a --- /dev/null +++ b/src/modules/14_IDP/views/main.vue @@ -0,0 +1,561 @@ + + + + diff --git a/src/router/index.ts b/src/router/index.ts index f94c403..53bb5de 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -18,6 +18,7 @@ import ModuleRegistry from "@/modules/10_registry/router"; import ModuleProbation from "@/modules/11_probation/router"; import ModuleOrganization from "@/modules/12_organization/router"; import ModulePortfolio from "@/modules/13_portfolio/router"; +import ModuleDevelop from "@/modules/14_IDP/router"; import { authenticated, tokenParsed } from "@/plugins/auth"; import { ro } from "date-fns/locale"; // TODO: ใช้หรือไม่? @@ -57,6 +58,7 @@ const router = createRouter({ ...ModuleProbation, ...ModuleOrganization, ...ModulePortfolio, + ...ModuleDevelop, ], }, {