hrms-checkin/src/views/HomeView.vue

836 lines
28 KiB
Vue
Raw Normal View History

2023-11-07 11:17:13 +07:00
<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'
2023-11-14 17:47:43 +07:00
import { useRouter } from 'vue-router'
import { useQuasar } from 'quasar'
2023-12-21 14:59:29 +07:00
import keycloak from '@/plugins/keycloak'
2023-11-14 17:47:43 +07:00
import moment from 'moment'
import Camera from 'simple-vue-camera'
import http from '@/plugins/http'
import config from '@/app.config'
2023-11-07 11:17:13 +07:00
// import Type
2023-11-14 17:47:43 +07:00
import type { FormRef } from '@/interface/response/checkin'
import type { notiType } from '@/interface/index/Main'
2023-11-07 11:17:13 +07:00
// import components
2023-12-21 14:59:29 +07:00
import MapCheck from '@/components/AscGISMap.vue'
2023-11-07 11:17:13 +07:00
// import Stores
2023-11-14 17:47:43 +07:00
import { useCounterMixin } from '@/stores/mixin'
2023-11-07 11:17:13 +07:00
2023-11-14 17:47:43 +07:00
const mixin = useCounterMixin()
2023-12-12 09:29:58 +07:00
const {
date2Thai,
showLoader,
hideLoader,
messageError,
dialogRemove,
success,
} = mixin
2023-11-14 17:47:43 +07:00
const router = useRouter()
const $q = useQuasar()
2023-11-07 11:17:13 +07:00
const dialogTime = ref<boolean>(false)
const stetusCheckin = ref<boolean>(true)
/** function เช็คเวลาต้องลงเวลาเข้าหรือออกงาน */
async function fetchCheckTime() {
showLoader()
await http
.get(config.API.checkTime())
.then((res) => {
const data = res.data.result
stetusCheckin.value = data.checkInId ? false : true
checkInId.value = data.checkInId ? data.checkInId : ''
})
.catch((err) => {
messageError($q, err)
})
.finally(() => {
hideLoader()
})
}
const notiTrigger = ref<boolean>(false)
const notiList = ref<notiType[]>([])
2024-01-18 10:47:24 +07:00
const totalNotiList = ref<number>(0)
/** function เรียกข้อมุลแจ้งเตือน */
async function fetchNotifications() {
showLoader()
await http
.get(config.API.msgNotificate)
.then((res) => {
2024-01-18 10:47:24 +07:00
const response = res.data.result.data
totalNotiList.value = res.data.result.total
const list: notiType[] = []
response.map((e: any) => {
list.push({
id: e.id,
sender:
e.createdFullName == '' || e.createdFullName == null
? 'เจ้าหน้าที่'[0]
: e.createdFullName[0],
body: e.body ?? '',
timereceive: new Date(e.receiveDate),
})
})
notiList.value = list
})
.catch((err) => {
messageError($q, err)
})
.finally(() => {
hideLoader()
})
}
2023-11-07 11:17:13 +07:00
/**
* function ลบรายการแจงเตอน
* @param id noti
*/
async function onClickDelete(id: string) {
dialogRemove($q, async () => {
await http
.delete(config.API.msgId(id))
.then(() => {
success($q, 'ลบข้อมูลสำเร็จ')
})
.catch((e) => {
messageError($q, e)
})
.finally(async () => {
await fetchNotifications()
hideLoader()
})
})
}
/** ref อัพเดทเวลา*/
2023-11-14 17:47:43 +07:00
const dateNow = ref<Date>(new Date())
const Thai = ref<Date>(dateNow.value)
const formattedS = ref()
const formattedM = ref()
const formattedH = ref()
/** function อัพเดทเวลา*/
2023-11-07 11:17:13 +07:00
function updateClock() {
2023-11-14 17:47:43 +07:00
const date = Date.now()
const hh = moment(date).format('HH')
const mm = moment(date).format('mm')
const ss = moment(date).format('ss')
formattedS.value = ss
formattedM.value = mm
formattedH.value = hh
2023-11-07 11:17:13 +07:00
}
2023-11-14 17:47:43 +07:00
setInterval(updateClock, 1000)
2023-11-07 11:17:13 +07:00
/** form-data */
const formLocation = reactive({
lat: 0, //พิกัดละติจูด
lng: 0, //พิกัดลองจิจูด
POI: '', //ชื่อสถานที่
})
const workplace = ref<string>('in-place') //ณ สถานที่ตั้ง, นอกสถานที่ตั้ง
const useLocation = ref<string>('') //กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่
const fileImg = ref<any>() //รูปถ่ายสถานที่
const remark = ref<string>('') //ข้อความหมายเหตุที่ต้องการระบุเพิ่ม
const checkInId = ref<string>('') //Id ลงเวลา check-in ล่าสุดที่ยังไม่ลงเวลาออก
/**
* funciton เรยกพดละต ดลองต
* @param location ดละต ดลองต
* @param namePOI อสถานท ไดมาจากระบบ ArcGis ของกองสารสนเทศภศาสตร
*/
2023-12-21 14:59:29 +07:00
async function updateLocation(latitude: any, longitude: any, namePOI: string) {
formLocation.lat = latitude
formLocation.lng = longitude
formLocation.POI = namePOI
}
2023-11-07 11:17:13 +07:00
//location
2023-11-14 17:47:43 +07:00
const location = ref<string>('')
2023-11-16 17:30:24 +07:00
// const coordinates = ref<string>('')
const model = ref<string>('')
2023-11-07 11:17:13 +07:00
const options = ref<string[]>([
2023-11-14 17:47:43 +07:00
'ปฏิบัติงานที่บ้าน',
'ลืมลงเวลาปฏิบัติงาน',
'ไปประชุม/อบรม/สัมมนา/ปฏิบัติงานที่บ้านนอกสถานที่',
'ขออนุญาตออกนอกสถานที่',
'อื่นๆ',
])
/** function เลือกสถานที่*/
2023-11-07 11:17:13 +07:00
function selectLocation() {
2023-11-14 17:47:43 +07:00
if (model.value === 'อื่นๆ') {
useLocation.value = ''
2023-11-07 11:17:13 +07:00
} else {
2023-11-14 17:47:43 +07:00
useLocation.value = model.value
2023-11-07 11:17:13 +07:00
}
}
/** Camera */
2023-11-14 17:47:43 +07:00
const camera = ref<InstanceType<typeof Camera>>()
const cameraIsOn = ref<boolean>(false)
const img = ref<any>(undefined)
const photoWidth = ref<number>(350)
const photoHeight = ref<number>(350)
2023-11-07 11:17:13 +07:00
/** function เปิดกล้อง */
async function openCamera() {
// change camera device
if (cameraIsOn.value) {
camera.value?.stop()
} else {
await camera.value?.start()
changeCamera()
}
2023-11-14 17:47:43 +07:00
cameraIsOn.value = !cameraIsOn.value
}
2023-11-07 11:17:13 +07:00
/** change camera device */
async function changeCamera() {
const devices: any = await camera.value?.devices(['videoinput'])
const device = await devices[0]
camera.value?.changeCamera(device.deviceId)
}
/** function ถ่ายรูป*/
2023-11-14 17:47:43 +07:00
async function capturePhoto() {
const imageBlob: any = await camera.value?.snapshot(
{ width: photoWidth.value, height: photoHeight.value },
'image/png',
0.5
)
const fileName = 'photo.png'
2023-11-07 11:17:13 +07:00
//ไฟล์รูป
const file = new File([imageBlob], fileName, { type: 'image/png' })
fileImg.value = file
//แสดงรูป
2023-11-14 17:47:43 +07:00
camera.value?.stop()
const url = URL.createObjectURL(imageBlob)
img.value = url
2023-11-07 11:17:13 +07:00
}
2023-11-14 17:47:43 +07:00
/** function เปลี่ยนรูปภาพ*/
2023-11-07 11:17:13 +07:00
function refreshPhoto() {
2023-11-14 17:47:43 +07:00
img.value = undefined
camera.value?.start()
2023-11-07 11:17:13 +07:00
}
2023-11-14 17:47:43 +07:00
/** ref validate*/
2023-11-14 17:47:43 +07:00
const useLocationRef = ref<object | null>(null)
const modelRef = ref<object | null>(null)
2023-11-07 11:17:13 +07:00
const objectRef: FormRef = {
model: modelRef,
useLocation: useLocationRef,
2023-11-14 17:47:43 +07:00
}
/** function ตรวจสอบค่าว่างของ input*/
2023-11-07 11:17:13 +07:00
function validateForm() {
2023-11-14 17:47:43 +07:00
const hasError = []
2023-11-07 11:17:13 +07:00
for (const key in objectRef) {
if (Object.prototype.hasOwnProperty.call(objectRef, key)) {
2023-11-14 17:47:43 +07:00
const property = objectRef[key]
if (property.value && typeof property.value.validate === 'function') {
const isValid = property.value.validate()
hasError.push(isValid)
2023-11-07 11:17:13 +07:00
}
}
}
if (hasError.every((result) => result === true)) {
2023-11-14 17:47:43 +07:00
confirm()
2024-01-18 10:47:24 +07:00
}
2023-11-07 11:17:13 +07:00
}
2023-11-16 17:30:24 +07:00
const timeChickin = ref<string>()
/** function ยืนยันการลงเวลาเข้า - ออก*/
async function confirm() {
2023-12-21 14:59:29 +07:00
showLoader()
const isLocation = workplace.value === 'in-place' //*true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง
const formdata = new FormData()
formdata.append('lat', formLocation.lat.toString())
formdata.append('lon', formLocation.lng.toString())
formdata.append('POI', formLocation.POI)
formdata.append('isLocation', isLocation.toString())
formdata.append('locationName', useLocation.value)
2023-11-27 09:38:41 +07:00
formdata.append('img', fileImg.value)
formdata.append('remark', remark.value)
2023-11-27 09:38:41 +07:00
formdata.append('checkInId', checkInId.value)
await http
.post(config.API.checkin(), formdata)
.then(async (res) => {
const data = res.data.result
2023-11-16 17:30:24 +07:00
const dateObject = new Date(data.date)
const options: Intl.DateTimeFormatOptions = {
hour12: false,
hour: '2-digit',
minute: '2-digit',
}
const timeString = new Intl.DateTimeFormat('en-US', options).format(
dateObject
)
timeChickin.value = timeString
dialogTime.value = true
2023-11-16 17:30:24 +07:00
// await fetchCheckTime()
})
.catch((err) => {
2023-11-16 17:30:24 +07:00
messageError($q, err)
})
2023-12-21 14:59:29 +07:00
.finally(() => {
hideLoader()
})
2023-11-16 17:30:24 +07:00
}
2023-11-16 17:30:24 +07:00
async function onClickConfirm() {
await fetchCheckTime()
cameraIsOn.value = false
img.value = undefined
dialogTime.value = false
}
2023-11-07 11:17:13 +07:00
2023-12-12 09:35:19 +07:00
/** function logout*/
function onClickLogout() {
$q.dialog({
title: 'ยืนยันการออกจากระบบ',
message: `ต้องการออกจากระบบใช้หรือไม่?`,
cancel: 'ยกเลิก',
ok: 'ยืนยัน',
persistent: true,
}).onOk(() => {
keycloak.logout()
})
}
2023-11-07 11:17:13 +07:00
// class
const getClass = (val: boolean) => {
return {
2023-11-14 17:47:43 +07:00
'bg-primary text-white col-12 row items-center q-px-md q-py-sm': val,
'bg-red-9 text-white col-12 row items-center q-px-md q-py-sm': !val,
}
}
2023-12-21 14:59:29 +07:00
2023-12-12 09:35:19 +07:00
const fullName = ref<string>('')
/** Hook*/
onMounted(async () => {
await fetchCheckTime()
await fetchNotifications()
2023-12-12 09:35:19 +07:00
if (keycloak.tokenParsed != null) {
fullName.value = keycloak.tokenParsed.name
}
updateClock()
})
2023-11-07 11:17:13 +07:00
</script>
<template>
<div class="col-12 row justify-center">
<div class="col-xs-12 col-sm-12 col-md-12">
<q-card flat class="row col-12 cardNone">
2023-12-22 15:56:31 +07:00
<!-- <q-header elevated class="bg-purple"> -->
<q-toolbar :class="getClass(stetusCheckin)">
<q-btn
icon="history"
unelevated
rounded
dense
flat
color="white"
:label="$q.screen.gt.xs ? 'ประวัติการลงเวลา' : ''"
:class="$q.screen.gt.xs ? 'q-px-md' : ''"
@click="router.push('/history')"
/>
<q-space />
2024-01-11 13:37:53 +07:00
<strong v-if="stetusCheckin" style="font-size: 1rem">
2023-12-22 15:56:31 +07:00
ลงเวลาเขางาน
</strong>
2024-01-11 13:37:53 +07:00
<strong v-else style="font-size: 1rem">ลงเวลาออกงาน</strong>
2023-12-22 15:56:31 +07:00
<q-space />
<q-btn
round
dense
flat
size="13px"
class="q-mx-md"
2024-01-18 10:47:24 +07:00
:disable="totalNotiList == 0"
2023-12-22 15:56:31 +07:00
>
<q-icon name="notifications" size="24px" color="white" />
<q-badge
rounded
2024-01-18 10:47:24 +07:00
v-show="totalNotiList !== 0"
2023-12-22 15:56:31 +07:00
color="negative"
text-color="white"
floating
2024-01-18 10:47:24 +07:00
>{{ totalNotiList }}</q-badge
2023-12-22 15:56:31 +07:00
>
<q-menu v-model="notiTrigger" max-width="480px" :offset="[0, 10]">
<div class="q-px-md q-py-sm row col-12 items-center">
<div class="text-subtitle1 text-weight-medium">
การแจงเตอน
</div>
</div>
<q-list
style="min-width: 300px"
v-for="n in notiList"
:key="n.id"
>
<q-item v-ripple class="mytry q-py-xs" dense>
<q-item-section avatar top style="min-width: 40px">
<q-avatar color="primary" size="22px" text-color="white">
<span class="text-weight-medium text-uppercase">{{
n.sender
}}</span>
</q-avatar>
</q-item-section>
<q-item-section>
<q-item-label caption class="text-black">{{
n.body
}}</q-item-label>
<q-item-label
caption
class="row items-center text-grey-7"
>{{ date2Thai(n.timereceive) }}</q-item-label
>
</q-item-section>
<q-btn
size="sm"
unelevated
dense
icon="mdi-close"
class="mybtn q-mx-xs"
@click="onClickDelete(n.id)"
></q-btn>
</q-item>
<q-separator color="grey-2" />
</q-list>
</q-menu>
</q-btn>
<q-btn round dense flat icon="account_circle" style="font-size: 16px">
<q-menu>
<div class="q-pa-md" style="max-width: 500px">
<q-list>
<q-item>
<q-item-section avatar>
<q-icon color="primary" name="account_circle" />
</q-item-section>
<q-item-section>{{ fullName }}</q-item-section>
</q-item>
<q-item class="text-center">
<q-item-section>
<q-item-label>
<q-btn
color="primary"
label="ออกจากระบบ"
push
size="sm"
@click="onClickLogout"
/></q-item-label>
</q-item-section>
</q-item>
</q-list>
</div> </q-menu
></q-btn>
</q-toolbar>
<!-- </q-header> -->
<!-- <div :class="getClass(stetusCheckin)">
2023-12-21 14:59:29 +07:00
<div class="col-2">
<q-btn
icon="history"
2023-11-07 11:17:13 +07:00
unelevated
rounded
2023-11-07 11:17:13 +07:00
dense
flat
color="white"
:label="$q.screen.gt.xs ? 'ประวัติการลงเวลา' : ''"
:class="$q.screen.gt.xs ? 'q-px-md' : ''"
@click="router.push('/history')"
/>
2023-12-21 14:59:29 +07:00
</div>
<span class="text-body1 text-weight-bold col-8 text-center">
2023-11-07 11:17:13 +07:00
<span v-if="stetusCheckin">ลงเวลาเข้างาน</span>
<span v-else>ลงเวลาออกงาน</span>
2023-12-21 14:59:29 +07:00
</span>
<div class="col-2 text-right">
2023-11-07 11:17:13 +07:00
<q-btn
round
2023-11-07 11:17:13 +07:00
dense
flat
size="13px"
class="q-mx-md"
:disable="notiList.length === 0"
>
<q-icon name="notifications" size="24px" color="white" />
<q-badge
rounded
v-show="notiList.length > 0"
color="negative"
text-color="white"
floating
>{{ notiList.length }}</q-badge
>
<q-menu v-model="notiTrigger" max-width="480px" :offset="[0, 10]">
<div class="q-px-md q-py-sm row col-12 items-center">
<div class="text-subtitle1 text-weight-medium">
การแจงเตอน
</div>
</div>
<q-list
style="min-width: 300px"
v-for="n in notiList"
:key="n.id"
>
<q-item v-ripple class="mytry q-py-xs" dense>
<q-item-section avatar top style="min-width: 40px">
<q-avatar color="primary" size="22px" text-color="white">
<span class="text-weight-medium text-uppercase">{{
n.sender
}}</span>
</q-avatar>
</q-item-section>
<q-item-section>
<q-item-label caption class="text-black">{{
n.body
}}</q-item-label>
<q-item-label
caption
class="row items-center text-grey-7"
>{{ date2Thai(n.timereceive) }}</q-item-label
>
</q-item-section>
<q-btn
size="sm"
unelevated
dense
icon="mdi-close"
class="mybtn q-mx-xs"
@click="onClickDelete(n.id)"
></q-btn>
</q-item>
<q-separator color="grey-2" />
</q-list>
</q-menu>
</q-btn>
2023-12-12 09:35:19 +07:00
<q-btn
round
dense
flat
icon="account_circle"
style="font-size: 16px"
>
<q-menu>
<div class="q-pa-md" style="max-width: 500px">
<q-list>
<q-item>
<q-item-section avatar>
<q-icon color="primary" name="account_circle" />
</q-item-section>
<q-item-section>{{ fullName }}</q-item-section>
</q-item>
<q-item class="text-center">
<q-item-section>
<q-item-label>
<q-btn
color="primary"
label="ออกจากระบบ"
push
size="sm"
@click="onClickLogout"
/></q-item-label>
</q-item-section>
</q-item>
</q-list>
</div> </q-menu
></q-btn>
2023-12-21 14:59:29 +07:00
</div>
2023-12-22 15:56:31 +07:00
</div> -->
2023-11-07 11:17:13 +07:00
<div class="col-12 q-pa-md text-grey-9">
<div class="col-12 row justify-center">
<div class="col-12 row q-py-sm justify-center">
<div
class="col-xs-12 col-sm-10 text-h6 text-center text-weight-bold"
>
{{ date2Thai(Thai) }}
</div>
<div class="row col-12 justify-center q-py-sm">
<div class="colunm">
<div class="text-h3 text-weight-bold">
{{ formattedH }}<span class="q-ma-md">:</span>
</div>
</div>
<div class="colunm">
<div class="text-h3 text-weight-bold">
{{ formattedM }}<span class="q-ma-md">:</span>
</div>
</div>
<div class="colunm">
<div class="text-h3 text-weight-bold">{{ formattedS }}</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-11 row q-col-gutter-md">
<div class="col-12 col-sm-8">
<MapCheck @update:location="updateLocation" />
2023-11-20 16:32:13 +07:00
<!-- <AscMaps /> -->
2023-11-07 11:17:13 +07:00
</div>
<div class="col-12 col-sm-4">
2023-11-14 17:47:43 +07:00
<q-card flat bordered class="card-container">
<div
v-if="!cameraIsOn && img == null"
class="preview-placeholder"
@click="openCamera()"
>
2023-11-07 11:17:13 +07:00
<div class="text-center">
<q-icon
name="photo_camera"
color="blue-grey-3"
size="100px"
class="center-icon"
/>
</div>
</div>
2023-11-14 17:47:43 +07:00
<div>
<!-- แสดงกลองตอนกดถายภาพ -->
<Camera
:resolution="{ width: photoWidth, height: photoHeight }"
ref="camera"
:autoplay="false"
:style="!img ? 'display: block' : 'display: none'"
/>
<!-- แสดงรปเมอกด capture -->
<div v-if="img" class="image-container">
2023-11-07 11:17:13 +07:00
<q-img :src="img" class="image-element"></q-img>
</div>
2023-11-14 17:47:43 +07:00
<div
v-if="cameraIsOn"
class="absolute-bottom-right q-ma-md"
>
2023-11-07 11:17:13 +07:00
<q-btn
2023-11-14 17:47:43 +07:00
v-if="img == null"
2023-11-07 11:17:13 +07:00
round
push
icon="photo_camera"
size="md"
color="positive"
@click="capturePhoto"
/>
<q-btn
v-else
round
push
icon="refresh"
size="md"
color="negative"
@click="refreshPhoto"
/>
</div>
</div>
</q-card>
</div>
2023-11-14 17:47:43 +07:00
2023-11-07 11:17:13 +07:00
<div class="col-12 q-mb-md">
<q-card
bordered
flat
:class="
$q.screen.gt.xs
? 'q-px-md q-py-sm row items-center shadow-0'
: 'q-pa-md row items-center shadow-0'
"
>
<div class="text-weight-bold">สถานททำงาน</div>
<div
:class="
$q.screen.gt.xs
? 'row q-gutter-md q-pl-md col-sm-6 col-md-3'
: 'column col-12'
"
>
<q-radio
v-model="workplace"
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
val="in-place"
label="ในสถานที่"
/>
<q-radio
v-model="workplace"
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
val="off-site"
label="นอกสถานที่"
/>
</div>
<div
class="col-xs-12 col-sm-6 col-md-4"
v-if="workplace == 'off-site'"
>
<q-select
ref="modelRef"
dense
class="q-ml-md"
outlined
v-model="model"
:options="options"
prefix="ระบุสถานที่ :"
:rules="[(val) => !!val || 'กรุณาระบุสถานที่']"
lazy-rules
@update:model-value="selectLocation()"
/>
</div>
<div
class="col-xs-12 col-sm-6 col-md-4"
2023-11-07 16:35:39 +07:00
v-if="model == 'อื่นๆ' && workplace === 'off-site'"
2023-11-07 11:17:13 +07:00
>
<q-input
ref="useLocationRef"
dense
class="q-ml-md"
outlined
v-model="useLocation"
label="ระบุสถานที่"
:rules="[(val) => !!val || 'กรุณาระบุสถานที่']"
lazy-rules
/>
</div>
</q-card>
2023-11-14 17:47:43 +07:00
<q-card bordered flat class="q-pa-sm">
<div class="col-12">
<q-input
outlined
v-model="remark"
label="หมายเหตุ"
lazy-rules
dense
/>
</div>
</q-card>
2023-11-07 16:35:39 +07:00
<div class="col-12 text-right">
<q-separator />
<div class="col-12 q-pa-md">
<p
:class="
$q.screen.gt.xs
? 'text-red text-caption '
: 'text-red text-caption text-center'
"
>
*หมายเหต คลกลงเวลาเขางานแลวระบบจะลงเวลาทนท
</p>
<q-btn
:label="
stetusCheckin == true ? 'ลงเวลาเข้างาน' : 'ลงเวลาออกงาน'
"
2023-11-16 17:30:24 +07:00
:color="img == null ? 'grey-6' : 'primary'"
2023-11-07 16:35:39 +07:00
push
size="14px"
:class="$q.screen.gt.xs ? 'q-px-md' : 'full-width'"
:disable="camera && img ? false : true"
@click="validateForm"
/>
</div>
</div>
2023-11-07 11:17:13 +07:00
</div>
</div>
</div>
</div>
</q-card>
</div>
</div>
2023-11-16 17:30:24 +07:00
<q-dialog v-model="dialogTime" persistent>
2023-11-07 11:17:13 +07:00
<q-card class="full-width cardNone">
<div :class="getClass(stetusCheckin)">
<div class="text-body1 text-center col-12 text-weight-bold">
<span v-if="stetusCheckin">ลงเวลาเข้างานของคุณ</span>
<span v-else>ลงเวลาออกงานของคุณ</span>
</div>
</div>
<q-card-section class="row col-12 justify-center">
<div class="bg-grey-2 rounded-borders q-pa-md col-11">
<div class="col-12 text-subtitle1 text-center text-weight-medium">
2023-11-07 16:35:39 +07:00
{{ date2Thai(Thai) }}
2023-11-07 11:17:13 +07:00
</div>
<div class="row col-12 justify-center q-pt-sm">
<div class="text-h3 text-weight-bold">
2023-11-16 17:30:24 +07:00
<!-- {{ formattedH }}<span class="q-ma-md">:</span> -->
2023-11-07 11:17:13 +07:00
</div>
2023-11-16 17:30:24 +07:00
<div class="text-h3 text-weight-bold">{{ timeChickin }}</div>
2023-11-07 11:17:13 +07:00
</div>
</div>
<div class="col-12 text-center row q-pt-md">
2023-12-21 14:59:29 +07:00
<div class="col-12 text-subtitle1 text-weight-medium text-secondary">
นทใกลเคยง {{ formLocation.POI ?? formLocation.POI }}
</div>
2023-11-07 11:17:13 +07:00
<div class="col-12 text-subtitle1 text-weight-medium text-secondary">
{{ location }}
</div>
2023-11-16 17:30:24 +07:00
<div class="col-12 text-grey-7">
{{ formLocation.lat }} , {{ formLocation.lng }}
</div>
2023-11-07 11:17:13 +07:00
</div>
</q-card-section>
<q-card-actions align="center" class="q-mb-md row">
<q-btn
class="col-xs-11 col-sm-6"
push
label="ตกลง"
color="secondary"
v-close-popup
2023-11-16 17:30:24 +07:00
@click="onClickConfirm"
2023-11-07 11:17:13 +07:00
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<style scoped>
.q-card.cardImg:hover {
border: 1px solid #02a998 !important;
}
.center-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.card-container {
position: relative;
overflow: hidden;
2023-12-21 14:59:29 +07:00
height: 39vh; /* Adjust as needed */
2023-11-07 11:17:13 +07:00
background: #f6f5f5;
}
.image-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.image-element {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 5px; /* Adjust as needed */
}
2023-11-14 17:47:43 +07:00
.preview-placeholder {
width: 100%;
height: 100%;
2023-11-07 11:17:13 +07:00
}
2023-12-22 15:56:31 +07:00
</style>