This commit is contained in:
parent
1032c93cba
commit
1e26f85310
2 changed files with 12 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted, watch } from 'vue'
|
||||||
import { is, useQuasar } from 'quasar'
|
import { is, useQuasar } from 'quasar'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import Camera from 'simple-vue-camera'
|
import Camera from 'simple-vue-camera'
|
||||||
|
|
@ -493,6 +493,15 @@ onMounted(async () => {
|
||||||
mapRef.value?.requestLocationPermission()
|
mapRef.value?.requestLocationPermission()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => privacyStore.isAccepted,
|
||||||
|
(newVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
mapRef.value?.requestLocationPermission()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,7 @@ async function fetchKeycloakPosition() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result
|
const data = await res.data.result
|
||||||
privacyStore.modalPrivacy = !data.privacyCheckin ? true : false
|
privacyStore.modalPrivacy = !data.privacyCheckin ? true : false
|
||||||
|
privacyStore.setAccepted(data.privacyCheckin)
|
||||||
//เช็คว่ามีรูปไหม ถ้ามีรูปเรียกข้อมูลรูป
|
//เช็คว่ามีรูปไหม ถ้ามีรูปเรียกข้อมูลรูป
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
await getImg(data.profileId, data.avatarName)
|
await getImg(data.profileId, data.avatarName)
|
||||||
|
|
@ -286,7 +287,7 @@ const isSsoToken = ref<boolean>(false)
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fetchTotolNotificate()
|
fetchTotolNotificate()
|
||||||
fetchKeycloakPosition()
|
await fetchKeycloakPosition()
|
||||||
const checkTokenParsed = await tokenParsed()
|
const checkTokenParsed = await tokenParsed()
|
||||||
const SSO_TOKEN = await getCookie('SSO')
|
const SSO_TOKEN = await getCookie('SSO')
|
||||||
isSsoToken.value = SSO_TOKEN === 'y' ? true : false
|
isSsoToken.value = SSO_TOKEN === 'y' ? true : false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue