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, ], }, {