- Statistiche
- Menu e Sottomenu - Lista ultimi Movimenti
This commit is contained in:
@@ -29,11 +29,6 @@ export const costanti = {
|
||||
ENABLE_FRIENDS: false,
|
||||
ENABLE_CONTI_COLLETTIVI: true,
|
||||
|
||||
AccountType: {
|
||||
USER: 0,
|
||||
COLLECTIVE_ACCOUNT: 1,
|
||||
COMMUNITY_ACCOUNT: 2,
|
||||
},
|
||||
|
||||
Lang: {
|
||||
IT: 1,
|
||||
@@ -115,6 +110,7 @@ export const costanti = {
|
||||
visuonstat: true,
|
||||
small: false,
|
||||
showfavorite: true,
|
||||
showinoptions: true,
|
||||
},
|
||||
{
|
||||
visible: true,
|
||||
@@ -129,6 +125,7 @@ export const costanti = {
|
||||
visuonstat: true,
|
||||
small: false,
|
||||
showfavorite: true,
|
||||
showinoptions: true,
|
||||
},
|
||||
{
|
||||
visible: true,
|
||||
@@ -145,6 +142,7 @@ export const costanti = {
|
||||
table: 'myhosps',
|
||||
visuonstat: true,
|
||||
showfavorite: true,
|
||||
showinoptions: true,
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
@@ -201,6 +199,7 @@ export const costanti = {
|
||||
visuonstat: true,
|
||||
small: false,
|
||||
showfavorite: true,
|
||||
showinoptions: true,
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
@@ -276,6 +275,7 @@ export const costanti = {
|
||||
small: false,
|
||||
showfavorite: true,
|
||||
forgroup: true,
|
||||
showinoptions: false,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -430,6 +430,7 @@ export const costanti = {
|
||||
currency: 15000,
|
||||
cards: 16000,
|
||||
color: 17000,
|
||||
arrmenu: 18000,
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ function AddCol(params: IColGridTable) {
|
||||
allowNewValue: (params.allowNewValue === undefined) ? false : params.allowNewValue,
|
||||
showpicprofile_ifnotset: (params.showpicprofile_ifnotset === undefined) ? false : params.showpicprofile_ifnotset,
|
||||
extrafield: (params.extrafield === undefined) ? '' : params.extrafield,
|
||||
tipoconto: (params.tipoconto === undefined) ? costanti.AccountType.USER : params.tipoconto,
|
||||
tipoconto: (params.tipoconto === undefined) ? shared_consts.AccountType.USER : params.tipoconto,
|
||||
visible: (params.visible === undefined) ? true : params.visible,
|
||||
icon: (params.icon === undefined) ? '' : params.icon,
|
||||
action: (params.action === undefined) ? '' : params.action,
|
||||
@@ -144,6 +144,7 @@ export const colmylistcards = [
|
||||
AddCol({ name: 'color', label_trans: 'color' }),
|
||||
AddCol({ name: 'content', label_trans: 'content' }),
|
||||
AddCol({ name: 'colorsub', label_trans: 'colorsub' }),
|
||||
AddCol({ name: 'link', label_trans: 'link' }),
|
||||
]
|
||||
|
||||
export const colmyelems = [
|
||||
@@ -220,9 +221,15 @@ export const colmypage = [
|
||||
AddCol({ name: 'order', label_trans: 'pages.order', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'active', label_trans: 'pages.active', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'inmenu', label_trans: 'pages.inmenu', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'infooter', label_trans: 'pages.infooter', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'title', label_trans: 'pages.title' }),
|
||||
AddCol({ name: 'subtitle', label_trans: 'pages.subtitle' }),
|
||||
AddCol({ name: 'mainMenu', label_trans: 'pages.mainMenu', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({
|
||||
name: 'sottoMenu', label_trans: 'pages.sottoMenu',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'mypages',
|
||||
}),
|
||||
AddCol({ name: 'infooter', label_trans: 'pages.infooter', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'img1', label_trans: 'pages.img1' }),
|
||||
AddCol({ name: 'content', label_trans: 'pages.contentfield', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'video1', label_trans: 'pages.video1' }),
|
||||
@@ -732,7 +739,7 @@ export const colmyMovement = [
|
||||
link: '/my/userfrom.username',
|
||||
noshowlabel: true,
|
||||
extrafield: 'movement.from',
|
||||
tipoconto: costanti.AccountType.USER,
|
||||
tipoconto: shared_consts.AccountType.USER,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'groupfrom.groupname',
|
||||
@@ -745,7 +752,7 @@ export const colmyMovement = [
|
||||
link: '/grp/groupfrom.groupname',
|
||||
noshowlabel: true,
|
||||
extrafield: 'movement.fromCColl',
|
||||
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'contocomfrom.path',
|
||||
@@ -758,7 +765,7 @@ export const colmyMovement = [
|
||||
link: '/circuit/contocomfrom.path',
|
||||
noshowlabel: true,
|
||||
extrafield: 'movement.fromCCom',
|
||||
tipoconto: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COMMUNITY_ACCOUNT,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'userto.username',
|
||||
@@ -771,7 +778,7 @@ export const colmyMovement = [
|
||||
link: '/my/userto.username',
|
||||
extrafield: 'movement.to',
|
||||
noshowlabel: true,
|
||||
tipoconto: costanti.AccountType.USER,
|
||||
tipoconto: shared_consts.AccountType.USER,
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
@@ -785,7 +792,7 @@ export const colmyMovement = [
|
||||
link: '/grp/groupto.groupname',
|
||||
extrafield: 'movement.toCColl',
|
||||
noshowlabel: true,
|
||||
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'contocomfto.path',
|
||||
@@ -798,7 +805,7 @@ export const colmyMovement = [
|
||||
link: '/circuit/contocomto.path',
|
||||
noshowlabel: true,
|
||||
extrafield: 'movement.toCCom',
|
||||
tipoconto: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COMMUNITY_ACCOUNT,
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
@@ -820,7 +827,7 @@ export const colmyMovementTable = [
|
||||
tipovisu: costanti.TipoVisu.LINK,
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/my/userfrom.username',
|
||||
tipoconto: costanti.AccountType.USER,
|
||||
tipoconto: shared_consts.AccountType.USER,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
@@ -832,7 +839,7 @@ export const colmyMovementTable = [
|
||||
tipovisu: costanti.TipoVisu.LINK,
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/grp/groupfrom.groupname',
|
||||
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
@@ -844,7 +851,7 @@ export const colmyMovementTable = [
|
||||
tipovisu: costanti.TipoVisu.LINK,
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/circuit/contocomfrom.path',
|
||||
tipoconto: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COMMUNITY_ACCOUNT,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
@@ -856,7 +863,7 @@ export const colmyMovementTable = [
|
||||
tipovisu: costanti.TipoVisu.LINK,
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/my/userto.username',
|
||||
tipoconto: costanti.AccountType.USER,
|
||||
tipoconto: shared_consts.AccountType.USER,
|
||||
required: true,
|
||||
}),
|
||||
|
||||
@@ -869,7 +876,7 @@ export const colmyMovementTable = [
|
||||
tipovisu: costanti.TipoVisu.LINK,
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/grp/groupto.groupname',
|
||||
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
@@ -881,7 +888,7 @@ export const colmyMovementTable = [
|
||||
tipovisu: costanti.TipoVisu.LINK,
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/circuit/contocomto.path',
|
||||
tipoconto: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COMMUNITY_ACCOUNT,
|
||||
required: true,
|
||||
}),
|
||||
|
||||
@@ -2658,8 +2665,8 @@ export const fields = {
|
||||
name: 'type', label_trans: 'col.type', fieldtype: costanti.FieldType.select, jointable: 'fieldstype',
|
||||
}),
|
||||
AddCol({ name: 'value_str', label_trans: 'col.value', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'value_date', label_trans: 'cal.data', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({ name: 'value_num', label_trans: 'cal.num', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'value_date', label_trans: 'cal.data', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({ name: 'value_bool', label_trans: 'cal.bool', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'serv', label_trans: 'cal.serv', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'crypted', label_trans: 'cal.crypted', fieldtype: costanti.FieldType.boolean }),
|
||||
@@ -3682,7 +3689,7 @@ export const colmyUserCircuit = [
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/circuit/contocom',
|
||||
noshowlabel: true,
|
||||
tipoconto: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COMMUNITY_ACCOUNT,
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
@@ -3693,7 +3700,7 @@ export const colmyUserCircuit = [
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/circuit/groupname',
|
||||
noshowlabel: true,
|
||||
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
|
||||
}),
|
||||
|
||||
AddCol({ name: 'deperibile', label_trans: 'account.deperibile', fieldtype: costanti.FieldType.boolean }),
|
||||
@@ -3726,7 +3733,7 @@ export const colTableNotifCoins = [
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/my/extrarec.dest',
|
||||
noshowlabel: true,
|
||||
tipoconto: costanti.AccountType.USER,
|
||||
tipoconto: shared_consts.AccountType.USER,
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
@@ -3739,7 +3746,7 @@ export const colTableNotifCoins = [
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/grp/extrarec.groupdest',
|
||||
noshowlabel: true,
|
||||
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COLLECTIVE_ACCOUNT,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'extrarec.contoComDest',
|
||||
@@ -3751,7 +3758,7 @@ export const colTableNotifCoins = [
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/circuit/extrarec.contoComDest',
|
||||
noshowlabel: true,
|
||||
tipoconto: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
tipoconto: shared_consts.AccountType.COMMUNITY_ACCOUNT,
|
||||
}),
|
||||
AddCol({ name: 'extrarec.qty', field: 'extrarec', subfield: 'qty', label_trans: 'movement.amount', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'extrarec.causal', field: 'extrarec', subfield: 'causal', label_trans: 'movement.causal', tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
@@ -3936,6 +3943,13 @@ export const fieldsTable = {
|
||||
colkey: 'path',
|
||||
collabel: 'title',
|
||||
},
|
||||
{
|
||||
value: 'mypages',
|
||||
label: 'Pagine Web',
|
||||
columns: colmypage,
|
||||
colkey: 'path',
|
||||
collabel: 'title',
|
||||
},
|
||||
{
|
||||
value: 'products',
|
||||
label: 'Prodotti',
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Router } from 'vue-router'
|
||||
import { ISpecialField } from 'model'
|
||||
|
||||
export const func_tools = {
|
||||
getLocale(vero ?: boolean): string {
|
||||
getLocale(vero?: boolean): string {
|
||||
const userStore = useUserStore()
|
||||
if (userStore) {
|
||||
return userStore.lang
|
||||
@@ -85,7 +85,7 @@ export const toolsext = {
|
||||
TABGALLERY: 'gallery',
|
||||
TABMAILINGLIST: 'mailinglist',
|
||||
TABGROUPS: 'groups',
|
||||
TABMYPAGE: 'mypage',
|
||||
TABMYPAGE: 'mypages',
|
||||
TABMYELEMS: 'myelems',
|
||||
TABMYBOT: 'bots',
|
||||
TABCALZOOM: 'calzoom',
|
||||
@@ -201,21 +201,21 @@ export const toolsext = {
|
||||
return userStore.my[keystr]
|
||||
}
|
||||
} else if (table === 'todos') {
|
||||
// console.log('id', id, 'idmain', idmain)
|
||||
const indcat = todos.categories.indexOf(idmain)
|
||||
console.log('indcat', indcat)
|
||||
if (indcat >= 0) {
|
||||
const myrec = todos.todos[indcat].find((rec: any) => rec._id === id)
|
||||
// console.log('myrec', myrec)
|
||||
let ris = null
|
||||
if (myrec) {
|
||||
ris = myrec[keystr]
|
||||
}
|
||||
console.log('ris', ris)
|
||||
return ris
|
||||
// console.log('id', id, 'idmain', idmain)
|
||||
const indcat = todos.categories.indexOf(idmain)
|
||||
console.log('indcat', indcat)
|
||||
if (indcat >= 0) {
|
||||
const myrec = todos.todos[indcat].find((rec: any) => rec._id === id)
|
||||
// console.log('myrec', myrec)
|
||||
let ris = null
|
||||
if (myrec) {
|
||||
ris = myrec[keystr]
|
||||
}
|
||||
console.log('ris', ris)
|
||||
return ris
|
||||
}
|
||||
|
||||
return ''
|
||||
return ''
|
||||
|
||||
} else {
|
||||
const ris = globalStore.getValueSettingsByKey(keystr, serv)
|
||||
|
||||
Reference in New Issue
Block a user