Cataloghi...
This commit is contained in:
@@ -29,6 +29,7 @@ export const costanti = {
|
||||
'excludeproductTypes',
|
||||
'misure',
|
||||
'Categoria',
|
||||
'idCollane',
|
||||
'editore',
|
||||
'pdf',
|
||||
'Printable',
|
||||
|
||||
@@ -129,17 +129,17 @@ export const colTableCatalogList = [
|
||||
isadvanced_field: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idCollana',
|
||||
name: 'idCollane',
|
||||
label_trans: 'cataloglist.collane',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'collanas',
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
name: 'idTemplateScheda',
|
||||
label_trans: 'scheda.linkIdTemplate',
|
||||
name: 'idPageAssigned',
|
||||
label_trans: 'cataloglist.idPageAssigned',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'collanas',
|
||||
jointable: 'mypages_id',
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
@@ -150,6 +150,8 @@ export const colTableCatalogList = [
|
||||
field_outtype: costanti.FieldType.object,
|
||||
showWhen: costanti.showWhen.InView_OnlyifExist,
|
||||
}),
|
||||
AddCol({ name: 'descr_introduttiva', label_trans: 'cataloglist.descr_introduttiva', fieldtype: costanti.FieldType.html }),
|
||||
|
||||
AddCol({
|
||||
name: 'img_bordata_web',
|
||||
label_trans: 'cataloglist.img_bordata_web',
|
||||
@@ -158,7 +160,6 @@ export const colTableCatalogList = [
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
isadvanced_field: false,
|
||||
}),
|
||||
AddCol({ name: 'idTemplateScheda', label_trans: 'scheda.linkIdTemplate', fieldtype: costanti.FieldType.string }),
|
||||
|
||||
AddCol(ModifRec),
|
||||
AddCol(DuplicateRec),
|
||||
@@ -241,7 +242,12 @@ export const colmyScheda = [
|
||||
AddCol({ name: 'editore', label_trans: 'editore' }),
|
||||
AddCol({ name: 'author', label_trans: 'scheda.author' }),
|
||||
AddCol({ name: 'argomenti', label_trans: 'scheda.argomenti' }),
|
||||
AddCol({ name: 'idCollana', label_trans: 'scheda.idCollana' }),
|
||||
AddCol({
|
||||
name: 'idCollane',
|
||||
label_trans: 'products.category',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'collanas',
|
||||
}),
|
||||
AddCol({ name: 'sort_field', label_trans: 'catalogo.sort_field', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'sort_dir', label_trans: 'catalogo.sort_dir', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'arrProdottiSpeciali', label_trans: 'editore' }),
|
||||
@@ -254,7 +260,12 @@ export const colmyelCatalogo = [
|
||||
AddCol({ name: 'pdf_filename', label_trans: 'pdf_filename' }),
|
||||
AddCol({ name: 'editore', label_trans: 'editore' }),
|
||||
AddCol({ name: 'argomenti', label_trans: 'scheda.argomenti' }),
|
||||
AddCol({ name: 'idCollana', label_trans: 'scheda.idCollana' }),
|
||||
AddCol({
|
||||
name: 'idCollane',
|
||||
label_trans: 'products.category',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'collanas',
|
||||
}),
|
||||
AddCol({ name: 'width', label_trans: 'width', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'height', label_trans: 'height', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'optcatalogo.', label_trans: 'catalogo.optcatalogo.', fieldtype: costanti.FieldType.number }),
|
||||
@@ -1067,7 +1078,7 @@ export const colmyUserPeople = [
|
||||
export const colmyUserGroup = [
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({
|
||||
name: 'title', label_trans: 'reg.name',
|
||||
name: 'title', label_trans: 'reg.nameorg',
|
||||
field_toduplicate_nospace: 'groupname',
|
||||
required: true, noshowlabel: true, maxlength: 50
|
||||
}),
|
||||
@@ -1860,7 +1871,6 @@ export const colmyBachecas = [
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
noshowlabel: true,
|
||||
icon: 'mood',
|
||||
isadvanced_field: true,
|
||||
sortable: false,
|
||||
typeobj: 'checkbox',
|
||||
}),
|
||||
@@ -4195,6 +4205,13 @@ export const fieldsTable = {
|
||||
colkey: 'path',
|
||||
collabel: 'title',
|
||||
},
|
||||
{
|
||||
value: 'mypages_id',
|
||||
label: 'Pagine Web (ID)',
|
||||
columns: colmypage,
|
||||
colkey: '_id',
|
||||
collabel: 'title',
|
||||
},
|
||||
{
|
||||
value: 'products',
|
||||
label: 'Prodotti',
|
||||
@@ -4270,7 +4287,7 @@ export const fieldsTable = {
|
||||
label: 'Collane',
|
||||
columns: colTableCollane,
|
||||
colkey: 'idCollana',
|
||||
collabel: 'descrizione',
|
||||
collabel: 'title',
|
||||
},
|
||||
{
|
||||
value: 'catais',
|
||||
@@ -4948,6 +4965,13 @@ export const fieldsTable = {
|
||||
colkey: '_id',
|
||||
collabel: 'title',
|
||||
},
|
||||
{
|
||||
value: 'schedeopt',
|
||||
label: 'Template Cataloghi',
|
||||
columns: colTableGeneric,
|
||||
colkey: 'value',
|
||||
collabel: 'label',
|
||||
},
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
@@ -7506,9 +7506,9 @@ export const tools = {
|
||||
// console.log('arrimage', arrimage)
|
||||
|
||||
if (shared_consts.TABLES_DIRECTORY_A_PARTE.includes(table)) {
|
||||
return costanti.DIR_UPLOAD + `${table}/` + groupname + '/' + arrimage[0].imagefile
|
||||
return costanti.DIR_UPLOAD + `${table}/` + groupname + '/' + arrimage[0]?.imagefile
|
||||
} else if (shared_consts.TABLES_DIRECTORY_SINGLE_IMG.includes(table)) {
|
||||
return costanti.DIR_UPLOAD + `${table}/` + groupname + '/' + arrimage[0].imagefile
|
||||
return costanti.DIR_UPLOAD + `${table}/` + groupname + '/' + arrimage[0]?.imagefile
|
||||
} else {
|
||||
// console.log('username', username, 'table', table)
|
||||
if (arrimage && arrimage.length > 0) {
|
||||
@@ -7540,7 +7540,7 @@ export const tools = {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (shared_consts.TABLES_WITH_ADMINS.includes(tablesel)) {
|
||||
if (userStore.isAdmin)
|
||||
return true
|
||||
@@ -9317,6 +9317,21 @@ export const tools = {
|
||||
return rec ? rec.strsingolo : ''
|
||||
},
|
||||
|
||||
getMainUrl(fullUrl: string) {
|
||||
try {
|
||||
// Crea un oggetto URL dall'input
|
||||
const url = new URL(fullUrl);
|
||||
|
||||
// Estrai il protocollo (http o https) e l'host (dominio)
|
||||
const mainUrl = `${url.host}`;
|
||||
|
||||
return mainUrl;
|
||||
} catch (error) {
|
||||
console.error("URL non valido:", error);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
getGradientByColors(col1: string, col2: string, col3: string): string {
|
||||
let mystr = ''
|
||||
if (col1) {
|
||||
|
||||
Reference in New Issue
Block a user