diff --git a/.env.development b/.env.development index aae86ce0..19c38895 100755 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ APP_VERSION="1.0.33" SERVICE_WORKER_FILE="service-worker.js" -APP_ID="13" +APP_ID="17" DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_SERVER="freeplanet_serverside" SERVERDIR_WEBSITE="" @@ -12,7 +12,7 @@ LANG_DEFAULT="it" PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF" MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T" MONGODB_HOST="https://localhost:3000" -LOGO_REG='riso-logo-full.png' +LOGO_REG='piuchebuono-logo-full.png' TEST_NAME="Paolo" TEST_SURNAME="Arena" TEST_EMAIL="" diff --git a/public/images/icon.png b/_ALL_SITES/riso.app/images/icon.png similarity index 100% rename from public/images/icon.png rename to _ALL_SITES/riso.app/images/icon.png diff --git a/public/images/marker-shadow.png b/_ALL_SITES/riso.app/images/marker-shadow.png similarity index 100% rename from public/images/marker-shadow.png rename to _ALL_SITES/riso.app/images/marker-shadow.png diff --git a/_ALL_SITES/riso.app/images/riso_home.png b/_ALL_SITES/riso.app/images/riso_home.png index e2e4c5d1..3d065405 100644 Binary files a/_ALL_SITES/riso.app/images/riso_home.png and b/_ALL_SITES/riso.app/images/riso_home.png differ diff --git a/_ALL_SITES/riso.app/images/riso_home_dark.png b/_ALL_SITES/riso.app/images/riso_home_dark.png index f8572648..fe6b8225 100644 Binary files a/_ALL_SITES/riso.app/images/riso_home_dark.png and b/_ALL_SITES/riso.app/images/riso_home_dark.png differ diff --git a/_ALL_SITES/riso.app/package.json b/_ALL_SITES/riso.app/package.json index 56c1d45a..2be2ee21 100755 --- a/_ALL_SITES/riso.app/package.json +++ b/_ALL_SITES/riso.app/package.json @@ -16,62 +16,69 @@ "lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt", "lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt", "fix": "eslint --ext .ts,.vue --ignore-path .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m pwa", + "pwa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=6096 DEBUG=v8:* quasar dev -m pwa", "spa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev --debug", "debug": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js" }, "dependencies": { - "@cubejs-client/core": "^0.31.0", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@cubejs-client/core": "^0.35.0", "@quasar/extras": "^1.16.9", "@quasar/quasar-ui-qcalendar": "^4.0.0-beta.19", - "@vue-leaflet/vue-leaflet": "^0.10.1", - "@vue/compat": "^3.3.9", - "@vue/compiler-sfc": "^3.3.9", - "@vue/eslint-config-standard": "7.0.0", + "@types/leaflet": "^1.9.8", + "@vue/compat": "^3.4.21", + "@vue/compiler-sfc": "^3.4.21", + "@vue/eslint-config-standard": "^7.0.0", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", - "acorn": "^8.11.2", + "acorn": "^8.11.3", "animate.css": "^4.1.1", - "autoprefixer": "^10.4.16", - "axios": "^1.6.2", + "autoprefixer": "^10.4.19", + "axios": "^1.6.8", "bcryptjs": "^2.4.3", - "chart.js": "^4.0.0", - "core-js": "^3.33.3", + "chart.js": "^4.4.2", + "core-js": "^3.36.1", "crypto": "^1.0.1", - "date-fns": "^2.30.0", - "dotenv": "^16.3.1", - "echarts": "5.4.2", + "crypto-browserify": "^3.12.0", + "date-fns": "^3.6.0", + "dotenv": "^16.4.5", + "echarts": "5.5.0", + "eslint-plugin-n": "^15.0.0", "eslint-plugin-quasar": "^1.1.0", "graphql": "^16.8.1", "graphql-tag": "^2.12.6", - "gsap": "^3.12.3", + "gsap": "^3.12.5", "jquery": "^3.7.1", "js-cookie": "^3.0.5", "leaflet": "^1.9.4", + "leaflet.markercluster": "^1.5.3", "localforage": "^1.10.0", "lodash": "^4.17.21", "normalize.css": "^8.0.1", - "npm": "^10.2.4", + "npm": "^10.5.0", "nprogress": "^0.2.0", "pinia": "^2.1.7", "prerender-spa-plugin": "^3.4.0", - "quasar": "^2.12.07", + "quasar": "^2.15.1", "quasar-extras": "^2.0.9", "register-service-worker": "^1.7.2", - "typescript-eslint": "^0.0.1-alpha.0", - "vee-validate": "^4.12.2", - "vue": "^3.3.9", + "typescript-eslint": "^7.3.1", + "vee-validate": "^4.12.6", + "vue": "^3.4.21", "vue-class-component": "^8.0.0-rc.1", "vue-country-code": "^1.1.3", - "vue-echarts": "^6.6.1", - "vue-i18n": "^9.8.0", + "vue-echarts": "^6.6.9", + "vue-i18n": "^9.10.2", "vue-idb": "^0.2.0", "vue-image-zoomer": "^2.2.3", - "vue-loader": "^17.3.1", + "vue-loader": "^17.4.2", "vue-property-decorator": "^10.0.0-rc.3", - "vue-router": "^4.2.5", + "vue-router": "^4.3.0", "vue-scroll-reveal": "^2.1.0", "vue-social-sharing": "^4.0.0-alpha4", "vue-svgicon": "^4.0.0-alpha.3", @@ -82,46 +89,44 @@ "vuex-router-sync": "^6.0.0-rc.1" }, "devDependencies": { - "@quasar/app-webpack": "^3.12.3", + "@babel/core": "^7.24.3", + "@quasar/app-webpack": "^3.12.4", "@types/bcryptjs": "^2.4.6", "@types/dotenv": "^8.2.0", "@types/googlemaps": "^3.43.3", - "@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.16", - "@typescript-eslint/eslint-plugin": "^6.7.3", - "@typescript-eslint/parser": "^6.7.2", + "@types/jest": "^29.5.12", + "@types/js-cookie": "^3.0.6", + "@types/node": "20.11.30", + "@types/nprogress": "^0.2.3", + "@types/vue-tel-input": "^2.1.6", + "@types/vuelidate": "^0.7.21", + "@typescript-eslint/eslint-plugin": "^7.3.1", + "@typescript-eslint/parser": "^7.3.1", "eslint": "^8.37.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-import": "^2.27.5", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-vue": "^9.19.2", + "eslint-plugin-vue": "^8.7.1", "file-loader": "^6.2.0", - "html-webpack-plugin": "^5.5.3", + "html-webpack-plugin": "^5.6.0", "http-proxy-middleware": "^2.0.6", "jest": "^29.7.0", "json-loader": "^0.5.7", "node-sass": "^9.0.0", - "npm-check-updates": "^16.14.11", + "npm-check-updates": "^16.14.17", "optimize-css-assets-webpack-plugin": "^6.0.1", - "parcel": "^2.6.2", - "postcss": "^8.4.31", - "postcss-loader": "^7.3.3", - "sass-loader": "^13.3.2", + "parcel": "^2.12.0", + "postcss": "^8.4.38", + "postcss-loader": "^8.1.1", + "sass-loader": "^14.1.1", "strip-ansi": "=7.1.0", - "ts-jest": "^29.1.1", + "ts-jest": "^29.1.2", "ts-loader": "^9.5.1", - "tslint": "^6.1.3", - "tslint-config-standard": "^9.0.0", - "tslint-loader": "^3.5.4", - "typescript": "^5.3.2", + "typescript": "5.3.2", "vue-cli-plugin-element-ui": "^1.1.4", "vueify": "^9.4.1", - "webpack": "^5.89.0", + "webpack": "^5.91.0", "workbox-webpack-plugin": "^6.5.4" }, "browser": { diff --git a/now.txt b/now.txt index 9bc58f3e..e5f5d4ff 100644 --- a/now.txt +++ b/now.txt @@ -1 +1 @@ -TERMINA DI LAVORARE SU piuchebuono.app: (Sovrascrivo !) +TERMINA DI LAVORARE SU riso.app: (Sovrascrivo !) diff --git a/package.json b/package.json index 2be2ee21..0239ba9b 100755 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "riso", - "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", + "name": "piuchebuono", + "version": "2.0.1", + "description": "PiuCheBuono", + "productName": "PiuCheBuono", "author": "Paolo Arena", "private": true, "keywords": [], diff --git a/public/images/ferrara.jpg b/public/images/ferrara.jpg deleted file mode 100644 index b4615a3a..00000000 Binary files a/public/images/ferrara.jpg and /dev/null differ diff --git a/public/images/foto1.jpg b/public/images/foto1.jpg old mode 100755 new mode 100644 index 6a0644be..195e9448 Binary files a/public/images/foto1.jpg and b/public/images/foto1.jpg differ diff --git a/public/images/foto2.jpg b/public/images/foto2.jpg old mode 100755 new mode 100644 index 6a0644be..940baa89 Binary files a/public/images/foto2.jpg and b/public/images/foto2.jpg differ diff --git a/public/images/foto3.jpg b/public/images/foto3.jpg old mode 100755 new mode 100644 index 6a0644be..effb7a77 Binary files a/public/images/foto3.jpg and b/public/images/foto3.jpg differ diff --git a/public/images/kolibrilab-logo-full.png b/public/images/kolibrilab-logo-full.png new file mode 100755 index 00000000..6915ebba Binary files /dev/null and b/public/images/kolibrilab-logo-full.png differ diff --git a/public/images/marocco_foto1.png b/public/images/marocco_foto1.png new file mode 100644 index 00000000..7dceb8eb Binary files /dev/null and b/public/images/marocco_foto1.png differ diff --git a/public/images/noi4.jpg b/public/images/noi4.jpg new file mode 100644 index 00000000..850651ed Binary files /dev/null and b/public/images/noi4.jpg differ diff --git a/public/images/nuda_e_cruda.jpeg b/public/images/nuda_e_cruda.jpeg new file mode 100644 index 00000000..d7912a1e Binary files /dev/null and b/public/images/nuda_e_cruda.jpeg differ diff --git a/public/images/pcb-android-icon-144x144.png b/public/images/pcb-android-icon-144x144.png new file mode 100644 index 00000000..fdea5eb1 Binary files /dev/null and b/public/images/pcb-android-icon-144x144.png differ diff --git a/public/images/pcb-android-icon-192x192.png b/public/images/pcb-android-icon-192x192.png new file mode 100644 index 00000000..93bb5fb7 Binary files /dev/null and b/public/images/pcb-android-icon-192x192.png differ diff --git a/public/images/pcb-android-icon-36x36.png b/public/images/pcb-android-icon-36x36.png new file mode 100644 index 00000000..f700c0d2 Binary files /dev/null and b/public/images/pcb-android-icon-36x36.png differ diff --git a/public/images/pcb-android-icon-48x48.png b/public/images/pcb-android-icon-48x48.png new file mode 100644 index 00000000..4018b080 Binary files /dev/null and b/public/images/pcb-android-icon-48x48.png differ diff --git a/public/images/pcb-android-icon-72x72.png b/public/images/pcb-android-icon-72x72.png new file mode 100644 index 00000000..fdaff445 Binary files /dev/null and b/public/images/pcb-android-icon-72x72.png differ diff --git a/public/images/pcb-android-icon-96x96.png b/public/images/pcb-android-icon-96x96.png new file mode 100644 index 00000000..74ae0a32 Binary files /dev/null and b/public/images/pcb-android-icon-96x96.png differ diff --git a/public/images/pcb-apple-icon-114x114.png b/public/images/pcb-apple-icon-114x114.png new file mode 100644 index 00000000..de67dfff Binary files /dev/null and b/public/images/pcb-apple-icon-114x114.png differ diff --git a/public/images/pcb-apple-icon-120x120.png b/public/images/pcb-apple-icon-120x120.png new file mode 100644 index 00000000..5864c9c8 Binary files /dev/null and b/public/images/pcb-apple-icon-120x120.png differ diff --git a/public/images/pcb-apple-icon-144x144.png b/public/images/pcb-apple-icon-144x144.png new file mode 100644 index 00000000..fdea5eb1 Binary files /dev/null and b/public/images/pcb-apple-icon-144x144.png differ diff --git a/public/images/pcb-apple-icon-152x152.png b/public/images/pcb-apple-icon-152x152.png new file mode 100644 index 00000000..6e92509a Binary files /dev/null and b/public/images/pcb-apple-icon-152x152.png differ diff --git a/public/images/pcb-apple-icon-180x180.png b/public/images/pcb-apple-icon-180x180.png new file mode 100644 index 00000000..4d59cedc Binary files /dev/null and b/public/images/pcb-apple-icon-180x180.png differ diff --git a/public/images/pcb-apple-icon-57x57.png b/public/images/pcb-apple-icon-57x57.png new file mode 100644 index 00000000..fb201a9d Binary files /dev/null and b/public/images/pcb-apple-icon-57x57.png differ diff --git a/public/images/pcb-apple-icon-60x60.png b/public/images/pcb-apple-icon-60x60.png new file mode 100644 index 00000000..3b5f1c33 Binary files /dev/null and b/public/images/pcb-apple-icon-60x60.png differ diff --git a/public/images/pcb-apple-icon-72x72.png b/public/images/pcb-apple-icon-72x72.png new file mode 100644 index 00000000..fdaff445 Binary files /dev/null and b/public/images/pcb-apple-icon-72x72.png differ diff --git a/public/images/pcb-apple-icon-76x76.png b/public/images/pcb-apple-icon-76x76.png new file mode 100644 index 00000000..2882992b Binary files /dev/null and b/public/images/pcb-apple-icon-76x76.png differ diff --git a/public/images/pcb-apple-icon.png b/public/images/pcb-apple-icon.png new file mode 100644 index 00000000..422a8dca Binary files /dev/null and b/public/images/pcb-apple-icon.png differ diff --git a/public/images/piuchebuono-logo-full.png b/public/images/piuchebuono-logo-full.png new file mode 100644 index 00000000..5465d80c Binary files /dev/null and b/public/images/piuchebuono-logo-full.png differ diff --git a/public/images/piuchebuono.jpg b/public/images/piuchebuono.jpg new file mode 100644 index 00000000..88e9bab0 Binary files /dev/null and b/public/images/piuchebuono.jpg differ diff --git a/public/images/riso-android-icon-144x144.png b/public/images/riso-android-icon-144x144.png deleted file mode 100644 index 37dcd661..00000000 Binary files a/public/images/riso-android-icon-144x144.png and /dev/null differ diff --git a/public/images/riso-android-icon-192x192.png b/public/images/riso-android-icon-192x192.png deleted file mode 100644 index 95b960e9..00000000 Binary files a/public/images/riso-android-icon-192x192.png and /dev/null differ diff --git a/public/images/riso-android-icon-36x36.png b/public/images/riso-android-icon-36x36.png deleted file mode 100644 index c78a13a3..00000000 Binary files a/public/images/riso-android-icon-36x36.png and /dev/null differ diff --git a/public/images/riso-android-icon-384x384.png b/public/images/riso-android-icon-384x384.png deleted file mode 100644 index ce1ffc47..00000000 Binary files a/public/images/riso-android-icon-384x384.png and /dev/null differ diff --git a/public/images/riso-android-icon-48x48.png b/public/images/riso-android-icon-48x48.png deleted file mode 100644 index 499e8674..00000000 Binary files a/public/images/riso-android-icon-48x48.png and /dev/null differ diff --git a/public/images/riso-android-icon-512x512.png b/public/images/riso-android-icon-512x512.png deleted file mode 100644 index e1c31acd..00000000 Binary files a/public/images/riso-android-icon-512x512.png and /dev/null differ diff --git a/public/images/riso-android-icon-72x72.png b/public/images/riso-android-icon-72x72.png deleted file mode 100644 index f95f7320..00000000 Binary files a/public/images/riso-android-icon-72x72.png and /dev/null differ diff --git a/public/images/riso-android-icon-96x96.png b/public/images/riso-android-icon-96x96.png deleted file mode 100644 index 98dbf9d9..00000000 Binary files a/public/images/riso-android-icon-96x96.png and /dev/null differ diff --git a/public/images/riso-apple-icon-114x114.png b/public/images/riso-apple-icon-114x114.png deleted file mode 100644 index 882dd21c..00000000 Binary files a/public/images/riso-apple-icon-114x114.png and /dev/null differ diff --git a/public/images/riso-apple-icon-120x120.png b/public/images/riso-apple-icon-120x120.png deleted file mode 100644 index 734b0503..00000000 Binary files a/public/images/riso-apple-icon-120x120.png and /dev/null differ diff --git a/public/images/riso-apple-icon-144x144.png b/public/images/riso-apple-icon-144x144.png deleted file mode 100644 index 923da7be..00000000 Binary files a/public/images/riso-apple-icon-144x144.png and /dev/null differ diff --git a/public/images/riso-apple-icon-152x152.png b/public/images/riso-apple-icon-152x152.png deleted file mode 100644 index 84fd455d..00000000 Binary files a/public/images/riso-apple-icon-152x152.png and /dev/null differ diff --git a/public/images/riso-apple-icon-180x180.png b/public/images/riso-apple-icon-180x180.png deleted file mode 100644 index e457d906..00000000 Binary files a/public/images/riso-apple-icon-180x180.png and /dev/null differ diff --git a/public/images/riso-apple-icon-57x57.png b/public/images/riso-apple-icon-57x57.png deleted file mode 100644 index f5f538db..00000000 Binary files a/public/images/riso-apple-icon-57x57.png and /dev/null differ diff --git a/public/images/riso-apple-icon-60x60.png b/public/images/riso-apple-icon-60x60.png deleted file mode 100644 index 4121f834..00000000 Binary files a/public/images/riso-apple-icon-60x60.png and /dev/null differ diff --git a/public/images/riso-apple-icon-72x72.png b/public/images/riso-apple-icon-72x72.png deleted file mode 100644 index 5efd872d..00000000 Binary files a/public/images/riso-apple-icon-72x72.png and /dev/null differ diff --git a/public/images/riso-apple-icon-76x76.png b/public/images/riso-apple-icon-76x76.png deleted file mode 100644 index 6db4b76f..00000000 Binary files a/public/images/riso-apple-icon-76x76.png and /dev/null differ diff --git a/public/images/riso-apple-icon.png b/public/images/riso-apple-icon.png deleted file mode 100644 index cfaeb3c0..00000000 Binary files a/public/images/riso-apple-icon.png and /dev/null differ diff --git a/public/images/riso-logo-full.png b/public/images/riso-logo-full.png deleted file mode 100644 index 38a9695f..00000000 Binary files a/public/images/riso-logo-full.png and /dev/null differ diff --git a/public/images/riso_home.png b/public/images/riso_home.png deleted file mode 100644 index 3d065405..00000000 Binary files a/public/images/riso_home.png and /dev/null differ diff --git a/public/images/riso_home_dark.png b/public/images/riso_home_dark.png deleted file mode 100644 index fe6b8225..00000000 Binary files a/public/images/riso_home_dark.png and /dev/null differ diff --git a/public/images/riso_services.png b/public/images/riso_services.png deleted file mode 100644 index 85a940bc..00000000 Binary files a/public/images/riso_services.png and /dev/null differ diff --git a/quasar.conf.js b/quasar.conf.js index 640a0360..c306658e 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -94,6 +94,7 @@ module.exports = configure((ctx) => ({ transpileDependencies: [ /quasar-ui-qcalendar[\\/]src/ ], + devtool: 'source-map', chainWebpack(chain, { isServer, isClient }) { chain.resolve.alias @@ -147,9 +148,8 @@ module.exports = configure((ctx) => ({ }, devServer: { https: false, - port: 8084, + port: 8088, open: false, // opens browser window automatically - hot: false, // Disable hot module replacement headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': '*', @@ -295,8 +295,8 @@ module.exports = configure((ctx) => ({ workboxPluginMode: 'InjectManifest', // 'GenerateSW' or 'InjectManifest' workboxOptions: {}, // only for GenerateSW extendGenerateSWOptions(cfg) { - cfg.skipWaiting = false - cfg.clientsClaim = false + cfg.skipWaiting = true + cfg.clientsClaim = true }, // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts]) // if using workbox in InjectManifest mode @@ -306,9 +306,9 @@ module.exports = configure((ctx) => ({ }, manifest: { - name: 'Riso', - short_name: 'Riso', - 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.', + name: 'Più che Buono', + short_name: 'PiuCheBuono', + description: 'PiuCheBuono è un GAS e Bottega', display: 'standalone', orientation: 'portrait', background_color: '#fff', @@ -318,54 +318,54 @@ module.exports = configure((ctx) => ({ start_url: "/?homescreen=1", icons: [ { - src: 'images/riso-android-icon-512x512.png', + src: 'images/pcb-android-icon-512x512.png', sizes: '512x512', type: 'image/png', }, { - src: 'images/riso-android-icon-384x384.png', + src: 'images/pcb-android-icon-384x384.png', sizes: '384x384', type: 'image/png', }, { - src: 'images/riso-android-icon-192x192.png', + src: 'images/pcb-android-icon-192x192.png', sizes: '192x192', type: 'image/png', }, { - src: 'images/riso-android-icon-144x144.png', + src: 'images/pcb-android-icon-144x144.png', sizes: '144x144', type: 'image/png', }, { - src: 'images/riso-android-icon-96x96.png', + src: 'images/pcb-android-icon-96x96.png', sizes: '96x96', type: 'image/png', }, { - src: 'images/riso-apple-icon-120x120.png', + src: 'images/pcb-apple-icon-120x120.png', sizes: '120x120', type: 'image/png', }, { - src: 'images/riso-apple-icon-144x144.png', + src: 'images/pcb-apple-icon-144x144.png', sizes: '144x144', type: 'image/png', }, { - src: 'images/riso-apple-icon-152x152.png', + src: 'images/pcb-apple-icon-152x152.png', sizes: '152x152', type: 'image/png', }, { - src: 'images/riso-apple-icon-180x180.png', + src: 'images/pcb-apple-icon-180x180.png', sizes: '180x180', type: 'image/png', }, ], related_applications: [{ "platform": "webapp", - "url": "https://www.riso.app/manifest.json" + "url": "https://www.piuchebuono.app/manifest.json" }] }, }, @@ -400,7 +400,7 @@ module.exports = configure((ctx) => ({ builder: { // https://www.electron.build/configuration/configuration - appId: 'Riso', + appId: 'PiuCheBuono', }, // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain diff --git a/src/components/CCart/CCart.scss b/src/components/CCart/CCart.scss index 4067f7bb..34bd4618 100755 --- a/src/components/CCart/CCart.scss +++ b/src/components/CCart/CCart.scss @@ -5,4 +5,21 @@ $heightBtn: 100%; } .insert{ cursor:pointer; +} + +.note_ordine_gas{ + margin: 5px; + border: 1px solid #007bff; /* Un bordo solido blu */ + background-color: #e9f5ff; /* Un colore di sfondo leggermente blu */ + border-radius: 8px; /* Angoli arrotondati per un aspetto moderno */ + padding: 20px; /* Spaziatura all'interno del box */ + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Una leggera ombreggiatura per farlo "sollevare" */ + color: #333; /* Colore del testo scuro per alta leggibilità */ + margin: 20px 0; /* Margine sopra e sotto per distanziarlo da altri contenuti */ + font-size: 16px; /* Dimensione del testo */ +} + +.strong { + color: #d9534f; /* Rosso */ + font-weight: bold; /* Testo in grassetto */ } \ No newline at end of file diff --git a/src/components/CCart/CCart.vue b/src/components/CCart/CCart.vue index 9944b642..d9cc109c 100755 --- a/src/components/CCart/CCart.vue +++ b/src/components/CCart/CCart.vue @@ -35,6 +35,13 @@ @input="change_field('note')" > + +
+
null) + const zoom = ref(6) + const arrprovince = ref([]) + + const comuniData = ref('') + + const initialMap = ref(null); + + const myIcon = L.icon({ + iconUrl: 'images/icon.png', + iconSize: [30, 30], + iconAnchor: [22, 35], + popupAnchor: [-6, -36], + shadowUrl: 'images/marker-shadow.png', + shadowSize: [60, 30], + shadowAnchor: [22, 35] + }); + + + function mywidth() { + return tools.getwidth($q) - 20 + } + + function myheight() { + return $q.screen.height - 50 + } + + const iconSize = computed(() => { + return [iconWidth.value, iconHeight.value]; + }) + + function changeIcon() { + iconWidth.value += 2; + if (iconWidth.value > iconHeight.value) { + iconWidth.value = Math.floor(iconHeight.value / 2); + } + } + + function getColor(d: any) { + return d > 1000 ? '#800026' : + d > 500 ? '#BD0026' : + d > 200 ? '#E31A1C' : + d > 100 ? '#FC4E2A' : + d > 50 ? '#FD8D3C' : + d > 20 ? '#FEB24C' : + d > 10 ? '#FED976' : + '#FFEDA0'; + } + + function styleFunction(feature: any) { + // Qui verrà implementata la logica per determinare il colore basato sul numero di utenti + // esempio semplice: + const userCount = getUserCountForComune(feature.properties.NOME_COM); // Assicurati di implementare getUserCountForComune + const density = userCount / feature.properties.area; // supponendo che 'area' sia un campo esistente + return { + fillColor: getColor(density), + weight: 2, + opacity: 1, + color: 'white', + fillOpacity: 0.7 + }; + } + + function getUserCountForComune(comuneName: string) { + // Implementa questa funzione per ottenere il numero di utenti per il dato comune + // Si può utilizzare una richiesta a un API o una mappa locale, a seconda di come sono archiviati i dati + const trovataprov = arrprovince.value.find((prov: any) => prov.descr === comuneName) + if (trovataprov) { + return trovataprov.userCount + } + + return 0; // stub, implementazione di esempio + } + + onMounted(async () => { + // Ottengo la lista degli utenti con i lat e long + arrprovince.value = await userStore.getProvincesForMap() + + initialMap.value = L.map('map', + { + zoomControl: true, zoom: zoom.value, zoomAnimation: false, + fadeAnimation: true, markerZoomAnimation: true, + center: [42.71, 12.934], + } + ); + L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + maxZoom: 13, + attribution: '' + }).addTo(initialMap.value); + + }); + + function log(str: string) { + console.log(str) + } + + function getCoordinates(e: any) { + // Ottieni la latitudine e la longitudine dal click + const lat = e.latlng.lat + const lng = e.latlng.lng + + // Fai qualcosa con le coordinate, ad esempio stamparle in console + console.log(`Latitudine: ${lat}, Longitudine: ${lng}`) + } + + return { + mywidth, + myheight, + map, + iconWidth, + iconHeight, + iconSize, + changeIcon, + zoom, + log, + styleFunction, + getCoordinates, + arrprovince, + comuniData, + } + } +}) diff --git a/src/components/CMapComuni/CMapComuni.vue b/src/components/CMapComuni/CMapComuni.vue new file mode 100755 index 00000000..87d60a56 --- /dev/null +++ b/src/components/CMapComuni/CMapComuni.vue @@ -0,0 +1,24 @@ + + + + diff --git a/src/components/CMapComuni/index.ts b/src/components/CMapComuni/index.ts new file mode 100755 index 00000000..93395984 --- /dev/null +++ b/src/components/CMapComuni/index.ts @@ -0,0 +1 @@ +export {default as CMapComuni} from './CMapComuni.vue' diff --git a/src/components/CMapUsers/CMapUsers.scss b/src/components/CMapUsers/CMapUsers.scss new file mode 100755 index 00000000..abcfe5ae --- /dev/null +++ b/src/components/CMapUsers/CMapUsers.scss @@ -0,0 +1,3 @@ +.map-container { + height: 400px; +} \ No newline at end of file diff --git a/src/components/CMapUsers/CMapUsers.ts b/src/components/CMapUsers/CMapUsers.ts new file mode 100755 index 00000000..c14942c2 --- /dev/null +++ b/src/components/CMapUsers/CMapUsers.ts @@ -0,0 +1,146 @@ +import { tools } from '@store/Modules/tools' +import { useQuasar } from 'quasar' +import { PropType, defineComponent, onMounted, ref, computed } from 'vue' + +import 'leaflet/dist/leaflet.css' +// @ts-ignore +import * as L from 'leaflet' +import 'leaflet.markercluster/dist/MarkerCluster.css' +import 'leaflet.markercluster/dist/MarkerCluster.Default.css' +import 'leaflet.markercluster' + +import { useUserStore } from '@src/store/UserStore' + +export default defineComponent({ + name: 'CMapUsers', + setup(props, { emit }) { + const $q = useQuasar() + const userStore = useUserStore() + + const iconWidth = ref(25) + const iconHeight = ref(40) + const map = ref(null) + const zoom = ref(6) + const arrprovince = ref([]) + + const initialMap = ref(null); + + const myIcon = L.icon({ + iconUrl: 'images/icon.png', + iconSize: [30, 30], + iconAnchor: [22, 35], + popupAnchor: [-6, -36], + shadowUrl: 'images/marker-shadow.png', + shadowSize: [60, 30], + shadowAnchor: [22, 35] + }); + + + function mywidth() { + return tools.getwidth($q) - 20 + } + + function myheight() { + return $q.screen.height - 50 + } + + const iconUrl = computed(() => { + return `https://placekitten.com/${iconWidth.value}/${iconHeight.value}`; + }) + + const iconSize = computed(() => { + return [iconWidth.value, iconHeight.value]; + }) + + function changeIcon() { + iconWidth.value += 2; + if (iconWidth.value > iconHeight.value) { + iconWidth.value = Math.floor(iconHeight.value / 2); + } + } + + function getColor(d: any) { + return d > 1000 ? '#800026' : + d > 500 ? '#BD0026' : + d > 200 ? '#E31A1C' : + d > 100 ? '#FC4E2A' : + d > 50 ? '#FD8D3C' : + d > 20 ? '#FEB24C' : + d > 10 ? '#FED976' : + '#FFEDA0'; + } + + function style(feature: any) { + return { + fillColor: getColor(feature.properties.density), + weight: 2, + opacity: 1, + color: 'white', + dashArray: '3', + fillOpacity: 0.7 + }; + } + + onMounted(async () => { + // Ottengo la lista degli utenti con i lat e long + arrprovince.value = await userStore.getProvincesForMap() + + initialMap.value = L.map('map', + { + zoomControl: true, zoom: zoom.value, zoomAnimation: false, + fadeAnimation: true, markerZoomAnimation: true, + center: [42.71, 12.934], + } + ); + L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + maxZoom: 13, + attribution: '' + }).addTo(initialMap.value); + + // @ts-ignore + const markers = L.markerClusterGroup(); + + for (const provincia of arrprovince.value) { + if (provincia.lat && provincia.long && provincia.userCount > 1) { + // @ts-ignore + let each_marker = new L.marker( + [provincia.lat, provincia.long], { icon: myIcon }) + .bindPopup(` ${provincia.descr}: + ${provincia.userCount} utenti `); + markers.addLayer(each_marker); + } + } + + initialMap.value.addLayer(markers); + + }); + + function log(str: string) { + console.log(str) + } + + function getCoordinates(e: any) { + // Ottieni la latitudine e la longitudine dal click + const lat = e.latlng.lat + const lng = e.latlng.lng + + // Fai qualcosa con le coordinate, ad esempio stamparle in console + console.log(`Latitudine: ${lat}, Longitudine: ${lng}`) + } + + return { + mywidth, + myheight, + map, + iconWidth, + iconHeight, + iconUrl, + iconSize, + changeIcon, + zoom, + log, + getCoordinates, + arrprovince, + } + } +}) diff --git a/src/components/CMapUsers/CMapUsers.vue b/src/components/CMapUsers/CMapUsers.vue new file mode 100755 index 00000000..1bc2c8b7 --- /dev/null +++ b/src/components/CMapUsers/CMapUsers.vue @@ -0,0 +1,44 @@ + + + + diff --git a/src/components/CMapUsers/index.ts b/src/components/CMapUsers/index.ts new file mode 100755 index 00000000..bae750d0 --- /dev/null +++ b/src/components/CMapUsers/index.ts @@ -0,0 +1 @@ +export {default as CMapUsers} from './CMapUsers.vue' diff --git a/src/components/CMyElem/CMyElem.ts b/src/components/CMyElem/CMyElem.ts index 074868f5..f496c30a 100755 --- a/src/components/CMyElem/CMyElem.ts +++ b/src/components/CMyElem/CMyElem.ts @@ -17,8 +17,8 @@ import { CECommerce } from '@/components/CECommerce' import { CAITools } from '@/components/CAITools' import { CCatalogo } from '@/components/CCatalogo' // import { CMapMarker } from '@src/components/CMapMarker.off' -// import { CMapUsers } from '@/components/CMapUsers' -// import { CMapComuni } from '@/components/CMapComuni' +import { CMapUsers } from '@/components/CMapUsers' +import { CMapComuni } from '@/components/CMapComuni' import { COpenStreetMap } from '@src/components/COpenStreetMap' import { CCardCarousel } from '@src/components/CCardCarousel' import { CMyPage } from '@src/components/CMyPage' @@ -60,7 +60,8 @@ export default defineComponent({ CMyProfileTutorial, CSendRISTo, CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration, CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools, - // CMapUsers, CMapComuni, //CMapMarker, + CMapComuni, CMapUsers, + // , //CMapMarker, }, emits: ['selElemClick'], props: { diff --git a/src/components/CMyElem/CMyElem.vue b/src/components/CMyElem/CMyElem.vue index 2d064c21..dc3af7c8 100755 --- a/src/components/CMyElem/CMyElem.vue +++ b/src/components/CMyElem/CMyElem.vue @@ -565,13 +565,13 @@
MAPPA UTENTI:
- +
MAPPA COMUNI:
- +
STRUMENTI AI:
diff --git a/src/components/CProductCard/CProductCard.vue b/src/components/CProductCard/CProductCard.vue index 794c4105..5e18360c 100755 --- a/src/components/CProductCard/CProductCard.vue +++ b/src/components/CProductCard/CProductCard.vue @@ -300,9 +300,9 @@
-
+
{{ t('products.origine') }}: @@ -325,7 +325,7 @@
- + @@ -334,17 +334,20 @@ +
+
diff --git a/src/db/lang/ws_enUs.js b/src/db/lang/ws_enUs.js index 4b20853c..25b51103 100755 --- a/src/db/lang/ws_enUs.js +++ b/src/db/lang/ws_enUs.js @@ -8,6 +8,8 @@ const msg_website_enUs = { products: { quantity: 'Quantità', quantityAvailable: 'Disponibili', + stockQty: 'In Magazzino', + stockBloccatiQty: 'Bloccati In Magazzino', weight: 'Peso', stars: 'Voto', color: 'Colore', @@ -36,6 +38,7 @@ const msg_website_enUs = { productslist: 'Lista Prodotti', collabora: 'Collabora', storehouses: 'Magazzino', + providers: 'Fornitori', departments: 'Uffici', orders: 'Ordini Ricevuti', orders2: 'Ordini Ricevuti', diff --git a/src/db/lang/ws_es.js b/src/db/lang/ws_es.js index 66a384d3..f143f859 100755 --- a/src/db/lang/ws_es.js +++ b/src/db/lang/ws_es.js @@ -8,6 +8,7 @@ const msg_website_es = { products: { quantity: 'Quantità', quantityAvailable: 'Disponibili', + stockQty: 'In Magazzino', weight: 'Peso', stars: 'Voto', color: 'Colore', diff --git a/src/db/lang/ws_it.js b/src/db/lang/ws_it.js index c7366e95..4eff69bf 100755 --- a/src/db/lang/ws_it.js +++ b/src/db/lang/ws_it.js @@ -1,9 +1,9 @@ const msg_website_it = { ws: { - sitename: 'Riso', - siteshortname: 'RISO', - 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.', - keywords: 'riso, piattaforma di scambio, rete italiana scambio orizzontale, riso app, riso piattaforma, scambio e baratto, momenta RIS', + sitename: 'Più che Buono', + siteshortname: 'Più che Buono', + description: '', + keywords: '', }, hours: { descr: 'Descrizione', @@ -16,23 +16,35 @@ const msg_website_it = { pages: { home: 'Home', profile: 'Profilo', + install_site: 'Installa Sito', profile2: 'ProfiloU', mypage2: 'mypage2', myservice2: 'myservice2', myhosps2: 'myhosps2', mygood2: 'mygood2', + catalogo: 'Catalogo', fundraising: 'Sostieni il Progetto', notifs: 'Configura le Notifiche', unsubscribe: 'Disiscriviti', + unsubscribe_user: 'Disiscriviti User', test: 'Test', projects: 'Progetti', report: 'Report Ore', producer: 'Produttore', orderinfo: 'Ordini Effettuati', products: 'Prodotti', + cash: 'Cassa', + productInfos: 'Info Prodotti', + listinoprodotti: 'Listino Prodotti', productslist: 'Lista Prodotti', collabora: 'Collabora', + categories: 'Categorie', storehouses: 'Magazzino', + providers: 'Fornitori', + catprods: 'Categorie', + subcatprods: 'Sotto-Categorie', + gasordine: 'Gas Ordine', + scontisticas: 'Scontistica', departments: 'Uffici', orders: 'Ordini Ricevuti', orders2: 'Ordini Ricevuti', @@ -121,9 +133,11 @@ const msg_website_it = { only_residenti: 'Solo Residenti', only_consiglio: 'Solo Consiglieri', color: 'Colore', + gasordini: 'Gas Ordini', + gestoreordini: 'Gestore Ordini', }, msg: { - myAppName: 'Riso', + myAppName: 'Più che Buono', myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito', underconstruction: 'App in costruzione...', myDescriz: '', diff --git a/src/db/static_data.ts b/src/db/static_data.ts index efd77ed1..799d1f4a 100755 --- a/src/db/static_data.ts +++ b/src/db/static_data.ts @@ -7,30 +7,6 @@ import { import { func } from '@store/Modules/fieldsTable' -// const SHOW_PROJINTHEMENU = false -// -// let arrlistafavourite = [] -// let arrlistaprojtutti = [] -// let arrlistaprojmiei = [] -// if (SHOW_PROJINTHEMENU) { -// arrlistaprojtutti = Projects.getters.listaprojects(RouteNames.projectsall) -// arrlistaprojmiei = Projects.getters.listaprojects(RouteNames.myprojects) -// arrlistafavourite = Projects.getters.listaprojects(RouteNames.favouriteprojects) -// } -// PROGETTI -> FAVORITI : - -// if (arrlistafavourite.length > 0) { -// arrMenu.push({ -// icon: 'favorite_border', -// nametranslate: 'pages.' + RouteNames.favouriteprojects, -// urlroute: RouteNames.favouriteprojects, -// level_parent: 0.0, -// level_child: 0.5, -// routes2: arrlistafavourite, -// idelem: '' -// }) -// } - const firstPage = { active: true, order: 5, @@ -57,72 +33,7 @@ function getDynamicPages(site: ISites): IListRoutes[] { inmenu: true, infooter: true, }, - { - active: true, - order: 400, - path: '/test', - materialIcon: 'fas fa-test', - name: 'mypages.test', - component: () => import('@/views/testServer/testServer.vue'), - inmenu: false, - infooter: false, - }, - { - active: true, - order: 12, - path: '/goods', - materialIcon: 'fas fa-tshirt', - name: 'mypages.goods', - component: () => import('@/root/goods/goods.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: true, - order: 15, - path: '/services', - materialIcon: 'fas fa-house-user', - name: 'mypages.services', - component: () => import('@/root/services/services.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: true, - order: 15, - path: '/provapao', - materialIcon: 'fas fa-house-user', - name: 'mypages.provapao', - component: () => import('@/root/provapao/provapao.vue'), - meta: { requiresAuth: true }, - inmenu: false, - infooter: false, - }, - { - active: true, - order: 15, - path: '/hosps', - materialIcon: 'fas fa-bed', - name: 'mypages.hosp', - component: () => import('@/root/hosp/hosp.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: site.confpages && site.confpages.enableCircuits, - order: 16, - path: '/circuits', - materialIcon: 'fas fa-coins', - name: 'mypages.circuits', - component: () => import('@/views/user/mycircuits/mycircuits.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { + /*{ active: true, order: 20, path: '/events', @@ -132,6 +43,17 @@ function getDynamicPages(site: ISites): IListRoutes[] { meta: { requiresAuth: true }, inmenu: true, infooter: true, + },*/ + { + active: site.confpages && site.confpages.showProfile, + order: 120, + path: '/myprofile', + materialIcon: 'fas fa-user', + name: 'pages.profile', + component: () => import('@/views/user/myprofile/myprofile.vue'), + meta: { requiresAuth: true }, + inmenu: true, + infooter: true, }, { active: true, @@ -145,18 +67,7 @@ function getDynamicPages(site: ISites): IListRoutes[] { infooter: false, }, { - active: true, - order: 120, - path: '/myprofile', - materialIcon: 'fas fa-user', - name: 'pages.profile', - component: () => import('@/views/user/myprofile/myprofile.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: true, + active: site.confpages && site.confpages.showProfile, order: 120, path: '/editprofile', materialIcon: 'fas fa-user', @@ -167,7 +78,7 @@ function getDynamicPages(site: ISites): IListRoutes[] { infooter: false, }, { - active: true, + active: site.confpages && site.confpages.showiscrittiMenu, order: 130, path: '/friends', materialIcon: 'fas fa-user-friends', @@ -177,6 +88,19 @@ function getDynamicPages(site: ISites): IListRoutes[] { inmenu: true, infooter: true, }, + { + active: site.confpages && site.confpages.enableCircuits, + order: 16, + path: '/circuits', + materialIcon: 'fas fa-coins', + name: 'mypages.circuits', + component: () => import('@/views/user/mycircuits/mycircuits.vue'), + meta: { requiresAuth: true }, + inmenu: true, + infooter: true, + onlyAdmin: true, + onlyManager: true, + }, { active: site.confpages && site.confpages.enableGroups, order: 132, @@ -187,6 +111,8 @@ function getDynamicPages(site: ISites): IListRoutes[] { meta: { requiresAuth: true }, inmenu: true, infooter: false, + onlyAdmin: true, + onlyManager: true, }, { active: true, diff --git a/src/model/Products.ts b/src/model/Products.ts index 798d66b5..eb849479 100755 --- a/src/model/Products.ts +++ b/src/model/Products.ts @@ -213,6 +213,7 @@ export interface IGasordine { referent?: string, city?: string, img?: string, + note_ordine_gas?: string dataora_chiusura_ordini?: Date, data_arrivo_merce?: Date, dataora_ritiro?: Date, @@ -271,6 +272,7 @@ export interface IOrderCart { note: string note_per_gestore: string note_per_admin: string + note_ordine_gas: string } export interface IShareWithUs { diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js index d5d901a9..3b1081bc 100755 --- a/src/statics/lang/it.js +++ b/src/statics/lang/it.js @@ -1739,6 +1739,7 @@ const msg_it = { gas: { name: 'Ordine Gas', dataora_chiusura_ordini: 'Chiusura Ordini', + note_ordine_gas: 'Note Ordine GAS', data_arrivo_merce: 'Arrivo Merce', dataora_ritiro: 'Ritiro dal', ordina_sul_gas: 'Gruppo di Acquisto', diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 974aeec3..97d7cc14 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -513,6 +513,7 @@ export const colTableGasordine = [ AddCol({ name: 'city', label_trans: 'store.city' }), AddCol({ name: 'img', label_trans: 'store.img' }), AddCol({ name: 'dataora_chiusura_ordini', label_trans: 'gas.dataora_chiusura_ordini', fieldtype: costanti.FieldType.date }), + AddCol({ name: 'note_ordine_gas', label_trans: 'gas.note_ordine_gas', fieldtype: costanti.FieldType.html }), AddCol({ name: 'data_arrivo_merce', label_trans: 'gas.data_arrivo_merce', fieldtype: costanti.FieldType.date }), AddCol({ name: 'dataora_ritiro', label_trans: 'gas.dataora_ritiro', fieldtype: costanti.FieldType.date }), AddCol(DeleteRec), diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index 1bfc39d7..2b57dee5 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -4270,7 +4270,7 @@ export const tools = { getCookie(mytok: any, def?: any, convertint: any = false, convertbool: any = false) { const ris = Cookies.get(mytok) - console.log('getCookie', mytok, ris) + // console.log('getCookie', mytok, ris) if (ris === 'null') return def diff --git a/src/store/Products.ts b/src/store/Products.ts index feda7838..910269dc 100755 --- a/src/store/Products.ts +++ b/src/store/Products.ts @@ -32,6 +32,7 @@ function getRecordOrdersCartEmpty(): IOrderCart { note: '', note_per_gestore: '', note_per_admin: '', + note_ordine_gas: '', } } diff --git a/src/views/ecommerce/productsList/productsList.ts b/src/views/ecommerce/productsList/productsList.ts index c1b0bc52..0a8b6228 100755 --- a/src/views/ecommerce/productsList/productsList.ts +++ b/src/views/ecommerce/productsList/productsList.ts @@ -67,7 +67,7 @@ export default defineComponent({ watch(() => cat.value, (newval, oldval) => { calcArrProducts() }) - + watch(() => idGasSel.value, (newval, oldval) => { calcArrProducts() }) @@ -88,7 +88,7 @@ export default defineComponent({ function calcArrProducts() { // console.log('calcArrProducts') - + refreshpage.value = true let arrprod = productStore.getProducts(cosa.value) let catstr = cat.value; @@ -102,22 +102,24 @@ export default defineComponent({ } else { arrprod = arrprod.filter((product: IProduct) => { - let lowerName = product.productInfo.name!.toLowerCase(); - let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr)); + if (product && product.productInfo) { + let lowerName = product.productInfo.name!.toLowerCase(); + let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr)); - let productgassel = true - if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) { - productgassel = (product.idGasordine === gasselstr) + let productgassel = true + if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) { + productgassel = (product.idGasordine === gasselstr) + } + + // Use a regular expression to match whole words + let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i'); + let nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i'); + + // Check if any word in lowerName starts with lowerSearchText + let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word)); + + return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria && productgassel; } - - // Use a regular expression to match whole words - let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i'); - let nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i'); - - // Check if any word in lowerName starts with lowerSearchText - let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word)); - - return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria && productgassel; }); } @@ -176,7 +178,7 @@ export default defineComponent({ return riscat } - + function onLoadScroll(index: number, done: any) { if (index >= 1) { @@ -184,7 +186,7 @@ export default defineComponent({ const step = 10 let mynrec = numRecLoaded.value + step - + if (mynrec > arrProducts.value.length) mynrec = arrProducts.value.length diff --git a/src/views/ecommerce/productsList/productsList.vue b/src/views/ecommerce/productsList/productsList.vue index 254f8173..091f7dc1 100755 --- a/src/views/ecommerce/productsList/productsList.vue +++ b/src/views/ecommerce/productsList/productsList.vue @@ -100,7 +100,7 @@