Compare commits

..

No commits in common. "dev" and "v1.1.155" have entirely different histories.

10 changed files with 40 additions and 265 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -97,8 +97,6 @@ const develop_result_option = ref<any>([
const isCheckFile = ref<boolean>(false); const isCheckFile = ref<boolean>(false);
const isSelectionPartfour = ref<boolean>(false);
// score // score
const score1 = computed(() => { const score1 = computed(() => {
if ( if (
@ -214,21 +212,20 @@ const percent_sum: any = computed(() => {
}); });
const score4 = computed(() => { const score4 = computed(() => {
return ( return (
Number(orientation.value) + (Number(orientation.value) +
Number(self_learning.value) + Number(self_learning.value) +
Number(training_seminar.value) + Number(training_seminar.value) +
(isSelectionPartfour.value ? Number(other_training.value) : 0) Number(other_training.value)) /
4
); );
}); });
const score5 = computed(() => { const score5 = computed(() => {
const rawTotal = const total =
(Number(orientation_percent.value) + (Number(orientation_percent.value) +
Number(self_learning_percent.value) + Number(self_learning_percent.value) +
Number(training_seminar_percent.value) + Number(training_seminar_percent.value) +
Number(other_training_percent.value)) / Number(other_training_percent.value)) /
(isSelectionPartfour.value ? 4 : 3); 4;
const total = Math.trunc(rawTotal);
develop_result.value = total > 60 ? 1 : 0; develop_result.value = total > 60 ? 1 : 0;
@ -1136,20 +1133,10 @@ onMounted(async () => {
<q-separator class="q-my-xs" /> <q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center q-pl-md"> <div class="row q-gutter-md align-center q-pl-md">
<div class="col-8"> <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. การอบรมอ ตามทหนวยงานกำหนด (าม) 4. การอบรมอ ตามทหนวยงานกำหนด (าม)
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input
:disable="!isSelectionPartfour"
outlined outlined
dense dense
type="number" type="number"
@ -1161,7 +1148,6 @@ onMounted(async () => {
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input
:disable="!isSelectionPartfour"
outlined outlined
dense dense
type="number" type="number"

View file

@ -90,8 +90,6 @@ const develop_result_option = ref<any>([
// footer // footer
const dateAutherise = ref<any>(null); const dateAutherise = ref<any>(null);
const isSelectionPartfour = ref<boolean>(false);
onMounted(() => { onMounted(() => {
fecthAssign(assignId.value); fecthAssign(assignId.value);
}); });
@ -241,21 +239,20 @@ const percent_sum: any = computed(() => {
}); });
const score4 = computed(() => { const score4 = computed(() => {
return ( return (
Number(orientation.value) + (Number(orientation.value) +
Number(self_learning.value) + Number(self_learning.value) +
Number(training_seminar.value) + Number(training_seminar.value) +
(isSelectionPartfour.value ? Number(other_training.value) : 0) Number(other_training.value)) /
4
); );
}); });
const score5 = computed(() => { const score5 = computed(() => {
const rawTotal = const total =
(Number(orientation_percent.value) + (Number(orientation_percent.value) +
Number(self_learning_percent.value) + Number(self_learning_percent.value) +
Number(training_seminar_percent.value) + Number(training_seminar_percent.value) +
Number(other_training_percent.value)) / Number(other_training_percent.value)) /
(isSelectionPartfour.value ? 4 : 3); 4;
const total = Math.trunc(rawTotal);
develop_result.value = total > 60 ? 1 : 0; develop_result.value = total > 60 ? 1 : 0;
@ -1217,20 +1214,10 @@ watch(lengthdiscipline_level, (newLength) => {
<q-separator class="q-my-xs" /> <q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center q-pl-md"> <div class="row q-gutter-md align-center q-pl-md">
<div class="col-8"> <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. การอบรมอ ตามทหนวยงานกำหนด (าม) 4. การอบรมอ ตามทหนวยงานกำหนด (าม)
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input
:disable="!isSelectionPartfour"
outlined outlined
dense dense
type="number" type="number"
@ -1244,7 +1231,6 @@ watch(lengthdiscipline_level, (newLength) => {
outlined outlined
dense dense
type="number" type="number"
:disable="!isSelectionPartfour"
v-model="other_training_percent" v-model="other_training_percent"
:rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']" :rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']"
hide-bottom-space hide-bottom-space

View file

@ -51,7 +51,7 @@ const isPermissionTab4 = computed(() => {
name="3" name="3"
label="ประมวลผลการขาดราชการ/มาสาย" label="ประมวลผลการขาดราชการ/มาสาย"
/> />
<q-tab v-if="isPermissionTab4" name="4" label="รอประมวลผล" /> <q-tab v-if="isPermissionTab4" name="4" label="รอประมวลผล/มาสาย" />
<!-- เพมแทบใหม --> <!-- เพมแทบใหม -->
</q-tabs> </q-tabs>

View file

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