PASSAGGIO A VITE !
AGG. 1.1.23
This commit is contained in:
@@ -1,35 +1,36 @@
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CLabel } from '@/components/CLabel'
|
||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { CMyGroup } from '@/components/CMyGroup'
|
||||
import { CMyCircuit } from '@/components/CMyCircuit'
|
||||
import { CMyFieldDb } from '@src/components/CMyFieldDb'
|
||||
import { CMyFieldRec } from '@src/components/CMyFieldRec'
|
||||
import { CTitleBanner } from '@src/components/CTitleBanner'
|
||||
import { CProfile } from '@src/components/CProfile'
|
||||
import { CLabel } from '@src/components/CLabel'
|
||||
import { CCopyBtn } from '@src/components/CCopyBtn'
|
||||
import { CSkill } from '@src/components/CSkill'
|
||||
import { CDateTime } from '@src/components/CDateTime'
|
||||
import { CMyGroup } from '@src/components/CMyGroup'
|
||||
import { CMyCircuit } from '@src/components/CMyCircuit'
|
||||
import { CContactUser } from '@src/components/CContactUser'
|
||||
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||
import { CTimeAgo } from '@src/components/CTimeAgo'
|
||||
import { CSendCoins } from '@/components/CSendCoins'
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { CSendCoins } from '@src/components/CSendCoins'
|
||||
import { CMyUser } from '@src/components/CMyUser'
|
||||
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
|
||||
import { CUserNonVerif } from '@src/components/CUserNonVerif'
|
||||
import { tools } from '@tools'
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { IBookmark, IReaction, ICircuit, IFavorite, IMyCircuit, IMyGroup, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import type { IReaction, IMyCircuit, IMyGroup, IUserFields } from 'model';
|
||||
import { IBookmark, ICircuit, IFavorite } from 'model'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import MixinUsers from '@/mixins/mixin-users'
|
||||
import MixinUsers from '@src/mixins/mixin-users'
|
||||
import { useCircuitStore } from '@src/store/CircuitStore'
|
||||
|
||||
|
||||
@@ -44,7 +45,7 @@ export default defineComponent({
|
||||
username_prop: {
|
||||
type: String,
|
||||
required: true,
|
||||
default : '',
|
||||
default: '',
|
||||
},
|
||||
introUser: {
|
||||
type: Boolean,
|
||||
@@ -104,7 +105,7 @@ export default defineComponent({
|
||||
async function loadProfile() {
|
||||
console.log('loadProfile...', username.value)
|
||||
try {
|
||||
let today = new Date();
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
|
||||
|
||||
@@ -116,7 +117,7 @@ export default defineComponent({
|
||||
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, 180)
|
||||
const mydateend = tools.addDays(mydate, 180)
|
||||
mydate = tools.getstrYYMMDDDate(mydate)
|
||||
filtro_eventi.value = [{ userId: myuser.value._id }, { dateTimeStart: { $gte: mydate, $lte: mydateend } }]
|
||||
filtroutente.value = [{ userId: myuser.value._id }]
|
||||
@@ -140,7 +141,7 @@ export default defineComponent({
|
||||
listcircuitsfiltered.value = allcirc.value.slice(0, 5)
|
||||
if (circnaz) {
|
||||
if (listcircuitsfiltered.value.findIndex((circ: IMyCircuit) => circ._id === circnaz._id) < 0) {
|
||||
// includi anche il circuito nazionale
|
||||
// includi anche il circuito nazionale
|
||||
listcircuitsfiltered.value.unshift(circnaz)
|
||||
}
|
||||
}
|
||||
@@ -213,7 +214,7 @@ export default defineComponent({
|
||||
function filtrofavorite(table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
if (myuser.value && myuser.value.profile.reaction) {
|
||||
let arrfav = myuser.value.profile.reaction.filter((rec: IReaction) => rec.tab === tab && (rec.fav! === true))
|
||||
const arrfav = myuser.value.profile.reaction.filter((rec: IReaction) => rec.tab === tab && (rec.fav! === true))
|
||||
if (arrfav)
|
||||
return myuser.value.profile.reaction ? [{ _id: { $in: arrfav.map((rec: any) => rec.idrec) } }] : []
|
||||
}
|
||||
@@ -222,7 +223,7 @@ export default defineComponent({
|
||||
function filtrobookmark(table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
if (myuser.value && myuser.value.profile.reaction) {
|
||||
let arrfav = myuser.value.profile.reaction.filter((rec: IReaction) => rec.tab === tab && rec.book === true);
|
||||
const arrfav = myuser.value.profile.reaction.filter((rec: IReaction) => rec.tab === tab && rec.book === true);
|
||||
if (arrfav)
|
||||
return myuser.value.profile.reaction ? [{ _id: { $in: arrfav.map((rec: any) => rec.idrec) } }] : []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user