- Statistiche
- Menu e Sottomenu - Lista ultimi Movimenti
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
IUserFields,
|
||||
Privacy,
|
||||
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang, IGroupShort, IPagination, IFavorite, IBookmark,
|
||||
IMovQuery,
|
||||
} from '@model'
|
||||
|
||||
import MixinBase from '@/mixins/mixin-base'
|
||||
@@ -489,7 +490,7 @@ export const tools = {
|
||||
{ label: 'sienna', value: '#a0522d' },
|
||||
{ label: 'silver', value: '#c0c0c0' },
|
||||
{ label: 'skyblue', value: '#87ceeb' },
|
||||
{ label: 'slateblue', value: '#6a5acd' },
|
||||
{ label: 'slateblue', value: '#6a5acdd' },
|
||||
{ label: 'slategray', value: '#708090' },
|
||||
{ label: 'snow', value: '#fffafa' },
|
||||
{ label: 'springgreen', value: '#00ff7f' },
|
||||
@@ -7352,8 +7353,8 @@ export const tools = {
|
||||
return this.getPathByTableAndRec(table, rec)
|
||||
},
|
||||
|
||||
getPathByGroup(grp: any, table: string) {
|
||||
return '/' + shared_consts.getDirectoryByTable(table) + '/' + grp.groupname
|
||||
getPathByGroup(grp: any) {
|
||||
return '/' + shared_consts.getDirectoryByTable(shared_consts.TABLES_MYGROUPS) + '/' + grp.groupname
|
||||
},
|
||||
|
||||
getPathByCircuit(circuit: any, table: string) {
|
||||
@@ -7369,7 +7370,7 @@ export const tools = {
|
||||
if (shared_consts.TABLES_REC_ID.includes(table)) {
|
||||
return '/' + shared_consts.getDirectoryByTable(table) + '/' + rec['_id']
|
||||
} else if (table === toolsext.TABMYGROUPS) {
|
||||
return this.getPathByGroup(rec, table)
|
||||
return this.getPathByGroup(rec)
|
||||
} else if (table === toolsext.TABCIRCUITS) {
|
||||
return this.getPathByCircuit(rec, table)
|
||||
}
|
||||
@@ -8009,7 +8010,7 @@ export const tools = {
|
||||
let obj = { label: '', value: '', icon: '' }
|
||||
for (let i = 0; i < costanti.MAINCARDS.length; i++) {
|
||||
let rec: any = costanti.MAINCARDS[i]
|
||||
if (rec.table) {
|
||||
if (rec.table && rec.showinoptions) {
|
||||
obj.label = rec.title
|
||||
obj.value = rec.table
|
||||
obj.icon = rec.icon
|
||||
@@ -8561,10 +8562,26 @@ export const tools = {
|
||||
|
||||
openUrl(url: string) {
|
||||
|
||||
url = url.replace('{link_chat_territoriale}', this.getLinkChatTerritoriale())
|
||||
|
||||
window.open(url, '_blank');
|
||||
|
||||
},
|
||||
|
||||
getText(mystr: string) {
|
||||
|
||||
mystr = mystr.replace('{miaprovincia}', this.getProvincia())
|
||||
|
||||
if (mystr.includes('{titolo_prov_riso}')) {
|
||||
let titleprovincia = translate('dashboard.link_gruppo_telegram')
|
||||
titleprovincia = titleprovincia.replace('{prov}', this.getProvincia())
|
||||
|
||||
mystr = mystr.replace('{titolo_prov_riso}', titleprovincia)
|
||||
}
|
||||
|
||||
return mystr
|
||||
},
|
||||
|
||||
getCircuitYourProvince() {
|
||||
|
||||
const circuitStore = useCircuitStore()
|
||||
@@ -8737,6 +8754,15 @@ export const tools = {
|
||||
return shared_consts.VERSIONI_PRODOTTO.find((rec: any) => rec.value === versione)
|
||||
},
|
||||
|
||||
numtostr(value: number): string {
|
||||
try {
|
||||
value = Math.round(value)
|
||||
return value.toLocaleString('it-IT')
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
convertToDecimal6(stringValue: string) {
|
||||
// Converti la stringa in un numero
|
||||
try {
|
||||
@@ -8876,6 +8902,63 @@ export const tools = {
|
||||
|
||||
},
|
||||
|
||||
updateEditOn(value: boolean) {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
globalStore.editOn = value
|
||||
|
||||
if (this.getCookie('edn') === '1' && !value) {
|
||||
this.setCookie('edn', '0')
|
||||
}
|
||||
if (this.getCookie('edn') !== '1' && value) {
|
||||
this.setCookie('edn', '1')
|
||||
}
|
||||
},
|
||||
|
||||
replaceStringCaseInsensitive(originalString: string, searchString: string, replaceString: string) {
|
||||
// Crea una regex con il flag 'i' per la ricerca case-insensitive
|
||||
const regex = new RegExp(searchString, 'gi'); // 'g' per global, 'i' per case-insensitive
|
||||
return originalString.replace(regex, replaceString);
|
||||
},
|
||||
|
||||
getStringaConto(mov: IMovQuery) {
|
||||
|
||||
let mystr = ''
|
||||
let mystrfrom = ''
|
||||
let mystrto = ''
|
||||
|
||||
let tipocontofrom = shared_consts.AccountType.USER
|
||||
let tipocontoto = shared_consts.AccountType.USER
|
||||
|
||||
if (mov.contocomfrom && mov.contocomfrom.name) {
|
||||
mystrfrom += mov.contocomfrom.name + ' '
|
||||
tipocontofrom = shared_consts.AccountType.COMMUNITY_ACCOUNT
|
||||
}
|
||||
if (mov.groupfrom) {
|
||||
mystrfrom += mov.groupfrom.groupname + ' '
|
||||
tipocontofrom = shared_consts.AccountType.COLLECTIVE_ACCOUNT
|
||||
}
|
||||
if (mov.userfrom) {
|
||||
mystrfrom += mov.userfrom.username + ' '
|
||||
}
|
||||
|
||||
if (mov.contocomto && mov.contocomto.name) {
|
||||
mystrto += mov.contocomto.name + ' '
|
||||
tipocontoto = shared_consts.AccountType.COMMUNITY_ACCOUNT
|
||||
}
|
||||
if (mov.groupto) {
|
||||
mystrto += mov.groupto.groupname + ' '
|
||||
tipocontoto = shared_consts.AccountType.COLLECTIVE_ACCOUNT
|
||||
}
|
||||
if (mov.userto) {
|
||||
mystrto += mov.userto.username + ' '
|
||||
}
|
||||
|
||||
mystr = t('movement.from') + mystrfrom + ' ' + t('movement.to') + mystrto
|
||||
|
||||
return { str: mystr.trim(), tipocontofrom, tipocontoto }
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
Reference in New Issue
Block a user