This commit is contained in:
setthawutttty 2023-12-12 09:38:42 +07:00
parent c673012cfd
commit 5ab256807a
2 changed files with 10 additions and 0 deletions

View file

@ -27,6 +27,7 @@ const checkInRef = ref<Object | null>(null);
const checkOutRef = ref<Object | null>(null);
const checkInStatusRef = ref<Object | null>(null);
const checkOutStatusRef = ref<Object | null>(null);
const reasonRef = ref<Object | null>(null);
const formData = reactive<dataRowRound>({
checkIn: "",
@ -41,6 +42,7 @@ const objectRound: MyObjectRoundRef = {
checkOut: checkOutRef,
checkInStatus: checkInStatusRef,
checkOutStatus: checkOutStatusRef,
note: reasonRef,
};
function validateForm() {
@ -56,6 +58,7 @@ function validateForm() {
}
if (hasError.every((result) => result === true)) {
onSubmit();
console.log(hasError)
} else {
console.log(hasError);
}
@ -263,6 +266,8 @@ watch(
ref="checkInStatusRef"
for="checkInStatus"
emit-value
:rules="[(val) => !!val || 'กรุณาเลือกสถานะเข้างาน']"
hide-bottom-space
map-options
outlined
full-width
@ -293,6 +298,8 @@ watch(
map-options
outlined
dense
:rules="[(val) => !!val || 'กรุณาเลือกสถานะออกงาน']"
hide-bottom-space
full-width
v-model="SpecialTimeStore.checkOutStatus"
:options="SpecialTimeStore.optionStatus"
@ -305,9 +312,11 @@ watch(
</div>
</div>
<q-input
ref="reasonRef"
class="col-12 bg-white q-ma-md"
outlined
stack-label
:rules="[(val) => !!val || 'กรุณาเหตุผล']"
v-model="formData.note"
label="เหตุผล"
hide-bottom-space

View file

@ -19,6 +19,7 @@ interface MyObjectRoundRef {
checkOut: object | null;
checkInStatus: object | null;
checkOutStatus: object | null;
note: object | null;
[key: string]: any;
}
export type { DataRows, dataRowRound, MyObjectRoundRef };