fix layout and select input

This commit is contained in:
Warunee Tamkoo 2026-03-25 10:27:45 +07:00
parent 0a5f64c17c
commit 5f48063ae7

View file

@ -90,6 +90,17 @@ function closeDialog() {
modal.value = false;
}
watch(
() => form.stampType,
(stampType) => {
if (stampType === "FULL_DAY") {
form.stampAmount = "1.0";
} else if (stampType === "MORNING" || stampType === "AFTERNOON") {
form.stampAmount = "0.5";
}
}
);
watch(
() => modal.value,
(newVal) => {
@ -119,29 +130,31 @@ watch(
<q-card-section class="q-pa-md">
<div class="col-12 row q-col-gutter-sm">
<div class="col-md-7 col-sm-12">
<q-select
class="full-width inputgreen cursor-pointer"
outlined
dense
lazy-rules
v-model="form.status"
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
hide-bottom-space
:label="`${'สถานะ'}`"
map-options
emit-value
option-label="name"
option-value="id"
:options="absentLateStore.statusOps"
use-input
hide-selected
fill-input
input-debounce="0"
/>
<div class="col-12 row">
<div class="col-md-4 col-sm-12">
<q-select
class="full-width inputgreen cursor-pointer"
outlined
dense
lazy-rules
v-model="form.status"
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
hide-bottom-space
:label="`${'สถานะ'}`"
map-options
emit-value
option-label="name"
option-value="id"
:options="absentLateStore.statusOps"
use-input
hide-selected
fill-input
input-debounce="0"
/>
</div>
</div>
<div class="col-md-5 col-sm-12">
<div class="col-md-4 col-sm-12">
<datepicker
class="inputgreen"
menu-class-name="modalfix"
@ -185,7 +198,7 @@ watch(
</template>
</datepicker>
</div>
<div class="col-md-6 col-xs-12">
<div class="col-md-4 col-xs-12">
<q-select
class="full-width inputgreen cursor-pointer"
outlined
@ -207,7 +220,7 @@ watch(
/>
</div>
<div class="col-md-6 col-xs-12">
<div class="col-md-4 col-xs-12">
<q-input
class="inputgreen"
dense
@ -215,7 +228,9 @@ watch(
v-model="form.stampAmount"
label="จำนวน"
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณากรอกจำนวน'}`]"
readonly
:rules="[(val:string) => !!val ||
`${'กรุณากรอกจำนวน'}`]"
mask="#.#"
/>
</div>
@ -229,7 +244,6 @@ watch(
label="เหตุผล"
hide-bottom-space
type="textarea"
:rules="[(val:string) => !!val || `${'กรุณากรอกเหตุผล'}`]"
/>
</div>
</div>