- Fare LISTA MOVIMENTI più comprensibile

- Grafica Circuiti
This commit is contained in:
Surya Paolo
2024-10-02 03:46:40 +02:00
parent 1424060813
commit e29de7e0f6
47 changed files with 937 additions and 291 deletions

View File

@@ -3596,11 +3596,11 @@ export const tools = {
let myw = Screen.width
if (!this.isMobile())
if (globalStore.leftDrawerOpen)
myw -= 300
// if (globalStore.leftDrawerOpen)
// myw -= 300
if (!this.isMobile())
if (globalStore.rightDrawerOpen)
myw -= 300
// if (globalStore.rightDrawerOpen)
// myw -= 300
maxh2 = (myw / coeff) + 20
if (maxh2 > 500)
@@ -4201,13 +4201,13 @@ export const tools = {
// return height()
let myw = mythisq.screen.width
if (withleft) {
if (globalStore.leftDrawerOpen)
myw -= 300
//if (globalStore.leftDrawerOpen)
// myw -= 300
}
if (withright)
if (globalStore.rightDrawerOpen)
myw -= 300
//if (globalStore.rightDrawerOpen)
// myw -= 300
return myw
},
@@ -6687,6 +6687,17 @@ export const tools = {
})
},
gestiscoAlmeno1Circuito() {
try {
const userStore = useUserStore()
return userStore.my.profile.manage_mycircuits ? userStore.my.profile.manage_mycircuits.length > 0 : false
} catch (e) {
return false
}
},
addtoAdminOfCircuit($q: any, username: string, circuitname: string, domanda: any = '') {
const userStore = useUserStore()
@@ -7270,6 +7281,14 @@ export const tools = {
}
},
getDateTomorrowByTime(ora: number) {
const dateTimeStart = new Date();
dateTimeStart.setDate(dateTimeStart.getDate() + 1); // Avanza al giorno successivo
dateTimeStart.setHours(ora, 0, 0, 0);
return dateTimeStart
},
getdefaultnewrec_MyBacheca(extrarec: any): any {
return {
@@ -7277,8 +7296,8 @@ export const tools = {
idSkill: tools.getSelectionByTable('skills', 0, true),
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
idContribType: tools.getSelectionByTable('contribtypes', []),
dateTimeStart: new Date(),
dateTimeEnd: new Date(),
dateTimeStart: this.getDateTomorrowByTime(21),
dateTimeEnd: this.getDateTomorrowByTime(23),
idCity: this.getCitySel(),
NumLevel: 0,
adType: tools.getSelectionByTable('adtypes', costanti.AdType.OFFRO),
@@ -7566,12 +7585,12 @@ export const tools = {
return []
},
async loadCircuits() {
async loadCircuits(nummovTodownload: number) {
const userStore = useUserStore()
const circuitStore = useCircuitStore()
// Carica il profilo di quest'utente
await userStore.loadCircuits().then((ris) => {
await userStore.loadCircuits(nummovTodownload).then((ris) => {
// console.log('ris', ris)
if (ris) {
@@ -7584,6 +7603,7 @@ export const tools = {
userStore.my.profile.asked_circuits = ris.asked_circuits ? ris.asked_circuits : []
userStore.my.profile.refused_circuits = ris.refused_circuits ? ris.refused_circuits : []
userStore.my.profile.last_my_transactions = ris.last_my_transactions ? ris.last_my_transactions : []
return [{ userId: userStore.my._id }]
}
})
@@ -8888,7 +8908,7 @@ export const tools = {
}
},
async saveInDBForTypes($q: any, mykey: string, newval: any, type: any, serv: boolean, table?: string, mysubkey: string, id: any, indrec?: number, mysubsubkey: string, specialField: ISpecialField): boolean {
async saveInDBForTypes($q: any, mykey: string, newval: any, type: any, serv: boolean, table?: string, mysubkey: string, id: any, indrec?: number, mysubsubkey: string, specialField: ISpecialField) {
const { setValDb, getValDb } = MixinBase()
@@ -8975,6 +8995,63 @@ export const tools = {
return { str: mystr.trim(), tipocontofrom, tipocontoto }
},
getUsernameOrGroupOrContoComByMov(mov: IMovQuery, from: boolean) {
let mystrfrom = ''
let mystrto = ''
if (from) {
if (mov.contocomfrom && mov.contocomfrom.name) {
mystrfrom = mov.contocomfrom.name
}
if (mov.groupfrom) {
mystrfrom = mov.groupfrom.groupname
}
if (mov.userfrom) {
mystrfrom = mov.userfrom.username
}
return mystrfrom
} else {
if (mov.contocomto && mov.contocomto.name) {
mystrto = mov.contocomto.name
}
if (mov.groupto) {
mystrto = mov.groupto.groupname
}
if (mov.userto) {
mystrto = mov.userto.username
}
return mystrto
}
},
getTitleAnnuncio(table: string) {
const rec = costanti.MAINCARDS.find((rec: any) => rec.showinoptions && rec.table === table)
return rec ? rec.strsingolo : ''
},
getGradientByColors(col1: string, col2: string, col3: string): string {
let mystr = ''
if (col1) {
mystr = `background: linear-gradient(${col1}`
}
if (col2) {
mystr += `, ${col2}`
}
if (col3) {
mystr += `, ${col3}`
}
mystr += ') !important;'
return mystr
},
// FINE !
// getLocale() {