diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yml similarity index 100% rename from .forgejo/workflows/deploy.yaml rename to .forgejo/workflows/deploy.yml diff --git a/package.json b/package.json index 75b2a4f43..088a0ead7 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "moment": "^2.29.4", "pdf-lib": "^1.17.1", "pinia": "^2.0.29", - "pinia-plugin-persistedstate": "^3.2.3", "quasar": "^2.11.1", "socket.io-client": "^4.7.4", "structure-chart": "^0.0.9", diff --git a/public/File/ข้อมูลผู้สมัครสอบ.xlsx b/public/File/ข้อมูลผู้สมัครสอบ.xlsx index 8506e75b6..0611f9be0 100644 Binary files a/public/File/ข้อมูลผู้สมัครสอบ.xlsx and b/public/File/ข้อมูลผู้สมัครสอบ.xlsx differ diff --git a/public/File/บัญชีรวมคะแนน.xlsx b/public/File/บัญชีรวมคะแนน.xlsx index 9c555c814..3fda2b8dc 100644 Binary files a/public/File/บัญชีรวมคะแนน.xlsx and b/public/File/บัญชีรวมคะแนน.xlsx differ diff --git a/public/File/ผลการสอบ (บัญชีรายชื่อ).xlsx b/public/File/ผลการสอบ (บัญชีรายชื่อ).xlsx index 2e584fc57..3e012c58c 100644 Binary files a/public/File/ผลการสอบ (บัญชีรายชื่อ).xlsx and b/public/File/ผลการสอบ (บัญชีรายชื่อ).xlsx differ diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index d370d9b29..b30ec3ec1 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -194,7 +194,6 @@ export default { `${orgProfile}${type}/profileid/position`, uploadProfile: (type: string, id: string) => `${organization}/upload/${type}-profileSalaryTemp/${id}`, - sortOrderByDate: `${orgProfile}/salaryTemp/sort-order`, workflowCommanderOperate: `${workflow}/commander/operate`, workflowCommanderSign: `${workflow}/commander/sign`, diff --git a/src/api/09_leave/api.leave.ts b/src/api/09_leave/api.leave.ts index ffd727de9..d0229b204 100644 --- a/src/api/09_leave/api.leave.ts +++ b/src/api/09_leave/api.leave.ts @@ -25,7 +25,6 @@ export default { specialTime: () => `${leave}/admin/edit`, specialTimeApprove: (id: string) => `${leave}/admin/edit/approve/${id}`, specialTimeReject: (id: string) => `${leave}/admin/edit/reject/${id}`, - specialTimeApproveLists: `${leave}/admin/edit/approve-list`, /** รายการลา*/ leaveType: () => `${leave}/type`, @@ -64,5 +63,4 @@ export default { `${leave}/report/download/time-records/${type}`, leaveTask: `${leave}/admin/leave-task/process`, - leavePendingJobs: `${leave}/pending-jobs/`, }; diff --git a/src/api/recruiting/api.period-exam.ts b/src/api/recruiting/api.period-exam.ts index 470303286..bf777e193 100644 --- a/src/api/recruiting/api.period-exam.ts +++ b/src/api/recruiting/api.period-exam.ts @@ -98,9 +98,6 @@ export default { `${env.API_URI}/placement/candidate/pdf/${candidateId}`, downloadCandidateExam: (id: string) => - `${exam_report}candidate/candidate-new/${id}`, + `${periodExam}download/candidate-exam/${id}`, downloadPassExam: (id: string) => `${periodExam}download/pass-exam/${id}`, - - downloadCandidatePassExam: (id: string) => - `${exam_report}candidate/pass-new/${id}`, }; diff --git a/src/api/recruiting/api.recruit.ts b/src/api/recruiting/api.recruit.ts index 8bfda023b..3a9f220a8 100644 --- a/src/api/recruiting/api.recruit.ts +++ b/src/api/recruiting/api.recruit.ts @@ -23,7 +23,6 @@ export default { uploadCandidates: (id: string) => `${recruit}candidate/${id}`, uploadResult: (id: string) => `${recruit}result/${id}`, getImportHistory: (id: string) => `${recruit}history/${id}`, - getImportStatus: (jobId: string) => `${recruit}import/status/${jobId}`, //upload periodRecruitDoc: (examId: string) => `${recruit}doc/${examId}`, diff --git a/src/components/CardProfile.vue b/src/components/CardProfile.vue index 2b90d2468..72fe7aad0 100644 --- a/src/components/CardProfile.vue +++ b/src/components/CardProfile.vue @@ -8,7 +8,6 @@ import config from "@/app.config"; import type { PropType } from "vue"; import type { FormProfile } from "@/interface/main"; import type { DataProfile } from "@/modules/05_placement/interface/index/Main"; -import avatarMain from "@/assets/avatar_user.jpg"; /** importComponents*/ import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; @@ -92,11 +91,8 @@ function fetchProfile(id: string, name: string) { if (profile.avatar === "") { http .get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `${name}`)) - .then((res) => { + .then(async (res) => { profile.avatar = res.data.downloadUrl; - }) - .catch(() => { - profile.avatar = avatarMain; }); } } diff --git a/src/components/DialogHeader.vue b/src/components/DialogHeader.vue index 19ee3f536..77d936c93 100644 --- a/src/components/DialogHeader.vue +++ b/src/components/DialogHeader.vue @@ -9,8 +9,6 @@ round dense @click="close" - @keydown.enter.prevent - @keydown.space.prevent style="color: #ff8080; background-color: #ffdede" /> diff --git a/src/components/Dialogs/DialogOrgSelect.vue b/src/components/Dialogs/DialogOrgSelect.vue index c5ca51415..e3c5e4634 100644 --- a/src/components/Dialogs/DialogOrgSelect.vue +++ b/src/components/Dialogs/DialogOrgSelect.vue @@ -7,7 +7,6 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useStructureTree } from "@/stores/structureTree"; -import { formatPosmasterNo } from "@/utils/function"; import type { QTableProps } from "quasar"; import type { @@ -263,7 +262,6 @@ async function getDataTable(id: string, level: number = 0) { posType: posType.value ? posType.value : "", isAll: isAll.value, isBlank: isBlank.value, - profileId: type.value === "MOVE" ? props.dataRows.profileId : undefined, }; await http @@ -284,12 +282,12 @@ async function getDataTable(id: string, level: number = 0) { const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({ id: e.id, isPosition: e.isPosition, - posMasterNo: formatPosmasterNo( - e.orgShortname, - e.posMasterNoPrefix, - e.posMasterNo.toString(), - e.posMasterNoSuffix - ), + posMasterNo: + e.orgShortname + + (e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") + + " " + + e.posMasterNo + + (e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""), positionName: e.positionName, posTypeName: e.posTypeName, posLevelName: e.posLevelName, @@ -514,7 +512,6 @@ function onSubmit() { posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง posExecutiveName: selectedPos.value[0].posExecutiveName, //ชื่อตำแหน่ง - posExecutiveId: selectedPos.value[0].posExecutiveId, //ชื่อตำแหน่ง reportingDate: convertDateToAPI(datePos.value), posmasterId: dataPosMaster.id, typeCommand: type.value, diff --git a/src/components/Dialogs/DialogOrgSelectEmployee.vue b/src/components/Dialogs/DialogOrgSelectEmployee.vue index 7bd4dde9d..80d5950f4 100644 --- a/src/components/Dialogs/DialogOrgSelectEmployee.vue +++ b/src/components/Dialogs/DialogOrgSelectEmployee.vue @@ -7,7 +7,6 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useStructureTree } from "@/stores/structureTree"; -import { formatPosmasterNo } from "@/utils/function"; import type { QTableProps } from "quasar"; import type { @@ -233,8 +232,7 @@ function close() { async function getDataTable(id: string, level: number = 0) { showLoader(); - positionNo.value = []; - rowsData.value = []; + const body = { node: level, nodeId: id, @@ -264,12 +262,11 @@ async function getDataTable(id: string, level: number = 0) { const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({ id: e.id, isPosition: e.isPosition, - posMasterNo: formatPosmasterNo( - e.orgShortname, - e.posMasterNoPrefix, - e.posMasterNo.toString(), - e.posMasterNoSuffix - ), + posMasterNo: + e.orgShortname + + (e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") + + e.posMasterNo + + (e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""), positionName: e.positionName, posTypeName: e.posTypeName, posLevelName: e.posLevelName, @@ -305,7 +302,9 @@ async function getDataTable(id: string, level: number = 0) { messageError($q, err); }) .finally(() => { - hideLoader(); + setTimeout(() => { + hideLoader(); + }, 1000); }); } diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index ffc275ee7..1b17f7efd 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -14,7 +14,6 @@ import type { GovermentEmpTemp, } from "@/components/information/interface/response/Government"; import type { Avatar } from "@/components/information/interface/response/avatar"; -import avatarMain from "@/assets/avatar_user.jpg"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; @@ -168,9 +167,9 @@ async function fetchInformation(id: string) { avatar.position = data.position ? data.position : "-"; //ถ้ามีรูปเรียก Function fetchProfile เรียกข้อมูลรูปโปรไฟล์ if (data.avatarName) { - fetchProfile(data.id as string, data.avatarName); + await fetchProfile(data.id as string, data.avatarName); } else { - avatar.avatar = avatarMain; + avatar.avatar = ""; } if (props.id) { @@ -261,14 +260,11 @@ async function fetchProfileGovTemp(id: string) { * @param id profileID * @param avatarName ชื่อไฟล์ */ -function fetchProfile(id: string, avatarName: string) { - http +async function fetchProfile(id: string, avatarName: string) { + await http .get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName)) - .then((res) => { - avatar.avatar = res.data.downloadUrl; - }) - .catch(() => { - avatar.avatar = avatarMain; + .then(async (res) => { + avatar.avatar = await res.data.downloadUrl; }); } diff --git a/src/main.ts b/src/main.ts index d75e834e2..570937672 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,7 +13,6 @@ import th from "quasar/lang/th"; import "@vuepic/vue-datepicker/dist/main.css"; import http from "./plugins/http"; import { createPinia } from "pinia"; -import piniaPluginPersistedstate from "pinia-plugin-persistedstate"; // import './assets/main.css' @@ -21,7 +20,6 @@ import filters from "./plugins/filters"; const app = createApp(App); const pinia = createPinia(); -pinia.use(piniaPluginPersistedstate); // เพิ่ม Global Filters ลงใน App app.config.globalProperties.$filters = filters; diff --git a/src/modules/02_organization/components/DialogFormAgency.vue b/src/modules/02_organization/components/DialogFormAgency.vue index 72b3d228c..32873fc17 100644 --- a/src/modules/02_organization/components/DialogFormAgency.vue +++ b/src/modules/02_organization/components/DialogFormAgency.vue @@ -89,11 +89,6 @@ const formData = reactive({ DIVISION_CODE: "", SECTION_CODE: "", JOB_CODE: "", - ROOT_CODE: "", - CHILD1_CODE: "", - CHILD2_CODE: "", - CHILD3_CODE: "", - CHILD4_CODE: "", }); /** @@ -165,11 +160,6 @@ function onSubmit() { DIVISION_CODE: formData.DIVISION_CODE, SECTION_CODE: formData.SECTION_CODE, JOB_CODE: formData.JOB_CODE, - ROOT_CODE: formData.ROOT_CODE, - CHILD1_CODE: formData.CHILD1_CODE, - CHILD2_CODE: formData.CHILD2_CODE, - CHILD3_CODE: formData.CHILD3_CODE, - CHILD4_CODE: formData.CHILD4_CODE, }; // เพิ่มข้อมูล @@ -199,20 +189,18 @@ function onSubmit() { body ) .then(async () => { - await Promise.all([ - await props.fetchDataTree(store.draftId), - await props.edit?.( - props.dataNode?.orgTreeId, - type, - body, - props.dataNode?.orgRootCode - ), - await props.fetchDataTable( - props?.dataNode?.orgTreeId, - props?.dataNode?.orgLevel, - false - ), - ]); + await props.fetchDataTree(store.draftId); + await props.edit?.( + props.dataNode?.orgTreeId, + type, + body, + props.dataNode?.orgRootCode + ); + await props.fetchDataTable( + props?.dataNode?.orgTreeId, + props?.dataNode?.orgLevel, + false + ); await success($q, "บันทึกข้อมูลสำเร็จ"); closeClear(); }) @@ -243,11 +231,6 @@ function closeClear() { formData.isCommission = false; formData.isInformation = false; formData.misId = ""; - formData.ROOT_CODE = ""; - formData.CHILD1_CODE = ""; - formData.CHILD2_CODE = ""; - formData.CHILD3_CODE = ""; - formData.CHILD4_CODE = ""; formData.DEPARTMENT_CODE = ""; formData.DIVISION_CODE = ""; formData.SECTION_CODE = ""; @@ -473,7 +456,6 @@ watch( else { props.dataNode?.orgLevel === 1 && checkOfficer(); if (props.dataNode) { - console.log(props.dataNode); formData.orgName = props.dataNode.orgTreeName; formData.orgShortName = props.dataNode.orgTreeShortName; formData.orgCode = props.dataNode.orgTreeCode; @@ -492,11 +474,6 @@ watch( formData.DIVISION_CODE = props.dataNode.DIVISION_CODE; formData.SECTION_CODE = props.dataNode.SECTION_CODE; formData.JOB_CODE = props.dataNode.JOB_CODE; - formData.ROOT_CODE = props.dataNode.ROOT_CODE; - formData.CHILD1_CODE = props.dataNode.CHILD1_CODE; - formData.CHILD2_CODE = props.dataNode.CHILD2_CODE; - formData.CHILD3_CODE = props.dataNode.CHILD3_CODE; - formData.CHILD4_CODE = props.dataNode.CHILD4_CODE; orgLevelOption.value = props.dataNode.orgTreeRank === "DEPARTMENT" ? orgLevelOptionMain.value @@ -753,66 +730,6 @@ watch( -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
({ ...item, fullname: item.firstName - ? `${item.prefix || ""}${item.firstName || ""} ${ - item.lastName || "" - }`.trim() + ? `${item.prefix}${item.firstName} ${item.lastName}`.trim() : "ว่าง", })); } @@ -277,7 +275,7 @@ watch( (store.typeOrganizational === "draft" || store.typeOrganizational === "old") ? "2 (ปัจจุบัน)" - : props.rowIndex + 1 + : props.rowIndex + 1 }}
diff --git a/src/modules/02_organization/components/DialogMovePos.vue b/src/modules/02_organization/components/DialogMovePos.vue index 1cf149379..e19999482 100644 --- a/src/modules/02_organization/components/DialogMovePos.vue +++ b/src/modules/02_organization/components/DialogMovePos.vue @@ -48,7 +48,7 @@ const modal = defineModel("modal", { required: true }); let reqMaster = defineModel("reqMaster", { required: true }); const totalPage = defineModel("totalPage", { required: true }); const nodeTree = defineModel("nodeTree", { required: true }); -const columns = defineModel("columns", {}); +const columns = defineModel("columns", {}); const rows = defineModel("rows", { required: true }); const props = defineProps({ fetchDataTree: { diff --git a/src/modules/02_organization/components/DialogStructureDetail.vue b/src/modules/02_organization/components/DialogStructureDetail.vue index 7ac7e12fc..aaaa56ba4 100644 --- a/src/modules/02_organization/components/DialogStructureDetail.vue +++ b/src/modules/02_organization/components/DialogStructureDetail.vue @@ -36,11 +36,6 @@ const formData = reactive({ responsibility: "", //หน้าที่ความรับผิดชอบ isCommission: "", //สำนักปลัด isDeputy: "", //สำนักงาน กก. - rootCode: "", //ROOT CODE - child1Code: "", //CHILD1 CODE - child2Code: "", //CHILD2 CODE - child3Code: "", //CHILD3 CODE - child4Code: "", //CHILD4 CODE }); /** @@ -81,11 +76,6 @@ async function fetchDetailTree(id: string, type: string) { formData.responsibility = data.responsibility ? data.responsibility : "-"; formData.isDeputy = data.isDeputy ? "ใช่" : "-"; formData.isCommission = data.isCommission ? "ใช่" : "-"; - formData.rootCode = data.ROOT_CODE ? data.ROOT_CODE : "-"; - formData.child1Code = data.CHILD1_CODE ? data.CHILD1_CODE : "-"; - formData.child2Code = data.CHILD2_CODE ? data.CHILD2_CODE : "-"; - formData.child3Code = data.CHILD3_CODE ? data.CHILD3_CODE : "-"; - formData.child4Code = data.CHILD4_CODE ? data.CHILD4_CODE : "-"; }) .catch((err) => { messageError($q, err); @@ -218,41 +208,6 @@ watch( -
-
ROOT CODE
-
-

{{ formData.rootCode }}

-
-
- -
-
CHILD1 CODE
-
-

{{ formData.child1Code }}

-
-
- -
-
CHILD2 CODE
-
-

{{ formData.child2Code }}

-
-
- -
-
CHILD3 CODE
-
-

{{ formData.child3Code }}

-
-
- -
-
CHILD4 CODE
-
-

{{ formData.child4Code }}

-
-
-
หน้าที่ความรับผิดชอบ
diff --git a/src/modules/02_organization/components/TableMain.vue b/src/modules/02_organization/components/TableMain.vue index b307970f0..7d8a2756b 100644 --- a/src/modules/02_organization/components/TableMain.vue +++ b/src/modules/02_organization/components/TableMain.vue @@ -9,7 +9,6 @@ import { checkPermission } from "@/utils/permissions"; import { updateCurrentPage } from "@/utils/function"; import { useOrganizational } from "@/modules/02_organization/store/organizational"; import { useCounterMixin } from "@/stores/mixin"; -import { formatPosmasterNo } from "@/utils/function"; /** importType*/ import type { QTableProps } from "quasar"; @@ -206,14 +205,6 @@ const columns = ref([ sortable: false, field: "posMasterNo", headerStyle: "font-size: 14px", - format(val, row) { - return formatPosmasterNo( - row.orgShortname, - row.posMasterNoPrefix, - row.posMasterNoMain, - row.posMasterNoSuffix - ); - }, style: "font-size: 14px", }, { @@ -1133,7 +1124,7 @@ watch( { posLevelName: e.isSit ? e.profilePoslevel : e.posLevelName, posExecutiveName: e.posExecutiveName, isSit: e.isSit, - orgShortname: e.orgShortname, - posMasterNoPrefix: e.posMasterNoPrefix, - posMasterNoSuffix: e.posMasterNoSuffix, - posMasterNoMain: e.posMasterNo, - })); return newPosMaster || []; diff --git a/src/modules/03_recruiting/components/Table.vue b/src/modules/03_recruiting/components/Table.vue index 6ff82cda4..b5f2877f6 100644 --- a/src/modules/03_recruiting/components/Table.vue +++ b/src/modules/03_recruiting/components/Table.vue @@ -56,7 +56,6 @@ const optionsStatus = ref([ { label: "ขาดสอบ", value: "missed_exam" }, { label: "ผ่าน", value: "pass" }, { label: "ไม่ผ่าน", value: "notpass" }, - { label: "อื่น ๆ", value: "other" }, ]); const emit = defineEmits([ diff --git a/src/modules/03_recruiting/components/TableCandidate.vue b/src/modules/03_recruiting/components/TableCandidate.vue index d725a3bc1..f5b1b2b21 100644 --- a/src/modules/03_recruiting/components/TableCandidate.vue +++ b/src/modules/03_recruiting/components/TableCandidate.vue @@ -363,59 +363,37 @@ async function downloadFileDashboard() { } async function clickPassExam() { - try { - showLoader(); - const res = await http.get( - config.API.downloadCandidatePassExam(examId.value), - { - headers: { - "Content-Type": "application/pdf", - Accept: "application/pdf", - }, - responseType: "blob", - } - ); - const url = window.URL.createObjectURL(new Blob([res.data])); - const link = document.createElement("a"); - link.href = url; - link.setAttribute( - "download", - `Candidate_Dashboard_${dateToISO(new Date())}` + ".pdf" - ); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - window.URL.revokeObjectURL(url); - } catch (error) { - messageError($q, error); - } finally { - hideLoader(); - } + showLoader(); + await http + .get(config.API.downloadPassExam(examId.value)) + .then(async (res) => { + const data = res.data.result; + data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`; + await genReport(data, data.reportName, "pdf"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); } async function clickCandidateList() { - try { - showLoader(); - const res = await http.get(config.API.downloadCandidateExam(examId.value), { - headers: { - "Content-Type": "application/pdf", - Accept: "application/pdf", - }, - responseType: "blob", + showLoader(); + await http + .get(config.API.downloadCandidateExam(examId.value)) + .then(async (res) => { + const data = res.data.result; + data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`; + await genReport(data, data.reportName, "pdf"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); }); - const url = window.URL.createObjectURL(new Blob([res.data])); - const link = document.createElement("a"); - link.href = url; - link.setAttribute("download", "รายชื่อผู้มีสิทธิ์สอบ" + ".pdf"); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - window.URL.revokeObjectURL(url); - } catch (error) { - messageError($q, error); - } finally { - hideLoader(); - } } async function onCheckShowExaminfo() { @@ -571,20 +549,8 @@ watch(
- - - {{ - attrs.rows.length !== 0 - ? "ดาวน์โหลดไฟล์" - : "ไม่มีข้อมูลผู้สอบคัดเลือก" - }} + + ดาวน์โหลดไฟล์
-
{ input-class="text-right" >
-
{
-
{
-
{ dateRegister != null ? dateThaiRange(dateRegister) : null " :label="`${'วันที่สมัคร'}`" - hide-bottom-space >
-
{ " :label="`${'วันที่ชำระเงิน'}`" :rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]" - hide-bottom-space >