Merge branch 'develop' into dev

* develop:
  fix: rules
  fix:bug rules
  fix: notifyWarring
  fix:datepicker rules
This commit is contained in:
Warunee Tamkoo 2025-11-08 18:20:16 +07:00
commit bf55f07f21
2 changed files with 6 additions and 3 deletions

View file

@ -609,6 +609,7 @@ onMounted(async () => {
datePayment != null ? dateThaiRange(datePayment) : null
"
:label="`${'วันที่ชำระเงิน'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ชำระเงิน'}`]"
>
<template v-slot:prepend>
<q-icon
@ -647,6 +648,7 @@ onMounted(async () => {
dateAnnounce != null ? date2Thai(dateAnnounce) : null
"
:label="`${'วันประกาศผลสอบ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันประกาศผลสอบ'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -378,7 +378,7 @@ async function checkSave() {
myForm.value.validate().then(async (success) => {
if (success) {
if (edit.value) {
if (rowsPosition.value.length == 0) {
if (rowsPosition.value.length == 0 && announcementExam.value) {
notifyWarring($q, "กรุณาเพิ่มตำแหน่ง");
} else {
await editData(id.value);
@ -1212,6 +1212,7 @@ onMounted(async () => {
</template>
</datepicker>
</div>
<div class="col-12" v-if="announcementExam">
<div class="col-12 q-mb-sm">
<q-separator size="5px" color="grey-2" />
@ -1447,7 +1448,7 @@ onMounted(async () => {
bg-color="white"
:readonly="checkRoutePermisson"
v-model="companyCode"
:rules="pay !== 'payment2'?[(val:string) => !!val || `${'กรุณากรอก Company Code'}`]:[]"
:rules="pay === 'payment1'?[(val:string) => !!val || `${'กรุณากรอก Company Code'}`]:[]"
hide-bottom-space
>
</q-input>
@ -1460,7 +1461,7 @@ onMounted(async () => {
bg-color="white"
:readonly="checkRoutePermisson"
v-model="refNo1"
:rules="pay !== 'payment2' ? [(val:string) => !!val || `${'กรุณากรอก refNo1.'}`]:[]"
:rules="pay === 'payment1' ? [(val:string) => !!val || `${'กรุณากรอก refNo1.'}`]:[]"
hide-bottom-space
>
</q-input>