From 473ea72e80d4b7f0ebb3675a4e820d5ef7674f27 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Sun, 18 Feb 2024 20:13:41 +0100 Subject: [PATCH] - profilo corretto --- .env.development | 2 +- .env.example.production | 2 +- .env.prod.pcb | 2 +- .env.test.pcb | 2 +- .env.test.risosrv | 2 +- .env.test_riso.pcb | 2 +- .../fioredellavita.riso.app/.env.development | 2 +- _ALL_SITES/fioredellavita.riso.app/.env.test | 2 +- _ALL_SITES/gruppomacro.app/.env.test | 2 +- _ALL_SITES/piuchebuono.app/.env.test | 2 +- _ALL_SITES/riso.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.production | 2 +- _ALL_SITES/riso.app/.env.test | 2 +- .../terradellavisione.app/.env.development | 2 +- src/components/CMyActivities/CMyActivities.ts | 29 +++++++++++++++++-- .../CMyActivities/CMyActivities.vue | 3 +- src/store/CircuitStore.ts | 15 ++++++++++ 17 files changed, 58 insertions(+), 17 deletions(-) diff --git a/.env.development b/.env.development index b909d09f..b7ae4d32 100755 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/.env.example.production b/.env.example.production index 58eb870d..bdd55a48 100755 --- a/.env.example.production +++ b/.env.example.production @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/.env.prod.pcb b/.env.prod.pcb index dbdb5bd8..b40e3c6d 100644 --- a/.env.prod.pcb +++ b/.env.prod.pcb @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="17" DIRECTORY_LOCAL=newfreeplanet diff --git a/.env.test.pcb b/.env.test.pcb index 9ab4b4e1..95e143fd 100755 --- a/.env.test.pcb +++ b/.env.test.pcb @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="17" DIRECTORY_LOCAL=newfreeplanet diff --git a/.env.test.risosrv b/.env.test.risosrv index 21ed5294..7d386617 100755 --- a/.env.test.risosrv +++ b/.env.test.risosrv @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" 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 316d6f90..805dc877 100755 --- a/.env.test_riso.pcb +++ b/.env.test_riso.pcb @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/fioredellavita.riso.app/.env.development b/_ALL_SITES/fioredellavita.riso.app/.env.development index 3e5c59ba..5ed78c2c 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.20" +APP_VERSION="1.0.26" 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 1460be95..172d6d2f 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.20" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="15" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/gruppomacro.app/.env.test b/_ALL_SITES/gruppomacro.app/.env.test index 98879930..f3764301 100755 --- a/_ALL_SITES/gruppomacro.app/.env.test +++ b/_ALL_SITES/gruppomacro.app/.env.test @@ -1,4 +1,4 @@ -APP_VERSION="1.0.20" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/piuchebuono.app/.env.test b/_ALL_SITES/piuchebuono.app/.env.test index 98879930..f3764301 100755 --- a/_ALL_SITES/piuchebuono.app/.env.test +++ b/_ALL_SITES/piuchebuono.app/.env.test @@ -1,4 +1,4 @@ -APP_VERSION="1.0.20" +APP_VERSION="1.0.26" 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 b909d09f..b7ae4d32 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" 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 6d5061c2..3596a494 100644 --- a/_ALL_SITES/riso.app/.env.production +++ b/_ALL_SITES/riso.app/.env.production @@ -1,4 +1,4 @@ -APP_VERSION="1.0.20" +APP_VERSION="1.0.26" 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 0b0e3a9d..ff91885d 100755 --- a/_ALL_SITES/riso.app/.env.test +++ b/_ALL_SITES/riso.app/.env.test @@ -1,4 +1,4 @@ -APP_VERSION="1.0.25" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="16" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/terradellavisione.app/.env.development b/_ALL_SITES/terradellavisione.app/.env.development index 51a81f39..ad1bb92a 100755 --- a/_ALL_SITES/terradellavisione.app/.env.development +++ b/_ALL_SITES/terradellavisione.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="1.0.20" +APP_VERSION="1.0.26" SERVICE_WORKER_FILE="service-worker.js" APP_ID="14" DIRECTORY_LOCAL="newfreeplanet" diff --git a/src/components/CMyActivities/CMyActivities.ts b/src/components/CMyActivities/CMyActivities.ts index 479797a2..01feacca 100755 --- a/src/components/CMyActivities/CMyActivities.ts +++ b/src/components/CMyActivities/CMyActivities.ts @@ -30,6 +30,7 @@ import { static_data } from '@/db/static_data' import { fieldsTable } from '@store/Modules/fieldsTable' import { useNotifStore } from '@store/NotifStore' import MixinUsers from '@/mixins/mixin-users' +import { useCircuitStore } from '@src/store/CircuitStore' export default defineComponent({ @@ -44,6 +45,7 @@ export default defineComponent({ setup(props) { const userStore = useUserStore() const globalStore = useGlobalStore() + const circuitStore = useCircuitStore() const $route = useRoute() const $q = useQuasar() const { t } = useI18n() @@ -59,12 +61,14 @@ export default defineComponent({ const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '') const filtroutente = ref([]) + const filtro_eventi = ref([]) const showPic = ref(false) const caricato = ref(false) const myuser = ref(null) const actualcard = ref('mygoods') + const allcirc = ref([]) const notifStore = useNotifStore() @@ -88,12 +92,21 @@ export default defineComponent({ async function loadProfile() { console.log('loadProfile...', username.value) try { + let today = new Date(); + today.setHours(0, 0, 0, 0); + + // Carica il profilo di quest'utente if (username.value) { await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => { console.log('loadUserProfile = ', ris) myuser.value = ris if (myuser.value) { + // filtro_eventi.value = [{ userId: myuser.value._id }, { dateTimeStart: { $gte: today } }] + let mydate = tools.addDays(tools.getDateNow(), -1) + let mydateend = tools.addDays(mydate, 30) + mydate = tools.getstrYYMMDDDate(mydate) + filtro_eventi.value = [{ userId: myuser.value._id }, { dateTimeStart: { $gte: mydate, $lte: mydateend } }] filtroutente.value = [{ userId: myuser.value._id }] notifStore.setAsRead(idnotif.value) @@ -104,9 +117,20 @@ export default defineComponent({ } try { - listcircuitsfiltered.value = myuser.value.profile.mycircuits + allcirc.value = myuser.value.profile.mycircuits } catch (e) { - listcircuitsfiltered.value = [] + allcirc.value = [] + } + + const circnaz = circuitStore.getCircuitoNazionale(allcirc.value) + + if (allcirc.value.length > 0) { + listcircuitsfiltered.value = allcirc.value.slice(0, 5) + if (circnaz) + listcircuitsfiltered.value.unshift(circnaz) + // includi anche il circuito nazionale + } else { + listcircuitsfiltered.value = allcirc.value } } @@ -214,6 +238,7 @@ export default defineComponent({ getLinkUserTelegram, getLinkWebSite, filtroutente, + filtro_eventi, filtrofavorite, filtrobookmark, showPic, diff --git a/src/components/CMyActivities/CMyActivities.vue b/src/components/CMyActivities/CMyActivities.vue index b2914847..4425bd03 100755 --- a/src/components/CMyActivities/CMyActivities.vue +++ b/src/components/CMyActivities/CMyActivities.vue @@ -117,6 +117,7 @@ >
+
Gruppi:
circ.showAlways) + + for (const circ of circNazionali) { + const reccirc = arrCircuiti.find((mycirc: any) => mycirc.circuitname === circ.name) + if (reccirc) { + return reccirc + } + } + + return null + + }, + EDentroAlCircuitoNazionale(user: IUserFields) { const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)