From d28050e71f34da1765b31466ee0bfa868c2262d2 Mon Sep 17 00:00:00 2001 From: Paolo Arena Date: Sun, 11 Sep 2022 11:45:13 +0200 Subject: [PATCH] Circuits... Circuits Fido e Max Qta Fixed error eslint: 7.0.0 is OK --- config/webpack.config.base.js | 7 + config/webpack.config.dev.js | 7 + package.json | 90 +- public/js/track.js | 2 +- query_gruppi.js | 365 +-- src/common/shared_vuejs.ts | 1 + src/components/CBigBtn/CBigBtn.vue | 2 +- src/components/CGridTableRec/CGridTableRec.ts | 9 + .../CGridTableRec/CGridTableRec.vue | 56 +- src/components/CLabel/CLabel.vue | 2 +- .../CMyCardCircuitPopup.vue | 13 +- .../CMyCardGrpPopup/CMyCardGrpPopup.vue | 2 +- src/components/CMyPopupEdit/CMyPopupEdit.ts | 3 + src/components/CMyPopupEdit/CMyPopupEdit.vue | 11 +- .../CMyRecCircuitCard/CMyRecCircuitCard.vue | 2 +- src/components/CSendCoins/CSendCoins.ts | 15 +- src/components/CSendCoins/CSendCoins.vue | 4 +- src/components/MyHeader/MyHeader.ts | 15 +- src/components/MyHeader/MyHeader.vue | 11 +- src/css/app.scss | 4 +- .../toolbar/notifPopover/notifPopover.ts | 22 +- .../toolbar/notifPopover/notifPopover.vue | 8 +- src/model/GlobalStore.ts | 37 +- src/statics/lang/it.js | 15 +- src/store/CircuitStore.ts | 10 - src/store/Modules/costanti.ts | 8 + src/store/Modules/fieldsTable.ts | 72 +- src/store/Modules/tools.ts | 27 +- src/store/UserStore.ts | 9 +- src/store/globalStore.ts | 3 +- src/views/user/mycircuit/mycircuit.ts | 26 +- src/views/user/mycircuit/mycircuit.vue | 269 +- src/views/user/myprofile/myprofile.vue | 4 +- .../circuits/risviterbo/raduno_riso.jpg | Bin 0 -> 263767 bytes yarn.lock | 2166 +++++++++-------- 35 files changed, 1862 insertions(+), 1435 deletions(-) create mode 100644 statics/upload/circuits/risviterbo/raduno_riso.jpg diff --git a/config/webpack.config.base.js b/config/webpack.config.base.js index bce20e4d..a9d66350 100755 --- a/config/webpack.config.base.js +++ b/config/webpack.config.base.js @@ -114,6 +114,13 @@ const baseConfig = { new CopyWebpackPlugin([{ from: path.resolve(__dirname, 'src/assets'), }]), + new ForkTsCheckerWebpackPlugin({ + async: false, + watch: paths.appSrc, + tsconfig: paths.appTsConfig, + tslint: paths.appTsLint, + memoryLimit: 5000, + }), ], }; diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 26793621..e3364dfb 100755 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -49,6 +49,13 @@ const webpackDevConfig = { new DefinePlugin({ 'process.env': env, }), + new ForkTsCheckerWebpackPlugin({ + async: false, + watch: paths.appSrc, + tsconfig: paths.appTsConfig, + tslint: paths.appTsLint, + memoryLimit: 5000, + }), new WebpackDashboard(), new FriendlyErrorsPlugin(), new webpack.HotModuleReplacementPlugin(), diff --git a/package.json b/package.json index 0884ea77..ef960454 100755 --- a/package.json +++ b/package.json @@ -22,52 +22,52 @@ "generate-sw": "workbox generateSW workbox-config.js" }, "dependencies": { - "@quasar/extras": "^1.14.2", + "@quasar/extras": "^1.15.2", "@quasar/quasar-ui-qcalendar": "^4.0.0-beta.13", "@vue-leaflet/vue-leaflet": "^0.6.1", - "@vue/compat": "^3.2.37", - "@vue/compiler-sfc": "^3.2.37", + "@vue/compat": "^3.2.38", + "@vue/compiler-sfc": "^3.2.38", "@vue/eslint-config-standard": "7.0.0", - "@vuelidate/core": "^2.0.0-alpha.42", - "@vuelidate/validators": "^2.0.0-alpha.30", - "acorn": "^8.7.1", - "autoprefixer": "^10.4.7", - "axios": "^0.26.0", + "@vuelidate/core": "^2.0.0-alpha.44", + "@vuelidate/validators": "^2.0.0-alpha.31", + "acorn": "^8.8.0", + "autoprefixer": "^10.4.8", + "axios": "^0.27.2", "bcryptjs": "^2.4.3", - "chart.js": "^3.8.0", - "core-js": "^3.23.3", + "chart.js": "^3.9.1", + "core-js": "^3.25.0", "crypto": "^1.0.1", - "date-fns": "^2.28.0", - "dotenv": "^16.0.1", + "date-fns": "^2.29.2", + "dotenv": "^16.0.2", "echarts": "^5.3.3", "eslint-plugin-quasar": "^1.1.0", "eslint-plugin-standard": "^5.0.0", - "graphql": "^16.5.0", + "graphql": "^16.6.0", "graphql-tag": "^2.12.6", - "gsap": "^3.10.4", - "jquery": "^3.6.0", + "gsap": "^3.11.1", + "jquery": "^3.6.1", "js-cookie": "^3.0.1", "localforage": "^1.10.0", "lodash": "^4.17.21", "normalize.css": "^8.0.1", - "npm": "^8.13.2", + "npm": "^8.19.1", "nprogress": "^0.2.0", - "pinia": "^2.0.14", + "pinia": "^2.0.22", "prerender-spa-plugin": "^3.4.0", - "quasar": "^2.7.5", + "quasar": "^2.7.7", "quasar-extras": "^2.0.9", "register-service-worker": "^1.7.2", - "vee-validate": "^4.5.11", - "vue": "^3.2.37", + "vee-validate": "^4.6.7", + "vue": "^3.2.38", "vue-chart-3": "^3.1.8", "vue-class-component": "^8.0.0-rc.1", "vue-country-code": "^1.1.3", - "vue-echarts": "^6.1.0", - "vue-i18n": "^9.2.0-beta.26", + "vue-echarts": "^6.2.3", + "vue-i18n": "^9.2.2", "vue-idb": "^0.2.0", "vue-loader": "^17.0.0", "vue-property-decorator": "^10.0.0-rc.3", - "vue-router": "^4.1.0", + "vue-router": "^4.1.5", "vue-scroll-reveal": "^1.0.11", "vue-svgicon": "^4.0.0-alpha.3", "vue2-dragula": "^2.5.5", @@ -79,56 +79,56 @@ "@types/bcryptjs": "^2.4.2", "@types/dotenv": "^8.2.0", "@types/googlemaps": "^3.43.3", - "@types/jest": "^28.1.4", + "@types/jest": "^29.0.0", "@types/js-cookie": "^3.0.2", - "@types/node": "18.0.1", + "@types/node": "18.7.15", "@types/nprogress": "^0.2.0", "@types/vue-tel-input": "^2.1.2", "@types/vuelidate": "^0.7.15", - "@typescript-eslint/eslint-plugin": "^5.30.5", - "@typescript-eslint/parser": "^5.30.5", - "eslint": "^8.19.0", + "@typescript-eslint/eslint-plugin": "^5.36.2", + "@typescript-eslint/parser": "^5.36.2", + "eslint": "^8.23.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-vue": "^9.1.1", + "eslint-plugin-promise": "^6.0.1", + "eslint-plugin-vue": "^9.4.0", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.0", "http-proxy-middleware": "^2.0.6", - "jest": "^28.1.2", + "jest": "^29.0.2", "json-loader": "^0.5.7", "node-sass": "7.0.1", - "npm-check-updates": "^15.0.3", + "npm-check-updates": "^16.1.0", "optimize-css-assets-webpack-plugin": "^6.0.1", - "postcss": "^8.4.14", - "postcss-loader": "^7.0.0", + "postcss": "^8.4.16", + "postcss-loader": "^7.0.1", "sass-loader": "^13.0.2", "strip-ansi": "=7.0.1", - "ts-jest": "^28.0.5", + "ts-jest": "^28.0.8", "ts-loader": "^9.3.1", "tslint": "^6.1.3", "tslint-config-standard": "^9.0.0", "tslint-loader": "^3.5.4", - "typescript": "^4.7.4", + "typescript": "^4.8.2", "vue-cli-plugin-element-ui": "^1.1.4", "vueify": "^9.4.1", - "webpack": "^5.0.0", - "workbox-webpack-plugin": "^6.5.3" + "webpack": "^5.74.0", + "workbox-webpack-plugin": "^6.5.4" }, "browser": { "crypto": false }, "browserslist": [ - "last 16 Chrome versions", - "last 16 Firefox versions", + "last 26 Chrome versions", + "last 26 Firefox versions", "last 4 Edge versions", - "last 13 Safari versions", - "last 16 Android versions", - "last 16 ChromeAndroid versions", - "last 16 FirefoxAndroid versions", + "last 23 Safari versions", + "last 26 Android versions", + "last 26 ChromeAndroid versions", + "last 26 FirefoxAndroid versions", "last 12 iOS versions", - "last 7 Opera versions" + "last 17 Opera versions" ], "engines": { "node": ">= 16.14.0", diff --git a/public/js/track.js b/public/js/track.js index 272b7957..58e06081 100755 --- a/public/js/track.js +++ b/public/js/track.js @@ -2,7 +2,7 @@ function geturl() { const miaurl = document.location.href if (miaurl.includes('localhost')) { - return 'http://localhost:8084/' + // return 'http://192.168.170.47:8084' } return '' } diff --git a/query_gruppi.js b/query_gruppi.js index 99adc8a2..f4eb1c15 100644 --- a/query_gruppi.js +++ b/query_gruppi.js @@ -1,280 +1,119 @@ -db.getCollection('myskills').aggregate( +db.getCollection('movements').aggregate( [ { "$match": { - "idapp": "13" - } - }, - { - "$sort": { - "date_created": -1 - } - }, - { - "$addFields": { - "myId1": { - "$toObjectId": "$userId" - } - } - }, - { - "$lookup": { - "from": "users", - "localField": "myId1", - "foreignField": "_id", - "as": "user" - } - }, - { - "$replaceRoot": { - "newRoot": { - "$mergeObjects": [ - { - "$arrayElemAt": [ - "$user", - 0 - ] - }, - "$$ROOT" - ] - } - } - }, - { - "$project": { - "recGood": 1, - "sectorGood": 1, - "idSectorGood": 1, - "idGood": 1, - "mygood": 1, - "idStatusSkill": 1, - "idContribType": 1, - "idCity": 1, - "pub_to_share": 1, - "numLevel": 1, - "adType": 1, - "photos": 1, - "note": 1, - "website": 1, - "descr": 1, - "date_created": 1, - "date_updated": 1, - "userId": 1, - "username": 1, - "name": 1, - "surname": 1, - "comune": 1, - "mycities": 1, - "profile.img": 1, - reported: 1, - date_report: 1, - username_who_report: 1, - "profile.mygroups": 1, - "profile.qualifica": 1 - } - }, - { - "$lookup": { - "from": "goods", - "localField": "idGood", - "foreignField": "_id", - "as": "recGood" - } - }, - { - "$replaceRoot": { - "newRoot": { - "$mergeObjects": [ - { - "$arrayElemAt": [ - "$recGood", - 0 - ] - }, - "$$ROOT" - ] - } - } - }, - { - "$project": { - "recGood": 1, - "sectorGood": 1, - "idSectorGood": 1, - "idGood": 1, - "mygood": 1, - "idStatusSkill": 1, - "idContribType": 1, - "idCity": 1, - "pub_to_share": 1, - "numLevel": 1, - "adType": 1, - "photos": 1, - "note": 1, - "website": 1, - "descr": 1, - "date_created": 1, - "date_updated": 1, - "userId": 1, - "username": 1, - "name": 1, - "surname": 1, - "comune": 1, - "mycities": 1, - "profile.img": 1, - reported: 1, - date_report: 1, - username_who_report: 1, - "profile.mygroups": 1, - "profile.qualifica": 1 - } - }, - { - "$lookup": { - "from": "sectorgoods", - "localField": "recGood.idSectorGood", - "foreignField": "_id", - "as": "sectorGood" - } - }, - { - "$replaceRoot": { - "newRoot": { - "$mergeObjects": [ - { - "$arrayElemAt": [ - "$sectorgood", - 0 - ] - }, - "$$ROOT" - ] - } - } - }, - { - "$project": { - "recGood": 1, - "sectorGood": 1, - "idSectorGood": 1, - "idGood": 1, - "mygood": 1, - "idStatusSkill": 1, - "idContribType": 1, - "idCity": 1, - "pub_to_share": 1, - "numLevel": 1, - "adType": 1, - "photos": 1, - "note": 1, - "website": 1, - "descr": 1, - "date_created": 1, - "date_updated": 1, - "userId": 1, - "username": 1, - "name": 1, - "surname": 1, - "comune": 1, - "mycities": 1, - "profile.img": 1, - reported: 1, - date_report: 1, - username_who_report: 1, - "profile.mygroups": 1, - "profile.qualifica": 1 - } - }, - { - "$lookup": { - "from": "cities", - "localField": "idCity", - "foreignField": "_id", - "as": "mycities" - } - }, - { - "$replaceRoot": { - "newRoot": { - "$mergeObjects": [ - { - "$arrayElemAt": [ - "$mycities", - 0 - ] - }, - "$$ROOT" - ] - } - } - }, - { - "$project": { - "recGood": 1, - "sectorGood": 1, - "idSectorGood": 1, - "idGood": 1, - "mygood": 1, - "idStatusSkill": 1, - "idContribType": 1, - "idCity": 1, - "pub_to_share": 1, - "numLevel": 1, - "adType": 1, - "photos": 1, - "note": 1, - "website": 1, - "descr": 1, - "date_created": 1, - "date_updated": 1, - "userId": 1, - "username": 1, - "name": 1, - "surname": 1, - "comune": 1, - "mycities": 1, - "profile.img": 1, - reported: 1, - date_report: 1, - username_who_report: 1, - "profile.mygroups": 1, - "profile.qualifica": 1 - } - }, - { - "$match": { - "$and": [ + "idapp": "13", + "$or": [ { - "mycities.reg": "EMR" + "accountFromId": 1 }, { - "idCity": 5730 + "accountToId": 1 } ] } }, { - "$group": { - "_id": null, - "count": { - "$sum": 1 - }, - "results": { - "$push": "$$ROOT" - } + "$lookup": { + "from": "accounts", + "localField": "accountFromId", + "foreignField": "_id", + "as": "accfrom" } }, + { + "$lookup": { + "from": "accounts", + "localField": "accountToId", + "foreignField": "_id", + "as": "accto" + } + }, + { + "$unwind": "$accfrom" + }, + { + "$unwind": "$accto" + }, + { + "$lookup": { + "from": "users", + "let": { + "username": "$accfrom.username", + "idapp": "$accfrom.idapp" + }, + "pipeline": [ + { + "$match": { + "$expr": { + "$and": [ + { + "$eq": [ + "$$username", + "$username" + ] + }, + { + "$eq": [ + "$$idapp", + "$idapp" + ] + } + ] + } + } + } + ], + "as": "userfrom" + } + }, + { + "$unwind": "$userfrom" + }, + { + "$lookup": { + "from": "users", + "let": { + "username": "$accto.username", + "idapp": "$accto.idapp" + }, + "pipeline": [ + { + "$match": { + "$expr": { + "$and": [ + { + "$eq": [ + "$$username", + "$username" + ] + }, + { + "$eq": [ + "$$idapp", + "$idapp" + ] + } + ] + } + } + } + ], + "as": "userto" + } + }, + { + "$unwind": "$userto" + }, { "$project": { - "count": 1, - "rows": { - "$slice": [ - "$results", - 0, - 20 - ] - } + "transactionDate": 1, + "amount": 1, + "causal": 1, + "userfrom.username": 1, + "userfrom.profile.img": 1 + "userto.username": 1, + "userto.profile.img": 1 } } -] -) +]) diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 25992012..1168f5a2 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -20,6 +20,7 @@ export const shared_consts = { ALL_SAW_AND_ACCEPTED: 3, QUERYTYPE_CIRCUIT: 10, QUERYTYPE_REFUSED_USER_CIRCUIT: 12, + QUERYTYPE_LIST_MOVEMENTS: 15, FILTER_EXTRALIST_NOT_REGISTERED: 1, FILTER_EXTRALIST_NOT_CONTACTED: 2, diff --git a/src/components/CBigBtn/CBigBtn.vue b/src/components/CBigBtn/CBigBtn.vue index db3cf131..755a5c82 100755 --- a/src/components/CBigBtn/CBigBtn.vue +++ b/src/components/CBigBtn/CBigBtn.vue @@ -15,7 +15,7 @@
-
+
diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index beb43c94..3a9b1f03 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -202,6 +202,11 @@ export default defineComponent({ required: false, default: true }, + showHeaderCol: { + type: Boolean, + required: false, + default: false + }, choose_visutype: { type: Boolean, required: false, @@ -1856,9 +1861,12 @@ export default defineComponent({ action = lists.MenuAction.CAN_EDIT_TABLE } + if (action > 0) { + const col = props.prop_mycolumns.find((rec: any) => rec.action === action) if (col) { + console.log('col action', col) const myarr = serverData.value.find((rec: any) => rec._id === id) if (myarr) clickFunz(myarr, col) @@ -1988,6 +1996,7 @@ export default defineComponent({ onLoadScroll, numRecLoaded, myinfscroll, + t, } } }) diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index ff786d69..bb9eb124 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -209,7 +209,20 @@ > -
+
+
+ + + {{ col.label }} + + +
+
+ +
@@ -277,6 +290,47 @@ />
+
+
+ + + + {{ tools.isEntrataByRecMov(row) ? t('movement.movin') : t('movement.movout') }} + + + +
+ +
+
+ + + +
+
+
+
+
+
+