fixed remove text and service

This commit is contained in:
Warunee Tamkoo 2026-05-01 11:01:29 +07:00
parent ac18c0f932
commit c4e246ed74
3 changed files with 28 additions and 14 deletions

View file

@ -197,7 +197,7 @@ async function initializeMap() {
'esri/views/MapView', 'esri/views/MapView',
'esri/geometry/Point', 'esri/geometry/Point',
'esri/Graphic', 'esri/Graphic',
'esri/layers/TileLayer', // 'esri/layers/TileLayer',
]) ])
// Set apiKey // Set apiKey
// esriConfig.apiKey = // esriConfig.apiKey =

View file

@ -298,9 +298,17 @@ async function stopChecking() {
function identifyCameraType(label: string): 'front' | 'back' | 'unknown' { function identifyCameraType(label: string): 'front' | 'back' | 'unknown' {
const lowerLabel = label.toLowerCase() const lowerLabel = label.toLowerCase()
if (lowerLabel.includes('front') || lowerLabel.includes('user') || lowerLabel.includes('face')) { if (
lowerLabel.includes('front') ||
lowerLabel.includes('user') ||
lowerLabel.includes('face')
) {
return 'front' return 'front'
} else if (lowerLabel.includes('back') || lowerLabel.includes('environment') || lowerLabel.includes('rear')) { } else if (
lowerLabel.includes('back') ||
lowerLabel.includes('environment') ||
lowerLabel.includes('rear')
) {
return 'back' return 'back'
} }
return 'unknown' return 'unknown'
@ -356,8 +364,9 @@ async function changeCamera(targetCameraType?: 'front' | 'back') {
return return
} }
const matchingCameras = devices.filter((device: any) => const matchingCameras = devices.filter(
identifyCameraType(device.label || '') === targetCameraType (device: any) =>
identifyCameraType(device.label || '') === targetCameraType
) )
if (matchingCameras.length > 0) { if (matchingCameras.length > 0) {
@ -470,7 +479,9 @@ const mapRefDesktop = ref<InstanceType<typeof MapCheck> | null>(null)
const mapRefMobile = ref<InstanceType<typeof MapCheck> | null>(null) const mapRefMobile = ref<InstanceType<typeof MapCheck> | null>(null)
// Computed ref that returns the correct map ref based on screen size // Computed ref that returns the correct map ref based on screen size
const mapRef = computed(() => ($q.screen.gt.xs ? mapRefDesktop.value : mapRefMobile.value)) const mapRef = computed(() =>
$q.screen.gt.xs ? mapRefDesktop.value : mapRefMobile.value
)
const timeChickin = ref<string>('') //, const timeChickin = ref<string>('') //,
@ -923,7 +934,10 @@ watch(
<!-- แสดงกลองตอนกดถายภาพ --> <!-- แสดงกลองตอนกดถายภาพ -->
<Camera <Camera
:resolution="{ width: photoWidth, height: photoHeight }" :resolution="{
width: photoWidth,
height: photoHeight,
}"
ref="camera" ref="camera"
:autoplay="false" :autoplay="false"
:style="!img ? 'display: block' : 'display: none'" :style="!img ? 'display: block' : 'display: none'"
@ -1167,7 +1181,7 @@ watch(
> >
<q-separator /> <q-separator />
<div class="col-12 q-pa-md"> <div class="col-12 q-pa-md">
<p <!-- <p
:class=" :class="
$q.screen.gt.xs $q.screen.gt.xs
? 'text-red text-caption ' ? 'text-red text-caption '
@ -1175,7 +1189,7 @@ watch(
" "
> >
*หมายเหต คลกลงเวลาเขางานแลวระบบจะลงเวลาทนท *หมายเหต คลกลงเวลาเขางานแลวระบบจะลงเวลาทนท
</p> </p> -->
<q-btn <q-btn
:label=" :label="
!statusCheckin && inQueue !statusCheckin && inQueue
@ -1282,7 +1296,7 @@ watch(
<q-footer reveal v-if="$q.screen.xs" class="bg-grey-2"> <q-footer reveal v-if="$q.screen.xs" class="bg-grey-2">
<q-separator /> <q-separator />
<div v-if="!isDisabledCheckTime" class="col-12 q-pa-md"> <div v-if="!isDisabledCheckTime" class="col-12 q-pa-md">
<p <!-- <p
:class=" :class="
$q.screen.gt.xs $q.screen.gt.xs
? 'text-red text-caption ' ? 'text-red text-caption '
@ -1290,7 +1304,7 @@ watch(
" "
> >
*หมายเหต คลกลงเวลาเขางานแลวระบบจะลงเวลาทนท *หมายเหต คลกลงเวลาเขางานแลวระบบจะลงเวลาทนท
</p> </p> -->
<q-btn <q-btn
:label=" :label="
!statusCheckin && inQueue !statusCheckin && inQueue
@ -1452,4 +1466,4 @@ watch(
rgba(2, 169, 152, 1) 100% rgba(2, 169, 152, 1) 100%
); );
} }
</style> </style>

View file

@ -460,7 +460,7 @@ onMounted(async () => {
<div class="col-12 text-right"> <div class="col-12 text-right">
<q-separator /> <q-separator />
<div class="col-12 q-pa-md"> <div class="col-12 q-pa-md">
<p <!-- <p
:class=" :class="
$q.screen.gt.xs $q.screen.gt.xs
? 'text-red text-caption ' ? 'text-red text-caption '
@ -468,7 +468,7 @@ onMounted(async () => {
" "
> >
*หมายเหต คลกลงเวลาเขางานแลวระบบจะลงเวลาทนท *หมายเหต คลกลงเวลาเขางานแลวระบบจะลงเวลาทนท
</p> </p> -->
<q-btn <q-btn
:label=" :label="
stetusCheckin == true ? 'ลงเวลาเข้างาน' : 'ลงเวลาออกงาน' stetusCheckin == true ? 'ลงเวลาเข้างาน' : 'ลงเวลาออกงาน'