- aggiornato la visualoizzazione per scaricare il PDF e per aprirlo

This commit is contained in:
Surya Paolo
2025-05-30 10:49:25 +02:00
parent 5ba3bef8a1
commit 72d5574fab
19 changed files with 827 additions and 543 deletions

4
.env
View File

@@ -1,6 +1,6 @@
VITE_APP_VERSION="1.2.50"
VITE_APP_VERSION="1.2.52"
VITE_LANG_DEFAULT="it"
VITE_PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
VITE_SERVICE_WORKER_FILE="sw-1.2.50.js"
VITE_SERVICE_WORKER_FILE="sw-1.2.52.js"
VITE_PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
VITE_VUE_ROUTER_MODE="history"

View File

@@ -10,7 +10,7 @@
<meta name="description" content="<%= productDescription %>">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="version" content="1.2.50">
<meta name="version" content="1.2.52">
<meta name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">

View File

@@ -1,6 +1,6 @@
{
"name": "gruppomacro",
"version": "1.2.50",
"version": "1.2.52",
"description": "Gruppo Macro",
"productName": "Gruppo Macro",
"author": "Surya",
@@ -9,20 +9,20 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "PORT=8089 APP_VERSION='1.2.50' quasar dev",
"dev": "PORT=8089 APP_VERSION='1.2.52' quasar dev",
"dev_noCheck": "SKIP_TSC=true quasar dev",
"build": "quasar build",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"type-check": "vue-tsc --noEmit",
"type-check:watch": "vue-tsc --noEmit --watch",
"buildspa": "APP_VERSION='1.2.50' quasar build -m spa",
"buildspa": "APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.52' quasar dev",
"debug": "quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js",

View File

@@ -1,6 +1,6 @@
{
"name": "cnm",
"version": "1.2.50",
"version": "1.2.52",
"description": "Comunita Nuovo Mondo",
"productName": "ComunitaNuovoMondo",
"author": "Surya",
@@ -9,7 +9,7 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "PORT=8083 APP_VERSION='1.2.50' quasar dev",
"dev": "PORT=8083 APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.52' quasar dev",
"debug": "quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js",

View File

@@ -1,6 +1,6 @@
{
"name": "freeplanet",
"version": "1.2.50",
"version": "1.2.52",
"description": "freeplanet",
"productName": "freeplanet",
"author": "Surya",
@@ -9,11 +9,11 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "PORT=8087 APP_VERSION='1.2.50' quasar dev",
"dev": "PORT=8087 APP_VERSION='1.2.52' quasar dev",
"dev_noCheck": "SKIP_TSC=true quasar dev",
"build": "quasar build",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8097 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.52' quasar dev",
"debug": "quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js",

View File

@@ -1,6 +1,6 @@
{
"name": "gruppomacro",
"version": "1.2.50",
"version": "1.2.52",
"description": "Gruppo Macro",
"productName": "Gruppo Macro",
"author": "Surya",
@@ -9,20 +9,20 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "PORT=8089 APP_VERSION='1.2.50' quasar dev",
"dev": "PORT=8089 APP_VERSION='1.2.52' quasar dev",
"dev_noCheck": "SKIP_TSC=true quasar dev",
"build": "quasar build",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"type-check": "vue-tsc --noEmit",
"type-check:watch": "vue-tsc --noEmit --watch",
"buildspa": "APP_VERSION='1.2.50' quasar build -m spa",
"buildspa": "APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.52' quasar dev",
"debug": "quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js",

View File

@@ -1,6 +1,6 @@
{
"name": "kolibrilab",
"version": "1.2.50",
"version": "1.2.52",
"description": "kolibrilab",
"productName": "kolibrilab",
"author": "Surya Paolo",
@@ -8,11 +8,11 @@
"keywords": [],
"license": "MIT",
"scripts": {
"dev": "PORT=8083 APP_VERSION='1.2.50' quasar dev",
"dev": "PORT=8083 APP_VERSION='1.2.52' quasar dev",
"dev_noCheck": "SKIP_TSC=true quasar dev",
"build": "quasar build",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.52' 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"

View File

@@ -1,6 +1,6 @@
{
"name": "nutriben",
"version": "1.2.50",
"version": "1.2.52",
"description": "Nutriben",
"productName": "Nutriben",
"author": "Surya",
@@ -9,20 +9,20 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "PORT=8093 APP_VERSION='1.2.50' quasar dev",
"dev": "PORT=8093 APP_VERSION='1.2.52' quasar dev",
"dev_noCheck": "SKIP_TSC=true quasar dev",
"build": "quasar build",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"type-check": "vue-tsc --noEmit",
"type-check:watch": "vue-tsc --noEmit --watch",
"buildspa": "APP_VERSION='1.2.50' quasar build -m spa",
"buildspa": "APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.52' quasar dev",
"debug": "quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js",

View File

@@ -1,6 +1,6 @@
{
"name": "piuchebuono",
"version": "1.2.50",
"version": "1.2.52",
"description": "PiuCheBuono",
"productName": "PiuCheBuono",
"author": "Surya",
@@ -9,11 +9,11 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "PORT=8085 APP_VERSION='1.2.50' quasar dev",
"dev": "PORT=8085 APP_VERSION='1.2.52' quasar dev",
"dev_noCheck": "SKIP_TSC=true quasar dev",
"build": "quasar build",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.52' quasar dev",
"debug": "quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js",

View File

@@ -1,6 +1,6 @@
{
"name": "riso",
"version": "1.2.50",
"version": "1.2.52",
"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.50' PORT=8084 quasar dev",
"dev": "APP_VERSION='1.2.52' PORT=8084 quasar dev",
"dev_noCheck": "SKIP_TSC=true quasar dev",
"build": "quasar build",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.50' quasar build -m pwa",
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.52' quasar build -m pwa",
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.52' 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.50' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.50' quasar dev",
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.52' quasar dev -m pwa",
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.52' quasar dev",
"debug": "quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js",

View File

@@ -3,7 +3,7 @@
/* global workbox */
/* global cfgenv */
const VITE_APP_VERSION = '1.2.50';
const VITE_APP_VERSION = '1.2.52';
// Costanti di configurazione
const DYNAMIC_CACHE = 'dynamic-cache-v2';

View File

@@ -6,7 +6,7 @@
:prop_mytable="table"
:options="tools.optionsTable(table)"
:prop_mytitlenew="tools.getTitleAnnuncio(table)"
prop_mytitle="Cataloghi"
prop_mytitle=""
:prop_mycolumns="col"
:prop_colkey="prop_colkey"
:col_title="col_title"

View File

@@ -524,6 +524,7 @@
row: opt.rowclass,
'items-stretch': opt.rowclass,
'justify-evenly': opt.rowclass,
'q-col-gutter-y-md': opt.rowclass,
}"
>
<div

View File

@@ -2,8 +2,13 @@
<q-card
v-if="myrec"
bordered
class="full-height flex flex-column justify-evenly"
:style="`width: ` + opt.widthcard + `; ` + (opt.heightcard ? `height: ` + opt.heightcard + `;` : '')"
class="full-height justify-evenly catalog-card"
:style="
`width: ` +
opt.widthcard +
`; ` +
(opt.heightcard ? `height: ` + opt.heightcard + `;` : '')
"
>
<q-img
:width="opt.widthimg"
@@ -14,29 +19,38 @@
:src="tools.getFullFileName([myrec.foto_collana], table, '', myrec._id)"
>
<template v-slot:error>
<div class="absolute-full flex flex-center text-white">immagine non impostata</div>
<div class="absolute-full flex flex-center text-white">
immagine non impostata
</div>
</template>
<!--<div class="text-h6 absolute-bottom text-left">
{{ myrec.title }}
</div>-->
</q-img>
<q-card-section class="q-px-sm" style="margin-top: 0; flex-grow: 0; align-self: flex-start;">
<q-card-section
class="q-px-sm"
style="margin-top: 0; flex-grow: 0; align-self: flex-start"
>
<div
class="q-mb-md text-center text-bold"
style="font-size: 1.15rem"
>
<a
:href="pagina_collegata"
target="_blank"
>{{ myrec.title }}</a
<div class="q-mb-md text-center text-bold">
<span
class="text-link"
@click="naviga(pagina_collegata)"
>
{{ myrec.title }}
</span>
</div>
</div>
<div class="q-px-md">
<div class="text-caption text-h7 text-grey q-pb-xs">
<q-icon name="fas fa-list-ol" /> {{ $t('cataloglist.numprodotti') }}:
<span :class="`text-` + (numprodottistr === 0 ? 'red' : 'blue')">{{ numprodottistr }}</span>
<q-icon name="fas fa-list-ol" />&nbsp; {{ $t('cataloglist.numprodotti') }}:
<span :class="`text-` + (numprodottistr === 0 ? 'red' : 'blue')">{{
numprodottistr
}}</span>
</div>
<div
v-if="!tools.isUtente() && dettagli"
@@ -45,7 +59,11 @@
<q-icon name="fas fa-user" /> {{ $t('cataloglist.referenti') }}:
<span
v-if="myrec.referenti && myrec.referenti.length > 0"
:class="`text-bold ` + myrec.referenti && myrec.referenti.length > 0 ? 'text-blue' : 'text-red'"
:class="
`text-bold ` + myrec.referenti && myrec.referenti.length > 0
? 'text-blue'
: 'text-red'
"
>
{{ myrec.referenti ? myrec.referenti.join(', ') : '' }}
</span>
@@ -103,15 +121,11 @@
</div>
<div
v-if="myrec.pdf_online"
class="text-caption text-h7 text-blue q-pb-xs"
class="text-caption text-h7 text-grey q-pb-xs"
>
<q-icon name="fas fa-book" />&nbsp;
<a
:href="myrec.pdf_online"
target="_blank"
>PDF OnLine</a
>
aggiornato al ({{ tools.getstrDate(myrec.data_online) }})
<q-icon name="fas fa-book" />&nbsp; Aggiornato al ({{
tools.getstrDate(myrec.data_online)
}})
</div>
<div
v-if="!tools.isUtente() && myrec.pdf_online_stampa && dettagli"
@@ -130,8 +144,12 @@
class="text-caption text-h7 text-grey q-pb-xs"
>
<q-icon name="fas fa-list" /> Lista generata il:
<span :class="`text-` + (tools.isDateValid(myrec.data_lista_generata) ? 'blue' : 'red')"
>{{ tools.getstrDate(myrec.data_lista_generata) || '(non ancora generata)' }} da
<span
:class="
`text-` + (tools.isDateValid(myrec.data_lista_generata) ? 'blue' : 'red')
"
>{{ tools.getstrDate(myrec.data_lista_generata) || '(non ancora generata)' }}
da
{{ myrec.username_lista_generata }}
</span>
</div>
@@ -140,11 +158,34 @@
</q-card-section>
<q-card-actions
v-if="!tools.isUtente() && dettagli"
align="center"
class="q-mt-auto q-mx-auto q-mb-sm"
>
<q-btn
v-if="myrec.pdf_online"
unelevated
rounded
color="primary"
icon="fas fa-file-pdf"
:label="`Apri PDF`"
:href="tools.getURLByHostAndFilePath(myrec.pdf_online)"
size="md"
class="hover-lift"
/>
<q-btn
v-if="myrec.pdf_online"
unelevated
rounded
color="primary"
icon="download"
:label="`Scarica PDF`"
:href="tools.getURLByHostAndFilePath(myrec.pdf_online)"
download
size="md"
class="hover-lift"
/>
<q-fab
v-if="!tools.isUtente() && dettagli"
color="primary"
icon="fas fa-caret-down"
label="Menu"
@@ -182,13 +223,13 @@
icon="fas fa-pencil-alt"
/>
</q-fab>
<q-btn
<!--<q-btn
flat
color="primary"
label="Info"
icon="fas fa-info"
@click="apriInfo = true"
/>
/>-->
</q-card-actions>
</q-card>
@@ -214,9 +255,15 @@
class="q-ma-sm"
>
<CLabel
:value="myrec.referenti && myrec.referenti.length > 0 ? myrec.referenti.join(', ') : '[Non Assegnato]'"
:value="
myrec.referenti && myrec.referenti.length > 0
? myrec.referenti.join(', ')
: '[Non Assegnato]'
"
:label="$t('cataloglist.referenti') + `:`"
:color="myrec.referenti && myrec.referenti.length > 0 ? 'text-blue' : 'text-red'"
:color="
myrec.referenti && myrec.referenti.length > 0 ? 'text-blue' : 'text-red'
"
/>
</div>
<div
@@ -256,8 +303,9 @@
>
<CLabel
:value="
tools.getstrDate(myrec.data_lista_generata) + ' da ' + myrec.username_lista_generata ||
'ancora non è stata generata'
tools.getstrDate(myrec.data_lista_generata) +
' da ' +
myrec.username_lista_generata || 'ancora non è stata generata'
"
label="Lista generata"
:color="myrec.pdf_generato ? 'green' : 'red'"

View File

@@ -422,7 +422,6 @@ export default defineComponent({
label: 'Magazz.',
field: 'quantity',
align: 'right',
visu: costanti.VISUCAMPI.PER_EDITORE,
},
{
name: 'actions',
@@ -437,7 +436,7 @@ export default defineComponent({
const allColumnsComputed = computed(() => {
return allColumns.value.filter(
(col) => !col.visu || col.visu === costanti.VISUCAMPI.PER_TUTTI
(col) => !col.visu || col.visu === costanti.VISUCAMPI.PER_TUTTI || (col.visu === costanti.VISUCAMPI.PER_EDITORE && tools.isCollaboratore())
);
});
@@ -448,6 +447,7 @@ export default defineComponent({
if (props.table === shared_consts.TABLES_CATALOG) {
selectedColumns.value = selectedColumns_Catalogs.value;
} else {
// "products"
selectedColumns.value = tools.isUtente()
? selectedColumns_Utenti.value
: selectedColumns_Editori.value;

View File

@@ -10351,6 +10351,22 @@ export const tools = {
);
},
isCollStampa() {
const userStore = useUserStore();
return (userStore.isGrafico || userStore.isAdmin)
},
isCollaboratore() {
const userStore = useUserStore();
return (
userStore.isEditor ||
userStore.isCommerciale ||
userStore.isAdmin ||
userStore.isManager || userStore.isGrafico
);
},
getsearchList_RaccoltaCataloghi() {
const lista = [
{

View File

@@ -187,3 +187,60 @@ body {
border-color: #5c8ef4 !important;
box-shadow: 0 0 0 2px rgba(92, 142, 244, 0.3);
}
.pdf-link {
font-family: 'Arial', sans-serif;
font-size: 1.1rem;
color: #1a3f8a;
text-decoration: underline;
cursor: pointer;
transition: color 0.2s ease-in-out;
&:hover {
color: #5c8ef4;
}
}
.intestaz-col {
font-size: 1.10rem;
}
.catalog-download-section {
padding: 2rem;
display: flex;
justify-content: center;
align-items: center;
background-color: #f9f9f9;
}
.catalog-card {
border-radius: 16px;
max-width: 400px;
width: 100%;
transition: transform 0.2s ease-in-out;
}
.catalog-card:hover {
transform: translateY(-5px);
}
.hover-lift {
transition: transform 0.2s ease;
}
.hover-lift:hover {
transform: translateY(-2px);
}
.text-link{
font-family: 'Arial', sans-serif;
font-size: 1.1rem;
color: #1a3f8a;
text-decoration: underline;
cursor: pointer;
transition: color 0.2s ease-in-out;
&:hover {
color: #5c8ef4;
}
}

View File

@@ -124,8 +124,13 @@ export default defineComponent({
{ name: 'azioni', label: 'Azioni', field: 'azioni', align: 'center' },
];
const pdfRows = computed(() => [
const pdfRows = computed(() => {
return pdfRowsall.value.filter((row) => row.visible);
});
const pdfRowsall = computed(() => [
{
visible: true,
name: 'PDF Generato',
pdf: myCatalog.value.pdf_generato,
data: myCatalog.value.data_generato,
@@ -135,15 +140,17 @@ export default defineComponent({
action: () => pubblicaPDF(false),
},
{
visible: true,
name: 'PDF Generato (Compresso)',
pdf: myCatalog.value.pdf_generato_compressed,
data: myCatalog.value.data_generato,
showButton: true,
buttonLabel: 'Pubblica PDF OnLine (Compr)',
buttonLabel: 'Pubblica PDF Compresso',
size: myCatalog.value.pdf_generato_compr_size,
action: () => pubblicaPDF(true),
},
{
visible: tools.isCollStampa(),
name: 'PDF Generato Stampa',
pdf: myCatalog.value.pdf_generato_stampa,
data: myCatalog.value.data_generato_stampa,
@@ -153,11 +160,12 @@ export default defineComponent({
action: () => pubblicaPDFStampa(false),
},
{
visible: tools.isCollStampa(),
name: 'PDF Generato Stampa (Compresso)',
pdf: myCatalog.value.pdf_generato_stampa_compressed,
data: myCatalog.value.data_generato_stampa,
showButton: true,
buttonLabel: 'Pubblica PDF Stampa (Compr)',
buttonLabel: 'Pubblica PDF Stampa (Compresso)',
size: myCatalog.value.pdf_generato_stampa_compr_size,
action: () => pubblicaPDFStampa(true),
},
@@ -326,6 +334,7 @@ export default defineComponent({
() => tabcatalogo.value,
() => {
if (!onlyCatalogoPDF.value) {
if (tabcatalogo.value === 'lista' || tabcatalogo.value === 'visu')
tools.setCookie('TAB_CAT', tabcatalogo.value);
}
}
@@ -2534,7 +2543,6 @@ export default defineComponent({
idCatalog: myCatalog.value._id,
stampa: instampa,
comprimi: true,
compressione: 'printer',
path: 'upload/cataloghi/',
// idtag_pdfcontent: 'tag-catalogo',
compressione: 'printer',

View File

@@ -9,8 +9,9 @@
</div>
<div
v-if="
ispageCatalogata && !optcatalogo.showOnlyCatalogoPDF
&& (tools.isEditor() || tools.isCommerciale()) &&
ispageCatalogata &&
!optcatalogo.showOnlyCatalogoPDF &&
(tools.isEditor() || tools.isCommerciale()) &&
myCatalog?.referenti?.length > 0
"
class="text-h7 text-center text-red q-ma-sm"
@@ -33,6 +34,12 @@
toggle-color="primary"
></q-toggle>
-->
<q-tab
name="visu"
icon="fas fa-book"
label="Catalogo"
>
</q-tab>
<q-tab
v-if="myCatalog?.lista_prodotti"
name="lista"
@@ -41,20 +48,20 @@
>
</q-tab>
<q-tab
name="visu"
icon="fas fa-book"
label="Catalogo"
name="pdf"
icon="fas fa-file-pdf"
label="PDF"
>
</q-tab>
<q-tab
v-if="tools.isGrafico()"
v-if="tools.isGrafico() && false"
name="sfondo"
icon="fas fa-image"
label="Sfondo"
>
</q-tab>
<q-tab
v-if="tools.isGrafico()"
v-if="tools.isGrafico() && false"
name="pagine"
icon="fas fa-book-reader"
label="Pagine"
@@ -244,102 +251,30 @@
@rigenera="generaListaLibri()"
/>
</q-tab-panel>
<q-tab-panel
name="visu"
name="pdf"
v-if="optcatalogo"
:style="{ 'padding': optcatalogo.showOnlyCatalogoPDF ? '0px !important' : '' }"
>
<q-inner-loading
id="spinner"
:showing="generatinglist"
>
</q-inner-loading>
<div class="">
<div class="text-center">
<q-spinner
v-if="ismounting"
color="primary"
size="3em"
:thickness="2"
/>
</div>
<div
v-if="!ismounting"
class="panel"
>
<div :class="{container: !optcatalogo.showOnlyCatalogoPDF}">
<q-tabs
v-model="tabvisu"
dense
class="bg-indigo text-white"
>
<q-tab
v-if="showListaFiltrata"
name="categorie"
icon="fas fa-folder-open"
label="Categorie"
>
<q-badge
v-if="cat"
color="red"
floating
>1</q-badge
>
</q-tab>
<q-tab
v-if="showListaFiltrata && false"
name="autori"
icon="fas fa-user"
label="Autori"
>
<q-badge
v-if="filter.author"
color="red"
floating
>1</q-badge
>
</q-tab>
<q-tab
v-if="showListaFiltrata && false"
name="ricerca"
icon="fas fa-search"
label="Cerca"
>
<q-badge
v-if="getSearchText()"
color="red"
floating
>1</q-badge
>
</q-tab>
</q-tabs>
<CTitleBanner
v-if="!optcatalogo.showOnlyCatalogoPDF"
v-show="tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0"
class="q-pa-xs"
title="Genera PDF"
bgcolor="bg-blue"
clcolor="text-white"
mystyle=""
myclass="myshad"
:canopen="true"
:visible="false"
>
<div v-if="tabcatalogo === 'visu'">
<div>
<div>
<div
v-if="!tools.isUtente()"
class="row justify-center"
>
<q-btn
v-if="optcatalogo.pdf && !optcatalogo.generazionePDFInCorso"
:label="`PREPARA PDF WEB`"
icon="fas fa-file-pdf"
:label="`GENERA PDF`"
@click="preparePDFWeb"
></q-btn>
<q-btn
v-if="optcatalogo.pdf && !optcatalogo.generazionePDFInCorso"
:label="`PREPARA PDF STAMPA`"
v-if="
optcatalogo.pdf &&
!optcatalogo.generazionePDFInCorso &&
tools.isCollStampa()
"
icon="fas fa-print"
:label="`GENERA PDF STAMPA`"
@click="preparePDFStampa"
></q-btn>
@@ -348,7 +283,10 @@
v-model="optcatalogo.selectedVersionStampabile"
:options="[
{ label: 'Versione Web', value: shared_consts.PREPARA_PDF.WEB },
{ label: 'Versione Stampabile', value: shared_consts.PREPARA_PDF.STAMPA },
{
label: 'Versione Stampabile',
value: shared_consts.PREPARA_PDF.STAMPA,
},
]"
label="Seleziona Versione"
emit-value
@@ -427,8 +365,7 @@
{ parteesternafissa: true }
)
}}<br />
Margine
Top:
Margine Top:
{{
tools.adjustSize(
optcatalogo,
@@ -437,7 +374,8 @@
true,
{ paddingTop: true, parteesternafissa: true }
)
}} - Bottom:
}}
- Bottom:
{{
tools.adjustSize(
optcatalogo,
@@ -450,9 +388,8 @@
</div>
</div>
<CTitleBanner
v-show="
tabcatalogo === 'visu' && tools.isAdmin() && arrProducts?.length > 0
"
v-if="false"
v-show="tools.isAdmin() && arrProducts?.length > 0"
class="q-pa-xs"
title="Configurazione"
bgcolor="bg-blue"
@@ -620,25 +557,14 @@
<div v-if="strout">
{{ strout }}
</div>
<CTitleBanner
v-show="
tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0
"
class="q-pa-xs"
title="Lista PDF"
bgcolor="bg-blue"
clcolor="text-white"
mystyle=""
myclass="myshad"
:canopen="true"
:visible="true"
>
<div>
<div v-if="myCatalog">
<div
v-if="myCatalog.pdf_generato"
class="bg-green-1 q-ma-sm q-pa-sm"
>
<div class="bg-blue-1 text-red text-bold text-h6 q-ma-sm q-pa-sm">
<div v-if="tools.isCollaboratore()">
<div class="bg-blue-1 text-red text-bold text-h7 q-ma-sm q-pa-sm">
<strong>PDF generati Temporanei</strong>
</div>
@@ -689,58 +615,253 @@
</q-td>
</template>
</q-table>
<div class="bg-red-1 q-pa-md q-mt-md">
<div class="bg-blue-1 text-green text-bold text-h6 q-ma-sm q-pa-sm">
<strong>PDF Pubblicati OnLine</strong>
</div>
</div>
<table class="q-table q-table--flat q-table--dense q-ma-none q-pa-none">
<tbody>
<tr>
<td>
<strong
><a
v-if="myCatalog.pdf_online"
:href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)"
target="_blank"
class="text-bold"
>PDF OnLine</a
></strong
<div class="row">
<div class="catalog-download-section">
<q-card class="catalog-card shadow-8">
<q-card-section class="text-center">
<q-img
:src="
tools.getFullFileName(
[myCatalog.foto_collana],
'catalogs',
'',
myCatalog._id
)
"
class="catalog-image"
height="128px"
fit="contain"
style="max-width: 100%"
/>
<div class="text-h5 q-mt-sm q-mb-xs">
Catalogo {{ `${myCatalog.title}` }}
</div>
<div class="text-caption text-grey-8 text-center q-mt-sm">
<div class="row items-center justify-center">
<q-icon
name="fas fa-file-pdf"
size="sm"
/>
<span class="q-ml-xs">
{{
myCatalog.pdf_online
? `${myCatalog.pdf_online_size} MB`
: ''
}}
</span>
<q-icon
name="fas fa-clock"
size="sm"
class="q-ml-sm"
/>
<span class="q-ml-xs"> Pubblicato il </span>
<span class="q-ml-xs">
{{
myCatalog.pdf_online
? tools.getstrDate(myCatalog.data_online)
: ''
}}
</span>
</div>
</div>
</q-card-section>
<q-card-actions
align="center"
class="q-pb-md"
>
</td>
<td>{{ myCatalog.pdf_online_size }} MB</td>
<td>
{{ tools.getstrDateTime(myCatalog.data_online) }}
</td>
</tr>
<tr>
<td>
<strong
><a
<q-btn
v-if="myCatalog.pdf_online"
unelevated
rounded
color="primary"
icon="fas fa-file-pdf"
:label="`Apri PDF`"
:href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)"
size="md"
class="hover-lift"
/>
<q-btn
v-if="myCatalog.pdf_online"
unelevated
rounded
color="primary"
icon="download"
:label="`Scarica PDF`"
:href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)"
download
size="md"
class="hover-lift"
/>
</q-card-actions>
</q-card>
</div>
<div
v-if="tools.isCollStampa()"
class="catalog-download-section"
>
<q-card class="catalog-card shadow-8">
<q-card-section class="text-center">
<q-img
:src="
tools.getFullFileName(
[myCatalog.foto_collana],
'catalogs',
'',
myCatalog._id
)
"
class="catalog-image"
height="128px"
fit="contain"
style="max-width: 100%"
/>
<div class="text-h5 q-mt-sm q-mb-xs">Versione per STAMPA</div>
<div class="text-caption text-grey-8 text-center q-mt-sm">
<div class="row items-center justify-center">
<q-icon
name="fas fa-print"
size="sm"
/>
<span class="q-ml-xs">
{{
myCatalog.pdf_online
? `${myCatalog.pdf_online_stampa_size} MB`
: ''
}}
</span>
<q-icon
name="fas fa-clock"
size="sm"
class="q-ml-sm"
/>
<span class="q-ml-xs"> Pubblicato il </span>
<span class="q-ml-xs">
{{
myCatalog.pdf_online_stampa
? tools.getstrDate(myCatalog.data_online_stampa)
: ''
}}
</span>
</div>
</div>
</q-card-section>
<q-card-actions
align="center"
class="q-pb-md"
>
<q-btn
v-if="myCatalog.pdf_online_stampa"
unelevated
rounded
color="primary"
icon="fas fa-file-pdf"
:label="`Apri PDF`"
:href="
tools.getURLByHostAndFilePath(myCatalog.pdf_online_stampa)
"
target="_blank"
class="text-bold"
>PDF OnLine Stampa</a
></strong
size="md"
class="hover-lift"
/>
<q-btn
v-if="myCatalog.pdf_online_stampa"
unelevated
rounded
color="primary"
icon="download"
:label="`Scarica PDF`"
:href="
tools.getURLByHostAndFilePath(myCatalog.pdf_online_stampa)
"
download
size="md"
class="hover-lift"
/>
</q-card-actions>
</q-card>
</div>
</div>
</div>
</div>
</div>
</div>
</q-tab-panel>
<q-tab-panel
name="visu"
v-if="optcatalogo"
:style="{ padding: optcatalogo.showOnlyCatalogoPDF ? '0px !important' : '' }"
>
</td>
<td>{{ myCatalog.pdf_online_stampa_size }} MB</td>
<td>
{{ tools.getstrDateTime(myCatalog.data_online_stampa) }}
</td>
</tr>
</tbody>
</table>
<q-inner-loading
id="spinner"
:showing="generatinglist"
>
</q-inner-loading>
<div class="">
<div class="text-center">
<q-spinner
v-if="ismounting"
color="primary"
size="3em"
:thickness="2"
/>
</div>
</div>
</div>
</CTitleBanner>
</div>
</CTitleBanner>
<div
v-if="!ismounting"
class="panel"
>
<div :class="{ container: !optcatalogo.showOnlyCatalogoPDF }">
<q-tabs
v-model="tabvisu"
dense
class="bg-indigo text-white"
>
<q-tab
v-if="showListaFiltrata"
name="categorie"
icon="fas fa-folder-open"
label="Categorie"
>
<q-badge
v-if="cat"
color="red"
floating
>1</q-badge
>
</q-tab>
<q-tab
v-if="showListaFiltrata && false"
name="autori"
icon="fas fa-user"
label="Autori"
>
<q-badge
v-if="filter.author"
color="red"
floating
>1</q-badge
>
</q-tab>
<q-tab
v-if="showListaFiltrata && false"
name="ricerca"
icon="fas fa-search"
label="Cerca"
>
<q-badge
v-if="getSearchText()"
color="red"
floating
>1</q-badge
>
</q-tab>
</q-tabs>
<q-tab-panels
v-model="tabvisu"
@@ -849,13 +970,17 @@
item.type === costanti.FieldType.select ||
item.type === costanti.FieldType.select_by_server
"
:label="item.value && item.value._id > 0 ? undefined : labelcombo(item)"
:label="
item.value && item.value._id > 0 ? undefined : labelcombo(item)
"
v-model:value="item.value"
:addall="item.addall"
:addnone="item.addnone"
:addlast="true"
:tablesel="
item.type === costanti.FieldType.select_by_server ? item.tablesel : ''
item.type === costanti.FieldType.select_by_server
? item.tablesel
: ''
"
:pickup="item.type === costanti.FieldType.select_by_server"
:label-color="$q.dark.isActive ? 'white' : 'black'"
@@ -870,7 +995,8 @@
:filter_extra="item.filter_extra"
style="font-size: 0.8rem !important"
:useinput="
item.useinput && item.type !== costanti.FieldType.select_by_server
item.useinput &&
item.type !== costanti.FieldType.select_by_server
"
>
</CMySelect>
@@ -906,9 +1032,17 @@
></q-select>
</div>
<div class="text-center q-py-sm prod_trov" v-if="!optcatalogo.showOnlyCatalogoPDF">
<div
v-if="cat === '' && arrProducts.length === 0 && showListaFiltrata && !optcatalogo.showOnlyCatalogoPDF"
class="text-center q-py-sm prod_trov"
v-if="!optcatalogo.showOnlyCatalogoPDF"
>
<div
v-if="
cat === '' &&
arrProducts.length === 0 &&
showListaFiltrata &&
!optcatalogo.showOnlyCatalogoPDF
"
class="row justify-center text-h6"
>
Seleziona {{ filtroStrApplicato }}
@@ -965,7 +1099,12 @@
>
<div class="flex-container-book">
<q-infinite-scroll
v-if="!optcatalogo.pdf && arrLoaded && arrLoaded.length > 0 && !ismounting"
v-if="
!optcatalogo.pdf &&
arrLoaded &&
arrLoaded.length > 0 &&
!ismounting
"
ref="myinfscroll"
:initial-index="0"
@load="onLoadScroll"
@@ -1042,11 +1181,16 @@
'card-page': false,
'pdf-section': true,
}"
:style="generateStylePageScheda(optcatalogo, recscheda.scheda)"
:style="
generateStylePageScheda(optcatalogo, recscheda.scheda)
"
>
<!--style {{generateStylePageScheda(optcatalogo, recscheda.scheda)}}-->
<div
v-if="recscheda.scheda.dimensioni.pagina?.testo_title?.contenuto"
v-if="
recscheda.scheda.dimensioni.pagina?.testo_title
?.contenuto
"
:style="{
'--scalecatalogx': tools.getScaleX(
optcatalogo,
@@ -1057,8 +1201,8 @@
recscheda.scheda
),
'line-height':
recscheda.scheda.dimensioni.pagina?.testo_title?.font
.line_height,
recscheda.scheda.dimensioni.pagina?.testo_title
?.font.line_height,
display: 'flex',
flexDirection: 'column',
position: 'relative', // Posizionamento assoluto
@@ -1080,7 +1224,10 @@
></div>
</div>
<div
v-if="recscheda.scheda.dimensioni.pagina?.testo_up?.contenuto"
v-if="
recscheda.scheda.dimensioni.pagina?.testo_up
?.contenuto
"
:style="{
'--scalecatalogx': tools.getScaleX(
optcatalogo,
@@ -1116,8 +1263,8 @@
recscheda.scheda
),
'line-height':
recscheda.scheda.dimensioni.pagina?.testo_title?.font
.line_height,
recscheda.scheda.dimensioni.pagina?.testo_title
?.font.line_height,
display: 'flex',
flexDirection: 'column',
position: 'absolute', // Posizione assoluta rispetto al contenitore padre
@@ -1130,14 +1277,21 @@
}"
>
<div
v-html="getTitoloPagina(null, optcatalogo.arrSchede[0], true)"
v-html="
getTitoloPagina(
null,
optcatalogo.arrSchede[0],
true
)
"
></div>
</div>
<div v-if="optcatalogo.indebug">
isStampa: {{ isStampa }} generazionePDFInCorso:
{{ optcatalogo.generazionePDFInCorso }} getScaleX:
{{ tools.getScaleX(optcatalogo, recscheda.scheda) }} getScaleY:
{{ tools.getScaleX(optcatalogo, recscheda.scheda) }}
getScaleY:
{{ tools.getScaleY(optcatalogo, recscheda.scheda) }}
IMG:
<span v-if="getTestoIntroduttivo(recscheda)">