check in check out

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-12-08 14:24:53 +07:00
parent f81f138c63
commit 308b9d0617
2 changed files with 25 additions and 5 deletions

View file

@ -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>