Compare commits

...

64 commits

Author SHA1 Message Date
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
f054dd54a4 refactor: redirect to landing page on 404 permission error in messageError
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m51s
2026-07-20 10:15:32 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
34d39c7215 refactor(probation): replace Math.round with Math.trunc
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m50s
2026-07-13 17:57:13 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
4dfc9bf4d6 refactor(probation): calculate score4 score5
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m43s
2026-07-13 15:01:41 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
8272a2b291 refactror(probation): add Check Box other_training
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m56s
2026-07-13 10:25:08 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
6392659c23 refactor(recruiting): add filter to compete and disable Page import
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m48s
2026-07-02 10:52:22 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
d3936e56b2 refactor(recruiting): add ScoreExpireDate to compete, qualify, and disable period forms
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m54s
2026-07-02 10:40:54 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
6f878a0e16 Merge branch 'develop' of https://github.com/Frappet/bma-ehr-frontend into develop
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m52s
2026-07-01 15:20:40 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
4621299dcf refactor(probation): checkType checkbox disable 2026-07-01 15:20:27 +07:00
a72b3afa70 แก้ไข tab ลงเวลา รอประมวลผล
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m10s
2026-06-30 20:15:28 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
faf529c13c feat(leave): show pending comment warning for system cancel case
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m0s
- Display 'ยังไม่ได้แสดงความคิดเห็น' in red when isSysCancel is true
- Hide original comment button when system cancel
- Improve UX for pending comments on cancelled leaves
2026-06-30 16:03:37 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
e283468d8c refactor(leave): show banner Comment
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m54s
2026-06-30 13:44:57 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
e08d716cf4 refactor(leavel) : label select
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m16s
2026-06-30 09:22:36 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
6aa2709986 feat(leave): add pending jobs tab to work-list page
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m53s
2026-06-29 16:39:36 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
2355639f25 Revert "refactor: disable DonwloadCandidatePassExam"
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m57s
This reverts commit 6e8dbfc375.
2026-06-29 15:27:25 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
96bb2faa1e refactor(placement): hide examRound display
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m1s
2026-06-29 13:30:59 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
6e8dbfc375 refactor: disable DonwloadCandidatePassExam 2026-06-29 13:24:03 +07:00
08fec651f2 fix clear noti ui
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m11s
2026-06-25 21:47:38 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
44e60d457f fix
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m12s
2026-06-25 18:01:45 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
a9bef5bc42 fix
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m2s
2026-06-25 17:19:10 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
fd665b8b4d refactor(qualify): replace api CandidateExam
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m50s
2026-06-25 14:53:59 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
16c21467e4 fix
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m45s
2026-06-23 16:17:56 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
c0aa285675 refactor(notification): update icon and text display
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m42s
2026-06-23 15:54:08 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
607457e921 refactor(timestamp-special): update checkIn/checkOut payload and edit conditions
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m5s
2026-06-23 15:27:42 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
13921f1a9f fix
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m56s
2026-06-23 14:40:50 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
b26396cd4a Revert "fix"
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m52s
This reverts commit 1afe3936bd.
2026-06-23 14:33:12 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
1afe3936bd fix 2026-06-23 14:31:13 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
c74952ed52 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m58s
2026-06-23 13:59:33 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
c49669021a feat(notification): add delete notification feature 2026-06-23 13:59:17 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
63f307c70d feat(timestamp-special): add MultipleApprove Special Lists 2026-06-23 13:41:10 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
d040427634 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m48s
2026-06-22 11:04:27 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
76156d03e4 refactor(round-time): replace max-height DialogForm 2026-06-22 11:03:58 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
a401601dac Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m56s
2026-06-22 10:46:07 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
8a9a14a1a0 refactor(command): default isBangkok to true when commandCode is 'C-PM-47' 2026-06-22 10:45:45 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
c4fe629cd2 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m57s
2026-06-22 09:29:08 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
2dfe617284 refactor(command): readonly radio commandCode C-PM-47 2026-06-22 09:28:50 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
f28758de8d Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m1s
2026-06-19 15:45:36 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
20d80916cb refactor(command): validate commandCode === 'C-PM-47' 2026-06-19 15:45:19 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
68659d3086 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m17s
2026-06-17 18:13:14 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
ee82e63e25 refactor(position-temp): comment checkbox isSit 2026-06-17 18:11:30 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
c411e9c0ff Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m57s
2026-06-17 17:30:45 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
c1d30de6d2 fix 2026-06-17 17:30:23 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
c3f7c78670 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m58s
2026-06-17 16:51:17 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
82411ce499 fix 2026-06-17 16:50:59 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
67f2cec40b Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m54s
2026-06-17 15:27:41 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
695c9ee271 fix 2026-06-17 15:27:20 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
004a0bcdb3 refactor(registry): rules q-select rank 2026-06-17 15:26:47 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
efaaa85fcf Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m53s
2026-06-16 16:07:44 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
df9a8408dd refactor(leave): add isAllDirector field to workflowCommanderOperate API 2026-06-16 16:07:24 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
4338d5bbce Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m14s
2026-06-16 10:43:47 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
06ddc1c970 refactor(org): add ROOT_CODE and CHILD_CODE fields for org hierarchy 2026-06-16 10:43:31 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
058fb6c464 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m45s
2026-06-12 17:00:27 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
72cbe6a8dc refactor(registry): itemsMenu RETIRE_MILITARY only SYS_PLACEMENT_OTHER 2026-06-12 17:00:09 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
141a5e40d6 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m50s
2026-06-12 11:10:16 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
bf4b03e643 refactor(registry-officer): prefix 2026-06-12 11:09:55 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
2bbab84f25 fix
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m1s
2026-06-11 18:20:51 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
92c204a7e4 Merge branch 'dev' of https://forgejo.chamomind.com/hrms-bangkok/hrms-mgt into dev 2026-06-11 18:17:29 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
5aed5699b9 fix 2026-06-11 18:17:21 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
60dfe0a6a5 Merge branch 'feat/registry' into develop 2026-06-11 17:55:26 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
d3e45048e8 fix 2026-06-11 16:30:18 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
5bcf07c306 Merge branch 'dev' into develop
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m51s
2026-06-11 16:27:39 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
f1b94c0d93 feat(Retired): add convertTypeRetired RETIRE_MILITARY 2026-06-11 16:27:07 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
eb23074454 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m59s
2026-06-11 14:02:29 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
f6f2c18d0f feat(resign): add commandType C-PM-48 2026-06-11 14:02:11 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
a8920b4473 feat(changeName): change Rank 2026-06-10 10:59:06 +07:00
38 changed files with 1402 additions and 129 deletions

View file

@ -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/`,
};

View file

@ -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}`,
};

View file

