- profilo corretto
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="17"
|
APP_ID="17"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="17"
|
APP_ID="17"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.20"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="15"
|
APP_ID="15"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.20"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="15"
|
APP_ID="15"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.20"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.20"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.20"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.25"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="16"
|
APP_ID="16"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.20"
|
APP_VERSION="1.0.26"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="14"
|
APP_ID="14"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import { static_data } from '@/db/static_data'
|
|||||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||||
import { useNotifStore } from '@store/NotifStore'
|
import { useNotifStore } from '@store/NotifStore'
|
||||||
import MixinUsers from '@/mixins/mixin-users'
|
import MixinUsers from '@/mixins/mixin-users'
|
||||||
|
import { useCircuitStore } from '@src/store/CircuitStore'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -44,6 +45,7 @@ export default defineComponent({
|
|||||||
setup(props) {
|
setup(props) {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
const circuitStore = useCircuitStore()
|
||||||
const $route = useRoute()
|
const $route = useRoute()
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@@ -59,12 +61,14 @@ export default defineComponent({
|
|||||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||||
|
|
||||||
const filtroutente = ref(<any[]>[])
|
const filtroutente = ref(<any[]>[])
|
||||||
|
const filtro_eventi = ref(<any[]>[])
|
||||||
const showPic = ref(false)
|
const showPic = ref(false)
|
||||||
const caricato = ref(false)
|
const caricato = ref(false)
|
||||||
|
|
||||||
const myuser = ref(<IUserFields | null>null)
|
const myuser = ref(<IUserFields | null>null)
|
||||||
|
|
||||||
const actualcard = ref('mygoods')
|
const actualcard = ref('mygoods')
|
||||||
|
const allcirc = ref(<any>[])
|
||||||
|
|
||||||
const notifStore = useNotifStore()
|
const notifStore = useNotifStore()
|
||||||
|
|
||||||
@@ -88,12 +92,21 @@ export default defineComponent({
|
|||||||
async function loadProfile() {
|
async function loadProfile() {
|
||||||
console.log('loadProfile...', username.value)
|
console.log('loadProfile...', username.value)
|
||||||
try {
|
try {
|
||||||
|
let today = new Date();
|
||||||
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
// Carica il profilo di quest'utente
|
// Carica il profilo di quest'utente
|
||||||
if (username.value) {
|
if (username.value) {
|
||||||
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
||||||
console.log('loadUserProfile = ', ris)
|
console.log('loadUserProfile = ', ris)
|
||||||
myuser.value = ris
|
myuser.value = ris
|
||||||
if (myuser.value) {
|
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 }]
|
filtroutente.value = [{ userId: myuser.value._id }]
|
||||||
notifStore.setAsRead(idnotif.value)
|
notifStore.setAsRead(idnotif.value)
|
||||||
|
|
||||||
@@ -104,9 +117,20 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
listcircuitsfiltered.value = myuser.value.profile.mycircuits
|
allcirc.value = myuser.value.profile.mycircuits
|
||||||
} catch (e) {
|
} 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,
|
getLinkUserTelegram,
|
||||||
getLinkWebSite,
|
getLinkWebSite,
|
||||||
filtroutente,
|
filtroutente,
|
||||||
|
filtro_eventi,
|
||||||
filtrofavorite,
|
filtrofavorite,
|
||||||
filtrobookmark,
|
filtrobookmark,
|
||||||
showPic,
|
showPic,
|
||||||
|
|||||||
@@ -117,6 +117,7 @@
|
|||||||
>
|
>
|
||||||
<q-card class="q-my-md">
|
<q-card class="q-my-md">
|
||||||
<div v-if="card.table === 'mygroups'">
|
<div v-if="card.table === 'mygroups'">
|
||||||
|
<div class="row text-h6 text-bold">Gruppi:</div>
|
||||||
<q-list>
|
<q-list>
|
||||||
<span
|
<span
|
||||||
v-for="(grp, index) in listgroupsfiltered"
|
v-for="(grp, index) in listgroupsfiltered"
|
||||||
@@ -155,7 +156,7 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<CSkill
|
<CSkill
|
||||||
:table="card.table"
|
:table="card.table"
|
||||||
:filtercustom="filtroutente"
|
:filtercustom="card.table === 'mybachecas' ? filtro_eventi: filtroutente"
|
||||||
:butt_modif_new="isMyRecord(myuser.username)"
|
:butt_modif_new="isMyRecord(myuser.username)"
|
||||||
:visuinpage="true"
|
:visuinpage="true"
|
||||||
:noaut="true"
|
:noaut="true"
|
||||||
|
|||||||
@@ -68,6 +68,21 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getCircuitoNazionale(arrCircuiti: any) {
|
||||||
|
|
||||||
|
const circNazionali: any = this.listcircuits.filter((circ: any) => 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) {
|
EDentroAlCircuitoNazionale(user: IUserFields) {
|
||||||
|
|
||||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
||||||
|
|||||||
Reference in New Issue
Block a user