From e7ead2e66a5f6ee2ac6ce0e53097d676c3e6ebc4 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Sun, 6 Jul 2025 23:12:56 +0200 Subject: [PATCH] - Raccolte Cataloghi corretto e migliorato. - Bottoni "Apri" e "PDF". --- .env | 4 +- index.html | 2 +- package.json | 14 +- .../comunitanuovomondo.app/package.json | 8 +- .../_ALL_SITES/freeplanet.app/package.json | 12 +- .../_ALL_SITES/gruppomacro.app/package.json | 14 +- scripts/_ALL_SITES/kolibrilab.it/package.json | 12 +- .../nutriben-naturopatia.it/package.json | 14 +- .../_ALL_SITES/piuchebuono.app/package.json | 12 +- scripts/_ALL_SITES/riso.app/package.json | 12 +- src-pwa/custom-service-worker.js | 2 +- src-pwa/register-service-worker.js | 1 + .../CMyRecCatalog/CMyRecCatalog.vue | 65 ++- .../CMyRecRaccoltaCataloghi.vue | 35 +- src/components/CProductTable/CProductTable.ts | 46 +- .../CSearchProduct/CSearchProduct.vue | 53 +- src/store/Modules/costanti.ts | 1 + src/store/Modules/tools.ts | 6 +- src/views/ecommerce/catalogo/catalogo.scss | 15 +- src/views/ecommerce/catalogo/catalogo.ts | 65 ++- src/views/ecommerce/catalogo/catalogo.vue | 52 +- .../raccoltacataloghi/raccoltacataloghi.ts | 2 +- .../raccoltacataloghi/raccoltacataloghi.vue | 489 ++++++++++++------ 23 files changed, 612 insertions(+), 324 deletions(-) diff --git a/.env b/.env index a6b0d6ab..d4b1ed3c 100755 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ -VITE_APP_VERSION="1.2.59" +VITE_APP_VERSION="1.2.62" VITE_LANG_DEFAULT="it" VITE_PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF" -VITE_SERVICE_WORKER_FILE="sw-1.2.59.js" +VITE_SERVICE_WORKER_FILE="sw-1.2.62.js" VITE_PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a" VITE_VUE_ROUTER_MODE="history" \ No newline at end of file diff --git a/index.html b/index.html index 956b596a..c0fe752a 100755 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + diff --git a/package.json b/package.json index 079ccb00..a9880638 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gruppomacro", - "version": "1.2.59", + "version": "1.2.62", "description": "Gruppo Macro", "productName": "Gruppo Macro", "author": "Surya", @@ -9,20 +9,20 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "PORT=8089 APP_VERSION='1.2.59' quasar dev", + "dev": "PORT=8089 APP_VERSION='1.2.62' quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", - "buildpwa": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", - "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", + "buildpwa": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", + "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", "type-check": "vue-tsc --noEmit", "type-check:watch": "vue-tsc --noEmit --watch", - "buildspa": "APP_VERSION='1.2.59' quasar build -m spa", + "buildspa": "APP_VERSION='1.2.62' quasar build -m spa", "lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"", "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 -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.62' quasar dev", "debug": "quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js", diff --git a/scripts/_ALL_SITES/comunitanuovomondo.app/package.json b/scripts/_ALL_SITES/comunitanuovomondo.app/package.json index 169701ba..30a3e6be 100755 --- a/scripts/_ALL_SITES/comunitanuovomondo.app/package.json +++ b/scripts/_ALL_SITES/comunitanuovomondo.app/package.json @@ -1,6 +1,6 @@ { "name": "cnm", - "version": "1.2.59", + "version": "1.2.62", "description": "Comunita Nuovo Mondo", "productName": "ComunitaNuovoMondo", "author": "Surya", @@ -9,7 +9,7 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "PORT=8083 APP_VERSION='1.2.59' quasar dev", + "dev": "PORT=8083 APP_VERSION='1.2.62' quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", "buildpwa": "NODE_ENV=production quasar build -m pwa", @@ -21,8 +21,8 @@ "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 -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.62' quasar dev", "debug": "quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js", diff --git a/scripts/_ALL_SITES/freeplanet.app/package.json b/scripts/_ALL_SITES/freeplanet.app/package.json index a7bac9f2..3a1ebf3c 100755 --- a/scripts/_ALL_SITES/freeplanet.app/package.json +++ b/scripts/_ALL_SITES/freeplanet.app/package.json @@ -1,6 +1,6 @@ { "name": "freeplanet", - "version": "1.2.59", + "version": "1.2.62", "description": "freeplanet", "productName": "freeplanet", "author": "Surya", @@ -9,11 +9,11 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "PORT=8087 APP_VERSION='1.2.59' quasar dev", + "dev": "PORT=8087 APP_VERSION='1.2.62' quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", - "buildpwa": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", - "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", + "buildpwa": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", + "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", "type-check": "vue-tsc --noEmit", "type-check:watch": "vue-tsc --noEmit --watch", "buildspa": "quasar build -m spa", @@ -21,8 +21,8 @@ "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 -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development PORT=8097 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8097 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.62' quasar dev", "debug": "quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js", diff --git a/scripts/_ALL_SITES/gruppomacro.app/package.json b/scripts/_ALL_SITES/gruppomacro.app/package.json index dd410787..d1f364ce 100755 --- a/scripts/_ALL_SITES/gruppomacro.app/package.json +++ b/scripts/_ALL_SITES/gruppomacro.app/package.json @@ -1,6 +1,6 @@ { "name": "gruppomacro", - "version": "1.2.59", + "version": "1.2.62", "description": "Gruppo Macro", "productName": "Gruppo Macro", "author": "Surya", @@ -9,20 +9,20 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "PORT=8089 APP_VERSION='1.2.59' quasar dev", + "dev": "PORT=8089 APP_VERSION='1.2.62' quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", - "buildpwa": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", - "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", + "buildpwa": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", + "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", "type-check": "vue-tsc --noEmit", "type-check:watch": "vue-tsc --noEmit --watch", - "buildspa": "APP_VERSION='1.2.59' quasar build -m spa", + "buildspa": "APP_VERSION='1.2.62' quasar build -m spa", "lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"", "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 -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.62' quasar dev", "debug": "quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js", diff --git a/scripts/_ALL_SITES/kolibrilab.it/package.json b/scripts/_ALL_SITES/kolibrilab.it/package.json index b3380896..01904bcf 100755 --- a/scripts/_ALL_SITES/kolibrilab.it/package.json +++ b/scripts/_ALL_SITES/kolibrilab.it/package.json @@ -1,6 +1,6 @@ { "name": "kolibrilab", - "version": "1.2.59", + "version": "1.2.62", "description": "kolibrilab", "productName": "kolibrilab", "author": "Surya Paolo", @@ -8,11 +8,11 @@ "keywords": [], "license": "MIT", "scripts": { - "dev": "PORT=8083 APP_VERSION='1.2.59' quasar dev", + "dev": "PORT=8083 APP_VERSION='1.2.62' quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", - "buildpwa": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", - "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", + "buildpwa": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", + "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", "type-check": "vue-tsc --noEmit", "type-check:watch": "vue-tsc --noEmit --watch", "buildspa": "quasar build -m spa", @@ -20,8 +20,8 @@ "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 PORT=8093 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.62' quasar dev", "spanorefresh": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m spa", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js" diff --git a/scripts/_ALL_SITES/nutriben-naturopatia.it/package.json b/scripts/_ALL_SITES/nutriben-naturopatia.it/package.json index 86fd6479..9e02e716 100755 --- a/scripts/_ALL_SITES/nutriben-naturopatia.it/package.json +++ b/scripts/_ALL_SITES/nutriben-naturopatia.it/package.json @@ -1,6 +1,6 @@ { "name": "nutriben", - "version": "1.2.59", + "version": "1.2.62", "description": "Nutriben", "productName": "Nutriben", "author": "Surya", @@ -9,20 +9,20 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "PORT=8093 APP_VERSION='1.2.59' quasar dev", + "dev": "PORT=8093 APP_VERSION='1.2.62' quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", - "buildpwa": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", - "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", + "buildpwa": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", + "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", "type-check": "vue-tsc --noEmit", "type-check:watch": "vue-tsc --noEmit --watch", - "buildspa": "APP_VERSION='1.2.59' quasar build -m spa", + "buildspa": "APP_VERSION='1.2.62' quasar build -m spa", "lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"", "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 -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.62' quasar dev", "debug": "quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js", diff --git a/scripts/_ALL_SITES/piuchebuono.app/package.json b/scripts/_ALL_SITES/piuchebuono.app/package.json index 932e81cc..01deaa83 100755 --- a/scripts/_ALL_SITES/piuchebuono.app/package.json +++ b/scripts/_ALL_SITES/piuchebuono.app/package.json @@ -1,6 +1,6 @@ { "name": "piuchebuono", - "version": "1.2.59", + "version": "1.2.62", "description": "PiuCheBuono", "productName": "PiuCheBuono", "author": "Surya", @@ -9,11 +9,11 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "PORT=8085 APP_VERSION='1.2.59' quasar dev", + "dev": "PORT=8085 APP_VERSION='1.2.62' quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", - "buildpwa": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", - "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", + "buildpwa": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", + "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", "type-check": "vue-tsc --noEmit", "type-check:watch": "vue-tsc --noEmit --watch", "buildspa": "quasar build -m spa", @@ -21,8 +21,8 @@ "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 -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.62' quasar dev", "debug": "quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js", diff --git a/scripts/_ALL_SITES/riso.app/package.json b/scripts/_ALL_SITES/riso.app/package.json index b6b0587e..bc893c64 100755 --- a/scripts/_ALL_SITES/riso.app/package.json +++ b/scripts/_ALL_SITES/riso.app/package.json @@ -1,6 +1,6 @@ { "name": "riso", - "version": "1.2.59", + "version": "1.2.62", "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": "Surya", @@ -9,11 +9,11 @@ "license": "MIT", "type": "module", "scripts": { - "dev": "APP_VERSION='1.2.59' PORT=8084 quasar dev", + "dev": "APP_VERSION='1.2.62' PORT=8084 quasar dev", "dev_noCheck": "SKIP_TSC=true quasar dev", "build": "quasar build", - "buildpwa": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", - "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.59' quasar build -m pwa", + "buildpwa": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", + "buildpwatest": "NODE_ENV=production APP_VERSION='1.2.62' quasar build -m pwa", "type-check": "vue-tsc --noEmit", "type-check:watch": "vue-tsc --noEmit --watch", "buildspa": "quasar build -m spa", @@ -21,8 +21,8 @@ "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 -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt", - "pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.59' quasar dev -m pwa", - "spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.59' quasar dev", + "pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.62' quasar dev -m pwa", + "spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.62' quasar dev", "debug": "quasar dev --mode debug", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js", diff --git a/src-pwa/custom-service-worker.js b/src-pwa/custom-service-worker.js index 6af8d437..0cdbb13d 100755 --- a/src-pwa/custom-service-worker.js +++ b/src-pwa/custom-service-worker.js @@ -3,7 +3,7 @@ /* global workbox */ /* global cfgenv */ -const VITE_APP_VERSION = '1.2.59'; +const VITE_APP_VERSION = '1.2.62'; // Costanti di configurazione const DYNAMIC_CACHE = 'dynamic-cache-v2'; diff --git a/src-pwa/register-service-worker.js b/src-pwa/register-service-worker.js index f50a3ede..5fca40aa 100755 --- a/src-pwa/register-service-worker.js +++ b/src-pwa/register-service-worker.js @@ -11,6 +11,7 @@ const SW_FILE = `/${import.meta.env.VITE_SERVICE_WORKER_FILE}`; console.log('SWFILE: ', SW_FILE); register(SW_FILE, { + updateViaCache: 'none', scope: '/', /************* ✨ Codeium Command ⭐ *************/ /** diff --git a/src/components/CMyRecCatalog/CMyRecCatalog.vue b/src/components/CMyRecCatalog/CMyRecCatalog.vue index 4c9b6e7f..5f391fdb 100755 --- a/src/components/CMyRecCatalog/CMyRecCatalog.vue +++ b/src/components/CMyRecCatalog/CMyRecCatalog.vue @@ -180,37 +180,72 @@ - + padding="sm" + > + + + + + + + diff --git a/src/components/CMyRecRaccoltaCataloghi/CMyRecRaccoltaCataloghi.vue b/src/components/CMyRecRaccoltaCataloghi/CMyRecRaccoltaCataloghi.vue index ef2b9355..af4effa3 100755 --- a/src/components/CMyRecRaccoltaCataloghi/CMyRecRaccoltaCataloghi.vue +++ b/src/components/CMyRecRaccoltaCataloghi/CMyRecRaccoltaCataloghi.vue @@ -62,26 +62,39 @@ > aggiornato al ({{ tools.getstrDate(myrec.data_online_stampa) }}) -
- Lista generata il: - {{ tools.getstrDate(myrec.data_lista_generata) || '(non ancora generata)' }} da - {{ myrec.username_lista_generata }} - -
+ + searchText.value, () => { - searchProducts(); - }); + watch( + () => searchText.value, + () => { + searchProducts(); + } + ); const allColumns = ref([]); @@ -178,6 +181,7 @@ export default defineComponent({ edit: true, noexp: true, notsortable: true, + visu: costanti.VISUCAMPI.PER_EDITORE, }, { name: 'drag', @@ -188,6 +192,7 @@ export default defineComponent({ edit: true, noexp: true, notsortable: true, + visu: costanti.VISUCAMPI.PER_LOGGATI, }, { name: 'image', @@ -296,6 +301,7 @@ export default defineComponent({ edit: true, noexp: true, notsortable: true, + visu: costanti.VISUCAMPI.PER_EDITORE, }, { name: 'drag', @@ -306,6 +312,7 @@ export default defineComponent({ edit: true, noexp: true, notsortable: true, + visu: costanti.VISUCAMPI.PER_LOGGATI, }, { name: 'validato', @@ -346,6 +353,7 @@ export default defineComponent({ align: 'center', noexp: true, notsortable: true, + visu: costanti.VISUCAMPI.PER_LOGGATI, }, { name: 'name', label: 'Titolo', field: 'name', align: 'left' }, { @@ -396,13 +404,13 @@ export default defineComponent({ align: 'left', }, { name: 'pagine', label: 'Pag.', field: 'pagine', align: 'right' }, - { name: 'prezzo', label: '€', field: 'prezzo', align: 'right' }, - { + { name: 'prezzo', label: 'Prezzo Intero', field: 'prezzo', align: 'right' }, + /*{ name: 'prezzo_sconto', label: '€ (sconto)', field: 'prezzo_sconto', align: 'right', - }, + },*/ { name: 'date_pub', label: 'Pubblicato', @@ -464,7 +472,7 @@ export default defineComponent({ }, { name: 'quantity', - label: 'Magazz.', + label: 'Disponib.', field: 'quantity', align: 'right', }, @@ -484,7 +492,8 @@ export default defineComponent({ (col) => !col.visu || col.visu === costanti.VISUCAMPI.PER_TUTTI || - (col.visu === costanti.VISUCAMPI.PER_EDITORE && tools.isCollaboratore()) + (col.visu === costanti.VISUCAMPI.PER_EDITORE && tools.isCollaboratore()) || + (col.visu === costanti.VISUCAMPI.PER_LOGGATI && tools.isLogged()) ); }); @@ -542,7 +551,7 @@ export default defineComponent({ loading.value = false; } - function getFieldValue(element: any, field: any): any { + function getFieldValue(element: any, field: any, colexport: boolean = false): any { if (!element) return ''; try { @@ -664,11 +673,13 @@ export default defineComponent({ case 'prezzo': // return element.price ? '€ ' + element.price.toFixed(2) : ''; - return '€ ' + element.arrvariazioni?.[0]?.price?.toFixed(2); + const add = colexport ? '' : ' ' + return '€' + add + element.arrvariazioni?.[0]?.price?.toFixed(2); case 'prezzo_sconto': + const add2 = colexport ? '' : ' ' // return element.sale_price ? '€ ' + element.sale_price.toFixed(2) : ''; - return '€ ' + element.arrvariazioni?.[0]?.sale_price?.toFixed(2); + return '€' + add2 + element.arrvariazioni?.[0]?.sale_price?.toFixed(2); case 'rank3M': return element.productInfo?.rank3M; @@ -884,10 +895,9 @@ export default defineComponent({ const faiConfronto = () => { return ( - Array.isArray(props.lista_prod_confronto) && - props.lista_prod_confronto.length > 0 + Array.isArray(props.lista_prod_confronto) && props.lista_prod_confronto.length > 0 ); - } + }; // 3. Funzione per verificare se una colonna è visibile (isColumnVisible) const isColumnVisible = (column: string, real?: boolean, element?: any) => { @@ -915,7 +925,7 @@ export default defineComponent({ if (column === 'addtolist') { if (!faiConfronto()) { - ok = false + ok = false; } } @@ -923,7 +933,7 @@ export default defineComponent({ }; function isElementVisible(col: string, element: any) { - let ok = true + let ok = true; if (col === 'addtolist') { if ( @@ -935,7 +945,7 @@ export default defineComponent({ } } - return ok + return ok; } const getColumnLabelByName = (name: string): string => { @@ -1193,7 +1203,7 @@ export default defineComponent({ const field = { field: col }; return field.field === 'pos' ? internalProducts.value.indexOf(product) + 1 - : getFieldValue(product, field); + : getFieldValue(product, field, true); }) .join('|'); }), diff --git a/src/components/CSearchProduct/CSearchProduct.vue b/src/components/CSearchProduct/CSearchProduct.vue index 9a7e083c..65f4f734 100755 --- a/src/components/CSearchProduct/CSearchProduct.vue +++ b/src/components/CSearchProduct/CSearchProduct.vue @@ -19,7 +19,10 @@ :key="index" > +
+
+ + + +
+
-
-
-
- - - -
-
-
diff --git a/src/store/Modules/costanti.ts b/src/store/Modules/costanti.ts index 266272b0..1d328e2d 100755 --- a/src/store/Modules/costanti.ts +++ b/src/store/Modules/costanti.ts @@ -553,6 +553,7 @@ export const costanti = { PER_TUTTI: 0, PER_EDITORE: 1, PER_ADMIN: 16, + PER_LOGGATI: 32, }, OP_ANDOR: { diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index 96ea875d..b4855890 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -8271,7 +8271,7 @@ export const tools = { }, getFullFileName( - arrimage: IImgGallery[], + arrimage: IImgGallery[] | IImg[], table: string, username: string, groupname: string @@ -8942,7 +8942,7 @@ export const tools = { } else if (table === 'catalogs') { ris = 'catalogs/' + id; } else if (table === 'raccoltacataloghis') { - ris = 'raccoltacatalogs/' + id; + ris = 'raccoltacataloghis/' + id; } else if (!!myrow && !!myrow.directory) { ris = myrow.directory; } else if (table === 'myelems') { @@ -11099,7 +11099,7 @@ export const tools = { return 0; } }, - getURLByHostAndFilePath(filepath: string, timestamp: string = '') { + getURLByHostAndFilePath(filepath: string, timestamp: number = 0) { try { let myurl = filepath.startsWith('/') ? tools.getHost() + filepath diff --git a/src/views/ecommerce/catalogo/catalogo.scss b/src/views/ecommerce/catalogo/catalogo.scss index b316e7b8..01fd33fc 100755 --- a/src/views/ecommerce/catalogo/catalogo.scss +++ b/src/views/ecommerce/catalogo/catalogo.scss @@ -96,7 +96,8 @@ body { text-align: justify; word-wrap: break-word; - hyphens: auto; /* Sillabazione automatica */ + hyphens: auto; + /* Sillabazione automatica */ } @@ -116,7 +117,7 @@ body { font-size: calc(17 * var(--scalecatalogx) * 1px); height: calc(380 * var(--scalecatalogy) * 1px); line-height: 130%; - + font-weight: normal; padding: 8px; @@ -124,7 +125,8 @@ body { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); text-shadow: 1px 1px 2px black; - overflow: hidden; /* Nasconde il testo che esce dalla height fissa */ + overflow: hidden; + /* Nasconde il testo che esce dalla height fissa */ } @@ -240,7 +242,7 @@ body { transform: translateY(-2px); } -.text-link{ +.text-link { font-family: 'Arial', sans-serif; font-size: 1.1rem; color: #1a3f8a; @@ -252,8 +254,13 @@ body { color: #5c8ef4; } } + .clCondiz { margin-bottom: 2px; margin-left: 2px; margin-right: 2px; +} + +.title_Catalogo { + text-shadow: 1px 1px 2px black; } \ No newline at end of file diff --git a/src/views/ecommerce/catalogo/catalogo.ts b/src/views/ecommerce/catalogo/catalogo.ts index f6318352..1081bb51 100755 --- a/src/views/ecommerce/catalogo/catalogo.ts +++ b/src/views/ecommerce/catalogo/catalogo.ts @@ -213,7 +213,11 @@ export default defineComponent({ }); const onlyCatalogoPDF = computed(() => { - return optcatalogo.value.showOnlyCatalogoPDF; + return optcatalogo.value.showOnlyCatalogoPDF || $route.query?.hideHeader; + }); + + const mostraTuttiITab = computed(() => { + return !onlyCatalogoPDF.value; }); const showListaFiltrata = computed(() => { @@ -577,6 +581,15 @@ export default defineComponent({ } } + function esistePagIntroduttiva(): boolean { + for (const recscheda of optcatalogo.value.arrSchede!) { + if (recscheda.scheda?.isPagIntro) { + return true; + } + } + return false; + } + const getImgIntroCatalogo = (scheda: IMyScheda): IImg => { const trovatocatalogo = myCatalog.value; @@ -1003,7 +1016,7 @@ export default defineComponent({ return arrris; } - async function calcArrProducts(generalista?: boolean, salva_listatemp: boolean) { + async function calcArrProducts(generalista?: boolean, salva_listatemp?: boolean) { // console.log('calcArrProducts (generalista=' + generalista + ')'); if (generalista) { @@ -1139,7 +1152,7 @@ export default defineComponent({ await globalStore.saveTable(mydata); } - function generaListaLibri() { + async function generaListaLibri() { // chiedi prima "Sei sicuro di rigenerare il catalogo?" let risposta_si = false; @@ -1154,16 +1167,27 @@ export default defineComponent({ message: msg, cancel: true, persistent: false, - }).onOk(() => { - calcArrProducts(true); + }).onOk(async () => { + $q.loading.show({ + message: `Rigenera lista in corso, attendere ...`, + }); + + await calcArrProducts(true); + $q.loading.hide(); }); } - function generaListaTempLibri() { + async function generaListaTempLibri() { // chiedi prima "Sei sicuro di rigenerare il catalogo?" let risposta_si = false; - calcArrProducts(true, true); + $q.loading.show({ + message: `Mostra lista, attendere ...`, + }); + + await calcArrProducts(true, true); + + $q.loading.hide(); } function reSortList() { @@ -1586,9 +1610,13 @@ export default defineComponent({ // controlla se è stato passato l'id dalla pagina: let idcatsel = ''; - if ($route.query.id) idcatsel = $route.query.id as string; - if ($route.query.stampa) instampa = $route.query.stampa === '1'; - else idcatsel = optcatalogo.value.idCatalogSel; + if ($route.query.id) { + idcatsel = $route.query.id as string; + } else { + idcatsel = optcatalogo.value.idCatalogSel; + } + + instampa = $route.query?.stampa === '1'; mycat = catalogStore.getCatalogById(idcatsel); } else { @@ -2399,7 +2427,7 @@ export default defineComponent({ generaPdfCatalogo(true); }; - const preparePDF = (instampa: boolean, senzachiedere: boolean) => { + async function preparePDF(instampa: boolean, senzachiedere = false) { let str = ''; if (instampa) { str = 'per la stampa'; @@ -2416,7 +2444,7 @@ export default defineComponent({ label: t('dialog.cancel'), }, title: 'Generazione PDF', - }).onOk(async () => { + }).onOk(() => { parti = true; }); } @@ -2427,8 +2455,8 @@ export default defineComponent({ : shared_consts.PREPARA_PDF.WEB; arrProducts.value = []; - console.log('aggiorna... '); - calcArrProducts(false); + console.log('aggiorna... ', optcatalogo.value.selectedVersionStampabile); + await calcArrProducts(false); updateCatalogoPadre(); optcatalogo.value.generazionePDFInCorso = true; @@ -2444,10 +2472,15 @@ export default defineComponent({ optcatalogo.value.selectedVersionStampabile = instampa ? shared_consts.PREPARA_PDF.STAMPA : shared_consts.PREPARA_PDF.WEB; + + console.log( + 'selectedVersionStampabile', + optcatalogo.value.selectedVersionStampabile + ); }, 500); }, 200); } - }; + } const terminaPDF = () => { optcatalogo.value.generazionePDFInCorso = false; @@ -2806,6 +2839,8 @@ export default defineComponent({ generaListaTempLibri, globalStore, showColorPicker, + mostraTuttiITab, + esistePagIntroduttiva, }; }, }); diff --git a/src/views/ecommerce/catalogo/catalogo.vue b/src/views/ecommerce/catalogo/catalogo.vue index 916b5cc3..d21938ae 100755 --- a/src/views/ecommerce/catalogo/catalogo.vue +++ b/src/views/ecommerce/catalogo/catalogo.vue @@ -2,7 +2,7 @@
{{ getTitoloCatalogo() }} @@ -10,8 +10,8 @@
{{ getReferentiCatalogo() }}
-
+
@@ -1148,6 +1148,19 @@ v-for="(product, index) in arrLoaded" :key="index" > + + + +
@@ -34,6 +33,7 @@ > -
+
- - -
-
-
- - -
+
+ + + +
+ {{ `${getRaccoltaCataloghiByMyPage.title}` }} +
+
+
+ + + {{ + getRaccoltaCataloghiByMyPage.pdf_online + ? `${getRaccoltaCataloghiByMyPage.pdf_online_size} MB` + : '' + }} + + + Pubblicato il -

+ + {{ + getRaccoltaCataloghiByMyPage.pdf_online + ? tools.getstrDate(getRaccoltaCataloghiByMyPage.data_online) + : '' + }} + +
+
+
-
- - - + + + + + +
+
+ + + +
Versione per STAMPA
+
+
+ + + {{ + getRaccoltaCataloghiByMyPage.pdf_online + ? `${getRaccoltaCataloghiByMyPage.pdf_online_stampa_size} MB` + : '' + }} + + + Pubblicato il + + + {{ + getRaccoltaCataloghiByMyPage.pdf_online_stampa + ? tools.getstrDate( + getRaccoltaCataloghiByMyPage.data_online_stampa + ) + : '' + }} + +
+
+
+ + + + + +
+
-
-
- PDF generati Temporanei +
+
+
+ + +
+
+
+ + +
+ +

+
+
+
+ + + +
- PDF Generato: - - {{ - tools.getURLByHostAndFilePath( - getRaccoltaCataloghiByMyPage?.pdf_generato - ) - }} - - - -
(del - {{ tools.getstrDateTime(getRaccoltaCataloghiByMyPage?.data_generato) }}) -
- + PDF generati Temporanei +
+
-
-
-
- PDF Generato Stampa: - - {{ - tools.getURLByHostAndFilePath( - getRaccoltaCataloghiByMyPage?.pdf_generato_stampa - ) - }} - - - -
(del - {{ - tools.getstrDateTime(getRaccoltaCataloghiByMyPage?.data_generato_stampa) - }}) + PDF Generato: + + {{ + tools.getURLByHostAndFilePath( + getRaccoltaCataloghiByMyPage?.pdf_generato + ) + }} + + - +
(del + {{ tools.getstrDateTime(getRaccoltaCataloghiByMyPage?.data_generato) }}) +
+ +

- -
-
-
- PDF Pubblicati OnLine -
-
- PDF OnLine: + > + PDF Generato Stampa: {{ tools.getURLByHostAndFilePath( - getRaccoltaCataloghiByMyPage?.pdf_online - ) - }} - - - -
(del - {{ tools.getstrDateTime(getRaccoltaCataloghiByMyPage?.data_online) }}) -
-
-
- > PDF OnLine Stampa: - - {{ - tools.getURLByHostAndFilePath( - getRaccoltaCataloghiByMyPage?.pdf_online_stampa + getRaccoltaCataloghiByMyPage?.pdf_generato_stampa ) }} -
(del {{ - tools.getstrDateTime(getRaccoltaCataloghiByMyPage?.data_online_stampa) + tools.getstrDateTime( + getRaccoltaCataloghiByMyPage?.data_generato_stampa + ) }}) +
+