Compare commits
No commits in common. "dev" and "v1.1.35" have entirely different histories.
1 changed files with 20 additions and 21 deletions
|
|
@ -178,32 +178,31 @@ const landingPageUrl = ref<string>(configParam.landingPageUrl)
|
||||||
/** ฟังก์ชันเรียกข้อมูลผู้ใช่งาน*/
|
/** ฟังก์ชันเรียกข้อมูลผู้ใช่งาน*/
|
||||||
async function fetchKeycloakPosition() {
|
async function fetchKeycloakPosition() {
|
||||||
// เช็คว่ามีข้อมูลใน store อยู่แล้วหรือไม่ (จาก localStorage)
|
// เช็คว่ามีข้อมูลใน store อยู่แล้วหรือไม่ (จาก localStorage)
|
||||||
// จะช่วยลดจำนวนครั้งในการเรียก API และปรับปรุงประสิทธิภาพของแอปพลิเคชัน
|
const existingData = positionKeycloakStore.dataPositionKeycloak
|
||||||
// const existingData = positionKeycloakStore.dataPositionKeycloak
|
|
||||||
|
|
||||||
// if (existingData) {
|
if (existingData) {
|
||||||
// // มีข้อมูลอยู่แล้ว ใช้ข้อมูลเดิม
|
// มีข้อมูลอยู่แล้ว ใช้ข้อมูลเดิม
|
||||||
|
|
||||||
// // เช็คว่ามีข้อมูลสังกัด (organization) หรือไม่
|
// เช็คว่ามีข้อมูลสังกัด (organization) หรือไม่
|
||||||
// const hasOrganization =
|
const hasOrganization =
|
||||||
// existingData.organization &&
|
existingData.organization &&
|
||||||
// (existingData.organization.root ||
|
(existingData.organization.root ||
|
||||||
// existingData.organization.child1 ||
|
existingData.organization.child1 ||
|
||||||
// existingData.organization.child2 ||
|
existingData.organization.child2 ||
|
||||||
// existingData.organization.child3 ||
|
existingData.organization.child3 ||
|
||||||
// existingData.organization.child4)
|
existingData.organization.child4)
|
||||||
|
|
||||||
// if (!hasOrganization) {
|
if (!hasOrganization) {
|
||||||
// // ไม่มีข้อมูลสังกัด redirect ไปหน้า NoPosition
|
// ไม่มีข้อมูลสังกัด redirect ไปหน้า NoPosition
|
||||||
// router.replace('/no-position')
|
router.replace('/no-position')
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
|
|
||||||
// privacyStore.modalPrivacy = !existingData.privacyCheckin
|
privacyStore.modalPrivacy = !existingData.privacyCheckin
|
||||||
// privacyStore.setAccepted(existingData.privacyCheckin)
|
privacyStore.setAccepted(existingData.privacyCheckin)
|
||||||
|
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
|
|
||||||
// ไม่มีข้อมูล ให้ fetch จาก API
|
// ไม่มีข้อมูล ให้ fetch จาก API
|
||||||
await http
|
await http
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue