-Bottone Chat Territoriale Circuito

This commit is contained in:
Surya Paolo
2024-02-28 12:03:01 +01:00
parent 9020b9b17f
commit fe7e492a8d
3 changed files with 48 additions and 3 deletions

View File

@@ -8317,7 +8317,7 @@ export const tools = {
mystr = unitrec ? (short ? unitrec.short : unitrec.label) : ''
return mystr
},
getWeightByUnit(unit: number, short: boolean, weight: number | undefined) {
let unitrec = shared_consts.Units_Of_Measure_ListBox.find((rec: any) => rec.value === unit)
@@ -8447,8 +8447,29 @@ export const tools = {
openUrl(url: string) {
window.open(url, '_blank');
}
},
getCircuitYourProvince() {
const circuitStore = useCircuitStore()
const userStore = useUserStore()
try {
return circuitStore.getCircuitByProvinceAndCard(userStore.my.profile.resid_province, userStore.my.profile.resid_card)
} catch (e) {
return null
}
},
getLinkChatTerritoriale() {
const circ = this.getCircuitYourProvince()
return circ ? circ.link_group : ''
},
getNomeCircuitoChatTerritoriale() {
const circ = this.getCircuitYourProvince()
return circ ? circ.name : ''
},
// FINE !