- Aggiornate tutte le categorie ottimizzandole.

- Migrazione delle vecchie categ. con quelle nuove.
- Create le Categorie e sottocategorie degli Eventi (a parte).
- Aggiornato la card dell'Ospitalità
This commit is contained in:
Surya Paolo
2025-12-07 02:13:18 +01:00
parent 5d35930dc8
commit a4ca394e49
58 changed files with 2127 additions and 1119 deletions

View File

@@ -1812,6 +1812,28 @@ export const colSectorGoods = [
AddCol(DuplicateRec),
];
export const colSectorBachecas = [
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
AddCol({
name: 'idSectorBacheca',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.select,
jointable: 'sectorbachecas',
}),
AddCol({
name: 'main',
label_trans: 'store.main',
fieldtype: costanti.FieldType.boolean,
}),
AddCol({ name: 'color', label_trans: 'products.color' }),
AddCol({ name: 'theme', label_trans: 'products.theme' }),
AddCol({ name: 'img', label_trans: 'store.img' }),
AddCol({ name: 'icon', label_trans: 'store.icon' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
];
export const colCatGrps = [
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
@@ -1938,7 +1960,7 @@ export const colSkills = [
AddCol(DeleteRec),
];
export const colGoods = [
// AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
AddCol({ name: 'img', label_trans: 'store.img' }),
AddCol({ name: 'icon', label_trans: 'store.icon' }),
@@ -1953,6 +1975,22 @@ export const colGoods = [
AddCol(DuplicateRec),
AddCol(DeleteRec),
];
export const colBachecas = [
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
AddCol({ name: 'img', label_trans: 'store.img' }),
AddCol({ name: 'icon', label_trans: 'store.icon' }),
AddCol({
name: 'idSectorBacheca',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.multiselect,
jointable: 'sectorbachecas',
}),
AddCol({ name: 'color', label_trans: 'products.color' }),
AddCol({ name: 'theme', label_trans: 'products.theme' }),
AddCol(DuplicateRec),
AddCol(DeleteRec),
];
/*
export const colSubSkills = [
@@ -3348,7 +3386,7 @@ export const colmyBachecas = [
showifIsStatusDiPersona: true,
showifIsStatusOnLine: false,
}),
AddCol({
/*AddCol({
name: 'idSector',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.select,
@@ -3380,7 +3418,39 @@ export const colmyBachecas = [
allowNewValue: false,
required: false,
sortable: false,
}),*/
AddCol({
name: 'idSectorBacheca',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'sectorbachecas',
showWhen:
costanti.showWhen.NewRec +
costanti.showWhen.InEdit +
costanti.showWhen.InView_OnlyifExist,
visible: true,
icon: 'category',
}),
AddCol({
name: 'idBacheca',
label_trans: 'skill.name',
fieldtype: costanti.FieldType.select,
required: false,
jointable: 'bachecas',
addnone: true,
filter_table: 'sectorbachecas',
filter_field: 'idSectorBacheca',
noshowlabel: true,
icon: 'engineering',
showWhen:
costanti.showWhen.NewRec +
costanti.showWhen.InPage +
costanti.showWhen.InEdit +
costanti.showWhen.InView_OnlyifExist,
allowNewValue: false,
}),
AddCol({
name: 'note',
label_trans: 'proj.descrapprof',
@@ -7605,6 +7675,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'descr',
},
{
value: 'bachecas',
label: 'Sottocategorie Eventi',
columns: colBachecas,
colkey: '_id',
collabel: 'descr',
},
{
value: 'caldate', // toolsext.TABCALDATE,
label: 'Date',
@@ -7651,6 +7728,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'descr',
},
{
value: 'sectorbachecas',
label: 'Settori Eventi',
columns: colSectorBachecas,
colkey: '_id',
collabel: 'descr',
},
{
value: 'catgrps',
label: 'Categorie Gruppi',

View File

@@ -63,7 +63,6 @@ export const serv_constants = {
TypeProj: {
TYPE_PROJECT: 1,
TYPE_SUBDIR: 2,
}
},
}

View File

@@ -8161,7 +8161,7 @@ export const tools = {
obj.col_footer = 'idCity';
obj.col_tabfooter = 'mycities';
} else if (table === toolsext.TABMYBACHECAS) {
obj.prop_colkey = 'idSkill';
obj.prop_colkey = 'idBacheca';
obj.col_title = 'descr';
obj.col_footer = 'idCity';
obj.col_tabfooter = 'mycities';
@@ -8199,6 +8199,7 @@ export const tools = {
'contribtypes',
'adtypes',
'sectorgoods',
'sectorbachecas',
'otherfilters',
'shippings',
'pub_to_share',
@@ -8207,6 +8208,7 @@ export const tools = {
const arrmultisel = [
{ table: 'skills', join: 'sectors' },
{ table: 'goods', join: 'sectorgoods' },
{ table: 'bachecas', join: 'sectorbachecas' },
];
let ris = mydef;
@@ -8354,8 +8356,11 @@ export const tools = {
getdefaultnewrec_MyBacheca(extrarec: any): any {
return {
idSector: tools.getSelectionByTable('sectors', 0, true),
idSkill: tools.getSelectionByTable('skills', 0, true),
//idSector: tools.getSelectionByTable('sectors', 0, true),
//idSkill: tools.getSelectionByTable('skills', 0, true),
idSectorBacheca: tools.getSelectionByTable('sectorbachecas', 0),
idBacheca: tools.getSelectionByTable('bachecas', 0),
idStatusSkill: tools.getSelectionByTable('statusSkills', [
shared_consts.STATUSSKILL_DI_PERSONA,
]),
@@ -8881,20 +8886,17 @@ export const tools = {
getArrSector(table: string, rec: any) {
if (table === toolsext.TABMYGOODS) return rec.sectorGood;
else if (table === toolsext.TABMYBACHECAS || table === toolsext.TABMYSKILLS)
return rec.sector;
else if (table === toolsext.TABMYSKILLS) return rec.sector;
else if (table === toolsext.TABMYBACHECAS) return rec.sectorBacheca;
else if (table === toolsext.TABMYGROUPS) return [{ descr: rec.sector }];
else if (table === toolsext.TABMYHOSPS) return [];
},
getArrSubSector(table: string, rec: any) {
if (table === toolsext.TABMYGOODS) return rec.recGood;
else if (
table === toolsext.TABMYBACHECAS ||
table === toolsext.TABMYSKILLS ||
table === toolsext.TABATTIVITA
)
else if (table === toolsext.TABMYSKILLS || table === toolsext.TABATTIVITA)
return rec.recSkill;
else if (table === toolsext.TABMYBACHECAS) return rec.recSkill;
else if (table === toolsext.TABMYGROUPS) return [];
else if (table === toolsext.TABMYHOSPS) return [];
},
@@ -9575,7 +9577,7 @@ export const tools = {
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'goods',
lk_tab: toolsext.TABGOODS,
lk_LF: 'idGood',
lk_FF: '_id',
lk_as: 'recGood',
@@ -9583,7 +9585,7 @@ export const tools = {
lk_proj: shared_consts.getProjectForAll({}, table),
},
lookup3: {
lk_tab: 'sectorgoods',
lk_tab: toolsext.TABSECTORGOODS,
// lk_LF: 'recGood.idSectorGood',
lk_LF: 'idSectorGood',
lk_FF: '_id',
@@ -9617,19 +9619,18 @@ export const tools = {
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_tab: toolsext.TABBACHECAS,
lk_LF: 'idBacheca',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: shared_consts.getProjectForAll({}, table),
},
lookup3: {
lk_tab: toolsext.TABSECTORS,
// lk_LF: 'recSkill.idSector',
lk_LF: 'idSector',
lk_tab: toolsext.TABSECTORBACHECAS,
lk_LF: 'idSectorBacheca',
lk_FF: '_id',
lk_as: 'sector',
lk_as: 'sectorBacheca',
af_objId_tab: '',
},
lookup4: {
@@ -11479,6 +11480,10 @@ export const tools = {
return this.getIdApp() === this.IDAPP_MACRO;
},
getPreferenceById(id: number) {
return shared_consts.Preferences.find((p) => p.value === id);
},
// FINE !
// getLocale() {

View File

@@ -64,8 +64,10 @@ export const toolsext = {
TABMYGROUPS: 'mygroups',
TABSKILLS: 'skills',
TABGOODS: 'goods',
TABBACHECAS: 'bachecas',
TABSECTORS: 'sectors',
TABSECTORGOODS: 'sectorgoods',
TABSECTORBACHECAS: 'sectorbachecas',
TABREGIONS: 'regions',
TABCITIES: 'cities',
TABPROVINCE: 'provinces',

View File

@@ -148,7 +148,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
// subSkills: [],
statusSkills: [],
sectors: [],
bachecas: [],
sectorgoods: [],
sectorbachecas: [],
catgrps: [],
catAI: [],
queryAIList: [],
@@ -590,12 +592,14 @@ export const useGlobalStore = defineStore('GlobalStore', {
else if (table === 'adtypes') return state.adtypes;
else if (table === 'adtypegoods') return state.adtypegoods;
else if (table === 'skills') return state.skills;
else if (table === 'goods') return state.goods;
else if (table === toolsext.TABGOODS) return state.goods;
else if (table === toolsext.TABBACHECAS) return state.bachecas;
// else if (table === 'subskills')
// return state.subSkills
else if (table === 'statusSkills') return state.statusSkills;
else if (table === toolsext.TABSECTORS) return state.sectors;
else if (table === 'sectorgoods') return state.sectorgoods;
else if (table === toolsext.TABSECTORGOODS) return state.sectorgoods;
else if (table === toolsext.TABSECTORBACHECAS) return state.sectorbachecas;
else if (table === 'catgrps') return state.catgrps;
else if (table === 'schedeopt')
return Products.getSchedeOptByArrSchede(state.myschedas);
@@ -2196,10 +2200,11 @@ export const useGlobalStore = defineStore('GlobalStore', {
this.levels = res.data.levels ? [...res.data.levels] : [];
this.skills = res.data.skills ? [...res.data.skills] : [];
this.goods = res.data.goods ? [...res.data.goods] : [];
// this.subSkills = (res.data.subSkills) ? [...res.data.subSkills] : []
this.bachecas = res.data.bachecas ? [...res.data.bachecas] : [];
this.statusSkills = res.data.statusSkills ? [...res.data.statusSkills] : [];
this.sectors = res.data.sectors ? [...res.data.sectors] : [];
this.sectorgoods = res.data.sectorgoods ? [...res.data.sectorgoods] : [];
this.sectorbachecas = res.data.sectorbachecas ? [...res.data.sectorbachecas] : [];
this.provinces = res.data.provinces ? [...res.data.provinces] : [];
this.catgrps = res.data.catgrps ? [...res.data.catgrps] : [];
this.catAI = res.data.catAI ? [...res.data.catAI] : [];
@@ -2747,6 +2752,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
obj.idSectorGood = [];
} else if (table === shared_consts.TABLES_MYSKILLS) {
obj.idSector = [];
} else if (table === shared_consts.TABLES_MYBACHECAS) {
obj.idSectorBacheca = [];
}
if (table === 'cards') {