diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yaml similarity index 100% rename from .forgejo/workflows/deploy.yml rename to .forgejo/workflows/deploy.yaml diff --git a/src/api/09_leave/api.leave.ts b/src/api/09_leave/api.leave.ts index d0229b204..ffd727de9 100644 --- a/src/api/09_leave/api.leave.ts +++ b/src/api/09_leave/api.leave.ts @@ -25,6 +25,7 @@ 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`, @@ -63,4 +64,5 @@ 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 bf777e193..470303286 100644 --- a/src/api/recruiting/api.period-exam.ts +++ b/src/api/recruiting/api.period-exam.ts @@ -98,6 +98,9 @@ export default { `${env.API_URI}/placement/candidate/pdf/${candidateId}`, downloadCandidateExam: (id: string) => - `${periodExam}download/candidate-exam/${id}`, + `${exam_report}candidate/candidate-new/${id}`, downloadPassExam: (id: string) => `${periodExam}download/pass-exam/${id}`, + + downloadCandidatePassExam: (id: string) => + `${exam_report}candidate/pass-new/${id}`, }; diff --git a/src/modules/02_organization/components/DialogFormAgency.vue b/src/modules/02_organization/components/DialogFormAgency.vue index 32873fc17..72b3d228c 100644 --- a/src/modules/02_organization/components/DialogFormAgency.vue +++ b/src/modules/02_organization/components/DialogFormAgency.vue @@ -89,6 +89,11 @@ const formData = reactive({ DIVISION_CODE: "", SECTION_CODE: "", JOB_CODE: "", + ROOT_CODE: "", + CHILD1_CODE: "", + CHILD2_CODE: "", + CHILD3_CODE: "", + CHILD4_CODE: "", }); /** @@ -160,6 +165,11 @@ 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, }; // เพิ่มข้อมูล @@ -189,18 +199,20 @@ function onSubmit() { body ) .then(async () => { - 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 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 success($q, "บันทึกข้อมูลสำเร็จ"); closeClear(); }) @@ -231,6 +243,11 @@ 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 = ""; @@ -456,6 +473,7 @@ 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; @@ -474,6 +492,11 @@ 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 @@ -730,6 +753,66 @@ watch( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
{ messageError($q, err); @@ -208,6 +218,41 @@ 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/interface/index/Main.ts b/src/modules/02_organization/interface/index/Main.ts index 8550b47e9..0103568c2 100644 --- a/src/modules/02_organization/interface/index/Main.ts +++ b/src/modules/02_organization/interface/index/Main.ts @@ -44,6 +44,11 @@ interface FormDataAgency { DIVISION_CODE: string; SECTION_CODE: string; JOB_CODE: string; + ROOT_CODE: string; + CHILD1_CODE: string; + CHILD2_CODE: string; + CHILD3_CODE: string; + CHILD4_CODE: string; } interface FormDataPosition { diff --git a/src/modules/03_recruiting/components/Table.vue b/src/modules/03_recruiting/components/Table.vue index b5f2877f6..6ff82cda4 100644 --- a/src/modules/03_recruiting/components/Table.vue +++ b/src/modules/03_recruiting/components/Table.vue @@ -56,6 +56,7 @@ 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 f5b1b2b21..d725a3bc1 100644 --- a/src/modules/03_recruiting/components/TableCandidate.vue +++ b/src/modules/03_recruiting/components/TableCandidate.vue @@ -363,37 +363,59 @@ async function downloadFileDashboard() { } async function clickPassExam() { - 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(); - }); + 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(); + } } async function clickCandidateList() { - 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(); + try { + showLoader(); + const res = await http.get(config.API.downloadCandidateExam(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", "รายชื่อผู้มีสิทธิ์สอบ" + ".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() { @@ -549,8 +571,20 @@ watch(
- - ดาวน์โหลดไฟล์ + + + {{ + attrs.rows.length !== 0 + ? "ดาวน์โหลดไฟล์" + : "ไม่มีข้อมูลผู้สอบคัดเลือก" + }}
diff --git a/src/modules/05_placement/components/PersonalList/DialogDetail.vue b/src/modules/05_placement/components/PersonalList/DialogDetail.vue index 13aa09aef..dff09ffdd 100644 --- a/src/modules/05_placement/components/PersonalList/DialogDetail.vue +++ b/src/modules/05_placement/components/PersonalList/DialogDetail.vue @@ -525,14 +525,14 @@ watch(props, () => {
ผลการสอบ
ลำดับที่สอบได้
-
จำนวนครั้งที่สมัครสอบ
+
{{ personalForm?.pass }}
{{ personalForm?.examNumber }}
-
{{ personalForm?.examRound }}
+
diff --git a/src/modules/05_placement/components/probation/DialogOrder.vue b/src/modules/05_placement/components/probation/DialogOrder.vue index 2646905f0..f4a5cb2a4 100644 --- a/src/modules/05_placement/components/probation/DialogOrder.vue +++ b/src/modules/05_placement/components/probation/DialogOrder.vue @@ -264,7 +264,7 @@ watch( @@ -352,7 +352,7 @@ watch( keep-color color="primary" dense - :disable="commandType" + :disable="!commandType ? true : false" v-model="props.selected" /> diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 6017dcaa3..07e8a2409 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -97,6 +97,8 @@ const develop_result_option = ref([ const isCheckFile = ref(false); +const isSelectionPartfour = ref(false); + // score const score1 = computed(() => { if ( @@ -212,20 +214,21 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - 4 + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / - 4; + (isSelectionPartfour.value ? 4 : 3); + + const total = Math.trunc(rawTotal); develop_result.value = total > 60 ? 1 : 0; @@ -1133,10 +1136,20 @@ onMounted(async () => {
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
{
([ // footer const dateAutherise = ref(null); +const isSelectionPartfour = ref(false); + onMounted(() => { fecthAssign(assignId.value); }); @@ -239,20 +241,21 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - 4 + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / - 4; + (isSelectionPartfour.value ? 4 : 3); + + const total = Math.trunc(rawTotal); develop_result.value = total > 60 ? 1 : 0; @@ -1214,10 +1217,20 @@ watch(lengthdiscipline_level, (newLength) => {
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
{ outlined dense type="number" + :disable="!isSelectionPartfour" v-model="other_training_percent" :rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']" hide-bottom-space diff --git a/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue b/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue index 443217e45..d83017e3f 100644 --- a/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue +++ b/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue @@ -5,10 +5,12 @@ import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import { useRetirementDataStore } from "@/modules/06_retirement/store/Main"; import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow"; +import { useCommandMainStore } from "@/modules/18_command/store/Main"; import type { PropType } from "vue"; import type { QTableProps } from "quasar"; import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main"; +import type { ListCommand } from "@/modules/18_command/interface/index/Main"; import DialogHeader from "@/components/DialogHeader.vue"; import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue"; @@ -16,6 +18,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom /** use */ const $q = useQuasar(); const stroe = useRetirementDataStore(); +const storeCommand = useCommandMainStore(); const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore(); const { statusText } = stroe; const selected = ref([]); @@ -47,6 +50,10 @@ const props = defineProps({ cancel: { type: Boolean, default: false }, }); +const commandType = ref(""); +const commandMainOp = ref([]); //ข้อมูลรายการคำสั่ง +const commandOp = ref([]); //ตัวเลือกคำสั่ง + //Table const filterKeyword = defineModel("filterKeyword", { required: true }); const rowsData = ref([]); @@ -169,6 +176,11 @@ const visibleColumns = ref([ ]); const modalCommand = ref(false); +const isDisable = computed(() => { + return props.mainTabs === "1" + ? selected.value.length === 0 || commandType.value === "" + : selected.value.length === 0; +}); /** popup ยืนยันส่งัว */ function saveOrder() { @@ -210,6 +222,19 @@ async function fetchCheckOfficer() { } } +/** + * ฟิลเตอร์ คำสั่ง + * @param val ค่าจาก Input + * @param update Funtion quasar + */ +function filterSelector(val: string, update: Function) { + update(() => { + commandOp.value = commandMainOp.value.filter( + (v: ListCommand) => v.name.indexOf(val) > -1 + ); + }); +} + watch( () => props.modal, async (val) => { @@ -231,6 +256,11 @@ watch( rowsData.value = data ? data : []; rowsDataMain.value = data ? data : []; + commandType.value = ""; + const dataCommandTypes = await storeCommand.getCommandTypes(); + commandMainOp.value = dataCommandTypes.filter( + (e: ListCommand) => e.code === "C-PM-17" || e.code === "C-PM-48" + ); } else { rowsData.value = []; rowsDataMain.value = []; @@ -238,6 +268,7 @@ watch( } ); +