เพิ่มปุ่มไปหน้าการลา และแก้ไข 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"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useRouter } from 'vue-router'
|
|||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import avatar from '@/assets/avatar_user.jpg'
|
||||
import { logout, tokenParsed, getCookie } from '@/plugins/auth'
|
||||
import { logout, tokenParsed, getCookie, gotoLeavePage } from '@/plugins/auth'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import { usePrivacyStore } from '@/stores/privacy'
|
||||
|
||||
|
|
@ -324,6 +324,18 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
<q-space />
|
||||
<q-btn
|
||||
icon="mdi-calendar-account-outline"
|
||||
unelevated
|
||||
rounded
|
||||
dense
|
||||
flat
|
||||
color="white"
|
||||
class="q-mx-md"
|
||||
@click="gotoLeavePage"
|
||||
>
|
||||
<q-tooltip>ไปหน้าการลา</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
icon="history"
|
||||
unelevated
|
||||
|
|
@ -332,7 +344,9 @@ onMounted(async () => {
|
|||
flat
|
||||
color="white"
|
||||
@click="router.push('/history')"
|
||||
/>
|
||||
>
|
||||
<q-tooltip>ไปหน้าประวัติการลงเวลาฯ</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn round dense flat size="13px" class="q-mx-md">
|
||||
<q-icon name="notifications" size="24px" color="white" />
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue