ver 1.1.20:

- corretto campo foto che non compariva più.
 - sistemato i campi aggiuntivi e i richiesti.
- migliorato la barra in alto di selezione.
- aggiunto alcune icone.
This commit is contained in:
Surya Paolo
2025-02-03 17:18:27 +01:00
parent 341b4b8ec7
commit 41d5f562ec
21 changed files with 292 additions and 298 deletions

View File

@@ -1,6 +1,6 @@
module.exports = {
list: [
{_id: 1, descr: 'Offro'},
{_id: 2, descr: 'Cerco'},
{_id: 1, descr: '🟢 Offro'},
{_id: 2, descr: '🔴 Cerco'},
],
};

View File

@@ -1,6 +1,6 @@
module.exports = {
list: [
{_id: 1, descr: 'Offro'},
{_id: 2, descr: 'Cerco'},
{_id: 1, descr: '🟢 Offro'},
{_id: 2, descr: '🔴 Cerco'},
],
};

View File

@@ -1,85 +1,82 @@
module.exports = {
list: [
{_id: 1, idSectorGood: [1], descr: 'Abbigliamento donna'},
{_id: 2, idSectorGood: [1], descr: 'Abbigliamento uomo'},
{_id: 3, idSectorGood: [1], descr: 'Accessori'},
{_id: 4, idSectorGood: [1], descr: 'Scarpe donna'},
{_id: 5, idSectorGood: [1], descr: 'Scarpe uomo'},
{_id: 6, idSectorGood: [2], descr: 'Bagno'},
{_id: 7, idSectorGood: [2], descr: 'Camera'},
{_id: 8, idSectorGood: [2], descr: 'Complementi d\'arredo'},
{_id: 9, idSectorGood: [2], descr: 'Cucina'},
{_id: 10, idSectorGood: [2], descr: 'Esterno'},
{_id: 11, idSectorGood: [2], descr: 'Soggiorno'},
{_id: 12, idSectorGood: [3], descr: 'Altri veicoli'},
{_id: 13, idSectorGood: [3], descr: 'Auto'},
{_id: 14, idSectorGood: [3], descr: 'Moto'},
{_id: 15, idSectorGood: [3], descr: 'Camper'},
{_id: 16, idSectorGood: [3], descr: 'Van (furgoni camperizzati)'},
{_id: 17, idSectorGood: [4], descr: 'Bigiotteria'},
{_id: 18, idSectorGood: [4], descr: 'Lavoretti'},
{_id: 19, idSectorGood: [4], descr: 'Altro'},
{_id: 20, idSectorGood: [5], descr: 'Accessori bellezza'},
{_id: 21, idSectorGood: [5], descr: 'Creme e detergenti'},
{_id: 22, idSectorGood: [5], descr: 'Trucchi e profumi'},
{_id: 23, idSectorGood: [6], descr: 'Giocattoli e giochi di società'},
{_id: 24, idSectorGood: [6], descr: 'Igiene e pannolini'},
{_id: 25, idSectorGood: [6], descr: 'Lettini e culle'},
{_id: 26, idSectorGood: [6], descr: 'Passeggini & co'},
{_id: 27, idSectorGood: [6], descr: 'Vestiti e scarpe'},
{_id: 28, idSectorGood: [7], descr: 'Bere'},
{_id: 29, idSectorGood: [7], descr: 'Mangiare'},
{_id: 30, idSectorGood: [8], descr: 'Antiquariato'},
{_id: 31, idSectorGood: [8], descr: 'Collezionismo'},
{_id: 32, idSectorGood: [9], descr: 'Altro'},
{_id: 33, idSectorGood: [9], descr: 'Cellulari e accessori'},
{_id: 34, idSectorGood: [9], descr: 'Computer e software'},
{_id: 35, idSectorGood: [9], descr: 'Elettrodomestici'},
{_id: 36, idSectorGood: [9], descr: 'Fotografia'},
{_id: 37, idSectorGood: [9], descr: 'Videogiochi e console'},
{_id: 38, idSectorGood: [10], descr: 'Console'},
{_id: 39, idSectorGood: [10], descr: 'Giochi di società'},
{_id: 40, idSectorGood: [10], descr: 'PC games'},
{_id: 41, idSectorGood: [11], descr: 'Attrezzatura'},
{_id: 42, idSectorGood: [11], descr: 'Materiali'},
{_id: 43, idSectorGood: [11], descr: 'Prodotti'},
{_id: 44, idSectorGood: [11], descr: 'Strumentazione'},
{_id: 45, idSectorGood: [12], descr: ' riviste e fumetti'},
{_id: 46, idSectorGood: [13], descr: 'CD e vinili'},
{_id: 47, idSectorGood: [13], descr: 'Film e DVD'},
{_id: 48, idSectorGood: [13], descr: 'Strumenti musicali'},
{_id: 49, idSectorGood: [14], descr: 'Arredamento'},
{_id: 50, idSectorGood: [14], descr: 'Attrezzature e accessori'},
{_id: 51, idSectorGood: [14], descr: 'Cancelleria e cartucce'},
{_id: 52, idSectorGood: [15], descr: 'Abbigliamento'},
{_id: 53, idSectorGood: [15], descr: 'Attrezzature e accessori Sport'},
{_id: 54, idSectorGood: [15], descr: 'Bici e accessori'},
{_id: 55, idSectorGood: [17], descr: 'Edilizia'},
{_id: 56, idSectorGood: [17], descr: 'Cucina'},
{_id: 57, idSectorGood: [17], descr: 'Modellismo'},
{_id: 58, idSectorGood: [17], descr: 'Cucito'},
{_id: 59, idSectorGood: [17], descr: 'Pulizia'},
{_id: 60, idSectorGood: [17], descr: 'Per Imbiancare'},
{_id: 61, idSectorGood: [17], descr: 'Giardinaggio'},
{_id: 62, idSectorGood: [17], descr: 'Falegnameria'},
{_id: 63, idSectorGood: [7], descr: 'Pane'},
{_id: 64, idSectorGood: [7], descr: 'Pasta'},
{_id: 65, idSectorGood: [7], descr: 'Formaggi'},
{_id: 66, idSectorGood: [7], descr: 'Olio'},
{_id: 67, idSectorGood: [7], descr: 'Fervida'},
{_id: 68, idSectorGood: [7], descr: 'Fermentati'},
{_id: 69, idSectorGood: [7], descr: 'Marmellate'},
{_id: 70, idSectorGood: [7], descr: 'Salse'},
{_id: 71, idSectorGood: [20], descr: 'Cereali'},
{_id: 72, idSectorGood: [20], descr: 'Frutta'},
{_id: 73, idSectorGood: [20], descr: 'Ortaggi'},
{_id: 74, idSectorGood: [20], descr: 'Zootecnia'},
{_id: 75, idSectorGood: [20], descr: 'Giardinaggio'},
{_id: 76, idSectorGood: [20], descr: 'Biologica'},
{_id: 77, idSectorGood: [20], descr: 'Permacultura'},
{_id: 78, idSectorGood: [20], descr: 'Sinergico'},
{_id: 79, idSectorGood: [20], descr: 'Tradizionale'},
{_id: 80, idSectorGood: [20], descr: 'Viticoltura'},
{_id: 81, idSectorGood: [20], descr: 'Acquacoltura'},
{ _id: 1, idSectorGood: [1], descr: 'Abbigliamento donna', icon: 'fas fa-tshirt', color: 'pink' },
{ _id: 2, idSectorGood: [1], descr: 'Abbigliamento uomo', icon: 'fas fa-tshirt', color: 'blue' },
{ _id: 3, idSectorGood: [1], descr: 'Accessori', icon: 'fas fa-glasses', color: 'purple' },
{ _id: 4, idSectorGood: [1], descr: 'Scarpe donna', icon: 'fas fa-shoe-prints', color: 'pink' },
{ _id: 5, idSectorGood: [1], descr: 'Scarpe uomo', icon: 'fas fa-shoe-prints', color: 'blue' },
{ _id: 6, idSectorGood: [2], descr: 'Bagno', icon: 'fas fa-bath', color: 'teal' },
{ _id: 7, idSectorGood: [2], descr: 'Camera', icon: 'fas fa-bed', color: 'indigo' },
{ _id: 8, idSectorGood: [2], descr: 'Complementi d\'arredo', icon: 'fas fa-couch', color: 'brown' },
{ _id: 9, idSectorGood: [2], descr: 'Cucina', icon: 'fas fa-utensils', color: 'orange' },
{ _id: 10, idSectorGood: [2], descr: 'Esterno', icon: 'fas fa-tree', color: 'green' },
{ _id: 11, idSectorGood: [2], descr: 'Soggiorno', icon: 'fas fa-tv', color: 'grey' },
{ _id: 12, idSectorGood: [3], descr: 'Altri veicoli', icon: 'fas fa-car', color: 'black' },
{ _id: 13, idSectorGood: [3], descr: 'Auto', icon: 'fas fa-car', color: 'red' },
{ _id: 14, idSectorGood: [3], descr: 'Moto', icon: 'fas fa-motorcycle', color: 'black' },
{ _id: 15, idSectorGood: [3], descr: 'Camper', icon: 'fas fa-caravan', color: 'orange' },
{ _id: 16, idSectorGood: [3], descr: 'Van (furgoni camperizzati)', icon: 'fas fa-truck', color: 'blue' },
{ _id: 17, idSectorGood: [4], descr: 'Bigiotteria', icon: 'fas fa-gem', color: 'gold' },
{ _id: 18, idSectorGood: [4], descr: 'Lavoretti', icon: 'fas fa-paint-brush', color: 'yellow' },
{ _id: 19, idSectorGood: [4], descr: 'Altro', icon: 'fas fa-question', color: 'grey' },
{ _id: 20, idSectorGood: [5], descr: 'Accessori bellezza', icon: 'fas fa-spa', color: 'pink' },
{ _id: 21, idSectorGood: [5], descr: 'Creme e detergenti', icon: 'fas fa-pump-soap', color: 'teal' },
{ _id: 22, idSectorGood: [5], descr: 'Trucchi e profumi', icon: 'fas fa-palette', color: 'purple' },
{ _id: 23, idSectorGood: [6], descr: 'Giocattoli e giochi di società', icon: 'fas fa-dice', color: 'yellow' },
{ _id: 24, idSectorGood: [6], descr: 'Igiene e pannolini', icon: 'fas fa-baby', color: 'pink' },
{ _id: 25, idSectorGood: [6], descr: 'Lettini e culle', icon: 'fas fa-baby-carriage', color: 'blue' },
{ _id: 26, idSectorGood: [6], descr: 'Passeggini & co', icon: 'fas fa-baby-carriage', color: 'green' },
{ _id: 27, idSectorGood: [6], descr: 'Vestiti e scarpe', icon: 'fas fa-socks', color: 'purple' },
{ _id: 28, idSectorGood: [7], descr: 'Bere', icon: 'fas fa-glass-cheers', color: 'red' },
{ _id: 29, idSectorGood: [7], descr: 'Mangiare', icon: 'fas fa-utensils', color: 'orange' },
{ _id: 30, idSectorGood: [8], descr: 'Antiquariato', icon: 'fas fa-history', color: 'brown' },
{ _id: 31, idSectorGood: [8], descr: 'Collezionismo', icon: 'fas fa-coins', color: 'gold' },
{ _id: 32, idSectorGood: [9], descr: 'Cellulari e accessori', icon: 'fas fa-mobile-alt', color: 'blue' },
{ _id: 33, idSectorGood: [9], descr: 'Computer e software', icon: 'fas fa-laptop', color: 'grey' },
{ _id: 34, idSectorGood: [9], descr: 'Elettrodomestici', icon: 'fas fa-blender', color: 'green' },
{ _id: 35, idSectorGood: [9], descr: 'Fotografia', icon: 'fas fa-camera', color: 'black' },
{ _id: 36, idSectorGood: [9], descr: 'Videogiochi e console', icon: 'fas fa-gamepad', color: 'purple' },
{ _id: 37, idSectorGood: [10], descr: 'Console', icon: 'fas fa-gamepad', color: 'black' },
{ _id: 38, idSectorGood: [10], descr: 'Giochi di società', icon: 'fas fa-dice', color: 'yellow' },
{ _id: 39, idSectorGood: [10], descr: 'PC games', icon: 'fas fa-desktop', color: 'blue' },
{ _id: 40, idSectorGood: [11], descr: 'Attrezzatura', icon: 'fas fa-tools', color: 'grey' },
{ _id: 41, idSectorGood: [11], descr: 'Materiali', icon: 'fas fa-box-open', color: 'brown' },
{ _id: 42, idSectorGood: [11], descr: 'Prodotti', icon: 'fas fa-box', color: 'green' },
{ _id: 43, idSectorGood: [11], descr: 'Strumentazione', icon: 'fas fa-toolbox', color: 'blue' },
{ _id: 44, idSectorGood: [12], descr: ' riviste e fumetti', icon: 'fas fa-book-open', color: 'red' },
{ _id: 45, idSectorGood: [13], descr: 'CD e vinili', icon: 'fas fa-compact-disc', color: 'black' },
{ _id: 46, idSectorGood: [13], descr: 'Film e DVD', icon: 'fas fa-film', color: 'blue' },
{ _id: 47, idSectorGood: [13], descr: 'Strumenti musicali', icon: 'fas fa-guitar', color: 'brown' },
{ _id: 48, idSectorGood: [14], descr: 'Arredamento', icon: 'fas fa-couch', color: 'brown' },
{ _id: 49, idSectorGood: [14], descr: 'Attrezzature e accessori', icon: 'fas fa-tools', color: 'grey' },
{ _id: 50, idSectorGood: [14], descr: 'Cancelleria e cartucce', icon: 'fas fa-print', color: 'blue' },
{ _id: 51, idSectorGood: [15], descr: 'Abbigliamento', icon: 'fas fa-tshirt', color: 'purple' },
{ _id: 52, idSectorGood: [15], descr: 'Attrezzature e accessori Sport', icon: 'fas fa-football-ball', color: 'green' },
{ _id: 53, idSectorGood: [15], descr: 'Bici e accessori', icon: 'fas fa-bicycle', color: 'blue' },
{ _id: 54, idSectorGood: [17], descr: 'Edilizia', icon: 'fas fa-hard-hat', color: 'orange' },
{ _id: 55, idSectorGood: [17], descr: 'Modellismo', icon: 'fas fa-puzzle-piece', color: 'yellow' },
{ _id: 56, idSectorGood: [17], descr: 'Cucito', icon: 'fas fa-cut', color: 'pink' },
{ _id: 57, idSectorGood: [17], descr: 'Pulizia', icon: 'fas fa-broom', color: 'green' },
{ _id: 58, idSectorGood: [17], descr: 'Per Imbiancare', icon: 'fas fa-paint-roller', color: 'white' },
{ _id: 59, idSectorGood: [17], descr: 'Giardinaggio', icon: 'fas fa-seedling', color: 'green' },
{ _id: 60, idSectorGood: [17], descr: 'Falegnameria', icon: 'fas fa-hammer', color: 'brown' },
{ _id: 61, idSectorGood: [7], descr: 'Pane', icon: 'fas fa-bread-slice', color: 'brown' },
{ _id: 62, idSectorGood: [7], descr: 'Pasta', icon: 'fas fa-utensils', color: 'yellow' },
{ _id: 63, idSectorGood: [7], descr: 'Formaggi', icon: 'fas fa-cheese', color: 'yellow' },
{ _id: 64, idSectorGood: [7], descr: 'Olio', icon: 'fas fa-oil-can', color: 'green' },
{ _id: 65, idSectorGood: [7], descr: 'Fervida', icon: 'fas fa-fire', color: 'red' },
{ _id: 66, idSectorGood: [7], descr: 'Fermentati', icon: 'fas fa-beer', color: 'brown' },
{ _id: 67, idSectorGood: [7], descr: 'Marmellate', icon: 'fas fa-jar', color: 'orange' },
{ _id: 68, idSectorGood: [7], descr: 'Salse', icon: 'fas fa-mortar-pestle', color: 'red' },
{ _id: 69, idSectorGood: [20], descr: 'Cereali', icon: 'fas fa-wheat', color: 'yellow' },
{ _id: 70, idSectorGood: [20], descr: 'Frutta', icon: 'fas fa-apple-alt', color: 'red' },
{ _id: 71, idSectorGood: [20], descr: 'Ortaggi', icon: 'fas fa-carrot', color: 'orange' },
{ _id: 72, idSectorGood: [20], descr: 'Zootecnia', icon: 'fas fa-paw', color: 'brown' },
{ _id: 73, idSectorGood: [20], descr: 'Biologica', icon: 'fas fa-leaf', color: 'green' },
{ _id: 74, idSectorGood: [20], descr: 'Permacultura', icon: 'fas fa-recycle', color: 'green' },
{ _id: 75, idSectorGood: [20], descr: 'Sinergico', icon: 'fas fa-handshake', color: 'green' },
{ _id: 76, idSectorGood: [20], descr: 'Tradizionale', icon: 'fas fa-tractor', color: 'brown' },
{ _id: 77, idSectorGood: [20], descr: 'Viticoltura', icon: 'fas fa-wine-glass-alt', color: 'purple' },
{ _id: 78, idSectorGood: [20], descr: 'Acquacoltura', icon: 'fas fa-fish', color: 'blue' },
],
};
};

