check in check out
This commit is contained in:
parent
f81f138c63
commit
308b9d0617
2 changed files with 25 additions and 5 deletions
|
|
@ -18,7 +18,14 @@ import MapCheck from '@/components/AscGISMap.vue'
|
|||
import { useCounterMixin } from '@/stores/mixin'
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai, showLoader, hideLoader, messageError, dialogRemove } = mixin
|
||||
const {
|
||||
date2Thai,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
dialogRemove,
|
||||
success,
|
||||
} = mixin
|
||||
const router = useRouter()
|
||||
const $q = useQuasar()
|
||||
|
||||
|
|
@ -130,9 +137,9 @@ const checkInId = ref<string>('') //Id ลงเวลา check-in ล่าส
|
|||
* @param location พิกัดละติจูด พิกัดลองติจูด
|
||||
* @param namePOI ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์
|
||||
*/
|
||||
async function updateLocation(location: any, namePOI: string) {
|
||||
formLocation.lat = location.lat
|
||||
formLocation.lng = location.lng
|
||||
async function updateLocation(latitude: any, longitude: any, namePOI: string) {
|
||||
formLocation.lat = latitude
|
||||
formLocation.lng = longitude
|
||||
formLocation.POI = namePOI
|
||||
}
|
||||
|
||||
|
|
@ -236,6 +243,7 @@ function validateForm() {
|
|||
const timeChickin = ref<string>()
|
||||
/** function ยืนยันการลงเวลาเข้า - ออก*/
|
||||
async function confirm() {
|
||||
showLoader()
|
||||
const isLocation = workplace.value === 'in-place' //*true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง
|
||||
const formdata = new FormData()
|
||||
formdata.append('lat', formLocation.lat.toString())
|
||||
|
|
@ -267,6 +275,9 @@ async function confirm() {
|
|||
console.log(err)
|
||||
messageError($q, err)
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader()
|
||||
})
|
||||
}
|
||||
|
||||
async function onClickConfirm() {
|
||||
|
|
@ -656,4 +667,4 @@ onMounted(async () => {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue