- posizione attuale GPS

- salvataggio ultima posizione in mappa
- visualizzazione prima icona con fas
This commit is contained in:
Surya Paolo
2024-08-01 12:18:22 +02:00
parent 822585cf33
commit 79e874e3e0
13 changed files with 849 additions and 67 deletions

View File

@@ -879,8 +879,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
console.log('DeleteSubscriptionToServer: ')
try {
return Api.SendReq('/subscribe/del', 'DELETE', null)
}catch (e) {
return Api.SendReq('/subscribe/del', 'DELETE', null)
} catch (e) {
console.error('deleteSubscriptionToServer')
}
},
@@ -1667,7 +1667,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
return true
}).then((res) => res).catch((error) => {
if (error.status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED) {
}
console.log('error dbLoad', error)
// userStore.setErrorCatch(error)
@@ -2099,7 +2099,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
prepareAddNewElem(order: any, $q: any, t: any, myelem: any, newtype: any) {
const newrec: IMyElem = {
_id: undefined,
type: newtype,
@@ -2130,7 +2130,16 @@ export const useGlobalStore = defineStore('GlobalStore', {
return newrec
}
},
},
getIconBySector(sectorId: string) {
const myrec = this.sectors.find((rec: any) => rec._id === sectorId)
if (myrec && myrec.icon) {
return myrec.icon
} else {
return 'fas fa-home'
}
}
}
})