View File

@@ -1,8 +1,8 @@
module.exports = {
list: [
{_id: 0, descr: '[Nessuno]', years_of_exp: 0},
{_id: 1, descr: 'Elementare', years_of_exp: 1},
{_id: 2, descr: 'Intermedio', years_of_exp: 2},
{_id: 3, descr: 'Avanzato', years_of_exp: 3},
{_id: 2, descr: 'Elementare', years_of_exp: 1},
{_id: 3, descr: 'Intermedio', years_of_exp: 2},
{_id: 4, descr: 'Avanzato', years_of_exp: 3},
],
};

View File

@@ -30,7 +30,7 @@ module.exports = {
},
async insertIntoDb_NoDuplicate(attiva, tablename, table, field) {
async insertIntoDb_NoDuplicate(attiva, tablename, table, field, field2) {
let numrec = 0;
let numupdated = 0;
try {
@@ -43,7 +43,10 @@ module.exports = {
if (mydbfile && mydbfile.list) {
for (const rec of mydbfile.list) {
let query = {};
query[field] = rec[field];
if (field)
query[field] = rec[field];
if (field2)
query[field2] = rec[field2];
if (rec.hasOwnProperty('_id')) {
query._id = rec._id;
@@ -57,6 +60,8 @@ module.exports = {
const existingDoc = await table.findOne(query);
if (!existingDoc) {
console.log('ADD: ' + query);
const { value: existingDoc, upserted } = await table.findOneAndUpdate(
query,
{ $set: rec },
@@ -71,8 +76,9 @@ module.exports = {
} else {
// Il documento esiste, lo aggiorniamo
await table.updateOne({ _id: existingDoc._id }, { $set: rec });
numupdated++;
const ris = await table.updateOne({ _id: existingDoc._id }, { $set: rec });
if (ris && ris.nModified > 0)
numupdated++;
}
} catch (e) {
console.log('Error processing record:', e);
@@ -172,8 +178,7 @@ module.exports = {
if (rec.table === 'contribtypes') {
attiva = scrivi_contribtype;
}
await this.insertIntoDb_NoDuplicate(attiva, rec.table, mytable, rec.key);
await this.insertIntoDb_NoDuplicate(attiva, rec.table, mytable, rec.key, rec.key2);
}
console.log('FINE - popolaTabelleNuove');

View File

@@ -8,7 +8,7 @@ module.exports = {
{_id: 6, descr: 'Bimbi', icon: 'fas fa-child', color: 'cyan-7'},
{_id: 7, descr: 'Cibo'},
{_id: 8, descr: 'Collezionismo e Antiquariato'},
{_id: 9, descr: 'Elettronica'},
{_id: 9, descr: 'Elettronica di Consumo'},
{_id: 10, descr: 'Giochi', icon: 'fas fa-gamepad', color: 'purple-7'},
{_id: 11, descr: 'Hobby', icon: 'fas fa-guitar', color: 'cyan-7'},
{_id: 12, descr: 'Libri', icon: 'fas fa-book', color: 'indigo-7'},
@@ -20,7 +20,6 @@ module.exports = {
{_id: 18, descr: 'Animali', icon: 'fas fa-paw', color: 'green-7'},
{_id: 19, descr: 'Arte / Decorazioni', icon: 'fas fa-palette', color: 'purple-7'},
{_id: 20, descr: 'Agricoltura', icon: 'fas fa-seedling', color: 'green-7'},
{_id: 21, descr: 'Elettrodomestici', icon: 'fas fa-blender', color: 'green-7'},
],
};

View File

@@ -1,3 +1,27 @@
/*
module.exports = {
list: [
{ _id: 2, descr: 'Agricoltura', icon: 'fas fa-tractor', color: '#4CAF50' },
{ _id: 3, descr: 'Cibo e Ristorazione', icon: 'fas fa-utensils', color: '#FF9800' },
{ _id: 4, descr: 'Animali', icon: 'fas fa-paw', color: '#795548' },
{ _id: 5, descr: 'Auto e Veicoli', icon: 'fas fa-car', color: '#607D8B' },
{ _id: 6, descr: 'Salute e Benessere', icon: 'fas fa-heartbeat', color: '#E91E63' },
{ _id: 7, descr: 'Casa e Arredamento', icon: 'fas fa-home', color: '#9C27B0' },
{ _id: 8, descr: 'Attività Ricreative e di Intrattenim.', icon: 'fas fa-gamepad', color: '#FF5722' },
{ _id: 13, descr: 'Tecnologie', icon: 'fas fa-microchip', color: '#2196F3' },
{ _id: 15, descr: 'Artigianato', icon: 'fas fa-hammer', color: '#FFC107' },
{ _id: 16, descr: 'Arte e Cultura', icon: 'fas fa-palette', color: '#3F51B5' },
{ _id: 17, descr: 'Assistenza e Integrazione', icon: 'fas fa-hands-helping', color: '#00BCD4' },
{ _id: 18, descr: 'Attività fisica e sportiva', icon: 'fas fa-running', color: '#8BC34A' },
{ _id: 20, descr: 'Bambini', icon: 'fas fa-baby', color: '#FFEB3B' },
{ _id: 21, descr: 'Consulenza e Supporto Professionale', icon: 'fas fa-briefcase', color: '#9E9E9E' },
{ _id: 22, descr: 'Formazione e crescita personale', icon: 'fas fa-graduation-cap', color: '#673AB7' },
{ _id: 23, descr: 'Manutenzione e riparazione', icon: 'fas fa-wrench', color: '#F44336' },
{ _id: 24, descr: 'Mobilità e Trasporti', icon: 'fas fa-bus', color: '#009688' },
],
};
*/
module.exports = {
list: [
{_id: 1, descr: 'Abitare'},
@@ -14,4 +38,4 @@ module.exports = {
{_id: 13, descr: 'Tecnologie'},
{_id: 14, descr: 'Servizi'},
],
};
};

View File

@@ -1,6 +1,6 @@
module.exports = {
list: [
{_id: 1, descr: 'Di Persona', icon:'fas fa-people-carry', color:'green-8' },
{_id: 2, descr: 'On Line', icon:'fas fa-desktop', color: 'indigo-7'},
{_id: 1, descr: '👤 Di Persona', icon:'fas fa-people-carry', color:'green-8' },
{_id: 2, descr: '💻 On Line', icon:'fas fa-desktop', color: 'indigo-7'},
],
};