fix bug rules

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-27 16:56:52 +07:00
parent 0c1ae8c74f
commit 751953b569
83 changed files with 422 additions and 422 deletions

View file

@ -1189,7 +1189,7 @@ onMounted(async () => {
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<q-input
:rules="[(val) => !!val || 'กรุณากรอกชื่อ']"
:rules="[(val:string) => !!val || 'กรุณากรอกชื่อ']"
hide-bottom-space
readonly
dense
@ -1202,7 +1202,7 @@ onMounted(async () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:rules="[(val) => !!val || 'กรุณากรอกตำเเหน่ง']"
:rules="[(val:string) => !!val || 'กรุณากรอกตำเเหน่ง']"
hide-bottom-space
readonly
dense
@ -1220,7 +1220,7 @@ onMounted(async () => {
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-4">
<q-select
:rules="[(val) => !!val || 'กรุณาเลือกระยะเวลา']"
:rules="[(val:string) => !!val || 'กรุณาเลือกระยะเวลา']"
hide-bottom-space
:options="monthOp"
class="col-xs-12 col-sm-6"
@ -1260,7 +1260,7 @@ onMounted(async () => {
:readonly="
!isEdit && routeName !== 'probationWorkAdd'
"
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
hide-bottom-space
class="full-width datepicker"
:model-value="
@ -1327,7 +1327,7 @@ onMounted(async () => {
</div>
<div v-if="isEdit == true" class="col-12 row q-col-gutter-md">
<q-select
:rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้ดูเเล']"
option-value="id"
:options="optionCaretaker"
class="col-xs-12 col-sm-6"
@ -1382,7 +1382,7 @@ onMounted(async () => {
<div v-else class="col-12 row q-col-gutter-md">
<q-select
:rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้ดูเเล']"
option-value="id"
:options="filtermantor(OPcaretaker, [caretaker2])"
class="col-xs-12 col-sm-6"
@ -1449,7 +1449,7 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-input
:rules="
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 2 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
hide-bottom-space
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
@ -1465,7 +1465,7 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-5">
<q-input
:rules="
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 2 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
hide-bottom-space
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
@ -1526,13 +1526,13 @@ onMounted(async () => {
<div class="col-11 q-my-xs">
<q-select
:option-label="
(item) => `${item.title}-${item.description}`
(item:any) => `${item.title}-${item.description}`
"
option-value="id"
map-options
:rules="
index < 3
? [(val) => !!val || 'กรุณาเลือกความสามารถ']
? [(val:string) => !!val || 'กรุณาเลือกความสามารถ']
: []
"
hide-bottom-space
@ -1773,13 +1773,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPcomputer"
class="bg-white"
@ -1806,14 +1806,14 @@ onMounted(async () => {
<q-select
ellipsis-2-lines
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
map-options
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPenglish"
class="bg-white"
@ -1838,13 +1838,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPinfomation"
class="bg-white"
@ -1870,13 +1870,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPresourse"
class="bg-white"
@ -1918,12 +1918,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main2, main3, main4, main5])
"
@ -1951,12 +1951,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main3, main4, main5])
"
@ -1984,12 +1984,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main2, main4, main5])
"
@ -2017,12 +2017,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main2, main3, main5])
"
@ -2049,13 +2049,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main2, main3, main4])
"
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
@ -2088,13 +2088,13 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๒ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
(val:string) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
]"
:options="filterData(OPgroup, [group2, group3])"
class="bg-white"
@ -2121,13 +2121,13 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๒ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
(val:string) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
]"
:options="filterData(OPgroup, [group, group3])"
class="bg-white"
@ -2154,14 +2154,14 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๒ ${item.description}`
"
option-value="id"
map-options
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
(val:string) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
]"
:options="filterData(OPgroup, [group, group2])"
class="bg-white"
@ -2311,7 +2311,7 @@ onMounted(async () => {
<q-input
hide-bottom-space
:rules="
index < 1 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 1 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
type="textarea"
:readonly="
@ -2329,7 +2329,7 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-5">
<q-input
:rules="
index < 1 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 1 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
hide-bottom-space
bg-color="white"
@ -2562,7 +2562,7 @@ onMounted(async () => {
<template #trigger>
<q-input
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
:readonly="
isEdit != true && routeName !== 'probationWorkAdd'
"
@ -2665,7 +2665,7 @@ onMounted(async () => {
<template #trigger>
<q-input
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
:readonly="
isEdit != true && routeName !== 'probationWorkAdd'
"
@ -2771,7 +2771,7 @@ onMounted(async () => {
dense
:rules="
caretaker2
? [(val) => !!val || 'กรุณาเลือกวันที่']
? [(val:string) => !!val || 'กรุณาเลือกวันที่']
: []
"
outlined
@ -2810,7 +2810,7 @@ onMounted(async () => {
:readonly="isEdit != true"
dense
borderless
:rules="[(val) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
outlined
v-model="commander"
label="ผู้บังคับบัญชา"
@ -2836,7 +2836,7 @@ onMounted(async () => {
class="col-xs-12 col-sm-8"
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
dense
:rules="[(val) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
borderless
outlined
v-model="commander"
@ -2876,7 +2876,7 @@ onMounted(async () => {
<template #trigger>
<q-input
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
:readonly="
isEdit != true && routeName !== 'probationWorkAdd'
"
@ -2918,7 +2918,7 @@ onMounted(async () => {
outlined
v-model="chairman"
label="ประธานกรรมการ"
:rules="[(val) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
:rules="[(val:string) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
use-input
behavior="menu"
@filter="filterFnChairman"
@ -2944,7 +2944,7 @@ onMounted(async () => {
borderless
outlined
v-model="chairman"
:rules="[(val) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
:rules="[(val:string) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
label="ประธานกรรมการ"
use-input
behavior="menu"
@ -3014,7 +3014,7 @@ onMounted(async () => {
.q-item span {
white-space: normal;
display: -webkit-box;
-webkit-line-clamp: 2;
// -webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;