เพิ่มปุ่มไปหน้าการลา และแก้ไข disbled ปุ่มลงเวลาหลังจากคลิกลงเวลา
This commit is contained in:
parent
e7e5ded4d9
commit
50b9ed9d35
5 changed files with 37 additions and 7 deletions
|
|
@ -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"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue