diff --git a/package.json b/package.json index d06cb9db..4d2a25ce 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "riso", - "version": "0.5.3", + "version": "0.6.1", "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", @@ -22,48 +22,48 @@ "generate-sw": "workbox generateSW workbox-config.js" }, "dependencies": { - "@quasar/extras": "^1.15.8", - "@quasar/quasar-ui-qcalendar": "^4.0.0-beta.13", - "@vue-leaflet/vue-leaflet": "^0.7.0", - "@vue/compat": "^3.2.45", - "@vue/compiler-sfc": "^3.2.45", + "@quasar/extras": "^1.16.2", + "@quasar/quasar-ui-qcalendar": "^4.0.0-beta.16", + "@vue-leaflet/vue-leaflet": "^0.9.0", + "@vue/compat": "^3.2.47", + "@vue/compiler-sfc": "^3.2.47", "@vue/eslint-config-standard": "7.0.0", - "@vuelidate/core": "^2.0.0", - "@vuelidate/validators": "^2.0.0", - "acorn": "^8.8.1", + "@vuelidate/core": "^2.0.2", + "@vuelidate/validators": "^2.0.2", + "acorn": "^8.8.2", "animate.css": "^4.1.1", - "autoprefixer": "^10.4.13", - "axios": "^1.2.1", + "autoprefixer": "^10.4.14", + "axios": "^1.3.5", "bcryptjs": "^2.4.3", "chart.js": "3.9.1", - "core-js": "^3.26.1", + "core-js": "^3.30.0", "crypto": "^1.0.1", "date-fns": "^2.29.3", "dotenv": "^16.0.3", - "echarts": "5.3.3", + "echarts": "5.4.2", "eslint-plugin-quasar": "^1.1.0", "eslint-plugin-standard": "^5.0.0", "graphql": "^16.6.0", "graphql-tag": "^2.12.6", - "gsap": "^3.11.3", - "jquery": "^3.6.2", + "gsap": "^3.11.5", + "jquery": "^3.6.4", "js-cookie": "^3.0.1", "localforage": "^1.10.0", "lodash": "^4.17.21", "normalize.css": "^8.0.1", - "npm": "^9.2.0", + "npm": "^9.6.4", "nprogress": "^0.2.0", - "pinia": "^2.0.28", + "pinia": "^2.0.33", "prerender-spa-plugin": "^3.4.0", - "quasar": "^2.11.0", + "quasar": "^2.11.10", "quasar-extras": "^2.0.9", "register-service-worker": "^1.7.2", - "vee-validate": "^4.7.3", - "vue": "^3.2.45", + "vee-validate": "^4.8.4", + "vue": "^3.2.47", "vue-chart-3": "^3.1.8", "vue-class-component": "^8.0.0-rc.1", "vue-country-code": "^1.1.3", - "vue-echarts": "^6.3.1", + "vue-echarts": "^6.5.4", "vue-i18n": "^9.2.2", "vue-idb": "^0.2.0", "vue-loader": "^17.0.1", @@ -82,56 +82,47 @@ "@types/bcryptjs": "^2.4.2", "@types/dotenv": "^8.2.0", "@types/googlemaps": "^3.43.3", - "@types/jest": "^29.2.4", - "@types/js-cookie": "^3.0.2", - "@types/node": "18.11.16", + "@types/jest": "^29.5.0", + "@types/js-cookie": "^3.0.3", + "@types/node": "18.15.11", "@types/nprogress": "^0.2.0", "@types/vue-tel-input": "^2.1.2", - "@types/vuelidate": "^0.7.15", - "@typescript-eslint/eslint-plugin": "^5.46.1", - "@typescript-eslint/parser": "^5.46.1", - "eslint": "^8.30.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.26.0", + "@types/vuelidate": "^0.7.16", + "@typescript-eslint/eslint-plugin": "^5.57.1", + "@typescript-eslint/parser": "^5.57.1", + "eslint": "^8.37.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-vue": "^9.8.0", + "eslint-plugin-vue": "^9.10.0", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.0", "http-proxy-middleware": "^2.0.6", - "jest": "^29.3.1", + "jest": "^29.5.0", "json-loader": "^0.5.7", - "node-sass": "7.0.1", - "npm-check-updates": "^16.6.0", + "node-sass": "7.0.0", + "npm-check-updates": "^16.10.7", "optimize-css-assets-webpack-plugin": "^6.0.1", - "postcss": "^8.4.20", - "postcss-loader": "^7.0.2", - "sass-loader": "^13.2.0", + "postcss": "^8.4.21", + "postcss-loader": "^7.2.4", + "sass-loader": "^13.2.2", "strip-ansi": "=7.0.1", - "ts-jest": "^29.0.3", + "ts-jest": "^29.1.0", "ts-loader": "^9.4.2", "tslint": "^6.1.3", "tslint-config-standard": "^9.0.0", "tslint-loader": "^3.5.4", - "typescript": "^4.9.4", + "typescript": "^5.0.3", "vue-cli-plugin-element-ui": "^1.1.4", "vueify": "^9.4.1", - "webpack": "^5.75.0", + "webpack": "^5.78.0", "workbox-webpack-plugin": "^6.5.4" }, "browser": { "crypto": false }, "browserslist": [ - "last 40 Chrome versions", - "last 40 Firefox versions", - "last 10 Edge versions", - "last 35 Safari versions", - "last 60 Android versions", - "last 250 ChromeAndroid versions", - "last 60 FirefoxAndroid versions", - "last 30 iOS versions", - "last 10 Opera versions", "> 0.05%", "not dead" ], diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 8cc7fc6d..bd620937 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -99,6 +99,7 @@ export const shared_consts = { OPTIONS_SEARCH_ONLY_FULL_WORDS: 1, OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2, OPTIONS_SEARCH_USER_ALL_WORDS: 4, + OPTIONS_ADD_COUNT_FAVORITE: 8, FRIENDSCMD: { SETTRUST: 121, diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index 94ed8ab1..0bf0a9c8 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -149,7 +149,7 @@ export default defineComponent({ else if (props.table === toolsext.TABUSER) return userStore.getMypaginationMembers() else if (shared_consts.TABLES_ORDER_DATE_UPDATED.includes(props.table)) - return { sortBy: 'date_created', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 } // date_updated + return { sortBy: 'date_updated', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 } // date_updated else if (shared_consts.TABLES_ORDER_DESCR.includes(props.table)) return { sortBy: 'desc', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 } @@ -1159,6 +1159,8 @@ export default defineComponent({ idStatusSkill: 1, idContribType: 1, 'profile.username_telegram': 1, + 'profile.favorite': 1, + 'profile.bookmark': 1, idCity: 1, pub_to_share: 1, numLevel: 1, @@ -1228,6 +1230,8 @@ export default defineComponent({ idStatusSkill: 1, idContribType: 1, 'profile.username_telegram': 1, + 'profile.favorite': 1, + 'profile.bookmark': 1, idCity: 1, pub_to_share: 1, dateTimeStart: 1, @@ -1305,6 +1309,8 @@ export default defineComponent({ preferences: 1, idContribType: 1, 'profile.username_telegram': 1, + 'profile.favorite': 1, + 'profile.bookmark': 1, photos: 1, idCity: 1, pub_to_share: 1, @@ -1352,6 +1358,8 @@ export default defineComponent({ idStatusSkill: 1, idContribType: 1, 'profile.username_telegram': 1, + 'profile.favorite': 1, + 'profile.bookmark': 1, idCity: 1, pub_to_share: 1, numLevel: 1, diff --git a/src/components/CFinder/CFinder.vue b/src/components/CFinder/CFinder.vue index ecd6c1da..d7f7e5cb 100755 --- a/src/components/CFinder/CFinder.vue +++ b/src/components/CFinder/CFinder.vue @@ -34,6 +34,7 @@ $route.params.username ? $route.params.username.toString() : userStore.my.username) const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '') @@ -180,6 +181,25 @@ export default defineComponent({ return '' } + function filtrofavorite(table: string) { + const tab = tools.getNumTabByTable(table) + if (myuser.value && myuser.value.profile.favorite) { + let arrfav = myuser.value.profile.favorite.filter((rec: IBookmark) => rec.tab === tab) + if (arrfav) + return myuser.value.profile.favorite ? [{ _id: { $in: arrfav.map((rec: any) => rec.id) } }] : [] + } + return [] + } + function filtrobookmark(table: string) { + const tab = tools.getNumTabByTable(table) + if (myuser.value && myuser.value.profile.bookmark) { + let arrfav = myuser.value.profile.bookmark.filter((rec: IBookmark) => rec.tab === tab) + if (arrfav) + return myuser.value.profile.bookmark ? [{ _id: { $in: arrfav.map((rec: any) => rec.id) } }] : [] + } + return [] + } + onMounted(mounted) return { @@ -194,6 +214,8 @@ export default defineComponent({ getLinkUserTelegram, getLinkWebSite, filtroutente, + filtrofavorite, + filtrobookmark, showPic, myusername, userStore, @@ -212,6 +234,7 @@ export default defineComponent({ listcircuitsfiltered, optionsMainCards, getlinkpage, + mytab, } } }) diff --git a/src/components/CMyCardCircuitPopup/CMyCardCircuitPopup.ts b/src/components/CMyCardCircuitPopup/CMyCardCircuitPopup.ts index f3438e5d..aaa7d011 100644 --- a/src/components/CMyCardCircuitPopup/CMyCardCircuitPopup.ts +++ b/src/components/CMyCardCircuitPopup/CMyCardCircuitPopup.ts @@ -61,7 +61,7 @@ export default defineComponent({ function load() { // Carica il profilo di quest'utente - if (props.idRec && props.idRec > 0) { + if (props.idRec) { userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => { myrec.value = ris notifStore.setAsRead(idnotif.value) diff --git a/src/components/CMyCardGrpPopup/CMyCardGrpPopup.ts b/src/components/CMyCardGrpPopup/CMyCardGrpPopup.ts index cb87a8f3..c74ade2c 100644 --- a/src/components/CMyCardGrpPopup/CMyCardGrpPopup.ts +++ b/src/components/CMyCardGrpPopup/CMyCardGrpPopup.ts @@ -61,7 +61,7 @@ export default defineComponent({ function load() { // Carica il profilo di quest'utente - if (props.idRec && props.idRec > 0) { + if (props.idRec) { userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => { myrec.value = ris notifStore.setAsRead(idnotif.value) diff --git a/src/components/CMyRecCard/CMyRecCard.vue b/src/components/CMyRecCard/CMyRecCard.vue index d949d6ae..6114eba0 100755 --- a/src/components/CMyRecCard/CMyRecCard.vue +++ b/src/components/CMyRecCard/CMyRecCard.vue @@ -1,77 +1,177 @@