diff --git a/src/api/KPI/api.kpis.ts b/src/api/KPI/api.kpis.ts index 8a708cc..9e5752d 100644 --- a/src/api/KPI/api.kpis.ts +++ b/src/api/KPI/api.kpis.ts @@ -11,6 +11,7 @@ const KpiFile = `${env.API_URI}/salary/file`; const KpiEvaluationInfo = `${env.API_URI}/kpi/evaluation`; const Kpiorg = `${env.API_URI}/org/profile/commander`; +const Kpi = `${env.API_URI}/kpi`; const KpiUser = `${env.API_URI}/kpi/user`; const kpiAchievement = `${env.API_URI}/kpi/user/achievement`; const kpiReason = `${env.API_URI}/kpi/reason`; @@ -45,7 +46,8 @@ export default { kpiSendToStatus: (id: string) => `${kpiEvaluation}/status/${id}`, kpiSendToSummary: (id: string) => `${kpiEvaluation}/summary/${id}`, kpiSendToGet: (id: string) => `${kpiEvaluation}/reason/${id}`, - kpiSendToReason: (id: string,type:string) => `${kpiEvaluation}/reason/${type}/${id}`, + kpiSendToReason: (id: string, type: string) => + `${kpiEvaluation}/reason/${type}/${id}`, kpiReqEdit: (id: string) => `${kpiEvaluation}/edit/${id}`, /**ประเมิน*/ kpiAchievementDevelop: `${kpiAchievement}/development`, @@ -59,4 +61,5 @@ export default { sendToSummary: (id: string) => `${kpiEvaluation}/summary/${id}`, updatePoint: (id: string) => `${kpiEvaluation}/point/${id}`, openPoint: (id: string) => `${kpiEvaluation}/open/${id}`, + kpiReport: (id: string) => `${Kpi}/report/kpi9/${id}`, }; diff --git a/src/api/api.development.ts b/src/api/api.development.ts new file mode 100644 index 0000000..94606b1 --- /dev/null +++ b/src/api/api.development.ts @@ -0,0 +1,15 @@ +import env from "./index"; + +const development = `${env.API_URI}/development`; +const urlFile = `${env.API_URI}/salary`; + +export default { + // portfolio + portfolio: `${development}/portfolio`, + portfolioId: (id: string) => `${development}/portfolio/${id}`, + + file: (name: string, group: string, id: string) => + `${urlFile}/file/${name}/${group}/${id}`, + fileByFile: (name: string, group: string, id: string, fileName: string) => + `${urlFile}/file/${name}/${group}/${id}/${fileName}`, +}; diff --git a/src/app.config.ts b/src/app.config.ts index 44b71ec..9dde560 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -12,21 +12,51 @@ 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"; +import development from "./api/api.development"; const API = { - ...testtest, - ...retirementResign, - ...placementTransfer, - ...message, - ...evaluate, - ...appeal, - ...support, - ...org, - ...scholarship, - ...kpi, - ...probation, + ...testtest, + ...retirementResign, + ...placementTransfer, + ...message, + ...evaluate, + ...appeal, + ...support, + ...org, + ...scholarship, + ...kpi, + ...probation, + ...development, +}; + +const path = "http://localhost:3008"; + +const generatePopupPath = (routeName: any) => { + if (routeName.includes("metadata")) { + return `${path}/manual/chapter-2-admin-metadata`; + } + if (routeName.includes("leave")) { + return `${path}/manual/chapter-3-user-leave`; + } + // if (routeName.includes("compete")) { + // return `${path}/manual/chapter-10-admin-recruit`; + // } + // if (routeName.includes("registryNew")) { + // return `${path}/manual/chapter-7-admin-registry`; + // } + // if (routeName.includes("registry")) { + // return `${path}/manual/chapter-7-admin-registry`; + // } + else { + return manualConfig[routeName as keyof typeof manualConfig]; + } +}; + +const manualConfig = { + dashboard: `${path}/manual/chapter-1-user-organization-chart`, }; export default { - API: API, + API: API, + generatePopupPath, }; diff --git a/src/modules/01_dashboard/views/Dashboard.vue b/src/modules/01_dashboard/views/Dashboard.vue index 165ba2a..cf4f375 100644 --- a/src/modules/01_dashboard/views/Dashboard.vue +++ b/src/modules/01_dashboard/views/Dashboard.vue @@ -34,6 +34,14 @@ const items = ref([ path: "/organization-chart", active: false, }, + { + icon: "mdi-clipboard-account-outline", + title: "ทะเบียนประวัติ", + sub: "ข้อมูลทะเบียนประวัติ", + color: "blue-4", + path: "/registry", + active: false, + }, { icon: "mdi-clipboard-account-outline", title: "ประเมินบุคคล", @@ -55,7 +63,7 @@ const items = ref([ title: "ผลงาน", sub: "ดูผลงาน", color: "light-green-3", - path: "", + path: "/portfolio", active: false, }, { @@ -66,14 +74,14 @@ const items = ref([ path: "/transfer", active: false, }, - { + /*{ icon: "mdi-account-remove-outline", title: "ลาออก", sub: "ทำเรื่องลาออก", color: "orange-3", path: "/retire", active: false, - }, + },*/ { icon: "mdi-scale-balance", title: "อุทธรณ์ร้องทุกข์", diff --git a/src/modules/02_transfer/views/AddTransfer.vue b/src/modules/02_transfer/views/AddTransfer.vue index 0c98baa..131b182 100644 --- a/src/modules/02_transfer/views/AddTransfer.vue +++ b/src/modules/02_transfer/views/AddTransfer.vue @@ -99,13 +99,13 @@ const fecthDataTransfer = async (id: string) => { }; /** - * ฟังก์ชั่นดาว์โหลดอัพโหลดไฟล์ + * ฟังก์ชั่นดาว์โหลดอัปโหลดไฟล์ */ const fileDocDataUpload = ref([]); const filesNull = () => { files.value = null; }; -//อัพโหลดไฟล์ +//อัปโหลดไฟล์ const fileUploadDoc = async (file: any) => { fileDocDataUpload.value.push(file); nameFile.value = file[0].name; @@ -178,25 +178,12 @@ function fileOpen(url: string) { lazy-rules hide-bottom-space accept=".pdf" - :rules="[ - (val) => !!val || 'กรุณากรอกอัพโหลดเอกสารเพิ่มเติม', - ]" + :rules="[(val: string) => !!val || 'กรุณาเลือกไฟล์เอกสารเพิ่มเติม']" label="เอกสารเพิ่มเติม" > -
@@ -209,10 +196,7 @@ function fileOpen(url: string) {
- + {{ file.fileName }} diff --git a/src/modules/03_retire/views/addRetire.vue b/src/modules/03_retire/views/addRetire.vue index 007a448..1da237a 100644 --- a/src/modules/03_retire/views/addRetire.vue +++ b/src/modules/03_retire/views/addRetire.vue @@ -234,7 +234,7 @@ function downloadFile(data: string) { " :label="`${'วันที่ยื่นขอลาออกจากราชการ'}`" :rules="[ - (val) => + (val: string) => !!val || `${'กรุณาเลือกวันที่ยื่นขอลาออกจากราชการ'}`, ]" > @@ -282,7 +282,7 @@ function downloadFile(data: string) { " :label="`${'วันที่ขอลาออกจากราชการ'}`" :rules="[ - (val) => + (val: string) => !!val || `${'กรุณาเลือกวันที่ขอลาออกจากราชการ'}`, ]" > @@ -309,7 +309,7 @@ function downloadFile(data: string) { hide-bottom-space :readonly="routeName != 'AddRetire'" :rules="[ - (val) => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`, + (val: string) => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`, ]" /> @@ -322,9 +322,7 @@ function downloadFile(data: string) { lazy-rules hide-bottom-space accept=".pdf" - :rules="[ - (val) => !!val || 'กรุณากรอกอัพโหลดเอกสารเพิ่มเติม', - ]" + :rules="[(val: string) => !!val || 'กรุณาเลือกเอกสารเพิ่มเติม']" label="เอกสารเพิ่มเติม" >