- aggiornato catalogo lista con filtri per editori e grafico

This commit is contained in:
Surya Paolo
2025-02-13 21:15:04 +01:00
parent cdefb91bef
commit f0098e57b2
58 changed files with 245 additions and 116 deletions

View File

@@ -409,8 +409,11 @@ export const costanti = {
TABLES_ARRAY: ['circuits'],
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
TABLES_IMG_USERNAME: ['friends', 'friendsandme'],
TABLES_WITH_STR_TUTTI: ['lista_editori'],
FILTER_SEP: '_',
FILTER_TUTTI_STR: '[Tutti]',
FuncDialog: {
CANCEL_BOOKING: 1,
},

View File

@@ -132,18 +132,18 @@ export const colTableCatalogList = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
isadvanced_field: false,
}),
AddCol({
name: 'idPageAssigned',
label_trans: 'cataloglist.idPageAssigned',
fieldtype: costanti.FieldType.select,
jointable: 'mypages_id',
}),
AddCol({
name: 'referenti',
label_trans: 'cataloglist.referenti',
fieldtype: costanti.FieldType.multiselect,
jointable: 'lista_editori',
}),
AddCol({
name: 'idPageAssigned',
label_trans: 'cataloglist.idPageAssigned',
fieldtype: costanti.FieldType.select,
jointable: 'mypages_id',
}),
AddCol({
name: 'argomenti',
label_trans: 'cataloglist.argomenti',
@@ -297,6 +297,8 @@ export const colmyScheda = [
AddCol({ name: 'widthpag', label_trans: 'scheda.widthpag', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'widthimg', label_trans: 'scheda.widthimg', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'heightimg', label_trans: 'scheda.heightimg', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'widthcard', label_trans: 'scheda.widthcard', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'heightcard', label_trans: 'scheda.heightcard', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'height_Printable', label_trans: 'scheda.height_Printable', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'numschede_perCol', label_trans: 'scheda,numschede_perCol', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'numschede_perRiga', label_trans: 'scheda.numschede_perRiga', fieldtype: costanti.FieldType.number }),
@@ -4942,28 +4944,28 @@ export const fieldsTable = {
label: 'Amici',
columns: colTableUsersGeneric,
colkey: 'username',
collabel: 'username',
collabel: (rec: any) => `${rec.name} ${rec.surname}`,
},
{
value: 'friendsandme',
label: 'Amici_and_me',
columns: colTableUsersGeneric,
colkey: 'username',
collabel: 'username',
collabel: (rec: any) => `${rec.name} ${rec.surname}`,
},
{
value: 'lista_editori',
label: 'Editori',
columns: colTableUsersGeneric,
colkey: 'username',
collabel: 'username',
collabel: 'name',
},
{
value: 'mygroups',
label: 'Organizzazioni',
columns: colmyUserGroup,
colkey: 'groupname',
collabel: 'groupname',
collabel: (rec: any) => `${rec.groupname} `,
},
{
value: 'movements',

View File

@@ -9059,15 +9059,21 @@ export const tools = {
setRecordByField(field: any, record: any, value: any) {
let mioval = ''
if (field) {
const arrfields = field.split('.')
if (arrfields && arrfields.length > 1) {
try {
record[arrfields[0]][arrfields[1]] = value
} catch (e) {
return record
}
if (typeof field === 'function') {
// Se field è una funzione, chiamala per ottenere il campo
const fieldValue = field(record)
record[fieldValue] = value
} else {
record[field] = value
const arrfields = field.split('.')
if (arrfields && arrfields.length > 1) {
try {
record[arrfields[0]][arrfields[1]] = value
} catch (e) {
return record
}
} else {
record[field] = value
}
}
}
return record
@@ -9643,6 +9649,24 @@ export const tools = {
return Object.keys(obj).length === 0;
},
getsearchList_Cataloghi() {
return [{
visible: true,
label: 'Editore',
table: 'lista_editori',
key: 'referenti',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + shared_consts.TABLES_CATALOG + costanti.FILTER_SEP + 'referente', costanti.FILTER_TUTTI),
keycookie: '',
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'fas fa-user'
}]
},
// FINE !
// getLocale() {