- 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"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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(<any[]>[])
|
||||
const filtro_eventi = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
const caricato = ref(false)
|
||||
|
||||
const myuser = ref(<IUserFields | null>null)
|
||||
|
||||
const actualcard = ref('mygoods')
|
||||
const allcirc = ref(<any>[])
|
||||
|
||||
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,
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
>
|
||||
<q-card class="q-my-md">
|
||||
<div v-if="card.table === 'mygroups'">
|
||||
<div class="row text-h6 text-bold">Gruppi:</div>
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(grp, index) in listgroupsfiltered"
|
||||
@@ -155,7 +156,7 @@
|
||||
<div v-else>
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtroutente"
|
||||
:filtercustom="card.table === 'mybachecas' ? filtro_eventi: filtroutente"
|
||||
:butt_modif_new="isMyRecord(myuser.username)"
|
||||
:visuinpage="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) {
|
||||
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
||||
|
||||
Reference in New Issue
Block a user