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