Compare commits

...

3 commits
v1.1.29 ... dev

Author SHA1 Message Date
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
5c05df26cf fix(camera): btn refreshPhoto
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m23s
2026-05-25 15:49:56 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
ef5e6d9017 fix: startChecking onClickConfirm Dialog
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m47s
2026-05-21 09:00:40 +07:00
DESKTOP-1R2VSQH\Lenovo ThinkPad E490
049143a385 fix: fetchCheckTime fetchCheckStatus
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m20s
2026-05-20 17:25:06 +07:00
2 changed files with 94 additions and 50 deletions

View file

@ -163,8 +163,19 @@ function reattachAndResizeMap(retry = 0) {
mapView.value.container = activeContainer mapView.value.container = activeContainer
} }
mapView.value.resize() // resize() method
mapView.value.requestRender?.() try {
if (typeof mapView.value.resize === 'function') {
mapView.value.resize()
}
} catch (error) {
console.warn('Map resize failed:', error)
}
if (typeof mapView.value.requestRender === 'function') {
mapView.value.requestRender?.()
}
mapView.value mapView.value
.goTo( .goTo(
{ {
@ -285,7 +296,11 @@ async function initializeMap() {
geometry: userPoint, geometry: userPoint,
symbol: userSymbol, symbol: userSymbol,
}) })
mapView.value.graphics.add(userGraphic)
// graphics
if (mapView.value && mapView.value.graphics && !mapView.value.destroyed) {
mapView.value.graphics.add(userGraphic)
}
// Get POI place server . // Get POI place server .
// await axios // await axios
// .get( // .get(
@ -381,12 +396,22 @@ async function initializeMap() {
geometry: poiPoint, geometry: poiPoint,
symbol: poiSymbol, symbol: poiSymbol,
}) })
mapView.value.graphics.add(poiGraphic)
// POI // graphics goTo
mapView.value.goTo({ if (mapView.value && !mapView.value.destroyed) {
target: [userPoint, poiPoint], if (mapView.value.graphics) {
zoom: zoomMap.value, mapView.value.graphics.add(poiGraphic)
}) }
// POI
if (typeof mapView.value.goTo === 'function') {
mapView.value.goTo({
target: [userPoint, poiPoint],
zoom: zoomMap.value,
}).catch(() => {
// Ignore goTo errors
})
}
}
updateLocation(latitude, longitude, poiPlaceName.value) updateLocation(latitude, longitude, poiPlaceName.value)
}) })

View file

@ -638,19 +638,18 @@ async function fetchCheckStatus() {
/** inQueue เป็น true */ /** inQueue เป็น true */
isDisabledCheckTime.value = true isDisabledCheckTime.value = true
msgCheckTime.value = 'ระบบกำลังประมวลผล' msgCheckTime.value = 'ระบบกำลังประมวลผล'
if (intervalId.value === undefined) { // if (intervalId.value === undefined) {
intervalId.value = setInterval(async () => { // intervalId.value = setInterval(async () => {
try { // try {
await fetchCheckStatus() // await fetchCheckStatus()
} catch (error) { // } catch (error) {
console.error('Error in interval fetchCheckStatus:', error) // console.error('Error in interval fetchCheckStatus:', error)
// interval error // // interval error
stopChecking() // stopChecking()
} // }
}, 3000) // }, 3000)
console.log('startChecking called, intervalId:', intervalId.value) // console.log('startChecking called, intervalId:', intervalId.value)
} // }
// hideLoader()
} else { } else {
/** inQueue เป็น false */ /** inQueue เป็น false */
isDisabledCheckTime.value = false isDisabledCheckTime.value = false
@ -1414,13 +1413,13 @@ watch(notificationCounter, () => {
</div> </div>
</div> </div>
<div v-if="cameraIsOn"> <div v-if="cameraIsOn && img == null">
<div <div
v-if="$q.screen.gt.xs" v-if="$q.screen.gt.xs"
class="absolute-bottom-right q-ma-md" class="absolute-bottom-right q-ma-md"
> >
<q-btn <q-btn
v-if="availableCameras.length > 1 && img == null" v-if="availableCameras.length > 1"
round round
push push
icon="flip_camera_ios" icon="flip_camera_ios"
@ -1430,7 +1429,6 @@ watch(notificationCounter, () => {
@click="switchCamera" @click="switchCamera"
/> />
<q-btn <q-btn
v-if="img == null"
round round
push push
icon="photo_camera" icon="photo_camera"
@ -1438,8 +1436,41 @@ watch(notificationCounter, () => {
color="positive" color="positive"
@click="capturePhoto" @click="capturePhoto"
/> />
</div>
<div v-else>
<div
class="absolute-bottom text-subtitle2 text-center q-py-sm"
style="background: #00000021"
>
<q-btn
v-if="availableCameras.length > 1"
round
icon="flip_camera_ios"
size="16px"
style="background: #424242; color: white"
@click="switchCamera"
unelevated
class="q-mr-xs"
/>
<q-btn
round
icon="photo_camera"
size="18px"
style="background: #263238; color: white"
@click="capturePhoto"
unelevated
/>
</div>
</div>
</div>
<!-- Refresh button - shows when photo is captured regardless of camera state -->
<div v-if="img != null && !useNativePhotoCapture">
<div
v-if="$q.screen.gt.xs"
class="absolute-bottom-right q-ma-md"
>
<q-btn <q-btn
v-else
round round
push push
icon="refresh" icon="refresh"
@ -1454,31 +1485,12 @@ watch(notificationCounter, () => {
style="background: #00000021" style="background: #00000021"
> >
<q-btn <q-btn
v-if="availableCameras.length > 1 && img == null"
round
icon="flip_camera_ios"
size="16px"
style="background: #424242; color: white"
@click="switchCamera"
unelevated
class="q-mr-xs"
/>
<q-btn
round
v-if="img == null"
icon="photo_camera"
size="18px"
style="background: #263238; color: white"
@click="capturePhoto"
unelevated
/>
<q-btn
v-else
round round
icon="refresh" icon="refresh"
size="18px" size="18px"
style="background: #263238; color: white" style="background: #263238; color: white"
@click="refreshPhoto" @click="refreshPhoto"
unelevated
/> />
</div> </div>
</div> </div>
@ -1550,13 +1562,13 @@ watch(notificationCounter, () => {
</div> </div>
</div> </div>
<div v-if="cameraIsOn"> <div v-if="cameraIsOn && img == null">
<div <div
class="absolute-bottom text-subtitle2 text-center q-py-sm" class="absolute-bottom text-subtitle2 text-center q-py-sm"
style="background: #00000021" style="background: #00000021"
> >
<q-btn <q-btn
v-if="availableCameras.length > 1 && img == null" v-if="availableCameras.length > 1"
round round
icon="flip_camera_ios" icon="flip_camera_ios"
size="16px" size="16px"
@ -1567,15 +1579,22 @@ watch(notificationCounter, () => {
/> />
<q-btn <q-btn
round round
v-if="img == null"
icon="photo_camera" icon="photo_camera"
size="18px" size="18px"
style="background: #263238; color: white" style="background: #263238; color: white"
@click="capturePhoto" @click="capturePhoto"
unelevated unelevated
/> />
</div>
</div>
<!-- Refresh button - shows when photo is captured regardless of camera state -->
<div v-if="img != null && !useNativePhotoCapture">
<div
class="absolute-bottom text-subtitle2 text-center q-py-sm"
style="background: #00000021"
>
<q-btn <q-btn
v-else
round round
icon="refresh" icon="refresh"
size="18px" size="18px"