เพิ่มปุ่มไปหน้าการลา และแก้ไข disbled ปุ่มลงเวลาหลังจากคลิกลงเวลา

This commit is contained in:
Warunee Tamkoo 2026-01-21 16:23:25 +07:00
parent e7e5ded4d9
commit 50b9ed9d35
5 changed files with 37 additions and 7 deletions

View file

@ -31,6 +31,7 @@ const isErr = ref<boolean | null>(null) // ข้อความแจ้งเ
const endTimeAfternoon = ref<string>('12:00:00') //
const isLoadingCheckTime = ref<boolean>(false) //
const disabledBtn = ref<boolean>(false)
/**
* fetch เชคเวลาตองลงเวลาเขาหรอออกงาน
@ -354,6 +355,7 @@ async function confirm() {
mapRef.value?.requestLocationPermission()
return
}
disabledBtn.value = true
showLoader()
const isLocation = workplace.value === 'in-place' //*true , false
const locationName = workplace.value === 'in-place' ? '' : useLocation.value
@ -383,9 +385,11 @@ async function confirm() {
timeChickin.value = timeString
modalTime.value = true
remark.value = ''
disabledBtn.value = false
})
.catch((err) => {
messageError($q, err)
disabledBtn.value = false
})
.finally(() => {
hideLoader()
@ -889,7 +893,7 @@ watch(
push
size="18px"
:class="$q.screen.gt.xs ? 'q-px-md' : 'full-width q-pa-sm'"
:disable="camera && img ? false : true"
:disable="disabledBtn ? true : camera && img ? false : true"
@click="validateForm"
:loading="inQueue"
/>
@ -1004,7 +1008,7 @@ watch(
push
size="18px"
:class="$q.screen.gt.xs ? 'q-px-md' : 'full-width q-pa-sm'"
:disable="camera && img ? false : true"
:disable="disabledBtn ? true : camera && img ? false : true"
@click="validateForm"
:loading="inQueue"
/>