diff --git a/src/api/probation/api.probation.ts b/src/api/probation/api.probation.ts new file mode 100644 index 0000000..70954c3 --- /dev/null +++ b/src/api/probation/api.probation.ts @@ -0,0 +1,41 @@ +import env from "../index"; +const probation = `${env.API_URI}/probation`; +const org = `${env.API_URI}/org`; +const kpiCapacity = `${env.API_URI}/kpi/capacity`; + + +const reportProbation = `${env.API_URI}/report/probation`; +export default { + probationMain:(id:string)=>`${probation}/assign/probation-assign-list?personal_id=${id}`, + + + orgProfilePlacement: (id: string) => `${org}/profile/placement/${id}`, + calculateDate: () => `${probation}/calculate/assign-finish`, + newAssign: (personalId: string) => + `${probation}/data-options/new-assign?personal_id=${personalId}`, + + lawOptions: (personalId: string) => + `${probation}/data-options/law?personal_id=${personalId}`, + skillOptions: (personalId: string) => + `${probation}/data-options/skill?personal_id=${personalId}`, + knowledgeOptions: (personalId: string) => + `${probation}/data-options/knowledge?personal_id=${personalId}`, + probationsGetAssign: (assignId: string) => + `${probation}/assign/probation-assign?assign_id=${assignId}`, + summarySurveyDetail: (id: string) => `${probation}/survey?assign_id=${id}`, + saveEditAssign: (personalId: string) => + `${probation}/assign/probation-assign?id=${personalId}`, + saveFinish: (personalId: string) => + `${probation}/assign/probation-assign?personal_id=${personalId}`, + + reportEvaluateResult: (type: string, id: string) => + `${reportProbation}/19/${type}/${id}`, + evaluateReportcreate: (id: string) => + `${probation}/evaluate-result/create?assign_id=${id}`, + createformReport: (id: string) => + `${probation}/evaluate-result?assign_id=${id}`, + reportAssign: (type: string, id: string) => + `${reportProbation}/13/${type}/${id}`, + + kpiCapacity +}; diff --git a/src/app.config.ts b/src/app.config.ts index 5d12307..44b71ec 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -11,6 +11,7 @@ import support from "./api/support/api.support"; import org from "./api/org/api.org"; import scholarship from "./api/scholarship/api.scholarship"; import kpi from "./api/KPI/api.kpis"; +import probation from "./api/probation/api.probation"; const API = { ...testtest, @@ -23,6 +24,7 @@ const API = { ...org, ...scholarship, ...kpi, + ...probation, }; export default { diff --git a/src/components/TableD.vue b/src/components/TableD.vue index 86a2ffd..4caa94a 100644 --- a/src/components/TableD.vue +++ b/src/components/TableD.vue @@ -108,5 +108,9 @@ const paginationLabel = (start: string, end: string, total: string) => { .q-table thead tr:first-child th { top: 0; } + .q-table__middle{ + margin-bottom: 0!important; + min-height: 0px!important; + } } diff --git a/src/modules/01_dashboard/views/Dashboard.vue b/src/modules/01_dashboard/views/Dashboard.vue index e0111e4..d10b6cc 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-school", + title: "ทดลองงาน", + sub: "รายการงานที่ได้รับมอบหมาย", + color: "teal-2", + path: "/probation", + active: false, + }, ]); onMounted(async () => { await fetchlistInbox(1); @@ -430,7 +438,7 @@ const thaiOptions: Intl.DateTimeFormatOptions = { @update:modal="updateModalDetail" /> - diff --git a/src/modules/11_probation/component/02_RecordCareker.vue b/src/modules/11_probation/component/02_RecordCareker.vue new file mode 100644 index 0000000..b2c8a7d --- /dev/null +++ b/src/modules/11_probation/component/02_RecordCareker.vue @@ -0,0 +1,27 @@ + + diff --git a/src/modules/11_probation/component/03_RecordCommander.vue b/src/modules/11_probation/component/03_RecordCommander.vue new file mode 100644 index 0000000..5059f8f --- /dev/null +++ b/src/modules/11_probation/component/03_RecordCommander.vue @@ -0,0 +1,27 @@ + + diff --git a/src/modules/11_probation/component/04_EvaluateCommander.vue b/src/modules/11_probation/component/04_EvaluateCommander.vue new file mode 100644 index 0000000..7082784 --- /dev/null +++ b/src/modules/11_probation/component/04_EvaluateCommander.vue @@ -0,0 +1,27 @@ + + diff --git a/src/modules/11_probation/component/05_EvaluateChairman.vue b/src/modules/11_probation/component/05_EvaluateChairman.vue new file mode 100644 index 0000000..7fcd2c3 --- /dev/null +++ b/src/modules/11_probation/component/05_EvaluateChairman.vue @@ -0,0 +1,27 @@ + + diff --git a/src/modules/11_probation/component/06_EvaluateResult.vue b/src/modules/11_probation/component/06_EvaluateResult.vue new file mode 100644 index 0000000..6cb3397 --- /dev/null +++ b/src/modules/11_probation/component/06_EvaluateResult.vue @@ -0,0 +1,735 @@ + + + diff --git a/src/modules/11_probation/component/07_EvaluateReport.vue b/src/modules/11_probation/component/07_EvaluateReport.vue new file mode 100644 index 0000000..726be63 --- /dev/null +++ b/src/modules/11_probation/component/07_EvaluateReport.vue @@ -0,0 +1,27 @@ + + diff --git a/src/modules/11_probation/component/08_SurveyComment.vue b/src/modules/11_probation/component/08_SurveyComment.vue new file mode 100644 index 0000000..0a4ca85 --- /dev/null +++ b/src/modules/11_probation/component/08_SurveyComment.vue @@ -0,0 +1,262 @@ + + + diff --git a/src/modules/11_probation/component/Criterion.vue b/src/modules/11_probation/component/Criterion.vue new file mode 100644 index 0000000..e21d339 --- /dev/null +++ b/src/modules/11_probation/component/Criterion.vue @@ -0,0 +1,61 @@ + + \ No newline at end of file diff --git a/src/modules/11_probation/interface/index/assign.ts b/src/modules/11_probation/interface/index/assign.ts new file mode 100644 index 0000000..cbc724b --- /dev/null +++ b/src/modules/11_probation/interface/index/assign.ts @@ -0,0 +1,13 @@ +interface MonthOption { + value: number; + label: string; +} +interface CheckboxItem { + id: number; + parent_id: number; + description: string; + status_select: number; + checked: number; +} + +export type { MonthOption, CheckboxItem }; diff --git a/src/modules/11_probation/interface/index/main.ts b/src/modules/11_probation/interface/index/main.ts new file mode 100644 index 0000000..e8c32f7 --- /dev/null +++ b/src/modules/11_probation/interface/index/main.ts @@ -0,0 +1,13 @@ +interface ListMain { + id: string + round_no: number; + date_start: string + date_finish: string + mentors: string + commander: string + chairman: string +} + +export type { + ListMain +} \ No newline at end of file diff --git a/src/modules/11_probation/pages/addPage.vue b/src/modules/11_probation/pages/addPage.vue new file mode 100644 index 0000000..f5ae724 --- /dev/null +++ b/src/modules/11_probation/pages/addPage.vue @@ -0,0 +1,41 @@ + + + diff --git a/src/modules/11_probation/pages/detailPage.vue b/src/modules/11_probation/pages/detailPage.vue new file mode 100644 index 0000000..e87ad25 --- /dev/null +++ b/src/modules/11_probation/pages/detailPage.vue @@ -0,0 +1,294 @@ + + + diff --git a/src/modules/11_probation/router.ts b/src/modules/11_probation/router.ts new file mode 100644 index 0000000..8552638 --- /dev/null +++ b/src/modules/11_probation/router.ts @@ -0,0 +1,117 @@ +// registry +const probationPage = () => import("@/modules/11_probation/views/main.vue"); + +const probationAdd = () => import("@/modules/11_probation/pages/addPage.vue"); +const probationDetailPage = () => import("@/modules/11_probation/pages/detailPage.vue"); + +const probationAssign = () => import('@/modules/11_probation/component/01_Assign.vue') +const probationRecordCareker = () => import('@/modules/11_probation/component/02_RecordCareker.vue') +const probationRecordCommander = () => import('@/modules/11_probation/component/03_RecordCommander.vue') +const probationEvaluateCommander = () => import('@/modules/11_probation/component/04_EvaluateCommander.vue') +const probationEvaluateChairman = () => import('@/modules/11_probation/component/05_EvaluateChairman.vue') +const probationEvaluateResult = () => import('@/modules/11_probation/component/06_EvaluateResult.vue') +const probationEvaluateReport = () => import('@/modules/11_probation/component/07_EvaluateReport.vue') +const probationSurveyComment = () => import('@/modules/11_probation/component/08_SurveyComment.vue') +export default [ + { + path: "/probation", + name: "probationMain", + component: probationPage, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/add/:profileId", + name: "probationAdd", + component: probationAdd, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/detail/:profileId/:id", + name: "probationDetail", + component: probationDetailPage, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/assign-work/:profileId/:id", + name: "probationAssign", + component: probationAssign, + meta: { + Auth: true, + Key: [11], + }, + }, +////////////////////////////////////////////////// + { + path: "/probation/record-careker/:profileId/:id", + name: "probationRecordCareker", + component: probationRecordCareker, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/record-commander/:profileId/:id", + name: "probationRecordCommander", + component: probationRecordCommander, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/evaluate-commander/:profileId/:id", + name: "probationEvaluateCommander", + component: probationEvaluateCommander, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/evaluate-chairman/:profileId/:id", + name: "probationEvaluateChairman", + component: probationEvaluateChairman, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/evaluate-result/:profileId/:id", + name: "probationEvaluateResult", + component: probationEvaluateResult, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/evaluate-report/:profileId/:id", + name: "probationEvaluateReport", + component: probationEvaluateReport, + meta: { + Auth: true, + Key: [11], + }, + }, + { + path: "/probation/survey-comment/:profileId/:id", + name: "probationSurveyComment", + component: probationSurveyComment, + meta: { + Auth: true, + Key: [11], + }, + }, + +]; diff --git a/src/modules/11_probation/store/probation.ts b/src/modules/11_probation/store/probation.ts new file mode 100644 index 0000000..f840dec --- /dev/null +++ b/src/modules/11_probation/store/probation.ts @@ -0,0 +1,20 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + + +export const useProbationStore = defineStore( + "probationStore", + () => { + const profileId = ref('') + const mainTab = ref('') + const ratingColors = ref([ + "light-blue-3", + "light-blue-6", + "blue", + "blue-9", + "blue-10", + ]); + + return { mainTab,ratingColors,profileId }; + } +); diff --git a/src/modules/11_probation/views/main.vue b/src/modules/11_probation/views/main.vue new file mode 100644 index 0000000..3cc14dc --- /dev/null +++ b/src/modules/11_probation/views/main.vue @@ -0,0 +1,430 @@ + + + diff --git a/src/router/index.ts b/src/router/index.ts index 200dd87..86a2395 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -13,7 +13,8 @@ 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"; -import Moduleregistry from "@/modules/10_registry/router"; +import ModuleRegistry from "@/modules/10_registry/router"; +import ModuleProbation from "@/modules/11_probation/router"; // TODO: ใช้หรือไม่? import keycloak from "@/plugins/keycloak"; @@ -52,7 +53,8 @@ const router = createRouter({ ...ModuleSupport, ...ModuleKPI, ...ModuleScholarship, - ...Moduleregistry + ...ModuleRegistry, + ...ModuleProbation ], }, ], diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index a1bfb6e..a803414 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -997,6 +997,42 @@ export const useCounterMixin = defineStore("mixin", () => { return ""; } + function findOrgName(obj: any) { + if (obj) { + let name = + obj.child4 != null && obj.child3 != null + ? obj.child4 + "/" + : obj.child4 != null + ? obj.child4 + : ""; + + name += + obj.child3 != null && obj.child2 != null + ? obj.child3 + "/" + : obj.child3 !== null + ? obj.child3 + : ""; + + name += + obj.child2 != null && obj.child1 != null + ? obj.child2 + "/" + : obj.child2 != null + ? obj.child2 + : ""; + + name += + obj.child1 != null && obj.root != null + ? obj.child1 + "/" + : obj.child1 != null + ? obj.child1 + : ""; + name += obj.root != null ? obj.root : ""; + return name == "" ? "-" : name; + } else { + return ""; + } + } + return { calAge, date2Thai, @@ -1031,5 +1067,6 @@ export const useCounterMixin = defineStore("mixin", () => { dialogMessageNotify, arabicNumberToText, calculateDurationYmd, + findOrgName, }; });