@ -89,6 +89,11 @@ const formData = reactive<FormDataAgency>({
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(
</div>
</div>
</div>
<div class="col-12">
<div class="col-12 row q-col-gutter-sm">
<div class="col">
<q-input
v-model="formData.ROOT_CODE"
dense
outlined
label="ROOT CODE"
hide-bottom-space
:class="classInput(false)"
maxlength="3"
/>
</div>
<div class="col">
<q-input
v-model="formData.CHILD1_CODE"
dense
outlined
label="CHILD1 CODE"
hide-bottom-space
:class="classInput(false)"
maxlength="3"
/>
</div>
<div class="col">
<q-input
v-model="formData.CHILD2_CODE"
dense
outlined
label="CHILD2 CODE"
hide-bottom-space
:class="classInput(false)"
maxlength="3"
/>
</div>
<div class="col">
<q-input
v-model="formData.CHILD3_CODE"
dense
outlined
label="CHILD3 CODE"
hide-bottom-space
:class="classInput(false)"
maxlength="3"
/>
</div>
<div class="col">
<q-input
v-model="formData.CHILD4_CODE"
dense
outlined
label="CHILD4 CODE"
hide-bottom-space
:class="classInput(false)"
maxlength="3"
/>
</div>
</div>
</div>
<div class="col-12">
<q-input
v-model="formData.responsibility"

View file

@ -36,6 +36,11 @@ const formData = reactive({
responsibility: "", //
isCommission: "", //
isDeputy: "", // .
rootCode: "", //ROOT CODE
child1Code: "", //CHILD1 CODE
child2Code: "", //CHILD2 CODE
child3Code: "", //CHILD3 CODE
child4Code: "", //CHILD4 CODE
});
/**
@ -76,6 +81,11 @@ 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);
@ -208,6 +218,41 @@ watch(
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">ROOT CODE</div>
<div class="col-8 text-grey-8">
<p>{{ formData.rootCode }}</p>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">CHILD1 CODE</div>
<div class="col-8 text-grey-8">
<p>{{ formData.child1Code }}</p>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">CHILD2 CODE</div>
<div class="col-8 text-grey-8">
<p>{{ formData.child2Code }}</p>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">CHILD3 CODE</div>
<div class="col-8 text-grey-8">
<p>{{ formData.child3Code }}</p>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">CHILD4 CODE</div>
<div class="col-8 text-grey-8">
<p>{{ formData.child4Code }}</p>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">หนาทความรบผดชอบ</div>
<div class="col-8 text-grey-8">

View file

@ -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 {

View file

@ -56,6 +56,7 @@ const optionsStatus = ref<ExamResultOption[]>([
{ label: "ขาดสอบ", value: "missed_exam" },
{ label: "ผ่าน", value: "pass" },
{ label: "ไม่ผ่าน", value: "notpass" },
{ label: "อื่น ๆ", value: "other" },
]);
const emit = defineEmits([

View file

@ -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(
</q-btn>
</div>
<div>
<q-btn icon="mdi-download" round color="green-6" flat>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>
<q-btn
icon="mdi-download"
round
color="green-6"
flat
:disable="attrs.rows.length === 0"
>
<q-tooltip>
{{
attrs.rows.length !== 0
? "ดาวน์โหลดไฟล์"
: "ไม่มีข้อมูลผู้สอบคัดเลือก"
}}</q-tooltip
>
<q-menu>
<q-list style="min-width: 100px">
<!-- <q-item clickable v-close-popup @click="downloadFileDashboard">

View file

@ -46,6 +46,7 @@ interface RequestPeriodCompete {
year: number;
announcementDate: string | null;
rootDnaId: string;
scoreExpireDate: string | null;
}
interface RequestPeriodDisable {
@ -65,6 +66,7 @@ interface RequestPeriodDisable {
year: number;
announcementDate: string | null;
rootDnaId: string;
scoreExpireDate: string | null;
}
interface RequestPosition {

View file

@ -56,6 +56,7 @@ const fileImgDataUpload = ref<File[]>([]);
const fileImgs = ref<UploadType[]>([]);
const id = ref<string>("");
const edit = ref<boolean>(false);
const scoreExpireDate = ref<Date | null>(null); //
/** กลับไปหน้าหลัก */
function clickBack() {
@ -101,6 +102,7 @@ async function fetchData() {
fileDocs.value = files;
fileImgs.value = images;
scoreExpireDate.value = data.scoreExpireDate;
})
.catch((e) => {
messageError($q, e);
@ -256,7 +258,11 @@ function sendData() {
year: yearly.value,
announcementDate:
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
scoreExpireDate:
scoreExpireDate.value !== null
? convertDateToAPI(scoreExpireDate.value)
: null,
rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
};
return valueData;
}
@ -359,6 +365,13 @@ function dateThaiRange(val: [Date, Date]) {
return `${date2Thai(val[0], true)} - ${date2Thai(val[1], true)}`;
}
}
function onUpdateScoreExpireDate(val: Date | null) {
if (val) {
const newDate = new Date(val);
newDate.setFullYear(newDate.getFullYear() + 2);
scoreExpireDate.value = newDate;
}
}
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
organizationNameOptions.value = [];
@ -455,6 +468,7 @@ onMounted(async () => {
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-4 col-md-2" v-if="announcementExam">
<q-input
outlined
@ -470,6 +484,7 @@ onMounted(async () => {
input-class="text-right"
></q-input>
</div>
<div class="col-xs-12 col-sm-4 col-md-3" v-if="announcementExam">
<datepicker
v-model="dateExam"
@ -505,6 +520,7 @@ onMounted(async () => {
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-3 col-md-3">
<datepicker
v-model="dateAnnouncement"
@ -547,6 +563,7 @@ onMounted(async () => {
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
<datepicker
v-model="dateRegister"
@ -572,6 +589,7 @@ onMounted(async () => {
dateRegister != null ? dateThaiRange(dateRegister) : null
"
:label="`${'วันที่สมัคร'}`"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -585,6 +603,7 @@ onMounted(async () => {
</template>
</datepicker>
</div>
<div
class="col-xs-12 col-sm-3 col-md-3"
v-if="announcementExam && isFeeNotZero"
@ -614,6 +633,7 @@ onMounted(async () => {
"
:label="`${'วันที่ชำระเงิน'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -636,6 +656,7 @@ onMounted(async () => {
borderless
:enableTimePicker="false"
week-start="0"
@update:model-value="onUpdateScoreExpireDate"
>
<template #year="{ year }">
{{ year + 543 }}
@ -653,6 +674,48 @@ onMounted(async () => {
"
:label="`${'วันประกาศผลสอบ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
<datepicker
v-model="scoreExpireDate"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
class="full-width datepicker q-mb-md"
:model-value="
scoreExpireDate != null ? date2Thai(scoreExpireDate) : null
"
:label="`${'วันหมดอายุบัญชี'}`"
clearable
@clear="scoreExpireDate = null"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon

View file

@ -47,7 +47,7 @@ const positionPathOptions = ref<DataOption2[]>([]);
const organizationShortName = ref<DataOption2>({ id: "", name: "" });
const organizationName = ref<DataOption2>({ id: "", name: "" });
const organizationNameOptions = ref<DataOption2[]>([]);
const scoreExpireDate = ref<Date | null>(null); //
const fileDocDataUpload = ref<File[]>([]);
const fileDocs = ref<UploadType[]>([]);
const fileImgDataUpload = ref<File[]>([]);
@ -93,6 +93,7 @@ async function fetchData() {
data.announcementDate != null ? new Date(data.announcementDate) : null;
fileDocs.value = data.documents;
fileImgs.value = data.images;
scoreExpireDate.value = data.scoreExpireDate;
})
.catch((e) => {
messageError($q, e);
@ -163,6 +164,10 @@ function sendData() {
announcementDate:
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
scoreExpireDate:
scoreExpireDate.value !== null
? convertDateToAPI(scoreExpireDate.value)
: null,
};
return valueData;
}
@ -352,6 +357,14 @@ function dateThaiRange(val: [Date, Date] | null) {
}
}
function onUpdateScoreExpireDate(val: Date | null) {
if (val) {
const newDate = new Date(val);
newDate.setFullYear(newDate.getFullYear() + 2);
scoreExpireDate.value = newDate;
}
}
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
organizationNameOptions.value = [];
});
@ -390,7 +403,7 @@ onMounted(async () => {
<q-form ref="myForm">
<q-card-section class="q-pa-md">
<div class="col-xs-12 col-sm-8"></div>
<div class="col-12 row items-center q-col-gutter-x-sm">
<div class="col-12 row q-col-gutter-sm">
<div class="col-xs-12 col-sm-6">
<q-input
outlined
@ -402,8 +415,10 @@ onMounted(async () => {
(val:string) =>
!!val || `${'กรุณากรอกชื่อรอบคัดเลือก/ชื่อประกาศ'}`,
]"
hide-bottom-space
></q-input>
</div>
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
<q-input
outlined
@ -413,8 +428,10 @@ onMounted(async () => {
dense
lazy-rules
:rules="[(val:number) => val > 0 || `${'กรุณากรอกรอบการสอบให้ถูกต้อง'}`]"
hide-bottom-space
></q-input>
</div>
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
<datepicker
v-model="yearly"
@ -435,6 +452,7 @@ onMounted(async () => {
:model-value="yearly + 543"
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
:label="`${'ปีงบประมาณ'}`"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -460,6 +478,7 @@ onMounted(async () => {
:rules="[
(val:any) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`,
]"
hide-bottom-space
></q-input>
</div>
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
@ -484,6 +503,7 @@ onMounted(async () => {
:model-value="dateExam != null ? date2Thai(dateExam) : null"
:label="`${'วันที่สอบ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สอบ'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -517,10 +537,11 @@ onMounted(async () => {
<q-input
outlined
dense
class="full-width datepicker q-mb-md"
class="full-width datepicker"
:model-value="dateThaiRange(dateAnnouncement)"
:label="`${'วันที่ประกาศ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ประกาศ'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -554,10 +575,11 @@ onMounted(async () => {
<q-input
outlined
dense
class="full-width datepicker q-mb-md"
class="full-width datepicker"
:model-value="dateThaiRange(dateRegister)"
:label="`${'วันที่สมัคร'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สมัคร'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -594,12 +616,13 @@ onMounted(async () => {
<q-input
outlined
dense
class="full-width datepicker q-mb-md"
class="full-width datepicker"
:model-value="
datePayment != null ? dateThaiRange(datePayment) : null
"
:label="`${'วันที่ชำระเงิน'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
@ -622,6 +645,7 @@ onMounted(async () => {
borderless
:enableTimePicker="false"
week-start="0"
@update:model-value="onUpdateScoreExpireDate"
>
<template #year="{ year }">
{{ year + 543 }}
@ -633,12 +657,54 @@ onMounted(async () => {
<q-input
outlined
dense
class="full-width datepicker q-mb-md"
class="full-width datepicker"
:model-value="
dateAnnounce != null ? date2Thai(dateAnnounce) : null
"
:label="`${'วันประกาศผลสอบ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
<datepicker
v-model="scoreExpireDate"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
class="full-width datepicker"
:model-value="
scoreExpireDate != null ? date2Thai(scoreExpireDate) : null
"
:label="`${'วันหมดอายุบัญชี'}`"
clearable
@clear="scoreExpireDate = null"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon

View file

@ -93,6 +93,7 @@ const examTypeOptions = [
{ name: "แพทย์", id: "docter" },
];
const category = ref<string>("");
const scoreExpireDate = ref<Date | null>(null);
const fileDocDataUpload = ref<File[]>([]);
const fileDocs = ref<UploadType[]>([]);
@ -333,6 +334,7 @@ async function fetchData() {
refNo1.value = data.refNo1;
reason.value = data.reason;
graduationYearLock.value = data.graduationYearLock;
scoreExpireDate.value = data.scoreExpireDate;
})
.catch((e) => {
messageError($q, e);
@ -506,6 +508,10 @@ function sendData() {
refNo1: refNo1.value,
reason: reason.value,
graduationYearLock: Number(graduationYearLock.value),
scoreExpireDate:
scoreExpireDate.value != null
? convertDateToAPI(scoreExpireDate.value)
: null,
};
return valueData;
}
@ -939,6 +945,14 @@ watch(
}
);
function onUpdateScoreExpireDate(val: Date | null) {
if (val) {
const newDate = new Date(val);
newDate.setFullYear(newDate.getFullYear() + 2);
scoreExpireDate.value = newDate;
}
}
onMounted(async () => {
hideLoader();
if (route.params.id != undefined) {
@ -1242,6 +1256,7 @@ onMounted(async () => {
borderless
:enableTimePicker="false"
week-start="0"
@update:model-value="onUpdateScoreExpireDate"
>
<template #year="{ year }">
{{ year + 543 }}
@ -1275,21 +1290,63 @@ onMounted(async () => {
</template>
</datepicker>
</div>
<div class="row col-12" v-if="announcementExam">
<div class="col-xs-12 col-md-2">
<q-input
outlined
v-model="graduationYearLock"
label="ล็อกวันที่สำเร็จการศึกษา (ปี)"
dense
:readonly="checkRoutePermisson"
lazy-rules
:rules="[
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
<datepicker
v-model="scoreExpireDate"
:locale="'th'"
autoApply
:readonly="checkRoutePermisson"
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
:readonly="checkRoutePermisson"
dense
class="full-width datepicker q-mb-md"
:model-value="
scoreExpireDate != null ? date2Thai(scoreExpireDate) : null
"
:label="`${'วันหมดอายุบัญชี'}`"
clearable
@clear="scoreExpireDate = null"
hide-bottom-space
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-2 col-md-2" v-if="announcementExam">
<q-input
outlined
v-model="graduationYearLock"
label="ล็อกวันที่สำเร็จการศึกษา (ปี)"
dense
:readonly="checkRoutePermisson"
lazy-rules
:rules="[
(val:string) => !!val || `${'กรุณากรอกล็อกวันที่สำเร็จการศึกษา (ปี)'}`,
]"
type="number"
></q-input>
</div>
type="number"
></q-input>
</div>
<div class="col-12" v-if="announcementExam">

View file

@ -96,11 +96,11 @@ const columnsHistory = ref<QTableColumn[]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "prefix",
name: "prefixMain",
align: "left",
label: "คำนำหน้าชื่อ",
sortable: true,
field: "prefix",
field: "prefixMain",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -256,7 +256,7 @@ const columnsHistory = ref<QTableColumn[]>([
]);
const visibleColumnsHistory = ref<string[]>([
"citizenId",
"prefix",
"prefixMain",
"rank",
"firstName",
"lastName",
@ -590,6 +590,7 @@ onMounted(() => {
<div class="col-xs-6 col-sm-6 col-md-6">
<q-select
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
:class="checkPermission($route)?.attrOwnership === 'OWNER' ? 'inputgreen' : ''"
dense
outlined
use-input

View file

@ -59,6 +59,7 @@ const changeNameData = reactive<FormChangeName>({
profileId: profileId.value,
prefixId: "", // id
prefix: "", //
rank: "", //
firstName: "", //
lastName: "", //
status: "", //
@ -69,11 +70,13 @@ const selection = ref<string[]>([]); // ตัวเลือก
const prefixChange = ref<string | null | undefined>(""); //
const firstNameChange = ref<string | null | undefined>(""); //
const lastNameChange = ref<string | null | undefined>(""); //
const rankChange = ref<string | null | undefined>(""); //
const profileInfo = ref<DataProfile>(); // Profile
const statusOption = ref<string[]>([
"เปลี่ยนคำนำหน้าชื่อ",
"เปลี่ยนยศ",
"เปลี่ยนชื่อ",
"เปลี่ยนนามสกุล",
"เปลี่ยนชื่อ-นามสกุล",
@ -84,6 +87,7 @@ const statusOption = ref<string[]>([
const statusOptionFilter = ref<string[]>([
"เปลี่ยนคำนำหน้าชื่อ",
"เปลี่ยนชื่อ",
"เปลี่ยนยศ",
"เปลี่ยนนามสกุล",
"เปลี่ยนชื่อ-นามสกุล",
"เปลี่ยนคำนำหน้าชื่อ และชื่อ",
@ -107,6 +111,17 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "rank",
align: "left",
label: "ยศ",
sortable: true,
field: "rank",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "firstName",
align: "left",
@ -156,6 +171,7 @@ const columns = ref<QTableProps["columns"]>([
]);
const visibleColumns = ref<string[]>([
"prefix",
"rank",
"firstName",
"lastName",
"lastUpdateFullName",
@ -215,6 +231,7 @@ function onSubmit() {
firstName: changeNameData.firstName,
lastName: changeNameData.lastName,
status: changeNameData.status,
rank: changeNameData.rank,
documentId: changeNameData.documentId,
})
.then(async (res) => {
@ -346,6 +363,14 @@ function filterSelector(val: string, update: Function, refData: string) {
);
});
break;
case "rankOps":
update(() => {
store.Ops.rankOps = store.OpsFilter.rankOps.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
});
break;
default:
break;
}
@ -390,12 +415,14 @@ watch(
changeNameData.prefix,
changeNameData.firstName,
changeNameData.lastName,
changeNameData.rank,
],
() => {
submitDisable.value =
changeNameData.prefix === prefixChange.value &&
changeNameData.firstName === firstNameChange.value &&
changeNameData.lastName === lastNameChange.value;
changeNameData.lastName === lastNameChange.value &&
changeNameData.rank === rankChange.value;
}
);
@ -411,6 +438,9 @@ watch(
if (!selection.value.includes("lastname")) {
changeNameData.lastName = lastNameChange.value;
}
if (!selection.value.includes("rank")) {
changeNameData.rank = rankChange.value;
}
}
);
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
@ -448,9 +478,11 @@ onMounted(async () => {
changeNameData.prefix = profileInfo?.prefixMain;
changeNameData.firstName = profileInfo?.firstName;
changeNameData.lastName = profileInfo?.lastName;
changeNameData.rank = profileInfo?.rank;
prefixChange = changeNameData.prefix;
firstNameChange = changeNameData.firstName;
lastNameChange = changeNameData.lastName;
rankChange = changeNameData.rank;
changeNameData.status = '';
dialogStatus = 'create';
submitDisable = true;
@ -533,7 +565,7 @@ onMounted(async () => {
:class="props.row.isEntry ? 'text-grey' : ''"
>
<div class="table_ellipsis">
{{ col.value }}
{{ col.value ? col.value : "-" }}
</div>
</q-td>
@ -563,12 +595,17 @@ onMounted(async () => {
<div class="row q-mb-sm">
<div class="col-12">
<div class="row">
<div class="q-gutter-sm">
<div class="q-col-gutter-sm">
<q-checkbox
v-model="selection"
val="prefix"
label="เปลี่ยนคำนำหน้าชื่อ"
/>
<q-checkbox
v-model="selection"
val="rank"
label="เปลี่ยนยศ"
/>
<q-checkbox
v-model="selection"
val="firstname"
@ -609,6 +646,30 @@ onMounted(async () => {
) "
/>
</div>
<div class="col">
<q-select
:readonly="!selection.includes('rank')"
v-model="changeNameData.rank"
:options="store.Ops.rankOps"
label="ยศ"
dense
:class="!selection.includes('rank') ? '' : 'inputgreen'"
outlined
use-input
hide-selected
fill-input
lazy-rules
emit-value
map-options
hide-bottom-space
input-debounce="0"
option-label="name"
option-value="name"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'rankOps'
) "
/>
</div>
<div class="col">
<q-input
:readonly="!selection.includes('firstname')"

View file

@ -66,6 +66,7 @@ interface FormChangeName {
profileId: string;
prefixId: string | null | undefined;
prefix: string | null | undefined;
rank: string | null | undefined;
firstName: string | null | undefined;
lastName: string | null | undefined;
status: string | null | undefined;

View file

@ -25,8 +25,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
{
id: "posNo",
name:
route.name === "registryNew" ||
route.name === "registryRetireOfficer"
route.name === "registryNew" || route.name === "registryRetireOfficer"
? "เลขที่ตำแหน่ง"
: "ตำแหน่งเลขที่",
},
@ -130,6 +129,8 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
return "ให้ออกจากราชการ";
case "DISCIPLINE_TEMP_SUSPEND":
return "ให้ออกจากราชการไว้ก่อน";
case "RETIRE_MILITARY":
return "ลาออกเพื่อไปรับราชการทหาร";
default:
return "";
}

View file

@ -121,7 +121,8 @@ const itemsMenu = computed(() => {
if (
leaveType.value === "DISCIPLINE_TEMP_SUSPEND" ||
leaveType.value === "RETIRE_RESIGN" ||
leaveType.value === "DISCIPLINE_SUSPEND"
leaveType.value === "DISCIPLINE_SUSPEND" ||
leaveType.value === "RETIRE_MILITARY"
) {
return (
baseItemsMenu.value?.filter(
@ -857,7 +858,8 @@ onMounted(async () => {
])) ||
leaveType === 'DISCIPLINE_TEMP_SUSPEND' ||
leaveType === 'RETIRE_RESIGN' ||
leaveType === 'DISCIPLINE_SUSPEND'
leaveType === 'DISCIPLINE_SUSPEND' ||
leaveType === 'RETIRE_MILITARY'
"
size="md"
rounded

View file

@ -48,12 +48,12 @@ const props = defineProps({
</div>
</div>
<div class="col">
<!-- <div class="col">
<div class="header-text-right q-px-xs">จำนวนครงทสมครสอบ</div>
<div class="sub-text-right q-px-xs q-pb-sm">
{{ props.data.examRound ? props.data.examRound : "-" }}
</div>
</div>
</div> -->
</div>
</q-card>
</div>

View file

@ -525,14 +525,14 @@ watch(props, () => {
<div class="col-7 header-sub-text">
<div class="q-pb-sm">ผลการสอบ</div>
<div class="q-pb-sm">ลำดบทสอบได</div>
<div class="q-pb-sm">จำนวนครงทสมครสอบ</div>
<!-- <div class="q-pb-sm">จำนวนครงทสมครสอบ</div> -->
</div>
<div class="col-5 sub-text-exam">
<div class="q-pb-sm">
{{ personalForm?.pass }}
</div>
<div class="q-pb-sm">{{ personalForm?.examNumber }}</div>
<div class="q-pb-sm">{{ personalForm?.examRound }}</div>
<!-- <div class="q-pb-sm">{{ personalForm?.examRound }}</div> -->
</div>
</div>
</div>

View file

@ -264,7 +264,7 @@ watch(
<template>
<q-dialog v-model="modal" persistent>
<q-card style="min-width: 85%">
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="closeModal" />
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="closeModal" />
<q-separator />
<q-card-section>
<div class="row col-12 q-col-gutter-sm">
@ -341,7 +341,7 @@ watch(
keep-color
color="primary"
dense
:disable="commandType"
:disable="!commandType ? true : false"
v-model="scope.selected"
/>
</template>
@ -352,7 +352,7 @@ watch(
keep-color
color="primary"
dense
:disable="commandType"
:disable="!commandType ? true : false"
v-model="props.selected"
/>
</q-td>

View file

@ -97,6 +97,8 @@ const develop_result_option = ref<any>([
const isCheckFile = ref<boolean>(false);
const isSelectionPartfour = ref<boolean>(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 () => {
<q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center q-pl-md">
<div class="col-8">
<q-checkbox
class="q-mr-sm"
dense
v-model="isSelectionPartfour"
@update:model-value="
other_training = 0;
other_training_percent = 0;
"
/>
4. การอบรมอ ตามทหนวยงานกำหนด (าม)
</div>
<div class="col">
<q-input
:disable="!isSelectionPartfour"
outlined
dense
type="number"
@ -1148,6 +1161,7 @@ onMounted(async () => {
</div>
<div class="col">
<q-input
:disable="!isSelectionPartfour"
outlined
dense
type="number"

View file

@ -90,6 +90,8 @@ const develop_result_option = ref<any>([
// footer
const dateAutherise = ref<any>(null);
const isSelectionPartfour = ref<boolean>(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) => {
<q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center q-pl-md">
<div class="col-8">
<q-checkbox
class="q-mr-sm"
dense
v-model="isSelectionPartfour"
@update:model-value="
other_training = 0;
other_training_percent = 0;
"
/>
4. การอบรมอ ตามทหนวยงานกำหนด (าม)
</div>
<div class="col">
<q-input
:disable="!isSelectionPartfour"
outlined
dense
type="number"
@ -1231,6 +1244,7 @@ watch(lengthdiscipline_level, (newLength) => {
outlined
dense
type="number"
:disable="!isSelectionPartfour"
v-model="other_training_percent"
:rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']"
hide-bottom-space

View file

@ -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<ResponseItems[]>([]);
@ -47,6 +50,10 @@ const props = defineProps({
cancel: { type: Boolean, default: false },
});
const commandType = ref<string>("");
const commandMainOp = ref<ListCommand[]>([]); //
const commandOp = ref<ListCommand[]>([]); //
//Table
const filterKeyword = defineModel<string>("filterKeyword", { required: true });
const rowsData = ref<ResponseItems[]>([]);
@ -169,6 +176,11 @@ const visibleColumns = ref<string[]>([
]);
const modalCommand = ref<boolean>(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(
}
);
</script>
<template>
<q-dialog v-model="props.modal" persistent>
<q-card style="min-width: 85%">
@ -249,6 +280,33 @@ watch(
<q-card-section>
<div class="row col-12 q-col-gutter-sm">
<div class="col-12 row">
<q-select
v-if="props.mainTabs === '1'"
v-model="commandType"
dense
outlined
label="ประเภทคำสั่ง"
:options="commandOp"
option-label="name"
option-value="code"
emit-value
map-options
use-input
hide-selected
fill-input
@update:model-value="onSearch"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn
) "
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
<q-space />
<q-input
borderless
@ -332,7 +390,7 @@ watch(
<q-btn
label="ส่งไปออกคำสั่ง"
@click="saveOrder"
:disable="selected.length === 0"
:disable="isDisable"
color="public"
/>
</q-card-actions>
@ -341,7 +399,7 @@ watch(
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="props.mainTabs === '1' ? 'C-PM-17' : 'C-PM-41'"
:command-type-code="props.mainTabs === '1' ? commandType : 'C-PM-41'"
:persons="dataMapToSend"
:fetch-data="props.fecthList"
/>

View file

@ -212,7 +212,7 @@ watch(
:close="close"
/>
<q-separator color="grey-4" />
<q-card-section style="max-height: 80vh" class="scroll q-pa-none">
<q-card-section style="max-height: 55vh" class="scroll q-pa-none">
<div
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
>
@ -362,6 +362,7 @@ watch(
</datepicker>
</div>
</div>
<div
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
>
@ -513,6 +514,7 @@ watch(
</datepicker>
</div>
</div>
<q-input
class="col-12 bg-white q-ma-md"
outlined
@ -522,7 +524,8 @@ watch(
label="คำอธิบาย"
hide-bottom-space
type="textarea"
></q-input>
/>
<div
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
>
@ -541,6 +544,7 @@ watch(
</label>
</div>
</div>
<div
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
>
@ -559,6 +563,7 @@ watch(
</div>
</div>
</q-card-section>
<q-separator color="grey-4" v-if="!isRead" />
<div class="q-pa-sm" v-if="!isRead">
<div class="row justify-end">

View file

@ -0,0 +1,263 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
import type { DataOption } from "@/interface/main";
import type { DataPendingJobs } from "@/modules/09_leave/interface/response/work";
const $q = useQuasar();
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
useCounterMixin();
/** ข้อมูลตาราง*/
const keyword = ref<string>("");
const timeOutMinutes = ref<string>("30");
const rowsMain = ref<DataPendingJobs[]>([]);
const rows = ref<DataPendingJobs[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: false,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdFullName",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "createdFullName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "checkType",
align: "left",
label: "ลงเวลาเข้า/ลงเวลาออก",
sortable: true,
field: "checkType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return val ? convertcheckType(val) : "-";
},
},
{
name: "status",
align: "left",
label: "สถานะ ",
sortable: true,
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return val ? convertStatus(val) : "-";
},
},
{
name: "createdDate",
align: "left",
label: "ลงเวลาเมื่อ",
sortable: true,
field: "createdDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return val ? date2Thai(val, false, true) : "-";
},
},
{
name: "processingDate",
align: "left",
label: "เริ่มประมวลผล",
sortable: true,
field: "processingDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return val ? date2Thai(val, false, true) : "-";
},
},
{
name: "completedDate",
align: "left",
label: "ประมวลผลเสร็จ",
sortable: true,
field: "completedDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return val ? date2Thai(val, false, true) : "-";
},
},
]);
const visibleColumns = ref<string[]>([
"no",
"createdFullName",
"checkType",
"status",
"createdDate",
"processingDate",
"completedDate",
]);
const timeOutMinutesOption = ref<DataOption[]>([
{ id: "30", label: "30 นาที" },
{ id: "60", label: "1 ชั่วโมง" },
{ id: "1440", label: "1 วัน" },
{ id: "10080", label: "7 วัน" },
]);
/** ฟังก์ชันดึงข้อมูลจาก API */
async function fetchData() {
try {
showLoader();
const res = await http.get(
`${config.API.leavePendingJobs}${Number(timeOutMinutes.value)}`
);
rowsMain.value = res.data.result;
serchDataTable();
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
}
/** ฟังก์ชันค้นหาข้อมูลในตาราง */
function serchDataTable() {
rows.value = onSearchDataTable(
keyword.value,
rowsMain.value,
columns.value ? columns.value : []
);
}
/**
* งกนแปลงสถานะเปนขอความ
* @param val
*/
function convertStatus(val: string) {
switch (val) {
case "PENDING":
return "รอดำเนินการ";
case "COMPLETED":
return "ดำเนินการเสร็จสิ้น";
default:
break;
}
}
function convertcheckType(val: string) {
switch (val) {
case "CHECK_OUT":
return "ลงเวลาออก";
case "CHECK_IN":
return "ลงเวลาเข้า";
default:
break;
}
}
onMounted(() => {
fetchData();
});
</script>
<template>
<div class="row items-center q-gutter-x-sm q-pb-sm">
<q-select
emit-value
map-options
outlined
dense
option-value="id"
option-label="label"
label="เวลาย้อนหลัง"
use-input
v-model="timeOutMinutes"
hide-selected
fill-input
:options="timeOutMinutesOption"
@update:model-value="fetchData"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey"> ไมอม </q-item-section>
</q-item>
</template>
</q-select>
<q-space />
<q-input
dense
outlined
v-model="keyword"
label="ค้นหา"
@keydown.enter.prevent="serchDataTable"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<q-select
v-model="visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>
<d-table
:columns="columns"
:rows="rows"
row-key="id"
flat
bordered
:paging="true"
dense
class="custom-header-table"
:visible-columns="visibleColumns"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th
v-for="col in props.cols"
:key="col.name"
:props="props"
style="color: #000000; font-weight: 500"
>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</template>
<style scoped></style>

View file

@ -96,8 +96,8 @@ watch(
formData.checkOut = "";
formData.note = "";
} else if (props.editCheck === "PENDING") {
if (props.detailData) {
if (props.detailData.checkInEdit) {
if (props.detailData) {
if (props.detailData.checkInEdit && props.detailData.checkOutEdit) {
formData.checkIn = props.detailData.startTimeMorning;
formData.checkOut = props.detailData.endTimeAfternoon;
} else if (

View file

@ -0,0 +1,344 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useSpecialTimeStore } from "@/modules/09_leave/stores/SpecialTimeStore";
import { usePagination } from "@/composables/usePagination";
import type { QTableProps } from "quasar";
import type { DataSpecialTime } from "@/modules/09_leave/interface/index/Main";
import DialogHeader from "@/components/DialogHeader.vue";
const $q = useQuasar();
const store = useSpecialTimeStore();
const {
hideLoader,
messageError,
showLoader,
success,
date2Thai,
dialogConfirm,
dialogMessageNotify,
dateToISO,
} = useCounterMixin();
const { pagination, params, onRequest } = usePagination("", fetchDataList);
/** props*/
const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
fetchData: { type: Function, default: () => {} },
dateThaiRange: { type: Function, default: () => {} },
columns: { type: Array as () => QTableProps["columns"], default: () => [] },
visibleColumnsMain: { type: Array as () => string[], default: () => [] },
});
const filterKeyword = ref<string>("");
const filterStatus = ref<string>("PENDING");
const filterDate = ref<[Date, Date] | null>([new Date(), new Date()]); //
const rows = ref<DataSpecialTime[]>([]);
const visibleColumns = ref<string[]>(props.visibleColumnsMain);
const selected = ref<DataSpecialTime[]>([]);
const reason = ref<string>("");
/** ฟังก์ชันเรียกข้อมูลรายการลงเวลากรณีพิเศษ*/
async function fetchDataList() {
showLoader();
selected.value = [];
await http
.get(config.API.specialTime(), {
params: {
...params.value,
keyword: filterKeyword.value.trim(),
status: filterStatus.value,
startDate: filterDate.value ? dateToISO(filterDate.value[0]) : null,
endDate: filterDate.value ? dateToISO(filterDate.value[1]) : null,
},
})
.then(async (res) => {
const result = await res.data.result;
pagination.value.rowsNumber = result.total;
if (result.data.length > 0) {
rows.value = result.data.map((e: DataSpecialTime) => ({
...e,
date: date2Thai(new Date(e.createdAt), false, true),
dateFix: date2Thai(new Date(e.checkDate)),
timeMorning:
e.startTimeMorning == null
? "-"
: e.checkInEdit == true
? e.startTimeMorning + " - " + e.endTimeMorning
: "-",
timeAfternoon:
e.startTimeAfternoon == null
? "-"
: e.checkOutEdit == true
? e.startTimeAfternoon + " - " + e.endTimeAfternoon
: "-",
checkIn: e.checkInTime,
checkOut: e.checkOutTime,
checkInStatus: store.convertStatus(e.checkInStatus),
checkOutStatus: store.convertStatus(e.checkOutStatus),
checkInStatusMain: e.checkInStatus,
checkOutStatusMain: e.checkOutStatus,
}));
} else {
rows.value = [];
}
})
.catch((e) => {
rows.value = [];
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/** ฟังก์ชันบันทึกข้อมูล*/
function onSubmit() {
if (selected.value.length === 0) {
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 รายการ");
} else {
dialogConfirm($q, async () => {
showLoader();
const payload = selected.value.map((e: DataSpecialTime) => {
let checkInTime: string;
let checkOutTime: string;
if (e.checkInEdit && e.checkOutEdit) {
checkInTime = e.startTimeMorning;
checkOutTime = e.endTimeAfternoon;
} else if (e.checkInEdit && !e.checkOutEdit) {
checkInTime = e.startTimeMorning;
checkOutTime = e.endTimeMorning;
} else if (!e.checkInEdit && e.checkOutEdit) {
checkInTime = e.startTimeAfternoon;
checkOutTime = e.endTimeAfternoon;
} else {
checkInTime = e.checkInTime;
checkOutTime = e.checkOutTime;
}
return {
recId: e.id,
checkInTime,
checkOutTime,
checkInStatus: e.checkInEdit ? "NORMAL" : e.checkInStatusMain,
checkOutStatus: e.checkOutEdit ? "NORMAL" : e.checkOutStatusMain,
reason: reason.value,
};
});
try {
await http.put(config.API.specialTimeApproveLists, payload);
await props.fetchData();
success($q, "บันทึกข้อมูลสำเร็จ");
handleClose();
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
});
}
}
/** ฟังก์ชั่นค้นหาข้อมูล */
function onSearchData() {
pagination.value.page = 1;
fetchDataList();
}
/** ฟังก์ชันปิด*/
function handleClose() {
modal.value = false;
selected.value = [];
rows.value = [];
reason.value = "";
filterDate.value = [new Date(), new Date()];
filterKeyword.value = "";
pagination.value.page = 1;
}
watch(modal, async (val) => {
if (val) {
await fetchDataList();
}
});
</script>
<template>
<q-dialog v-model="modal" persistent>
<q-card style="min-width: 800px">
<q-form greedy @submit.prevent @validation-success="onSubmit">
<DialogHeader
tittle="อนุมัติการลงเวลากรณีพิเศษแบบหลายรายการ"
:close="handleClose"
/>
<q-separator />
<q-card-section class="row q-col-gutter-sm">
<div class="col-12">
<div class="row col-12 q-col-gutter-sm">
<div class="col-xs-12 col-sm-6 col-md-5">
<datepicker
v-model="filterDate"
:locale="'th'"
autoApply
borderless
range
:enableTimePicker="false"
week-start="0"
@update:modelValue="onSearchData()"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
class="full-width datepicker"
:model-value="
filterDate != null ? dateThaiRange(filterDate) : null
"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<q-space v-if="!$q.screen.xs && !$q.screen.sm" />
<div class="col-xs-12 col-sm-6 col-md-4">
<q-input
standout
dense
v-model="filterKeyword"
outlined
placeholder="ค้นหาชื่อ-นามสกุล"
@keydown.enter.prevent="onSearchData()"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</div>
<div class="col-xs-12 col-sm-6 col-md-2">
<q-select
v-model="visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
option-value="name"
/>
</div>
</div>
</div>
<span class="text-red"
>*หมายเหตเลอกทงหมดเฉพาะรายการทแสดงเทาน</span
>
<div class="col-12">
<p-table
:columns="columns"
:rows="rows"
row-key="id"
flat
bordered
:paging="false"
dense
:visible-columns="visibleColumns"
:rows-per-page-options="[10, 25, 50, 100]"
v-model:pagination="pagination"
@request="onRequest"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else-if="col.name === 'description'"
class="table_ellipsis"
>
{{ col.value ?? "-" }}
</div>
<div v-else>
{{ col.value ?? "-" }}
</div>
</q-td>
</q-tr>
</template>
</p-table>
</div>
<div class="col-12">
<q-input
outlined
v-model="reason"
dense
lazy-rules
type="textarea"
:rules="[(val:string) => !!val || 'กรุณาเหตุผลการอนุมัติ']"
label="เหตุผลการอนุมัติ"
hide-bottom-space
rows="3"
/>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn label="บันทึก" color="public" id="onSubmit" type="submit">
<q-tooltip>นท</q-tooltip>
</q-btn>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</template>
<style scoped></style>

View file

@ -260,6 +260,14 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
]);
const isSysCancel = computed(() => {
return (
formData.reasonOligarch === "อนุมัติการขอยกเลิกการลา โดยระบบ" &&
statusCheck.value === "DELETE"
);
});
/**
* งกนเรยกรายละเอยดของขอม
* @param paramsId ID จาก paramID
@ -1036,7 +1044,12 @@ onMounted(async () => {
props.row.comment == ''
"
>
<div v-if="isSysCancel" class="text-red-6">
งไมไดแสดงความคดเห
</div>
<q-btn
v-else
dense
:disable="
statusCheck == 'NEW' ||
@ -1133,7 +1146,13 @@ onMounted(async () => {
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
<div v-if="isSysCancel" class="row col-12 q-pa-md">
<q-banner class="bg-red-2 text-red-6 full-width" rounded>
อำนาจยงไมไดจารณา ใบลานกยกเลกแล
</q-banner>
</div>
<div class="row col-12 q-pa-md" v-else>
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-6 row items-start">
<div class="col-12 text-weight-bold text-top">

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useQuasar } from "quasar";
@ -158,6 +158,13 @@ const isLoadData = ref<boolean>(false);
const leaveType = ref<LeaveType[]>([]); //
const checkForm = ref<string>(""); //
const isSysCancel = computed(() => {
return (
formData.reasonOligarch === "อนุมัติการขอยกเลิกการลา โดยระบบ" &&
statusCheck.value === "DELETE"
);
});
/**
* งกเรยกขอมลรายละเอยดของการยกเลกลา
* @param paramsId ID จาก paramID
@ -769,7 +776,13 @@ onMounted(async () => {
</div>
</div>
<q-separator />
<div class="row col-12 q-pa-md">
<div v-if="isSysCancel" class="row col-12 q-pa-md">
<q-banner class="bg-green-2 text-green-6 full-width" rounded>
{{ formDataReject.leaveDirectorComment }}
</q-banner>
</div>
<div class="row col-12 q-pa-md" v-else>
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-6 row items-start">
<div class="col-12 text-weight-bold text-top">
@ -799,7 +812,7 @@ onMounted(async () => {
<div class="col-xs-6 row items-start">
<div class="col-12 text-weight-bold text-top">
ผลการพจารณา
ผลการพจารณายกเลกวนลา
</div>
<div class="col-12 text-detail">
{{

View file

@ -35,6 +35,7 @@ const props = defineProps({
const pageId = ref<string>(route.params.id as string);
const keyword = ref<string>("");
const isAct = ref<boolean>(false);
const isAllDirector = ref<boolean>(false);
const total = ref<number>(0);
const totalList = ref<number>(1);
@ -105,6 +106,7 @@ async function getData() {
page: pagination.value.page,
keyword: keyword.value,
isAct: isAct.value,
isAllDirector: isAllDirector.value,
keycloakId: props.keycloakUserId,
type:
props.profileType?.toLocaleLowerCase() === "officer"
@ -196,6 +198,7 @@ function closeDialog() {
modal.value = false;
rows.value = [];
selected.value = [];
isAllDirector.value = false;
}
watch(
@ -231,19 +234,45 @@ watch(
<q-card-section>
<div class="row q-col-gutter-sm">
<div class="col-12">
<div class="row q-gutter-x-xs">
<div class="row items-center q-mb-sm">
<q-input
dense
outlined
label="ค้นหา"
v-model="keyword"
style="width: 300px"
class="col-grow"
style="max-width: 400px"
@keydown.enter.prevent="onSearchData()"
>
<template v-slot:append>
<q-icon name="search"></q-icon>
</template>
</q-input>
<q-space />
<q-btn
color="primary"
icon="search"
label="ค้นหา"
class="q-px-md"
@click.prevent="onSearchData"
style="width: 150px"
/>
</div>
<div
class="row items-center q-gutter-x-md text-subtitle2 text-grey-8"
>
<q-checkbox
keep-color
v-model="isAllDirector"
label="หัวหน้าทั้งหน่วยงาน"
color="primary"
@update:model-value="onSearchData"
>
<q-tooltip>วหนาทงหนวยงาน</q-tooltip>
</q-checkbox>
<q-checkbox
keep-color
v-model="isAct"
@ -251,20 +280,11 @@ watch(
color="primary"
@update:model-value="onSearchData"
>
<q-tooltip>แสดงเฉพาะรกษาการแทน </q-tooltip>
<q-tooltip>แสดงเฉพาะรกษาการแทน</q-tooltip>
</q-checkbox>
<q-space />
<q-btn
color="primary"
icon="search"
label="ค้นหา"
class="q-pa-sm"
@click.prevent="onSearchData"
style="width: 200px"
>
</q-btn>
</div>
</div>
<div class="col-12 text-red">
{{
props.type == "APPROVER"

View file

@ -68,6 +68,8 @@ interface DataSpecialTime {
statusSort: number;
timeAfternoon: string;
timeMorning: string;
checkInStatusMain: string;
checkOutStatusMain: string;
}
export type {
DataOption,

View file

@ -98,6 +98,26 @@ interface DataProcess {
errorMessage: string | null;
}
interface DataPendingJobs {
taskId: string;
keycloakUserId: string;
createdDate: string | Date;
processingDate: string | Date;
completedDate: string | Date;
status: string;
checkType: string;
checkInId: string;
errorMessage: string;
additionalData: string;
id: string;
createdAt: string | Date;
createdUserId: string;
lastUpdatedAt: string;
lastUpdateUserId: string;
createdFullName: string;
lastUpdateFullName: string;
}
export type {
TableRows,
DataResLog,
@ -105,4 +125,5 @@ export type {
TableRowsTime,
FormDetail,
DataProcess,
DataPendingJobs,
};

View file

@ -9,6 +9,7 @@ import { useRoute } from "vue-router";
import Tab1 from "@/modules/09_leave/components/02_WorkList/Tab1.vue";
import Tab2 from "@/modules/09_leave/components/02_WorkList/Tab2.vue";
import Tab3 from "@/modules/09_leave/components/02_WorkList/Tab3_Processed_Late.vue";
import Tab4_Pending from "@/modules/09_leave/components/02_WorkList/Tab4_Pending.vue";
const stores = useWorklistDataStore();
const route = useRoute();
@ -21,6 +22,10 @@ const isPermissionTab3 = computed(() => {
checkPermission(route)?.attrIsUpdate)
);
});
const isPermissionTab4 = computed(() => {
return checkPermission(route)?.attrOwnership === "OWNER";
});
</script>
<template>
@ -46,6 +51,7 @@ const isPermissionTab3 = computed(() => {
name="3"
label="ประมวลผลการขาดราชการ/มาสาย"
/>
<q-tab v-if="isPermissionTab4" name="4" label="รอประมวลผล" />
<!-- เพมแทบใหม -->
</q-tabs>
@ -62,6 +68,9 @@ const isPermissionTab3 = computed(() => {
<q-tab-panel name="3">
<Tab3 />
</q-tab-panel>
<q-tab-panel name="4">
<Tab4_Pending />
</q-tab-panel>
</q-tab-panels>
</div>
</q-card>

View file

@ -17,6 +17,7 @@ import type {
import DialogReason from "@/components/Dialogs/PopupReason.vue";
import DialogApprove from "@/modules/09_leave/components/04_SpecialTime/DialogApprove.vue";
import DialogMultipleApprove from "@/modules/09_leave/components/04_SpecialTime/DialogMultipleApprove.vue";
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
@ -47,6 +48,7 @@ const name = ref<string>("");
const id = ref<string>("");
const dateDialog = ref<string>("");
const dateFixDialog = ref<string>("");
const modalMultiple = ref<boolean>(false);
//
const filterKeyword = ref<string>("");
@ -54,7 +56,7 @@ const filterStatus = ref<string>("PENDING");
const filterDate = ref<[Date, Date] | null>([new Date(), new Date()]); //
const optionStatus = ref<DataOption[]>(store.optionStatusMain);
const rows = ref<DataSpecialTime[]>([]);
const visibleColumns = ref<String[]>([
const visibleColumns = ref<string[]>([
"no",
"fullName",
"createdAt",
@ -283,6 +285,20 @@ onMounted(async () => {
<template>
<div class="toptitle text-dark col-12 row items-center">
รายการลงเวลากรณเศษ
<q-space />
<q-btn
v-if="
checkPermission($route)?.attrIsUpdate &&
checkPermission($route)?.attrIsGet
"
class="q-px-md"
color="primary"
dense
unelevated
@click="modalMultiple = true"
>
อนแบบหลายรายการ
</q-btn>
</div>
<q-card flat bordered class="col-12 q-pa-md">
@ -492,6 +508,14 @@ onMounted(async () => {
:detailData="detailData"
:fetch-data="fetchData"
/>
<DialogMultipleApprove
v-model:modal="modalMultiple"
:fetch-data="fetchData"
:dateThaiRange="dateThaiRange"
:columns="columns"
:visibleColumnsMain="visibleColumns"
/>
</template>
<style></style>

View file

@ -113,8 +113,6 @@ const visibleColumns = ref<Array<string>>([
const modalAddOperator = ref<boolean>(false); //
/**
* งกนบนทกขอมลรายละเอยดคำส
* และกำหนด isChangeData เป false
@ -225,6 +223,8 @@ onMounted(async () => {
formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate;
formData.isBangkok = !store.isIdofficer
? null
: props.formCommandList.commandCode === "C-PM-47"
? "BANGKOK"
: props.formCommandList.isBangkok;
commandCode.value = props.formCommandList.commandCode;
const [volume, chapter] = props.formCommandList.commandNo.split("/");
@ -486,12 +486,9 @@ onMounted(async () => {
/>
</div>
<div
class="col-12 q-gutter-sm"
v-if="store.isIdofficer && commandCode !== 'C-PM-47'"
>
<div class="col-12 q-gutter-sm" v-if="store.isIdofficer">
<q-radio
:disable="store.readonly"
:disable="store.readonly || commandCode === 'C-PM-47'"
keep-color
color="primary"
dense
@ -501,7 +498,7 @@ onMounted(async () => {
/>
<q-radio
:disable="store.readonly"
:disable="store.readonly || commandCode === 'C-PM-47'"
keep-color
color="primary"
dense

View file

@ -706,7 +706,7 @@ watch(
</div>
</q-card>
<div class="row col-12 q-pa-sm">
<!-- <div class="row col-12 q-pa-sm">
<q-checkbox
keep-color
color="primary"
@ -714,7 +714,7 @@ watch(
v-model="isSit"
label="นั่งทับตำแหน่ง"
/>
</div>
</div> -->
</div>
</q-card-section>
<q-separator />

View file

@ -362,13 +362,21 @@ export const useCounterMixin = defineStore("mixin", () => {
const messageError = (q: any, e: any = "", msg: string = "") => {
if (e.response !== undefined) {
if (e.response.data.status !== undefined) {
if (e.response.data.status == 401) {
if (
e.response.data.status == 401 ||
(e.response.data.status == 404 &&
e.response.data.message == "ไม่พบข้อมูลสิทธิ์")
) {
//invalid_token
const msg =
e.response.data.status == 401
? "ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง"
: e.response.data.message;
q.dialog({
component: CustomComponent,
componentProps: {
title: `พบข้อผิดพลาด`,
message: `ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง`,
message: msg,
icon: "warning",
color: "red",
onlycancel: true,

View file

@ -561,6 +561,26 @@ function getImg(id: string, pathName: string) {
function onViewDetailNoti(url: string) {
window.open(url, "_blank");
}
function handleDeleteNotification() {
dialogRemove(
$q,
async () => {
try {
showLoader();
await http.delete(config.API.msgNotificate);
await getDataNotification(1, "DEL");
success($q, "ล้างการแจ้งสำเร็จ");
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
},
"ยืนยันการล้างการแจ้งเตือนทั้งหมด",
`ต้องการล้างการแจ้งเตือนทั้งหมด (${totalInbox.value} รายการ) ใช่หรือไม่? การกระทำนี้ไม่สามารถย้อนกลับได้`
);
}
</script>
<!-- โครงเว -->
@ -642,6 +662,21 @@ function onViewDetailNoti(url: string) {
<div class="text-grey-5" style="font-size: 12px">
งหมด {{ totalInbox }} อความ
</div>
<q-btn
v-if="totalInbox !== 0"
flat
dense
no-caps
size="12px"
color="red-7"
icon="mdi-trash-can-outline"
label="ล้างทั้งหมด"
class="q-ml-sm"
aria-label="ล้างการแจ้งเตือนทั้งหมด"
@click.stop.prevent="handleDeleteNotification"
>
<q-tooltip>างการแจงเตอนทงหมด</q-tooltip>
</q-btn>
</div>
<q-infinite-scroll