diff --git a/.env.development b/.env.development
index c795895c..049804c3 100755
--- a/.env.development
+++ b/.env.development
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="19"
DIRECTORY_LOCAL="newfreeplanet"
diff --git a/.env.example.production b/.env.example.production
index 15dcc7d2..4e635c6f 100755
--- a/.env.example.production
+++ b/.env.example.production
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.prod.gruppomacro b/.env.prod.gruppomacro
index e27f7093..38f53e00 100644
--- a/.env.prod.gruppomacro
+++ b/.env.prod.gruppomacro
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="18"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.prod.pcb b/.env.prod.pcb
index 73e17601..23d86b0a 100644
--- a/.env.prod.pcb
+++ b/.env.prod.pcb
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="17"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.test.abitaregliiblei.it b/.env.test.abitaregliiblei.it
index b4358573..3e943947 100755
--- a/.env.test.abitaregliiblei.it
+++ b/.env.test.abitaregliiblei.it
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="19"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.test.gruppomacro b/.env.test.gruppomacro
index 7456718b..d727b003 100755
--- a/.env.test.gruppomacro
+++ b/.env.test.gruppomacro
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="18"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.test.pcb b/.env.test.pcb
index 8d1cef84..6171ff04 100755
--- a/.env.test.pcb
+++ b/.env.test.pcb
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="17"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.test.risosrv b/.env.test.risosrv
index 0ff00b91..ce449ef5 100755
--- a/.env.test.risosrv
+++ b/.env.test.risosrv
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker_1.0.39.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.test2 b/.env.test2
index a28cd203..36cf7593 100755
--- a/.env.test2
+++ b/.env.test2
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/.env.test_riso.pcb b/.env.test_riso.pcb
index 40281573..56effc0f 100755
--- a/.env.test_riso.pcb
+++ b/.env.test_riso.pcb
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/_ALL_SITES/abitaregliiblei.it/.env.development b/_ALL_SITES/abitaregliiblei.it/.env.development
index 32164efe..5ee33ed3 100755
--- a/_ALL_SITES/abitaregliiblei.it/.env.development
+++ b/_ALL_SITES/abitaregliiblei.it/.env.development
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="19"
DIRECTORY_LOCAL="newfreeplanet"
diff --git a/_ALL_SITES/abitaregliiblei.it/.env.test b/_ALL_SITES/abitaregliiblei.it/.env.test
index b6b6174a..96bfd83b 100755
--- a/_ALL_SITES/abitaregliiblei.it/.env.test
+++ b/_ALL_SITES/abitaregliiblei.it/.env.test
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="16"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/_ALL_SITES/abitaregliiblei.it/package.json b/_ALL_SITES/abitaregliiblei.it/package.json
index dd5d1f6f..0a2a682b 100755
--- a/_ALL_SITES/abitaregliiblei.it/package.json
+++ b/_ALL_SITES/abitaregliiblei.it/package.json
@@ -1,6 +1,6 @@
{
"name": "abitaregliiblei",
- "version": "1.0.58",
+ "version": "1.0.60",
"description": "Abitare Gli Iblei",
"productName": "AbitareGliIblei",
"author": "Paolo Arena",
diff --git a/_ALL_SITES/fioredellavita.riso.app/.env.development b/_ALL_SITES/fioredellavita.riso.app/.env.development
index 3f2aff46..5c994fe2 100755
--- a/_ALL_SITES/fioredellavita.riso.app/.env.development
+++ b/_ALL_SITES/fioredellavita.riso.app/.env.development
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="15"
DIRECTORY_LOCAL="newfreeplanet"
diff --git a/_ALL_SITES/fioredellavita.riso.app/.env.test b/_ALL_SITES/fioredellavita.riso.app/.env.test
index 6db17ee6..0a31193a 100755
--- a/_ALL_SITES/fioredellavita.riso.app/.env.test
+++ b/_ALL_SITES/fioredellavita.riso.app/.env.test
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="15"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/_ALL_SITES/fioredellavita.riso.app/package.json b/_ALL_SITES/fioredellavita.riso.app/package.json
index f4832b1c..93c11f9f 100755
--- a/_ALL_SITES/fioredellavita.riso.app/package.json
+++ b/_ALL_SITES/fioredellavita.riso.app/package.json
@@ -1,6 +1,6 @@
{
"name": "fioredellavita",
- "version": "1.0.58",
+ "version": "1.0.60",
"description": "Fiore Della Vita",
"productName": "Fiore Della Vita",
"author": "Paolo Arena",
diff --git a/_ALL_SITES/gruppomacro.app/.env.development b/_ALL_SITES/gruppomacro.app/.env.development
index 45b0cc2e..68c79c93 100755
--- a/_ALL_SITES/gruppomacro.app/.env.development
+++ b/_ALL_SITES/gruppomacro.app/.env.development
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="18"
DIRECTORY_LOCAL="newfreeplanet"
diff --git a/_ALL_SITES/gruppomacro.app/.env.test b/_ALL_SITES/gruppomacro.app/.env.test
index 2a56f042..6d58d486 100755
--- a/_ALL_SITES/gruppomacro.app/.env.test
+++ b/_ALL_SITES/gruppomacro.app/.env.test
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="16"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/_ALL_SITES/gruppomacro.app/package.json b/_ALL_SITES/gruppomacro.app/package.json
index bdb37d57..ced3dbde 100755
--- a/_ALL_SITES/gruppomacro.app/package.json
+++ b/_ALL_SITES/gruppomacro.app/package.json
@@ -1,6 +1,6 @@
{
"name": "gruppomacro",
- "version": "1.0.58",
+ "version": "1.0.60",
"description": "GruppoMacro",
"productName": "Gruppo Macro",
"author": "Paolo Arena",
diff --git a/_ALL_SITES/piuchebuono.app/.env.development b/_ALL_SITES/piuchebuono.app/.env.development
index aa3e8e35..0af3f7c9 100755
--- a/_ALL_SITES/piuchebuono.app/.env.development
+++ b/_ALL_SITES/piuchebuono.app/.env.development
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="17"
DIRECTORY_LOCAL="newfreeplanet"
diff --git a/_ALL_SITES/piuchebuono.app/.env.test b/_ALL_SITES/piuchebuono.app/.env.test
index 14e936fd..b3868cc7 100755
--- a/_ALL_SITES/piuchebuono.app/.env.test
+++ b/_ALL_SITES/piuchebuono.app/.env.test
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/_ALL_SITES/riso.app/.env.development b/_ALL_SITES/riso.app/.env.development
index fd5d5b9b..a5ca0056 100755
--- a/_ALL_SITES/riso.app/.env.development
+++ b/_ALL_SITES/riso.app/.env.development
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet"
diff --git a/_ALL_SITES/riso.app/.env.production b/_ALL_SITES/riso.app/.env.production
index a8296a72..c981ff3e 100644
--- a/_ALL_SITES/riso.app/.env.production
+++ b/_ALL_SITES/riso.app/.env.production
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/_ALL_SITES/riso.app/.env.test b/_ALL_SITES/riso.app/.env.test
index 2a56f042..6d58d486 100755
--- a/_ALL_SITES/riso.app/.env.test
+++ b/_ALL_SITES/riso.app/.env.test
@@ -1,4 +1,4 @@
-APP_VERSION="1.0.58"
+APP_VERSION="1.0.60"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="16"
DIRECTORY_LOCAL=newfreeplanet
diff --git a/_ALL_SITES/riso.app/package.json b/_ALL_SITES/riso.app/package.json
index 12d901fa..74122275 100755
--- a/_ALL_SITES/riso.app/package.json
+++ b/_ALL_SITES/riso.app/package.json
@@ -1,6 +1,6 @@
{
"name": "riso",
- "version": "1.0.58",
+ "version": "1.0.60",
"description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.",
"productName": "Riso",
"author": "Paolo Arena",
diff --git a/deploy_on_prod_gruppomacro.app.sh b/deploy_on_prod_gruppomacro.app.sh
index 04a45f0c..b2bca3df 100755
--- a/deploy_on_prod_gruppomacro.app.sh
+++ b/deploy_on_prod_gruppomacro.app.sh
@@ -20,7 +20,8 @@ if [[ $risposta == "Y" || $risposta == "y" ]]; then
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
rsync -e 'ssh -p 8822' -a dist/pwa/ pcbuser@pcb:$SERVERDIR_WEBSITE
- rsync -e 'ssh -p 8822' -av --delete dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
+ #rsync -e 'ssh -p 8822' -av --delete dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
+ rsync -e 'ssh -p 8822' -a dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
echo "Finito $SERVERDIR_WEBSITE "
diff --git a/deploy_on_production.sh b/deploy_on_production.sh
index 253c251b..86fe84c3 100755
--- a/deploy_on_production.sh
+++ b/deploy_on_production.sh
@@ -20,7 +20,8 @@ if [[ $risposta == "Y" || $risposta == "y" ]]; then
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a --exclude 'upload' dist/pwa/ suryapaolo@servereng:/var/www/$SERVERDIR_WEBSITE/
- rsync -e 'ssh -p 8855' -av --delete dist/pwa/js/ suryapaolo@servereng:/var/www/$SERVERDIR_WEBSITE/js
+ #rsync -e 'ssh -p 8855' -av --delete dist/pwa/js/ suryapaolo@servereng:/var/www/$SERVERDIR_WEBSITE/js
+ rsync -e 'ssh -p 8855' -a dist/pwa/js/ suryapaolo@servereng:/var/www/$SERVERDIR_WEBSITE/js
echo "Finito $SERVERDIR_WEBSITE "
fi
diff --git a/deploy_on_test_abitaregliiblei.it.sh b/deploy_on_test_abitaregliiblei.it.sh
index 4f38b8f5..6c68e145 100755
--- a/deploy_on_test_abitaregliiblei.it.sh
+++ b/deploy_on_test_abitaregliiblei.it.sh
@@ -19,7 +19,8 @@ npm run buildpwa
echo "Sincronizzazione $SERVERDIR_WEBSITE in remoto..."
rsync -e 'ssh -p 8822' -a dist/pwa/ pcbuser@pcb:$SERVERDIR_WEBSITE
-rsync -e 'ssh -p 8822' -av --delete dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
+#rsync -e 'ssh -p 8822' -av --delete dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
+rsync -e 'ssh -p 8822' -a dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
cp .env.prod.bak .env.production
diff --git a/deploy_riso_on_pcb_server.sh b/deploy_riso_on_pcb_server.sh
index a4e66947..161fc6a2 100755
--- a/deploy_riso_on_pcb_server.sh
+++ b/deploy_riso_on_pcb_server.sh
@@ -19,7 +19,7 @@ npm run buildpwa
echo "Sincronizzazione $SERVERDIR_WEBSITE in remoto..."
rsync -e 'ssh -p 8822' -a dist/pwa/ pcbuser@pcb:$SERVERDIR_WEBSITE
-rsync -e 'ssh -p 8822' -av --delete dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
+rsync -e 'ssh -p 8822' -a dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
cp .env.prod.bak .env.production
diff --git a/deploy_risosrv_on_test_server.sh b/deploy_risosrv_on_test_server.sh
index ded8c4c7..29cf12aa 100755
--- a/deploy_risosrv_on_test_server.sh
+++ b/deploy_risosrv_on_test_server.sh
@@ -19,7 +19,7 @@ npm run buildpwa
echo "Sincronizzazione $SERVERDIR_WEBSITE in remoto..."
rsync -e 'ssh -p 8822' -a dist/pwa/ pcbuser@pcb:$SERVERDIR_WEBSITE
-rsync -e 'ssh -p 8822' -av --delete dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
+rsync -e 'ssh -p 8822' -a dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
cp .env.prod.bak .env.production
diff --git a/package.json b/package.json
index d670ea5b..605099bf 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "abitaregliiblei",
- "version": "1.0.58",
+ "version": "1.0.60",
"description": "Abitare Gli Iblei",
"productName": "AbitareGliIblei",
"author": "Paolo Arena",
diff --git a/src-pwa/custom-service-worker.js b/src-pwa/custom-service-worker.js
index 7b564fff..5f0153cb 100755
--- a/src-pwa/custom-service-worker.js
+++ b/src-pwa/custom-service-worker.js
@@ -34,7 +34,7 @@ self.addEventListener('activate', (event) => {
});
-const VersioneApp = "1.0.58";
+const VersioneApp = "1.0.60";
console.log(' [ VER-' + VersioneApp + ' ] _---------________------ PAO: this is my custom service worker');
diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts
index 82a5d5ef..500008cc 100755
--- a/src/common/shared_vuejs.ts
+++ b/src/common/shared_vuejs.ts
@@ -295,10 +295,10 @@ export const shared_consts = {
// Condivise
TABLES_FAVORITE_BOOKMARK: ['myskills', 'mygoods', 'mybachecas', 'myhosps', 'attivitas'],
-
+
// Solo per VUE.JS
-
+
TABLES_INSERT_ALMOST_ONE_TO_ENABLE_CIRCUIT: ['myskills', 'myhosps', 'mygoods'],
TABLES_WITH_FILTER_FIELD: ['caldate'],
@@ -1139,7 +1139,7 @@ export const shared_consts = {
OrderStat: {
// IN_CART: { label: 'In Carrello', value: 1 }, //IN_CART
IN_CORSO: { label: 'In Corso', value: 2, icon: 'fas fa-tasks', color: 'text-black' }, //CHECKOUT_SENT
- PREPARED: { label: 'Preparati', value: 15, icon: 'fas fa-archive', color: 'text-orange' },
+ PREPARED: { label: 'Preparati', value: 15, icon: 'fas fa-archive', color: 'text-orange' },
CONFERMATI: { label: 'Confermati', value: 3, icon: 'fas fa-calendar', color: 'text-blue' }, //ORDER_CONFIRMED
PAGATI: { label: 'Pagati', value: 4, icon: 'money', color: 'text-green' }, //PAYED
DELIVERED: { label: 'Consegnato', value: 5, icon: 'fas fa-calendar', color: 'text-blue' }, //DELIVERED
@@ -1788,18 +1788,20 @@ export const shared_consts = {
{
value: 20,
label: 'Testo',
+ icon: 'fas fa-file-alt',
},
{
value: 35,
label: 'Immagine',
+ icon: '',
},
{
value: 7,
- label: 'Scheda (1 Immagine e Testo)',
+ label: 'Scheda (IMG + Testo)',
},
{
value: 9,
- label: 'Poster (1 Immagine + Testo)',
+ label: 'Poster (IMG + Testo)',
},
{
value: 195,
@@ -2038,7 +2040,7 @@ export const shared_consts = {
idSkill: 1,
idCity: 1,
logo: 1,
- photos: 1,
+ photos: 1,
note: 1,
descr: 1,
website: 1,
@@ -2053,7 +2055,7 @@ export const shared_consts = {
createdBy: 1,
//**ADDFIELD_ATTIVITA
};
-
+
} else if (table === this.TABLES_MYBACHECAS) {
proj = {
recSkill: 1,
@@ -2187,9 +2189,9 @@ export const shared_consts = {
EPUB: 105,
MOBI: 106,
PDF: 107,
- STREAMING: 108,
+ STREAMING: 108,
},
-
+
VERSIONI_PRODOTTO: [
{
label: '[Nessuno]',
@@ -2218,7 +2220,7 @@ export const shared_consts = {
},
{
label: 'EPUB',
- value: 105,
+ value: 105,
color: 'orange',
},
{
@@ -2236,8 +2238,8 @@ export const shared_consts = {
value: 108,
color: 'red',
},
-
- ],
+
+ ],
}
diff --git a/src/components/CBarSelection/CBarSelection.vue b/src/components/CBarSelection/CBarSelection.vue
index a15ffb8e..08b0605e 100755
--- a/src/components/CBarSelection/CBarSelection.vue
+++ b/src/components/CBarSelection/CBarSelection.vue
@@ -25,7 +25,7 @@
/>
-
+
-
+
+
percrange_ne_lat && precboundariesMap.value.ne.lng > percrange_ne_lng &&
precboundariesMap.value.sw.lat < percrange_sw_lat && precboundariesMap.value.sw.lng < percrange_sw_lng) {
- updatedata = false
- // console.log('updateMapBoundaries', 'updatedata', updatedata)
- } else {
+ updatedata = false
+ // console.log('updateMapBoundaries', 'updatedata', updatedata)
+ } else {
// updatedata = false
}
}
@@ -2488,12 +2488,12 @@ export default defineComponent({
if (autoaggiornaMappaSeMuovi.value) {
doSearch()
} else {
-
+
}
-
+
}
}
-
+
}
function updateMapZoomOut() {
@@ -2510,11 +2510,11 @@ export default defineComponent({
function getLabelAreaMap(conHtml: boolean = true) {
if (showMap.value) {
if (conHtml) {
- return '' + translate('grid.intheareamap') + ''
+ return '' + translate('grid.intheareamap') + ''
} else {
return translate('grid.intheareamap')
}
-
+
}
return ''
@@ -2524,14 +2524,14 @@ export default defineComponent({
myMapComp.value.gotoCurrentLocation()
}
- function showInMap(rec: any) {
- visupagedialog.value = false
+ function showInMap(rec: any) {
+ visupagedialog.value = false
if (!showMap.value) {
showMapAtLeast1.value = true
- showMap.value = true
+ showMap.value = true
}
-
+
if (myMapComp.value && mapInitialized.value) {
myMapComp.value.showInMap(rec)
}
diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue
index 324bb149..6ae196c6 100755
--- a/src/components/CGridTableRec/CGridTableRec.vue
+++ b/src/components/CGridTableRec/CGridTableRec.vue
@@ -15,7 +15,6 @@
style="text-align: center"
>
-
+
rec.table === 'sectors')
if (recSector) {
- tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table + costanti.FILTER_SEP + recSector.value, newval)
+ tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table + costanti.FILTER_SEP + recSector.value, newval)
}
} else if (table === toolsext.TABSECTORS) {
setCategBySector(shared_consts.TABLES_MYSKILLS, table, newval)
@@ -1424,6 +1424,7 @@ export default defineComponent({
return pagination.value.rowsNumber
}
+
function createNewRecordDialog() {
const mydata: any = {
diff --git a/src/components/CGridTableUser/CGridTableUser.vue b/src/components/CGridTableUser/CGridTableUser.vue
index 2b676b06..e4cdb79e 100755
--- a/src/components/CGridTableUser/CGridTableUser.vue
+++ b/src/components/CGridTableUser/CGridTableUser.vue
@@ -162,7 +162,9 @@
{{
tools.isEntrataByRecMov(row)
? t('movement.movin')
- : (tools.isUscitaByRecMov(row) ? t('movement.movout') : '')
+ : tools.isUscitaByRecMov(row)
+ ? t('movement.movout')
+ : ''
}}
diff --git a/src/components/CMapByTable/CMapByTable.ts b/src/components/CMapByTable/CMapByTable.ts
index 59969230..93482b43 100755
--- a/src/components/CMapByTable/CMapByTable.ts
+++ b/src/components/CMapByTable/CMapByTable.ts
@@ -496,7 +496,7 @@ export default defineComponent({
{ icon: currentLocationIcon }
).addTo(map.value)
.bindPopup('Posizione attuale')
- // .openPopup();
+ // .openPopup();
isTrackingLocation.value = false; // Resetta lo stato di tracciamento
@@ -567,7 +567,7 @@ export default defineComponent({
//console.log('openPopup markerShowed', markerShowed.value)
if (markerShowed.value.closePopup) {
markerShowed.value.openPopup(); // Mostra il popup
- }
+ }
}
});
}
diff --git a/src/components/CMyEditElem/CMyEditElem.scss b/src/components/CMyEditElem/CMyEditElem.scss
index b01a253d..07b9f50f 100755
--- a/src/components/CMyEditElem/CMyEditElem.scss
+++ b/src/components/CMyEditElem/CMyEditElem.scss
@@ -1,4 +1,3 @@
-
.testo-banda {
//background: -webkit-gradient(linear, left top, left bottom, from(#3144f0), to(transparent));
//background: linear-gradient(180deg, #3144f0, transparent);
@@ -23,15 +22,14 @@ h4 {
visibility: hidden;
}
-.landing {
-}
+.landing {}
.landing_background {
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
background-size: cover
}
-.landing > section {
+.landing>section {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
@@ -74,21 +72,21 @@ h4 {
font-size: 1rem;
}
-.landing > section.padding {
+.landing>section.padding {
padding: 5.62rem 1rem;
}
-.landing > section.padding_testo {
+.landing>section.padding_testo {
padding-top: 1.25rem;
padding-bottom: 1rem;
}
-.landing > section.padding_gallery {
+.landing>section.padding_gallery {
padding-top: 3.125rem;
padding-bottom: 5.625rem;
}
-.landing > section > div {
+.landing>section>div {
position: relative;
width: 100%
}
@@ -144,7 +142,8 @@ h4 {
text-shadow: .25rem .25rem .5rem $grayshadow;
}
-.landing__features h4, .landing__features h6 {
+.landing__features h4,
+.landing__features h6 {
margin: 1rem 0
}
@@ -252,7 +251,8 @@ body.mobile .landing:before {
text-shadow: 0.125rem 0.125rem 0.25rem $grayshadow;
}
-.text-h1, h1 {
+.text-h1,
+h1 {
font-size: 3rem;
font-weight: bold;
line-height: 3rem;
@@ -341,42 +341,47 @@ body.mobile .landing:before {
.landing__hero {
text-align: center
}
+
.landing__header {
height: 7vh
}
+
.clgutter {
margin-top: 0;
padding: 0;
}
- .landing__hero .text-h1, h1 {
+
+ .landing__hero .text-h1,
+ h1 {
font-size: 2rem;
line-height: 2.05rem;
margin-bottom: 1.25rem
}
- .landing > section.padding {
+ .landing>section.padding {
padding: 2.5rem 1rem;
}
- .landing > section.padding_testo {
+ .landing>section.padding_testo {
padding-top: 1.25rem;
padding-bottom: 1rem;
}
- .landing > section.padding_gallery {
+ .landing>section.padding_gallery {
padding-top: 3.125rem;
padding-bottom: 5.625rem;
max-width: 800px;
}
- .landing > section.padding_gallery > div {
+ .landing>section.padding_gallery>div {
padding-top: 3.125rem;
padding-bottom: 5.625rem;
}
- .landing__features h4, .landing__features h6 {
+ .landing__features h4,
+ .landing__features h6 {
margin: 1.25rem 0
}
@@ -389,12 +394,15 @@ body.mobile .landing:before {
text-align: center;
margin-top: 1.25rem;
}
+
.landing__hero-content {
padding-bottom: 11.25rem;
}
+
.landing__hero2-content {
padding-bottom: 7.25rem;
}
+
.landing__hero-btns {
-webkit-box-pack: center;
-ms-flex-pack: center;
@@ -408,6 +416,7 @@ body.mobile .landing:before {
.text-subtitle1 {
font-size: 1.25rem;
}
+
.text-vers {
font-size: 0.6rem;
}
@@ -480,3 +489,12 @@ body.mobile .landing:before {
justify-content: space-between;
background-color: green;
}
+
+
+.uniform-button {
+ height: 40px;
+ /* Altezza fissa per tutti i bottoni */
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
\ No newline at end of file
diff --git a/src/components/CMyEditElem/CMyEditElem.ts b/src/components/CMyEditElem/CMyEditElem.ts
index dd899fa4..64f5cebe 100755
--- a/src/components/CMyEditElem/CMyEditElem.ts
+++ b/src/components/CMyEditElem/CMyEditElem.ts
@@ -1,5 +1,5 @@
import {
- defineComponent, onMounted, PropType, ref, toRef, watch,
+ defineComponent, onMounted, PropType, computed, ref, toRef, watch,
} from 'vue'
import { IElemText, IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IOperators } from '@src/model'
@@ -39,7 +39,7 @@ export default defineComponent({
CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro, CMyEditor, CMyFieldRec,
CSelectColor, CSelectFontSize, CSelectImage, CImgPoster, CSelectAnimation
},
- emits: ['saveElem', 'selElemClick'],
+ emits: ['saveElem', 'selElemClick', 'toggleSize', 'deleteElem'],
props: {
myelem: {
type: Object as PropType,
@@ -90,6 +90,7 @@ export default defineComponent({
const myel = toRef(props, 'myelem')
const newtype = ref('')
const visuadd = ref(false)
+ const direzadd = ref(1)
watch(() => myel.value.order, (value, oldval) => {
mounted()
@@ -108,29 +109,69 @@ export default defineComponent({
// OK
disableSave.value = true
emit('saveElem', myelem)
+
if (exit)
elemChanged.value = false
}
})
}
- function addNewElem(order?: number) {
+ function getNewOrderByThisElem() {
+ let myelem = props.myelem
+ let neword = 0
+ if (myelem) {
+ neword = myelem.order!
+ const recfound = globalStore.getMyElemNextThisElemId(props.path, myelem._id!)
+
+ if (recfound) {
+ neword = Math.round((recfound.order! + myelem.order!) / 2)
+ }
+ }
+ return neword
+ }
+
+ async function addNewElem(elemsel: any, direz: number) {
visuadd.value = false
- let newrec = globalStore.prepareAddNewElem(order, $q, t, props.myelem, newtype.value)
+ let neword = 0
+
+ let recfound = null
+
+ if (direz === -1) { // Sopra
+ // ottieni l'elemento precedente, mantenendo l'ordinamento
+ recfound = globalStore.getMyElemPrecThisElemId(props.path, elemsel._id)
+ } else if (direz === 1) { // Sotto
+ // ottieni l'elemento precedente, mantenendo l'ordinamento
+ recfound = globalStore.getMyElemNextThisElemId(props.path, elemsel._id)
+ }
+
+ if (recfound) {
+ // get the middle of the order number between thie 2 elements
+ neword = Math.round((recfound.order + elemsel.order) / 2)
+ }
+
+ let newrec = await globalStore.prepareAddNewElem(neword, $q, t, props.myelem, newtype.value)
emit('selElemClick', newrec)
+
+ // emit('updateAll', newrec)
}
- function dupElem(order?: number) {
+ async function dupElem(order?: number) {
- const newrec = props.myelem
+ const newrec: IMyElem = { ...props.myelem }
newrec._id = undefined
- newrec.order = order ? order : newrec.order! + 10
+ newrec.order = getNewOrderByThisElem()
+ if (newrec.type === shared_consts.ELEMTYPE.HTML) {
+ newrec.containerHtml = 'Copia di ' + newrec.containerHtml
+ }
+
+ const mynewelem = await globalStore.addNewElem($q, t, newrec)
+
+ emit('selElemClick', mynewelem)
- globalStore.addNewElem($q, t, newrec)
}
function delElem() {
@@ -151,6 +192,7 @@ export default defineComponent({
if (ris) {
// OK
disableSave.value = true
+ emit('deleteElem', props.myelem)
}
})
})
@@ -292,6 +334,73 @@ export default defineComponent({
modifElem()
}
+ function toggleSize() {
+ emit('toggleSize', null)
+ }
+
+ const orderOptions = computed(() => {
+ const options = []
+
+ for (let i = 0; i <= 100; i += 1) {
+ options.push({ label: i.toString(), value: i });
+ }
+
+ for (let i = 100; i <= 1000; i += 10) {
+ options.push({ label: i.toString(), value: i });
+ }
+
+ return options;
+ });
+
+ function addOrder(rec: any) {
+ neworder.value = rec
+ }
+
+ async function moveElem(direz: any) {
+ let myelem = props.myelem
+
+ const elemprec = globalStore.getMyElemPrecThisElemId(props.path, myelem._id)
+ const elemnext = globalStore.getMyElemNextThisElemId(props.path, myelem._id!)
+
+ let neworder = 0
+ let oldorder = myelem.order!
+
+ if (direz === -1) {
+ // UP
+ neworder = elemprec.order!
+ elemprec.order = oldorder
+
+ if (oldorder === elemprec.order!) {
+ const elemprec2 = globalStore.getMyElemPrecThisElemId(props.path, elemprec._id!)
+
+ neworder = (elemprec2.order! + elemprec.order) / 2
+ elemprec.order = Math.round((oldorder + neworder) / 2)
+ }
+
+ await globalStore.saveMyElem($q, t, elemprec)
+ emit('saveElem', elemprec)
+ } else if (direz === 1) {
+ // DOWN
+ neworder = elemnext.order!
+ elemnext.order = oldorder
+
+ if (oldorder === elemnext.order!) {
+ const elemnext2 = globalStore.getMyElemNextThisElemId(props.path, elemnext._id!)
+
+ neworder = (elemnext2.order! + elemnext.order) / 2
+ elemnext.order = Math.round((oldorder + neworder) / 2)
+ }
+
+
+ await globalStore.saveMyElem($q, t, elemnext)
+ emit('saveElem', elemnext)
+ }
+
+ myelem.order = neworder
+ await globalStore.saveMyElem($q, t, myelem)
+ emit('saveElem', myelem)
+ }
+
onMounted(mounted)
return {
@@ -334,6 +443,11 @@ export default defineComponent({
Products,
generateSizeOptions,
updateSizeWidth,
+ direzadd,
+ toggleSize,
+ orderOptions,
+ addOrder,
+ moveElem,
}
},
diff --git a/src/components/CMyEditElem/CMyEditElem.vue b/src/components/CMyEditElem/CMyEditElem.vue
index 9ee2eb1b..d22fefd6 100755
--- a/src/components/CMyEditElem/CMyEditElem.vue
+++ b/src/components/CMyEditElem/CMyEditElem.vue
@@ -8,54 +8,66 @@
"
>
-
+
+
+
+
-
-
-
+
-
-
@@ -83,449 +95,247 @@
-->
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- Card {{ ind + 1 }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- Elem {{ ind + 1 }}
+ Card {{ ind + 1 }}
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Elem {{ ind + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Cataloghi:
-
-
-
-
-
-
-
-
-
-
- Versione PDF:
-
-
+
-
+
+
+
+
+
+
+
+
Cataloghi:
+
+
+
+
+
+
+
+
+
+
+ Versione PDF:
+
+
+
+
+
-
+
Aggiungi Elemento:
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/components/CMyElem/CMyElem.ts b/src/components/CMyElem/CMyElem.ts
index 8f6de691..f4b8ac8b 100755
--- a/src/components/CMyElem/CMyElem.ts
+++ b/src/components/CMyElem/CMyElem.ts
@@ -169,30 +169,6 @@ export default defineComponent({
globalStore.addNewElem($q, t, newrec)
}
- function delElem() {
- $q.dialog({
- message: 'Eliminare ' + props.myelem.container + ' ?',
- html: true,
- ok: {
- label: 'Elimina',
- push: true,
- },
- title: '',
- cancel: true,
- persistent: false,
- }).onOk(async () => {
-
- // Save Elem record
- await globalStore.delMyElem($q, t, props.myelem).then((ris) => {
- if (ris) {
- // OK
- disableSave.value = true
- }
- })
- })
-
- }
-
function modifElem() {
disableSave.value = false
}
@@ -278,7 +254,6 @@ export default defineComponent({
myel,
disableSave,
modifElem,
- delElem,
addNewElem,
newtype,
neworder,
diff --git a/src/components/CMyPageElem/CMyPageElem.ts b/src/components/CMyPageElem/CMyPageElem.ts
index b1951540..030d80a7 100755
--- a/src/components/CMyPageElem/CMyPageElem.ts
+++ b/src/components/CMyPageElem/CMyPageElem.ts
@@ -84,6 +84,8 @@ export default defineComponent({
const selElem = ref(globalStore.selElem)
const site = ref(globalStore.site)
+ const onloading = ref(false)
+
const myelems = computed(() => {
if (mypathin.value)
return globalStore.getMyElems(mypathin.value)
@@ -91,11 +93,11 @@ export default defineComponent({
return null
})
- function load() {
+ async function load() {
// console.log('load', mypathin.value)
if (mypathin.value !== '') {
- globalStore.loadPage('/' + mypathin.value, 'cmypageelem').then(ris => {
+ await globalStore.loadPage('/' + mypathin.value, 'cmypageelem').then(ris => {
rec.value = ris
// console.log('LoadPage', ris)
})
@@ -124,15 +126,8 @@ export default defineComponent({
}
})
- function selElemClick(myelem: IMyElem) {
- // console.log('mypageelem selElemClick', myelem)
- selElem.value = {}
- selElem.value = myelem
- visuEditor.value = !!myelem
- }
-
- function mounted() {
- load()
+ async function mounted() {
+ await load()
}
function saveElem(myelem: IMyElem) {
@@ -147,6 +142,20 @@ export default defineComponent({
mywidthEditor.value = mywidthEditor.value === 400 ? 1200 : 400
}
+ function deleteElem() {
+ selElem.value = {}
+ visuEditor.value = false
+ }
+ function selElemClick(myelem: IMyElem) {
+ // console.log('mypageelem selElemClick', myelem)
+
+ selElem.value = {}
+ selElem.value = myelem
+ visuEditor.value = !!myelem
+
+ }
+
+
onMounted(mounted)
return {
@@ -164,6 +173,8 @@ export default defineComponent({
changeVisuDrawer,
mywidthEditor,
toggleSize,
+ onloading,
+ deleteElem,
}
},
diff --git a/src/components/CMyPageElem/CMyPageElem.vue b/src/components/CMyPageElem/CMyPageElem.vue
index 702bd252..aa0eb80e 100755
--- a/src/components/CMyPageElem/CMyPageElem.vue
+++ b/src/components/CMyPageElem/CMyPageElem.vue
@@ -1,6 +1,6 @@
-
+
-
-
@@ -80,23 +80,26 @@
>
-
+
+
+
diff --git a/src/components/CMyPageElem2/CMyPageElem2.ts b/src/components/CMyPageElem2/CMyPageElem2.ts
index 7d611021..b5439f8c 100755
--- a/src/components/CMyPageElem2/CMyPageElem2.ts
+++ b/src/components/CMyPageElem2/CMyPageElem2.ts
@@ -106,7 +106,7 @@ export default defineComponent({
})
function selElemClick(myelem: IMyElem) {
- console.log('mypageelem selElemClick', myelem)
+ // console.log('mypageelem selElemClick', myelem)
selElem.value = {}
selElem.value = myelem
visuEditor.value = !!myelem
diff --git a/src/components/CMyPageElem2/CMyPageElem2.vue b/src/components/CMyPageElem2/CMyPageElem2.vue
index f545f40a..954f6f9f 100755
--- a/src/components/CMyPageElem2/CMyPageElem2.vue
+++ b/src/components/CMyPageElem2/CMyPageElem2.vue
@@ -15,10 +15,12 @@
@@ -57,7 +59,7 @@
>
-
+
diff --git a/src/components/CSignUp/CSignUp.ts b/src/components/CSignUp/CSignUp.ts
index 91ce6233..6465d817 100755
--- a/src/components/CSignUp/CSignUp.ts
+++ b/src/components/CSignUp/CSignUp.ts
@@ -165,7 +165,7 @@ export default defineComponent({
},
username: {
required,
- minLength: minLength(3),
+ minLength: minLength(4),
complexityUser,
registereduser,
},
@@ -214,9 +214,9 @@ export default defineComponent({
console.log('changeaportador', $route.params.invited)
if (!signup.aportador_solidario) {
if ($route.params.invited) {
- // @ts-ignore
- signup.aportador_solidario = $route.params.invited
- }
+ // @ts-ignore
+ signup.aportador_solidario = $route.params.invited
+ }
}
}
})
@@ -308,7 +308,7 @@ export default defineComponent({
}
}
- function selectcountry({ name, iso2, dialCode }: {name: string, iso2: string, dialCode: string}) {
+ function selectcountry({ name, iso2, dialCode }: { name: string, iso2: string, dialCode: string }) {
// console.log(name, iso2, dialCode)
signup.profile.nationality = iso2
countryname.value = name
diff --git a/src/components/CSignUp/CSignUp.vue b/src/components/CSignUp/CSignUp.vue
index d84dccbd..fd04ed75 100755
--- a/src/components/CSignUp/CSignUp.vue
+++ b/src/components/CSignUp/CSignUp.vue
@@ -1,9 +1,7 @@
@@ -13,7 +11,6 @@
-
@@ -199,14 +202,21 @@
debounce="1000"
@keyup.enter="$refs.inputSurname.focus()"
:error-message="tools.errorMsg('name', v$.name)"
- :label="tools.getConfSiteOptionEnabled(shared_consts.ConfSite.regNameSurnameMandatory) ? $t('reg.name') : $t('reg.name_opt')"
+ :label="
+ tools.getConfSiteOptionEnabled(
+ shared_consts.ConfSite.regNameSurnameMandatory
+ )
+ ? $t('reg.name')
+ : $t('reg.name_opt')
+ "
>
-
+
-
@@ -470,7 +487,13 @@
debounce="1000"
@keyup.enter="$refs.inputSurname.focus()"
:error-message="tools.errorMsg('name', v$.name)"
- :label="tools.getConfSiteOptionEnabled(shared_consts.ConfSite.regNameSurnameMandatory) ? $t('reg.name') : $t('reg.name_opt')"
+ :label="
+ tools.getConfSiteOptionEnabled(
+ shared_consts.ConfSite.regNameSurnameMandatory
+ )
+ ? $t('reg.name')
+ : $t('reg.name_opt')
+ "
>
@@ -490,7 +513,13 @@
!checkifDisabled ? $refs.carousel.next() : null
"
:error-message="tools.errorMsg('surname', v$.surname)"
- :label="tools.getConfSiteOptionEnabled(shared_consts.ConfSite.regNameSurnameMandatory) ? $t('reg.surname') : $t('reg.surname_opt')"
+ :label="
+ tools.getConfSiteOptionEnabled(
+ shared_consts.ConfSite.regNameSurnameMandatory
+ )
+ ? $t('reg.surname')
+ : $t('reg.surname_opt')
+ "
>
diff --git a/src/index.template.html b/src/index.template.html
index 4fb69929..27d9d765 100755
--- a/src/index.template.html
+++ b/src/index.template.html
@@ -10,7 +10,7 @@
-
+
diff --git a/src/root/activities/activities.vue b/src/root/activities/activities.vue
index 81b8afb5..782ad622 100755
--- a/src/root/activities/activities.vue
+++ b/src/root/activities/activities.vue
@@ -1,28 +1,19 @@
-
-
+
-
-
-
-
-
-
diff --git a/src/rootgen/admin/confsite/confsite.vue b/src/rootgen/admin/confsite/confsite.vue
index 912a0066..121db923 100755
--- a/src/rootgen/admin/confsite/confsite.vue
+++ b/src/rootgen/admin/confsite/confsite.vue
@@ -311,17 +311,6 @@
:rec="mysite"
mykey="idMyGroup"
debounce="1000"
- :type="costanti.FieldType.string"
- @save="updateSite"
- >
-
-
' + checkDomain + '
', ok }
+ },
+
+ checkIfICanAddNewRecord() {
+
+ // Attualmente se sei loggato puoi inserire Record
+
+ return this.isLogged() && this.isUserOk()
}
+
// FINE !
// getLocale() {
diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts
index f91bc617..d98370b9 100644
--- a/src/store/globalStore.ts
+++ b/src/store/globalStore.ts
@@ -274,6 +274,40 @@ export const useGlobalStore = defineStore('GlobalStore', {
return state.myelems.filter((page: IMyElem) => (page.path === path)).sort((a: any, b: any) => a.order - b.order)
},
+ getMyElemPrecThisElemId: (state: IGlobalState) => (path: string, idelem: string): IMyElem => {
+ // Ottieni tutti gli myelem con lo stesso path e ordinali per order
+ const sortedElems = state.myelems
+ .filter((elem: IMyElem) => elem.path === path)
+ .sort((a: any, b: any) => a.order - b.order);
+
+ // Trova l'indice dell'elemento con _id = idelem
+ const index = sortedElems.findIndex((elem: IMyElem) => elem._id === idelem);
+
+ // ritorna l'elemento precedente
+ if (index > 0) {
+ return sortedElems[index - 1];
+ } else {
+ return sortedElems[0];
+ }
+ },
+
+ getMyElemNextThisElemId: (state: IGlobalState) => (path: string, idelem: string): IMyElem => {
+ // Ottieni tutti gli myelem con lo stesso path e ordinali per order
+ const sortedElems = state.myelems
+ .filter((elem: IMyElem) => elem.path === path)
+ .sort((a: any, b: any) => a.order - b.order);
+
+ // Trova l'indice dell'elemento con _id = idelem
+ const index = sortedElems.findIndex((elem: IMyElem) => elem._id === idelem);
+
+ // ritorna l'elemento successivo
+ if (index < sortedElems.length - 1) {
+ return sortedElems[index + 1];
+ } else {
+ return sortedElems[sortedElems.length - 1];
+ }
+ },
+
getmenu: (state: IGlobalState): any => {
// console.log('getmenu', cfgrouter.getmenu())
@@ -1630,6 +1664,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
if (page.loadFirst)
page.loaded = true
}
+ this.myelems = []
this.myelems = (res.data.myelems) ? [...res.data.myelems] : []
// console.log('this.mypage', this.mypage)
@@ -2040,18 +2075,21 @@ export const useGlobalStore = defineStore('GlobalStore', {
if (!myelem._id)
return false
- return await this.DeleteRec({ table: 'myelems', id: myelem._id }).then((ris) => {
- if (ris) {
- this.myelems = this.myelems.filter((rec) => rec._id !== myelem._id)
+ return await this.DeleteRec({ table: 'myelems', id: myelem._id })
+ .then(async (ris) => {
+ if (ris) {
+ this.myelems = this.myelems.filter((rec) => rec._id !== myelem._id)
- // Aggiorna anche tutto il sito...
- this.loadSite()
+ // Aggiorna anche tutto il sito...
+ // await this.loadSite()
- tools.showPositiveNotif($q, t('db.deletedrecord'))
- } else {
- tools.showNegativeNotif($q, t('db.recdelfailed'))
- }
- })
+ tools.showPositiveNotif($q, t('db.deletedrecord'))
+ return true
+ } else {
+ tools.showNegativeNotif($q, t('db.recdelfailed'))
+ return false
+ }
+ })
},
async saveMyElem($q: any, t: any, myelem: IMyElem) {
@@ -2062,26 +2100,27 @@ export const useGlobalStore = defineStore('GlobalStore', {
mydata.data = myelem
- // Save in Memory
- for (let i = 0; i < this.myelems.length; i++) {
- if (this.myelems[i]._id === myelem._id) {
- this.myelems[i] = myelem;
- break;
- }
- }
-
return await this.saveTable(mydata)
- .then((ris) => {
- if (ris) {
+ .then(async (newelem) => {
+ if (newelem) {
+ console.log('*** newelem', newelem)
+
+ // Save in Memory
+ for (let i = 0; i < this.myelems.length; i++) {
+ if (this.myelems[i]._id === newelem._id) {
+ this.myelems[i] = newelem;
+ break;
+ }
+ }
// Aggiorna anche tutto il sito...
- this.loadSite()
+ // await this.loadSite()
tools.showPositiveNotif($q, t('db.recupdated'))
} else {
tools.showNegativeNotif($q, t('db.recfailed'))
}
- return ris
+ return newelem
}).catch((e) => {
tools.showNegativeNotif($q, t('db.recfailed'))
return false
@@ -2091,11 +2130,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
async addNewElem($q: any, t: any, myelem: IMyElem) {
- const myrec = await this.saveMyElem($q, t, myelem)
- if (myrec) {
- myelem._id = myrec._id
- this.myelems.push(myelem)
+ const newelem = await this.saveMyElem($q, t, myelem)
+ if (newelem) {
+ this.myelems.push(newelem)
}
+
+ return newelem
},
changeVisuDrawer(path: string, edit: boolean) {
@@ -2117,7 +2157,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
})
},
- prepareAddNewElem(order: any, $q: any, t: any, myelem: any, newtype: any) {
+ async prepareAddNewElem(order: any, $q: any, t: any, myelem: any, newtype: any) {
const newrec: IMyElem = {
_id: undefined,
@@ -2145,9 +2185,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
}
}
- this.addNewElem($q, t, newrec)
+ const mynewrec = await this.addNewElem($q, t, newrec)
- return newrec
+ return mynewrec
},