- Cataloghi: pagine, schede, formato
@@ -1,17 +1,18 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
DIRECTORY_SERVER="freeplanet_serverside"
|
||||
SERVERDIR_WEBSITE=""
|
||||
SERVERPW_WEBSITE=""
|
||||
APP_URL="https://localhost"
|
||||
URL_FACEBOOK="https://www.facebook.com/freeplanetapp"
|
||||
PROVA_PAOLO="PROVA ENV FUNZIONA!"
|
||||
LANG_DEFAULT="it"
|
||||
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
|
||||
MONGODB_HOST="https://localhost:3000"
|
||||
LOGO_REG='riso-logo-full.png'
|
||||
LOGO_REG='gruppomacro-logo-full.png'
|
||||
TEST_NAME="Paolo"
|
||||
TEST_SURNAME="Arena"
|
||||
TEST_EMAIL=""
|
||||
@@ -24,5 +25,5 @@ DEBUG="1"
|
||||
TELEGRAM_SUPPORT=""
|
||||
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||
TEST_CELL=""
|
||||
VUE_APP_ISTEST="1"
|
||||
VUE_APP_INLOCALE="1"
|
||||
VUE_APP_ISTEST=1
|
||||
VUE_APP_INLOCALE=1
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="17"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="19"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="17"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="19"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "abitaregliiblei",
|
||||
"version": "1.1.11",
|
||||
"version": "1.1.12",
|
||||
"description": "Abitare Gli Iblei",
|
||||
"productName": "AbitareGliIblei",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="16"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "1.1.11",
|
||||
"version": "1.1.12",
|
||||
"description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.",
|
||||
"productName": "Riso",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="15"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="15"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fioredellavita",
|
||||
"version": "1.1.11",
|
||||
"version": "1.1.12",
|
||||
"description": "Fiore Della Vita",
|
||||
"productName": "Fiore Della Vita",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="16"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gruppomacro",
|
||||
"version": "1.1.11",
|
||||
"version": "1.1.12",
|
||||
"description": "GruppoMacro",
|
||||
"productName": "Gruppo Macro",
|
||||
"author": "Paolo Arena",
|
||||
@@ -57,6 +57,7 @@
|
||||
"html2canvas": "^1.4.1",
|
||||
"html2pdf.js": "^0.10.2",
|
||||
"jquery": "^3.7.1",
|
||||
"jsbarcode": "^3.11.6",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jspdf": "^2.5.2",
|
||||
"leaflet": "^1.9.4",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="17"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="17"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "piuchebuono",
|
||||
"version": "1.1.11",
|
||||
"version": "1.1.12",
|
||||
"description": "PiuCheBuono",
|
||||
"productName": "PiuCheBuono",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.1.11"
|
||||
APP_VERSION="1.1.12"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="16"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "1.1.11",
|
||||
"version": "1.1.12",
|
||||
"description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.",
|
||||
"productName": "Riso",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
12
package.json
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "1.1.11",
|
||||
"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": "gruppomacro",
|
||||
"version": "1.1.12",
|
||||
"description": "GruppoMacro",
|
||||
"productName": "Gruppo Macro",
|
||||
"author": "Paolo Arena",
|
||||
"private": true,
|
||||
"keywords": [],
|
||||
@@ -54,9 +54,12 @@
|
||||
"graphql": "^16.9.0",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"gsap": "^3.12.5",
|
||||
"html2canvas": "^1.4.1",
|
||||
"html2pdf.js": "^0.10.2",
|
||||
"jquery": "^3.7.1",
|
||||
"jsbarcode": "^3.11.6",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jspdf": "^2.5.2",
|
||||
"leaflet": "^1.9.4",
|
||||
"leaflet-routing-machine": "^3.2.12",
|
||||
"leaflet.markercluster": "^1.5.3",
|
||||
@@ -127,7 +130,6 @@
|
||||
"jest": "^29.7.0",
|
||||
"json-loader": "^0.5.7",
|
||||
"node-sass": "^9.0.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"npm-check-updates": "^17.1.3",
|
||||
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
||||
"parcel": "^2.12.0",
|
||||
|
||||
3592316
public/images/comuni_italia.geojson
Normal file
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 90 KiB |
BIN
public/images/gm-android-icon-192x192.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/images/gm-android-icon-512x512.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
public/images/gm-apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/images/gruppomacro-logo-full.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 634 KiB |
|
Before Width: | Height: | Size: 279 KiB |
|
Before Width: | Height: | Size: 258 KiB |
|
Before Width: | Height: | Size: 124 KiB |
@@ -17,8 +17,6 @@ const webpack = require('webpack')
|
||||
const helpers = require('./helpers')
|
||||
const envparser = require('./config/envparser')
|
||||
|
||||
const package = require('./package.json');
|
||||
|
||||
// const ESLintPlugin = require('eslint-webpack-plugin')
|
||||
|
||||
module.exports = configure((ctx) => ({
|
||||
@@ -89,7 +87,6 @@ module.exports = configure((ctx) => ({
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
|
||||
build: {
|
||||
env: envparser(),
|
||||
versionCode: package.version,
|
||||
vueRouterMode: 'history',
|
||||
vueCompiler: true,
|
||||
gzip: false, // gzip true
|
||||
@@ -152,9 +149,9 @@ module.exports = configure((ctx) => ({
|
||||
},
|
||||
devServer: {
|
||||
https: false,
|
||||
port: 8084,
|
||||
port: 8089,
|
||||
open: false, // opens browser window automatically
|
||||
hot: false, // Disable hot module replacement
|
||||
hot: true, // Disable hot module replacement
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': '*',
|
||||
@@ -251,8 +248,6 @@ module.exports = configure((ctx) => ({
|
||||
'Cookies',
|
||||
'Loading',
|
||||
'AppVisibility',
|
||||
'LocalStorage',
|
||||
'SessionStorage',
|
||||
],
|
||||
get plugins_1() {
|
||||
return this._plugins;
|
||||
@@ -313,9 +308,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: 'Gruppo Macro',
|
||||
short_name: 'GruppoMacro',
|
||||
description: '',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
background_color: '#fff',
|
||||
@@ -325,54 +320,24 @@ module.exports = configure((ctx) => ({
|
||||
start_url: "/?homescreen=1",
|
||||
icons: [
|
||||
{
|
||||
src: 'images/riso-android-icon-512x512.png',
|
||||
src: 'images/gm-android-icon-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-android-icon-384x384.png',
|
||||
sizes: '384x384',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-android-icon-192x192.png',
|
||||
src: 'images/gm-android-icon-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-android-icon-144x144.png',
|
||||
sizes: '144x144',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-android-icon-96x96.png',
|
||||
sizes: '96x96',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-apple-icon-120x120.png',
|
||||
sizes: '120x120',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-apple-icon-144x144.png',
|
||||
sizes: '144x144',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-apple-icon-152x152.png',
|
||||
sizes: '152x152',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'images/riso-apple-icon-180x180.png',
|
||||
src: 'images/gm-apple-touch-icon.png',
|
||||
sizes: '180x180',
|
||||
type: 'image/png',
|
||||
},
|
||||
],
|
||||
related_applications: [{
|
||||
"platform": "webapp",
|
||||
"url": "https://www.riso.app/manifest.json"
|
||||
"url": "https://www.gruppomacro.app/manifest.json"
|
||||
}]
|
||||
},
|
||||
},
|
||||
@@ -407,7 +372,7 @@ module.exports = configure((ctx) => ({
|
||||
builder: {
|
||||
// https://www.electron.build/configuration/configuration
|
||||
|
||||
appId: 'Riso',
|
||||
appId: 'GruppoMacro',
|
||||
},
|
||||
|
||||
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
|
||||
|
||||
@@ -34,7 +34,7 @@ self.addEventListener('activate', (event) => {
|
||||
});
|
||||
|
||||
|
||||
const APP_VERSION = "1.1.11";
|
||||
const APP_VERSION = "1.1.12";
|
||||
|
||||
console.log(' [ VER-' + APP_VERSION + ' ] _---------________------ PAO: this is my custom service worker');
|
||||
|
||||
|
||||
10
src/components/CBarCode/CBarCode.scss
Executable file
@@ -0,0 +1,10 @@
|
||||
.barcode-container {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text-barcode {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
83
src/components/CBarCode/CBarCode.ts
Executable file
@@ -0,0 +1,83 @@
|
||||
import { defineComponent, onMounted, ref, toRef, watch, toRefs } from 'vue'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
|
||||
import JsBarcode from 'jsbarcode'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CBarCode',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
format: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'CODE128',
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 2,
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 100,
|
||||
},
|
||||
fontsize: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 16,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n();
|
||||
|
||||
// Converti le props in riferimenti reattivi
|
||||
const { value, format, width, height, fontsize } = toRefs(props);
|
||||
|
||||
// Funzione per disegnare il codice a barre
|
||||
const drawBarcode = () => {
|
||||
JsBarcode("#C" + value.value, value.value, {
|
||||
format: format.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
displayValue: true,
|
||||
lineColor: "#000",
|
||||
font: "monospace",
|
||||
margin: 1,
|
||||
textMargin: 0,
|
||||
marginTop: 0,
|
||||
fontSize: fontsize.value,
|
||||
textPosition:"bottom",
|
||||
});
|
||||
}
|
||||
|
||||
// Chiamato quando il componente è montato
|
||||
onMounted(() => {
|
||||
drawBarcode();
|
||||
})
|
||||
|
||||
// Watcher per aggiornamenti delle proprietà
|
||||
watch([value, format, width, height, fontsize], () => {
|
||||
drawBarcode();
|
||||
})
|
||||
|
||||
return {
|
||||
tools,
|
||||
toolsext,
|
||||
fontsize,
|
||||
}
|
||||
},
|
||||
})
|
||||
13
src/components/CBarCode/CBarCode.vue
Executable file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div class="row barcode-container justify-center">
|
||||
<div class="text-center " :style="`font-size: ${fontsize}px`">{{text}}</div>
|
||||
<svg :id="`C${value}`"></svg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CBarCode.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CBarCode.scss';
|
||||
</style>
|
||||
1
src/components/CBarCode/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CBarCode} from './CBarCode.vue'
|
||||
@@ -10,12 +10,12 @@
|
||||
{{ label }}
|
||||
</q-banner>
|
||||
|
||||
<div class="row">
|
||||
<div v-if="internalModel" class="column">
|
||||
<CMySlider
|
||||
label="Top:"
|
||||
v-model="internalModel.top"
|
||||
:min="10"
|
||||
:max="3000"
|
||||
:max="1000"
|
||||
color="green"
|
||||
addstr="px"
|
||||
@update:model-value="modifValueTop"
|
||||
@@ -24,7 +24,7 @@
|
||||
label="Bottom:"
|
||||
v-model="internalModel.bottom"
|
||||
:min="10"
|
||||
:max="3000"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifValueBottom"
|
||||
@@ -33,7 +33,7 @@
|
||||
label="Left:"
|
||||
v-model="internalModel.left"
|
||||
:min="10"
|
||||
:max="3000"
|
||||
:max="1000"
|
||||
color="orange"
|
||||
addstr="px"
|
||||
@update:model-value="modifValueLeft"
|
||||
@@ -42,7 +42,7 @@
|
||||
label="Right:"
|
||||
v-model="internalModel.right"
|
||||
:min="10"
|
||||
:max="3000"
|
||||
:max="1000"
|
||||
color="fuchsia"
|
||||
addstr="px"
|
||||
@update:model-value="modifValueRight"
|
||||
|
||||
@@ -19,7 +19,6 @@ export default defineComponent({
|
||||
Categoria: [],
|
||||
Editore: [],
|
||||
pdf: false,
|
||||
backgroundimage: '',
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -9,6 +9,7 @@ import { CCardState } from '../CCardState'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CMyValueDb } from '../CMyValueDb'
|
||||
import { CPrice } from '../CPrice'
|
||||
import { CBarCode } from '../CBarCode'
|
||||
|
||||
import { func_tools, toolsext } from '@store/Modules/toolsext'
|
||||
|
||||
@@ -77,7 +78,7 @@ export default defineComponent({
|
||||
}),
|
||||
},
|
||||
},
|
||||
components: { CTitleBanner, CCardState, CCopyBtn, CMyValueDb, VuePdfApp, CPrice },
|
||||
components: { CTitleBanner, CCardState, CCopyBtn, CMyValueDb, VuePdfApp, CPrice, CBarCode },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
' items-start q-gutter-sm': true,
|
||||
}"
|
||||
:style="
|
||||
scheda.height
|
||||
? ' height: ' + scheda.height + 'px !important; '
|
||||
: ''
|
||||
scheda.height ? ' height: ' + scheda.height + 'px !important; ' : ''
|
||||
"
|
||||
>
|
||||
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
|
||||
|
||||
<div
|
||||
v-if="!!myproduct && !!myproduct.productInfo"
|
||||
:class="{
|
||||
@@ -57,7 +56,7 @@
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-start',
|
||||
gap: '0.5rem',
|
||||
width: '100%',
|
||||
width: scheda.dimensioni?.scheda_prodotto?.size.width ?? '100%',
|
||||
}"
|
||||
>
|
||||
<q-img
|
||||
@@ -82,8 +81,10 @@
|
||||
scheda.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? '50%'
|
||||
: '45%',
|
||||
...(scheda.dimensioni.immagine_prodotto.width && {
|
||||
width: scheda.dimensioni.immagine_prodotto.width + ' !important',
|
||||
...(scheda.dimensioni?.immagine_prodotto?.size?.width && {
|
||||
width:
|
||||
scheda.dimensioni?.immagine_prodotto.size?.width +
|
||||
' !important',
|
||||
}),
|
||||
display: 'block',
|
||||
}"
|
||||
@@ -120,8 +121,34 @@
|
||||
}"
|
||||
>
|
||||
<div
|
||||
v-if="scheda.testo_right"
|
||||
:style="`line-height: ${scheda.line_height}%; `"
|
||||
v-html="products.replaceKeyWordsByProduct(myproduct, scheda.text)"
|
||||
v-html="products.replaceKeyWordsByProduct(myproduct, scheda.testo_right)"
|
||||
></div>
|
||||
|
||||
<div v-if="scheda.barcode && scheda.barcode.show">
|
||||
<CBarCode
|
||||
:value="myproduct.productInfo.code"
|
||||
:format="scheda.barcode.format"
|
||||
:fontsize="scheda.barcode.font?.size"
|
||||
:width="parseInt(scheda.barcode.size.width)"
|
||||
:height="parseInt(scheda.barcode.size.height)"
|
||||
:text="`ISBN: ${myproduct.productInfo.code}`"
|
||||
>
|
||||
</CBarCode>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="scheda.testo_bottom && scheda.testo_bottom.contenuto"
|
||||
:style="{
|
||||
width: '100%',
|
||||
textAlign: 'center',
|
||||
marginTop: '1rem',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
:style="`line-height: ${scheda.line_height}%; `"
|
||||
v-html="products.replaceKeyWordsByProduct(myproduct, scheda.testo_bottom)"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,6 @@ export default defineComponent({
|
||||
Categoria: [],
|
||||
Editore: [],
|
||||
pdf: false,
|
||||
backgroundimage: '',
|
||||
}),
|
||||
},
|
||||
scheda: {
|
||||
|
||||
@@ -84,6 +84,24 @@ export default defineComponent({
|
||||
{ label: 'In basso', value: costanti.POSIZ_TESTO.IN_BASSO },
|
||||
{ label: 'A Destra', value: costanti.POSIZ_TESTO.A_DESTRA },
|
||||
])
|
||||
const formatOptions = ref([
|
||||
{ label: 'auto', value: 'CODE128' },
|
||||
{ label: 'EAN-13', value: 'EAN-13' },
|
||||
{ label: 'UPC', value: 'upc' },
|
||||
])
|
||||
const fontSizeOptions = ref([
|
||||
{ label: '9', value: '9' },
|
||||
{ label: '10', value: '10' },
|
||||
{ label: '11', value: '11' },
|
||||
{ label: '12', value: '12' },
|
||||
{ label: '13', value: '13' },
|
||||
{ label: '14', value: '14' },
|
||||
{ label: '15', value: '15' },
|
||||
{ label: '16', value: '16' },
|
||||
{ label: '18', value: '18' },
|
||||
{ label: '20', value: '20' },
|
||||
{ label: '22', value: '22' },
|
||||
])
|
||||
|
||||
const animare = ref(0)
|
||||
const slide = ref(0)
|
||||
@@ -247,6 +265,62 @@ export default defineComponent({
|
||||
selectedClasses.value = myel.value.class4.split(' ').filter(Boolean)
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && myel.value.catalogo?.arrSchede) {
|
||||
for (const recscheda of myel.value.catalogo?.arrSchede) {
|
||||
if (recscheda.scheda && (!recscheda.scheda?.testo_bottom)) {
|
||||
recscheda.scheda.testo_bottom = {contenuto: '', maxlength: 100}
|
||||
}
|
||||
if (recscheda.scheda && (!recscheda.scheda?.testo_right)) {
|
||||
recscheda.scheda.testo_right = {contenuto: ''}
|
||||
}
|
||||
if (recscheda.scheda && (!recscheda.scheda?.barcode || !recscheda.scheda?.barcode.font)) {
|
||||
recscheda.scheda.barcode = {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '100',
|
||||
},
|
||||
font: {
|
||||
name: '',
|
||||
size: 16,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && !myel.value.catalogo.imgsfondo_def) {
|
||||
myel.value.catalogo.imgsfondo_def = {
|
||||
imagefile: '',
|
||||
fit: '',
|
||||
}
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && !myel.value.catalogo.dimensioni_def) {
|
||||
myel.value.catalogo.dimensioni_def = {
|
||||
pagina: {
|
||||
size: {
|
||||
width: '',
|
||||
height: '',
|
||||
},
|
||||
margini: {
|
||||
left: '',
|
||||
top: '',
|
||||
right: '',
|
||||
bottom: '',
|
||||
},
|
||||
padding: {
|
||||
left: '',
|
||||
top: '',
|
||||
right: '',
|
||||
bottom: '',
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function clickOnElem() {
|
||||
@@ -267,7 +341,7 @@ export default defineComponent({
|
||||
|
||||
let maxorder = 0
|
||||
myel.value.catalogo!.arrSchede?.forEach(scheda => {
|
||||
if (scheda.order > maxorder) {
|
||||
if (scheda?.order! > maxorder) {
|
||||
maxorder = scheda.order
|
||||
}
|
||||
})
|
||||
@@ -332,22 +406,24 @@ export default defineComponent({
|
||||
right: '0px',
|
||||
},
|
||||
},
|
||||
immagine_prodotto: {size: {
|
||||
width: '150px',
|
||||
height: '235px',
|
||||
immagine_prodotto: {
|
||||
size: {
|
||||
width: '150px',
|
||||
height: '235px',
|
||||
},
|
||||
margini: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},
|
||||
padding: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},
|
||||
},
|
||||
margini: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},
|
||||
padding: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},},
|
||||
}
|
||||
|
||||
let newscheda: IMyScheda = {
|
||||
@@ -359,9 +435,25 @@ export default defineComponent({
|
||||
line_height: 100,
|
||||
numschede_perRiga: 2,
|
||||
numschede_perCol: 2,
|
||||
text: '',
|
||||
posiz_text: costanti.POSIZ_TESTO.A_DESTRA,
|
||||
|
||||
testo_right: {
|
||||
contenuto: '',
|
||||
},
|
||||
testo_bottom: {
|
||||
contenuto: '',
|
||||
},
|
||||
barcode: {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '100',
|
||||
},
|
||||
font: {
|
||||
name: 'monospace',
|
||||
size: 16,
|
||||
}
|
||||
},
|
||||
productTypes: [],
|
||||
excludeproductTypes: [],
|
||||
editore: [],
|
||||
@@ -480,6 +572,7 @@ export default defineComponent({
|
||||
|
||||
let iscatalogo = costanti.CATALOGO_FIELDS.includes(col.name)
|
||||
let isscheda = costanti.SCHEDA_FIELDS.includes(col.name)
|
||||
let isIImg = costanti.IMG_FIELDS.includes(col.name) && (col.fieldtype === costanti.FieldType.image)
|
||||
|
||||
if (col.fieldtype === costanti.FieldType.image) {
|
||||
if (iscatalogo) {
|
||||
@@ -487,6 +580,11 @@ export default defineComponent({
|
||||
//console.log('SALVATO IN', col.name, newval.imagefile, 'RIS', myel.value.catalogo[col.name])
|
||||
} else if (isscheda) {
|
||||
rec[col.name] = newval.imagefile
|
||||
} else if (isIImg) {
|
||||
if (!rec[col.name]) {
|
||||
rec[col.name] = {}
|
||||
}
|
||||
rec[col.name].imagefile = newval.imagefile
|
||||
} else {
|
||||
myel.value[col.name] = newval.imagefile
|
||||
}
|
||||
@@ -757,6 +855,8 @@ export default defineComponent({
|
||||
delRecScheda,
|
||||
SchedeOpt,
|
||||
addProdSpeciale,
|
||||
formatOptions,
|
||||
fontSizeOptions,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1352,6 +1352,17 @@
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
label="NomeFile PDF"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.catalogo.pdf_filename"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
|
||||
<br />
|
||||
|
||||
<!--++AddCATALOGO_FIELDS-->
|
||||
@@ -1414,6 +1425,34 @@
|
||||
</q-select>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Pagina di Default"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div
|
||||
v-if="myel.catalogo.dimensioni_def"
|
||||
class="sfondo_margine row"
|
||||
>
|
||||
<CMySize
|
||||
label="Pagina:"
|
||||
v-model="myel.catalogo.dimensioni_def.pagina.size"
|
||||
@update:model-value="modifElem"
|
||||
></CMySize>
|
||||
<CBorders
|
||||
label="Margini Pagina:"
|
||||
v-model="myel.catalogo.dimensioni_def.pagina.margini"
|
||||
@update:model-value="modifElem"
|
||||
></CBorders>
|
||||
<CBorders
|
||||
label="Padding Pagina:"
|
||||
v-model="myel.catalogo.dimensioni_def.pagina.padding"
|
||||
@update:model-value="modifElem"
|
||||
></CBorders>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
@@ -1421,27 +1460,29 @@
|
||||
label="Sfondi"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
Nome File Web: {{ myel.catalogo.backgroundimage }}<br />
|
||||
<CMyFieldRec
|
||||
title="Per Web:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="backgroundimage"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.image"
|
||||
@save="saveFieldElem"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
Immagine Sfondo di default:
|
||||
{{ myel.catalogo.imgsfondo_def?.imagefile }}<br />
|
||||
|
||||
<q-select
|
||||
v-model="myel.catalogo.imgsfondo_def.fit"
|
||||
:options="tools.SelectListFit"
|
||||
label="Dimensione Img"
|
||||
options-dense
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
style="width: 100px"
|
||||
@update:model-value="modifElem"
|
||||
fill-input
|
||||
text-color="white"
|
||||
>
|
||||
</q-select>
|
||||
|
||||
Nome File Printable:
|
||||
{{ myel.catalogo.backgroundimage_printable }}
|
||||
<CMyFieldRec
|
||||
title="Sfondo:"
|
||||
title="Immagine Sfondo di default:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="backgroundimage_printable"
|
||||
field="imgsfondo_def"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
@@ -1722,7 +1763,7 @@
|
||||
|
||||
<q-select
|
||||
v-model="recscheda.scheda.bgSize"
|
||||
:options="bgSizeOpt"
|
||||
:options="tools.SelectListFit"
|
||||
label="Dimensione Img"
|
||||
options-dense
|
||||
dense
|
||||
@@ -1735,13 +1776,12 @@
|
||||
>
|
||||
</q-select>
|
||||
|
||||
Nome File Printable:
|
||||
{{ recscheda.scheda.bgimg_printable }}
|
||||
{{ recscheda.scheda.dimensioni.imgsfondo }}
|
||||
<CMyFieldRec
|
||||
title="Sfondo:"
|
||||
table="myschedas"
|
||||
:rec="recscheda.scheda"
|
||||
field="bgimg_printable"
|
||||
table="imgs"
|
||||
:rec="recscheda.scheda.dimensioni"
|
||||
field="imgsfondo"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
@@ -1802,7 +1842,6 @@
|
||||
"
|
||||
@update:model-value="modifElem"
|
||||
></CMySize>
|
||||
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
|
||||
@@ -1836,11 +1875,29 @@
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<div>
|
||||
Parole Chiave: {autore} {titolo} {descrizione}
|
||||
{descrizione_estesa} {prezzo}
|
||||
</div>
|
||||
|
||||
<CMyFieldRec
|
||||
title="Testo:"
|
||||
table="myschedas"
|
||||
:rec="recscheda.scheda"
|
||||
field="text"
|
||||
title="Testo a Destra:"
|
||||
table="text"
|
||||
:rec="recscheda.scheda.testo_right"
|
||||
field="contenuto"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.html"
|
||||
@save="saveFieldElem"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
<CMyFieldRec
|
||||
title="Testo in Basso :"
|
||||
table="text"
|
||||
:rec="recscheda.scheda.testo_bottom"
|
||||
field="contenuto"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
@@ -1851,7 +1908,56 @@
|
||||
</CMyFieldRec>
|
||||
</q-expansion-item>
|
||||
|
||||
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Codice a Barre"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<q-toggle
|
||||
v-model="recscheda.scheda.barcode.show"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
label="Mostra Codice a Barre"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
<q-select
|
||||
v-model="recscheda.scheda.barcode.format"
|
||||
:options="formatOptions"
|
||||
label="Formato"
|
||||
options-dense
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
style="width: 100px"
|
||||
@update:model-value="modifElem"
|
||||
fill-input
|
||||
text-color="white"
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
v-model="recscheda.scheda.barcode.font.size"
|
||||
:options="fontSizeOptions"
|
||||
label="Font Size"
|
||||
options-dense
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
style="width: 100px"
|
||||
@update:model-value="modifElem"
|
||||
fill-input
|
||||
text-color="white"
|
||||
>
|
||||
</q-select>
|
||||
<CMySize
|
||||
label="Dimensioni:"
|
||||
v-model="recscheda.scheda.barcode.size"
|
||||
@update:model-value="modifElem"
|
||||
:addstr="false"
|
||||
></CMySize>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
@@ -1872,7 +1978,7 @@
|
||||
label="Altezza:"
|
||||
v-model="myel.catalogo.first_page_height"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
:max="1200"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
@@ -1880,7 +1986,7 @@
|
||||
label="Larghezza:"
|
||||
v-model="myel.catalogo.first_page_width"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
:max="1200"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
@@ -1928,7 +2034,7 @@
|
||||
label="Altezza:"
|
||||
v-model="myel.catalogo.last_page_height"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
:max="1200"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
@@ -1936,7 +2042,7 @@
|
||||
label="Larghezza:"
|
||||
v-model="myel.catalogo.last_page_width"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
:max="1200"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
@@ -1988,38 +2094,6 @@
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
|
||||
<CMySlider
|
||||
label="Margine per Pagina Stampa"
|
||||
v-model="myel.catalogo.margine_paginaPrintable"
|
||||
:disable="!myel.catalogo.printable"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Margine per Riga"
|
||||
v-model="myel.catalogo.margine_rigaPrintable"
|
||||
:disable="!myel.catalogo.printable"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Larghezza Pagina Stampa:"
|
||||
v-model="myel.catalogo.widthpagPrintable"
|
||||
:disable="!myel.catalogo.printable"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
addstr: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
{{ label }}
|
||||
</q-banner>
|
||||
|
||||
<div class="row">
|
||||
<div v-if="internalModel" class="column">
|
||||
<CMySlider
|
||||
label="Width:"
|
||||
v-model="internalModel.width"
|
||||
:min="10"
|
||||
:max="3000"
|
||||
:max="1000"
|
||||
color="green"
|
||||
addstr="px"
|
||||
:addstr="addstr ? 'px' : ''"
|
||||
@update:model-value="modifValueWidth"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Height:"
|
||||
v-model="internalModel.height"
|
||||
:min="10"
|
||||
:max="3000"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
:addstr="addstr ? 'px' : ''"
|
||||
@update:model-value="modifValueHeight"
|
||||
></CMySlider>
|
||||
</div>
|
||||
|
||||
@@ -51,13 +51,46 @@ export default defineComponent({
|
||||
let mystr = props.modelValue + ''
|
||||
return mystr.replace(props.addstr, '')
|
||||
},
|
||||
set: (value) => emit('update:modelValue', value + props.addstr)
|
||||
set: (value) => emit('update:modelValue', value ? value + props.addstr : '')
|
||||
})
|
||||
|
||||
function valoreinc() {
|
||||
let mioval = parseFloat(sliderValue.value)
|
||||
if (mioval >= 1000) {
|
||||
return 20
|
||||
} else if (mioval >= 500) {
|
||||
return 10
|
||||
} else if (mioval >= 100) {
|
||||
return 5
|
||||
} else {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
function incrementValue() {
|
||||
if (!sliderValue.value) {
|
||||
sliderValue.value = '1'
|
||||
} else {
|
||||
sliderValue.value = (parseFloat(sliderValue.value) + valoreinc()) + ''; // Aumenta il valore
|
||||
}
|
||||
}
|
||||
|
||||
function decrementValue() {
|
||||
if (sliderValue.value === '0') {
|
||||
sliderValue.value = ''
|
||||
} else if (!sliderValue.value) {
|
||||
// niente
|
||||
} else {
|
||||
sliderValue.value = (parseFloat(sliderValue.value) - valoreinc()) + ''; // Diminuisci il valore
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
t,
|
||||
shared_consts,
|
||||
sliderValue,
|
||||
incrementValue,
|
||||
decrementValue
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,17 +1,29 @@
|
||||
<template>
|
||||
<div class="q-pa-xs" style="width: 170px">
|
||||
<q-badge color="primary"> {{ label }} {{ modelValue }} </q-badge>
|
||||
|
||||
<q-badge color="primary"> {{ label }} {{ modelValue }} </q-badge>
|
||||
<div class="q-pa-xs row no-wrap">
|
||||
<q-btn
|
||||
icon="fas fa-minus"
|
||||
@click="decrementValue"
|
||||
:disable="disable || !sliderValue"
|
||||
flat
|
||||
/>
|
||||
<q-input
|
||||
style="width: 150px"
|
||||
dense
|
||||
v-model="sliderValue"
|
||||
filled
|
||||
:disable="disable"
|
||||
>
|
||||
</q-input>
|
||||
<q-btn icon="fas fa-plus" @click="incrementValue" :disable="disable" flat />
|
||||
|
||||
<q-slider :disable="disable" v-model="sliderValue" :min="min" :max="max" :color="color" />
|
||||
|
||||
<q-slider
|
||||
:disable="disable"
|
||||
v-model="sliderValue"
|
||||
:min="min"
|
||||
:max="max"
|
||||
:color="color"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -8,10 +8,9 @@ import { CTitleBanner } from '../CTitleBanner'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CMyFieldRec } from '../CMyFieldRec'
|
||||
import { CBarCode } from '../CBarCode'
|
||||
import { CMyValueDb } from '../CMyValueDb'
|
||||
|
||||
import VueBarcode from 'vue-barcode'
|
||||
|
||||
import { func_tools, toolsext } from '@store/Modules/toolsext'
|
||||
|
||||
import { IBaseOrder, IGasordine, IOrder, IOrderCart, IProduct } from '@src/model'
|
||||
@@ -52,7 +51,10 @@ export default defineComponent({
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: { CTitleBanner, CCardState, CCopyBtn, CMyFieldRec, CMyValueDb, VuePdfApp },
|
||||
components: {
|
||||
CTitleBanner, CCardState, CCopyBtn,
|
||||
CMyFieldRec, CMyValueDb, VuePdfApp, CBarCode,
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -231,9 +231,9 @@
|
||||
{{ t('ecomm.codice') }}: {{ myproduct.productInfo.code }}
|
||||
</div>
|
||||
<div v-if="false" class="barcode">
|
||||
<barcode :value="myproduct.productInfo.code" format="EAN-13">
|
||||
</barcode>
|
||||
<vue-barcode></vue-barcode>
|
||||
<CBarCode :value="myproduct.productInfo.code" format="EAN-13" text="ISBN:">
|
||||
</CBarCode>
|
||||
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
|
||||
@@ -2473,6 +2473,7 @@ body.body--dark {
|
||||
flex-direction: row; /* Allineamento orizzontale */
|
||||
flex-wrap: wrap;
|
||||
gap: 10px; /* Spaziatura tra gli elementi */
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.flex-item-book {
|
||||
@@ -2480,7 +2481,7 @@ body.body--dark {
|
||||
justify-content: center; /* Allineamento orizzontale al centro */
|
||||
align-items: center; /* Allineamento verticale al centro */
|
||||
padding: 0px;
|
||||
flex-grow: 1; /* Opzionale: permette agli elementi di crescere uniformemente */
|
||||
flex-grow: 0; /* Opzionale: permette agli elementi di crescere uniformemente */
|
||||
|
||||
break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
@@ -2499,7 +2500,6 @@ body.body--dark {
|
||||
.cards-container {
|
||||
display: flex;
|
||||
flex-direction: column !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.sfondo_print{
|
||||
|
||||
@@ -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: 'Gruppo Macro',
|
||||
siteshortname: 'Gruppo Macro',
|
||||
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,15 +133,11 @@ const msg_website_it = {
|
||||
only_residenti: 'Solo Residenti',
|
||||
only_consiglio: 'Solo Consiglieri',
|
||||
color: 'Colore',
|
||||
mainMenu: 'Menu Principale',
|
||||
subtitle: 'Sottotitolo',
|
||||
lang: 'Lingua',
|
||||
keywords: 'Parole Chiave',
|
||||
desctiption: 'Descrizione',
|
||||
heightimg: 'Altezza Immagine',
|
||||
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: '',
|
||||
|
||||
@@ -67,39 +67,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
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: '/activities',
|
||||
materialIcon: 'fas fa-house-user',
|
||||
name: 'mypages.activities',
|
||||
component: () => import('@/root/activities/activities.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
@@ -111,17 +78,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
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,
|
||||
@@ -209,7 +165,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
meta: { requiresAuth: true, newpage: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 137,
|
||||
@@ -276,7 +232,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
{
|
||||
active: true,
|
||||
order: 150,
|
||||
path: '/sostieniilprogetto',
|
||||
path: '/fundraising',
|
||||
materialIcon: 'fas fa-hand-holding-heart',
|
||||
name: 'pages.fundraising',
|
||||
component: () => import('@src/root/fundraising/fundraising.vue'),
|
||||
|
||||
@@ -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.1.11">
|
||||
<meta name="version" content="1.1.12">
|
||||
<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<% } %>">
|
||||
|
||||
|
||||
@@ -688,6 +688,10 @@ export interface ISize {
|
||||
width?: string
|
||||
height?: string
|
||||
}
|
||||
export interface IFont {
|
||||
name?: string
|
||||
size?: number
|
||||
}
|
||||
|
||||
export interface IBorder {
|
||||
top?: string
|
||||
@@ -695,15 +699,33 @@ export interface IBorder {
|
||||
left?: string
|
||||
right?: string
|
||||
}
|
||||
|
||||
export interface IImg {
|
||||
imagefile?: string
|
||||
fit?: string
|
||||
}
|
||||
|
||||
export interface IBarCode {
|
||||
show?: boolean
|
||||
format?: string
|
||||
size?: ISize
|
||||
font?: IFont
|
||||
}
|
||||
|
||||
export interface IDimensioni {
|
||||
size?: ISize
|
||||
margini?: IBorder
|
||||
padding?: IBorder
|
||||
imgsfondo?: IImg
|
||||
}
|
||||
|
||||
export interface IElementiPagina {
|
||||
pagina: IDimensioni
|
||||
riga: IDimensioni
|
||||
}
|
||||
|
||||
export interface IText {
|
||||
contenuto?: string
|
||||
maxlength?: number
|
||||
}
|
||||
|
||||
export interface IElementiScheda {
|
||||
@@ -721,16 +743,12 @@ export interface IMyScheda {
|
||||
line_height?: number
|
||||
numschede_perRiga?: number
|
||||
numschede_perCol?: number
|
||||
text?: string
|
||||
testo_right?: IText
|
||||
testo_bottom?: IText
|
||||
posiz_text?: number
|
||||
|
||||
barcode?: IBarCode,
|
||||
dimensioni: IElementiScheda
|
||||
|
||||
bgimg?: string
|
||||
bgimg_printable?: string
|
||||
bgSize?: string
|
||||
bgSize_printable?: string
|
||||
|
||||
productTypes?: number[]
|
||||
excludeproductTypes?: number[]
|
||||
editore?: string[]
|
||||
@@ -747,7 +765,7 @@ export interface ISchedaSingola {
|
||||
numSchede?: number,
|
||||
|
||||
// In Memoria
|
||||
arrProdToShow?: IProduct[][]
|
||||
arrProdToShow?: IProduct[][][]
|
||||
}
|
||||
|
||||
export interface ICatalogo {
|
||||
@@ -758,15 +776,9 @@ export interface ICatalogo {
|
||||
Categoria: string[]
|
||||
Editore: string[]
|
||||
pdf: boolean
|
||||
pdf_filename?: string
|
||||
printable?: boolean
|
||||
|
||||
dimensioni: IElementiPagina,
|
||||
|
||||
backgroundimage?: string
|
||||
backgroundimage_printable?: string
|
||||
backgroundSize?: string
|
||||
backgroundSize_printable?: string
|
||||
|
||||
first_page_img?: string
|
||||
first_page_html?: string
|
||||
first_page_height?: number
|
||||
@@ -776,6 +788,9 @@ export interface ICatalogo {
|
||||
last_page_height?: number
|
||||
last_page_width?: number
|
||||
|
||||
imgsfondo_def?: IImg
|
||||
dimensioni_def?: IElementiPagina
|
||||
|
||||
arrSchede?: ISchedaSingola[]
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export interface IProductInfo {
|
||||
publisher?: IPublisher
|
||||
date_publishing?: Date
|
||||
date_publishing_ts: number
|
||||
numpages?: number
|
||||
pagine?: number
|
||||
productTypes?: number[]
|
||||
versioneGM?: string
|
||||
short_descr: string
|
||||
@@ -52,8 +52,8 @@ export interface IVariazione {
|
||||
sale_price?: number
|
||||
quantita?: number
|
||||
availability?: number
|
||||
numpages?: number
|
||||
formato?: string
|
||||
misure?: string
|
||||
tipologia?: string
|
||||
edizione?: string
|
||||
preOrderDate?: Date
|
||||
|
||||
@@ -1900,6 +1900,11 @@ const msg_it = {
|
||||
area_personale: 'Area Personale',
|
||||
},
|
||||
|
||||
catalogo: {
|
||||
text: 'Testo',
|
||||
imgsfondo_def: 'Immagine di sfondo',
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -180,16 +180,19 @@ export const Api = {
|
||||
|
||||
if (error.status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED) {
|
||||
try {
|
||||
console.log('Token Scaduto.')
|
||||
const newAccessToken = await this.refreshToken();
|
||||
if (newAccessToken) {
|
||||
userStore.setAuth(newAccessToken, userStore.refreshToken);
|
||||
if (!evitaloop)
|
||||
if (!evitaloop) {
|
||||
console.log('uso il RefreshToken...')
|
||||
return resolve(this.SendReq(url, method, mydata, setAuthToken, true));
|
||||
}
|
||||
} else {
|
||||
$router.push('/signin')
|
||||
}
|
||||
} catch (err2: any) {
|
||||
console.error('err2', err2)
|
||||
console.error('err2, Token Invalido', err2)
|
||||
if (err2?.code === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
|
||||
userStore.setServerCode(toolsext.ERR_AUTHENTICATION)
|
||||
userStore.setAuth('', '')
|
||||
@@ -241,7 +244,7 @@ export const Api = {
|
||||
mydata: any,
|
||||
setAuthToken = false,
|
||||
evitaloop = false,
|
||||
retryCount = 5,
|
||||
retryCount = 3,
|
||||
retryDelay = 5000
|
||||
): Promise<Types.AxiosSuccess | Types.AxiosError> {
|
||||
try {
|
||||
|
||||
@@ -27,25 +27,13 @@ export const costanti = {
|
||||
CATALOGO_FIELDS: [
|
||||
'productTypes',
|
||||
'excludeproductTypes',
|
||||
'formato',
|
||||
'misure',
|
||||
'Categoria',
|
||||
'Editore',
|
||||
'pdf',
|
||||
'printable',
|
||||
'backgroundimage',
|
||||
'backgroundimage_printable',
|
||||
'width',
|
||||
'widthscheda',
|
||||
'widthpag',
|
||||
'Printable',
|
||||
'height',
|
||||
'height_Printable',
|
||||
'numschede_perCol',
|
||||
'numschede_perRiga',
|
||||
'margine_pagina',
|
||||
'margine_riga',
|
||||
'margine_paginaPrintable',
|
||||
'margine_rigaPrintable',
|
||||
'first_page_img',
|
||||
'first_page_html',
|
||||
'first_page_height',
|
||||
@@ -56,10 +44,12 @@ export const costanti = {
|
||||
],
|
||||
|
||||
SCHEDA_FIELDS: [
|
||||
'bgimg',
|
||||
'bgimg_printable',
|
||||
'bgSize',
|
||||
'bgSize_printable',
|
||||
// 'imgsfondo',
|
||||
],
|
||||
|
||||
IMG_FIELDS: [
|
||||
'imgsfondo',
|
||||
'imgsfondo_def',
|
||||
],
|
||||
|
||||
TIPOFAVBOOK: {
|
||||
|
||||
@@ -158,6 +158,14 @@ export const colISize = [
|
||||
AddCol({ name: 'width', label_trans: 'size.width', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'height', label_trans: 'size.height', fieldtype: costanti.FieldType.string }),
|
||||
]
|
||||
export const colIText = [
|
||||
AddCol({ name: 'contenuto', label_trans: 'catalogo.contenuto', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'maxlength', label_trans: 'catalogo.maxlength', fieldtype: costanti.FieldType.number }),
|
||||
]
|
||||
export const colmyIImg = [
|
||||
AddCol({ name: 'filename', label_trans: 'iimg.filename', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'fit', label_trans: 'iimg.fit', fieldtype: costanti.FieldType.string }),
|
||||
]
|
||||
|
||||
export const colmyScheda = [
|
||||
AddCol({ name: 'name', label_trans: 'scheda.name', fieldtype: costanti.FieldType.string }),
|
||||
@@ -171,19 +179,10 @@ export const colmyScheda = [
|
||||
AddCol({ name: 'numschede_perRiga', label_trans: 'scheda.numschede_perRiga', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'margine_top', label_trans: 'scheda.margine_top', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'margine_pagina', label_trans: 'scheda.margine_pagina', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'margine_paginaPrintable', label_trans: 'scheda.margine_paginaPrintable', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'margine_riga', label_trans: 'scheda.margine_riga', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'margine_rigaPrintable', label_trans: 'scheda.margine_rigaPrintable', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'text', label_trans: 'catalogo.text', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'posiz_text', label_trans: 'catalogo.posiz_text', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'line_height', label_trans: 'catalogo.line_height', fieldtype: costanti.FieldType.number }),
|
||||
|
||||
AddCol({ name: 'bgimg', label_trans: 'scheda.bgimg', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'bgimg_printable', label_trans: 'scheda.bgimg_printable', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'bgSize', label_trans: 'scheda.bgimg', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'bgSize_printable', label_trans: 'scheda.bgSize', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'widthPPrintable', label_trans: 'scheda.widthPPrintable', fieldtype: costanti.FieldType.number }),
|
||||
|
||||
AddCol({ name: 'productTypes', label_trans: 'productTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'excludeproductTypes', label_trans: 'excludeproductTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'Editore', label_trans: 'Editore' }),
|
||||
@@ -196,14 +195,13 @@ export const colmyelCatalogo = [
|
||||
AddCol({ name: 'productTypes', label_trans: 'productTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'excludeproductTypes', label_trans: 'excludeproductTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'pdf', label_trans: 'pdf' }),
|
||||
AddCol({ name: 'pdf_filename', label_trans: 'pdf_filename' }),
|
||||
AddCol({ name: 'Editore', label_trans: 'Editore' }),
|
||||
AddCol({ name: 'width', label_trans: 'width', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'height', label_trans: 'height', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'optcatalogo.', label_trans: 'catalogo.optcatalogo.', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'margine_pagina', label_trans: 'margine_pagina', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'margine_paginaPrintable', label_trans: 'margine_paginaPrintable', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'margine_riga', label_trans: 'margine_riga', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'margine_rigaPrintable', label_trans: 'margine_rigaPrintable', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'first_page_img', label_trans: 'catalogo.first_page_img', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'last_page_img', label_trans: 'catalogo.last_page_img', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'first_page_html', label_trans: 'catalogo.first_page_html', fieldtype: costanti.FieldType.html }),
|
||||
@@ -211,12 +209,8 @@ export const colmyelCatalogo = [
|
||||
AddCol({ name: 'last_page_height', label_trans: 'catalogo.last_page_html', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'last_page_html', label_trans: 'catalogo.last_page_html', fieldtype: costanti.FieldType.html }),
|
||||
|
||||
AddCol({ name: 'backgroundimage', label_trans: 'backgroundimage', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'backgroundimage_printable', label_trans: 'backgroundimage_printable', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'backgroundSize', label_trans: 'scheda.bgimg', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'backgroundSize_printable', label_trans: 'scheda.bgSize', fieldtype: costanti.FieldType.image }),
|
||||
AddCol({ name: 'widthpagPrintable', label_trans: 'widthpag', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'widthpagPrintable', label_trans: 'widthpagPrintable', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'imgsfondo_def', label_trans: 'catalogo.imgsfondo_def', fieldtype: costanti.FieldType.image }),
|
||||
|
||||
]
|
||||
|
||||
export const colmyelems = [
|
||||
@@ -2336,7 +2330,7 @@ export const colTableProductInfos = [
|
||||
AddCol({ name: 'collezione', label_trans: 'products.collezione', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'date_publishing', label_trans: 'products.date_publishing', fieldtype: costanti.FieldType.onlydate }),
|
||||
AddCol({ name: 'publisher', label_trans: 'products.publisher', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'numpages', label_trans: 'products.numpages', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'pagine', label_trans: 'products.pagine', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'note', label_trans: 'products.note', fieldtype: costanti.FieldType.html }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
@@ -3044,6 +3038,7 @@ export const colTableUsers = [
|
||||
titlepopupedit: 'Permessi'
|
||||
}),
|
||||
AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }),
|
||||
AddCol({ name: 'banIp', label_trans: 'reg.banIp', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
@@ -3470,6 +3465,7 @@ export const colTableUsersISP = [
|
||||
titlepopupedit: 'Notifiche'
|
||||
}),
|
||||
AddCol({ name: 'ipaddr', label_trans: 'reg.ipaddr' }),
|
||||
AddCol({ name: 'banIp', label_trans: 'reg.banIp', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
@@ -4217,6 +4213,20 @@ export const fieldsTable = {
|
||||
colkey: '_id',
|
||||
collabel: 'name',
|
||||
},
|
||||
{
|
||||
value: 'text',
|
||||
label: 'Testo',
|
||||
columns: colIText,
|
||||
colkey: 'contenuto',
|
||||
collabel: 'contenuto',
|
||||
},
|
||||
{
|
||||
value: 'imgs',
|
||||
label: 'Immagini',
|
||||
columns: colmyIImg,
|
||||
colkey: 'filename',
|
||||
collabel: 'filename',
|
||||
},
|
||||
{
|
||||
value: 'listcards',
|
||||
label: 'Elementi',
|
||||
|
||||
@@ -227,7 +227,7 @@ export const useNotifStore = defineStore('NotifStore', {
|
||||
async updateNotifDataFromServer({ username, lastdataread }: { username: string, lastdataread: Date }) {
|
||||
console.log('updateNotifDataFromServer', username, lastdataread)
|
||||
|
||||
return Api.SendReq(`/sendnotif/${username}/${lastdataread}/${process.env.APP_ID}`, 'GET', null)
|
||||
return Api.SendReq(`/sendnotif/${username}/${lastdataread}/${process.env.APP_ID}`, 'GET', null, false, false, 0)
|
||||
.then((res) => {
|
||||
// console.log('res', res)
|
||||
if (!!res.data) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd } from 'model'
|
||||
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText } from 'model'
|
||||
|
||||
import { Api } from '@api'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
@@ -1267,32 +1267,46 @@ export const useProducts = defineStore('Products', {
|
||||
return authorString
|
||||
},
|
||||
|
||||
replaceKeyWordsByProduct(myproduct: IProduct, text_html: string) {
|
||||
if (!myproduct || !text_html) {
|
||||
return text_html;
|
||||
replaceKeyWordsByProduct(myproduct: IProduct, testo: IText) {
|
||||
if (!myproduct || !testo.contenuto) {
|
||||
return testo.contenuto;
|
||||
}
|
||||
|
||||
const autori = this.getAutoriByArrayAuthors(myproduct.productInfo.authors)
|
||||
|
||||
const maxDescriptionLength = 100;
|
||||
const maxDescriptionLength = testo.maxlength ?? 100;
|
||||
const description = myproduct.productInfo.short_descr || '';
|
||||
const long_descr = myproduct.productInfo.description || '';
|
||||
|
||||
const truncatedDescription = description.length > maxDescriptionLength
|
||||
? description.substring(0, description.lastIndexOf(' ', maxDescriptionLength)) + '...'
|
||||
: description;
|
||||
|
||||
const truncatedlongDescription = long_descr.length > maxDescriptionLength
|
||||
? long_descr.substring(0, long_descr.lastIndexOf(' ', maxDescriptionLength)) + '...'
|
||||
: long_descr;
|
||||
|
||||
const prezzo = myproduct.arrvariazioni ? myproduct.arrvariazioni[0].price?.toFixed(2) : ''
|
||||
const prezzo_scontato = myproduct.arrvariazioni ? myproduct.arrvariazioni[0].sale_price?.toFixed(2) : ''
|
||||
const misure = myproduct.arrvariazioni ? myproduct.arrvariazioni[0].misure : ''
|
||||
const formato = myproduct.arrvariazioni ? myproduct.arrvariazioni[0].formato : ''
|
||||
const pagine = myproduct.arrvariazioni ? myproduct.arrvariazioni[0].pagine : ''
|
||||
|
||||
// Crea una mappa di sostituzioni
|
||||
const replacements = {
|
||||
'{autore}': autori || '',
|
||||
'{titolo}': myproduct.productInfo.name || '',
|
||||
'{descrizione}': truncatedDescription || '',
|
||||
'{descrizione_estesa}': truncatedlongDescription || '',
|
||||
'{pagine}': pagine || '',
|
||||
'{misure}': misure || '',
|
||||
'{formato}': formato || '',
|
||||
'{prezzo}': prezzo || '',
|
||||
'{prezzo_scontato}': prezzo_scontato || '',
|
||||
};
|
||||
|
||||
// Esegue le sostituzioni
|
||||
let result = text_html;
|
||||
let result = testo.contenuto;
|
||||
for (const [key, value] of Object.entries(replacements)) {
|
||||
result = result.replace(new RegExp(key, 'g'), value);
|
||||
}
|
||||
|
||||
@@ -900,7 +900,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
mydata.repeatPassword = ''
|
||||
mydata.password = String(hashedPassword)
|
||||
|
||||
return Api.SendReq('/updatepwd', 'POST', mydata, true)
|
||||
return Api.SendReq('/updatepwd', 'POST', mydata, true, false, 1)
|
||||
.then((res) => {
|
||||
return { code: res.data.code, msg: res.data.msg }
|
||||
})
|
||||
@@ -1425,7 +1425,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
// console.log('executing login...')
|
||||
|
||||
return await Api.SendReq('/users/login', 'POST', usertosend, true)
|
||||
return await Api.SendReq('/users/login', 'POST', usertosend, true, false, 0)
|
||||
.then((res) => {
|
||||
|
||||
myres = res
|
||||
@@ -1867,7 +1867,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
async setCircuitCmd($q: any, t: any, usernameOrig: string, circuitname: string, cmd: number, value: any, extrarec?: any) {
|
||||
return await Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, circuitname, cmd, value, extrarec })
|
||||
return await Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, circuitname, cmd, value, extrarec }, false, false, 0)
|
||||
.then((res) => {
|
||||
this.updateTables = true
|
||||
const notifStore = useNotifStore()
|
||||
|
||||
@@ -2163,7 +2163,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
for (let i = 0; i < this.myelems.length; i++) {
|
||||
if (this.myelems[i]._id === newelem._id) {
|
||||
this.myelems[i] = newelem;
|
||||
|
||||
|
||||
console.log('SALVATO', this.myelems[i])
|
||||
break;
|
||||
}
|
||||
@@ -2239,7 +2239,13 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
Categoria: [],
|
||||
Editore: [],
|
||||
pdf: false,
|
||||
backgroundimage: '',
|
||||
dimensioni_def: {
|
||||
pagina: {
|
||||
size: { width: '', height: '' },
|
||||
margini: {left: '', top: '', right: '', bottom: ''},
|
||||
padding: {left: '', top: '', right: '', bottom: ''},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,9 @@ $heightBtn: 100%;
|
||||
.fixed-width {
|
||||
width: var(--width) !important; /* Usa una variabile CSS */
|
||||
}
|
||||
.fixed-height {
|
||||
height: var(--height) !important; /* Usa una variabile CSS */
|
||||
}
|
||||
|
||||
.break {
|
||||
flex-basis: 100%;
|
||||
|
||||
@@ -190,7 +190,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function calcArrProducts() {
|
||||
console.log('calcArrProducts')
|
||||
// console.log('calcArrProducts')
|
||||
|
||||
// eventuali titoli specifici estratti dall'array di Prodotti Selezionati
|
||||
//const searchtext = getSearchText()
|
||||
@@ -412,16 +412,16 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getProdBySchedaRigaCol(recscheda: ISchedaSingola, riga: number, col: number) {
|
||||
function getProdBySchedaRigaCol(recscheda: ISchedaSingola, pagina: number, riga: number, col: number) {
|
||||
try {
|
||||
return recscheda.arrProdToShow![riga][col]
|
||||
return recscheda.arrProdToShow![pagina][riga][col]
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
function generatearrProdToViewSorted() {
|
||||
console.log('generatearrProdToViewSorted')
|
||||
// console.log('generatearrProdToViewSorted')
|
||||
|
||||
// Svuota
|
||||
arrProdToView.value = []
|
||||
@@ -438,31 +438,38 @@ export default defineComponent({
|
||||
let indadded = 0
|
||||
recscheda.arrProdToShow = []
|
||||
|
||||
for (let giro = 0; giro < schedePerPagina; giro++) {
|
||||
// Aggiunge il prossimo prodotto che non è stato ancora inserito
|
||||
const result = addNextProductToTheView(arrProdFiltrati, indprod);
|
||||
if (result.end) {
|
||||
break; // Esci dal ciclo se non ci sono più prodotti disponibili
|
||||
} else {
|
||||
if (result.indprod)
|
||||
indprod = result.indprod // Aggiorna indprod per il prossimo giro
|
||||
if (result.myrec) {
|
||||
for (let pagina = 0; pagina < 100; pagina++) {
|
||||
indadded = 0
|
||||
if (!recscheda.arrProdToShow[pagina]) {
|
||||
recscheda.arrProdToShow[pagina] = [];
|
||||
}
|
||||
|
||||
let riga = Math.floor(indadded / schedePerCol)
|
||||
let col = indadded % schedePerCol
|
||||
for (let giro = 0; giro < schedePerPagina; giro++) {
|
||||
// Aggiunge il prossimo prodotto che non è stato ancora inserito
|
||||
const result = addNextProductToTheView(arrProdFiltrati, indprod);
|
||||
if (result.end) {
|
||||
break; // Esci dal ciclo se non ci sono più prodotti disponibili
|
||||
} else {
|
||||
if (result.indprod)
|
||||
indprod = result.indprod // Aggiorna indprod per il prossimo giro
|
||||
if (result.myrec) {
|
||||
|
||||
if (!recscheda.arrProdToShow[riga]) {
|
||||
recscheda.arrProdToShow[riga] = [];
|
||||
let riga = Math.floor(indadded / schedePerCol)
|
||||
let col = indadded % schedePerCol
|
||||
|
||||
if (!recscheda.arrProdToShow[pagina][riga]) {
|
||||
recscheda.arrProdToShow[pagina][riga] = [];
|
||||
}
|
||||
|
||||
recscheda.arrProdToShow[pagina][riga][col] = result.myrec
|
||||
|
||||
indadded++
|
||||
}
|
||||
|
||||
recscheda.arrProdToShow[riga][col] = result.myrec
|
||||
|
||||
indadded++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log('*** arrProdToShow', recscheda.arrProdToShow)
|
||||
// console.log('*** arrProdToShow', recscheda.arrProdToShow)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -635,7 +642,7 @@ export default defineComponent({
|
||||
const element = document.getElementById('pdf-content')
|
||||
const opt = {
|
||||
margin: [0.1, 0.1, 0.1, 0.1],
|
||||
filename: 'catalogo_completo.pdf',
|
||||
filename: (props.optcatalogo.pdf_filename ?? 'catalogo_completo') + '.pdf',
|
||||
image: {
|
||||
type: 'jpeg',
|
||||
quality: 0.98
|
||||
@@ -687,11 +694,11 @@ export default defineComponent({
|
||||
const page = []
|
||||
|
||||
// Crea le righe per questa pagina
|
||||
for (let rowStart = 0; rowStart < schedePerCol; rowStart++) {
|
||||
for (let rowStart = 0; rowStart < schedePerRiga; rowStart++) {
|
||||
const row = []
|
||||
|
||||
// Riempi ogni riga con il numero corretto di prodotti
|
||||
for (let col = 0; col < schedePerRiga; col++) {
|
||||
for (let col = 0; col < schedePerCol; col++) {
|
||||
const productIndex = pageStart + (rowStart * schedePerRiga) + col
|
||||
row.push(indiceprodotto)
|
||||
indiceprodotto++
|
||||
@@ -711,53 +718,89 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function generateStyleCatalogo(optcatalogo: ICatalogo) {
|
||||
const fileimg = (optcatalogo.printable
|
||||
? optcatalogo.backgroundimage_printable
|
||||
: optcatalogo.backgroundimage)
|
||||
|
||||
const marginBottom = optcatalogo.dimensioni.pagina.margini!.bottom || ''
|
||||
|
||||
const backgroundImage = fileimg ? `url(${costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO + fileimg})` : ''
|
||||
|
||||
const backgroundSize = `${optcatalogo.printable
|
||||
? optcatalogo.backgroundSize_printable
|
||||
: optcatalogo.backgroundSize}`;
|
||||
|
||||
const width = optcatalogo.dimensioni.pagina.size?.width
|
||||
|
||||
return {
|
||||
backgroundImage,
|
||||
backgroundSize,
|
||||
marginBottom,
|
||||
'--width': width
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function generateStylePageScheda(optcatalogo: ICatalogo, scheda: IMyScheda) {
|
||||
const marginTop = `${scheda.dimensioni.pagina.margini!.top}`
|
||||
const marginTop = scheda.dimensioni?.pagina?.margini?.top ? scheda.dimensioni?.pagina?.margini?.top : (optcatalogo.dimensioni_def?.pagina?.margini?.top ?? '')
|
||||
const marginBottom = scheda.dimensioni?.pagina?.margini?.bottom ? scheda.dimensioni?.pagina?.margini?.bottom : (optcatalogo.dimensioni_def?.pagina?.margini?.bottom ?? '')
|
||||
const marginLeft = scheda.dimensioni?.pagina?.margini?.left ? scheda.dimensioni?.pagina?.margini?.left : (optcatalogo.dimensioni_def?.pagina?.margini?.left ?? '')
|
||||
const marginRight = scheda.dimensioni?.pagina?.margini?.right ? scheda.dimensioni?.pagina?.margini?.right : (optcatalogo.dimensioni_def?.pagina?.margini?.right ?? '')
|
||||
|
||||
const marginBottom = scheda.dimensioni.pagina.margini!.bottom
|
||||
const paddingTop = scheda.dimensioni?.pagina?.padding?.top ? scheda.dimensioni?.pagina?.padding?.top : (optcatalogo.dimensioni_def?.pagina?.padding?.top ?? '')
|
||||
const paddingBottom = scheda.dimensioni?.pagina?.padding?.bottom ? scheda.dimensioni?.pagina?.padding?.bottom : (optcatalogo.dimensioni_def?.pagina?.padding?.bottom ?? '')
|
||||
const paddingLeft = scheda.dimensioni?.pagina?.padding?.left ? scheda.dimensioni?.pagina?.padding?.left : (optcatalogo.dimensioni_def?.pagina?.padding?.left ?? '')
|
||||
const paddingRight = scheda.dimensioni?.pagina?.padding?.right ? scheda.dimensioni?.pagina?.padding?.right : (optcatalogo.dimensioni_def?.pagina?.padding?.right ?? '')
|
||||
|
||||
const fileimg = (optcatalogo.printable
|
||||
? scheda.bgimg_printable
|
||||
: scheda.bgimg)
|
||||
// Esiste un immagine di sfondo specifica della singola pagina ?
|
||||
let fileimg = scheda.dimensioni?.pagina?.imgsfondo?.imagefile
|
||||
let backgroundSize = scheda.dimensioni?.pagina?.imgsfondo?.fit
|
||||
if (fileimg) {
|
||||
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_SCHEDA + fileimg})` : ''
|
||||
}
|
||||
|
||||
const backgroundImage = fileimg ? `url(${costanti.DIR_UPLOAD +
|
||||
costanti.DIR_SCHEDA + fileimg})` : ''
|
||||
if (!fileimg) {
|
||||
// Esiste un immagine di sfondo uguali per tutte le pagine ?
|
||||
fileimg = optcatalogo.imgsfondo_def?.imagefile
|
||||
backgroundSize = optcatalogo.imgsfondo_def?.fit
|
||||
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + fileimg})` : ''
|
||||
}
|
||||
|
||||
const backgroundSize = `${optcatalogo.printable
|
||||
? scheda.bgSize_printable
|
||||
: scheda.bgSize}`;
|
||||
let backgroundImage = fileimg ?? ''
|
||||
|
||||
const width = scheda.dimensioni.pagina.size?.width
|
||||
const width = scheda.dimensioni?.pagina?.size?.width ? scheda.dimensioni?.pagina?.size?.width : (optcatalogo.dimensioni_def?.pagina?.size?.width ?? '')
|
||||
const height = scheda.dimensioni?.pagina?.size?.height ? scheda.dimensioni?.pagina?.size?.height : (optcatalogo.dimensioni_def?.pagina?.size?.height ?? '')
|
||||
|
||||
return {
|
||||
marginBottom,
|
||||
marginTop,
|
||||
marginLeft,
|
||||
marginRight,
|
||||
paddingBottom,
|
||||
paddingTop,
|
||||
paddingLeft,
|
||||
paddingRight,
|
||||
backgroundImage,
|
||||
backgroundSize,
|
||||
'--width': width
|
||||
'--width': width,
|
||||
'--height': height,
|
||||
...(width ? { width: `${width} !important;` } : {}),
|
||||
...(height ? { height: `${height} !important;` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
};
|
||||
}
|
||||
|
||||
function getWidthPagina(optcatalogo: ICatalogo, scheda: IMyScheda) {
|
||||
return scheda.dimensioni?.pagina?.size?.width ? scheda.dimensioni?.pagina?.size?.width : (optcatalogo.dimensioni_def?.pagina?.size?.width ?? '')
|
||||
}
|
||||
function getHeightPagina(optcatalogo: ICatalogo, scheda: IMyScheda) {
|
||||
return scheda.dimensioni?.pagina?.size?.height ? scheda.dimensioni?.pagina?.size?.height : (optcatalogo.dimensioni_def?.pagina?.size?.height ?? '')
|
||||
}
|
||||
|
||||
function getStyleRow(recscheda: ISchedaSingola) {
|
||||
const placeContent = 'center';
|
||||
|
||||
const width = recscheda.scheda?.dimensioni?.scheda_prodotto?.size?.width ?? '100px';
|
||||
const height = recscheda.scheda?.dimensioni?.scheda_prodotto?.size?.height;
|
||||
|
||||
const marginTop = recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.top ?? '0px';
|
||||
const marginBottom = recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.bottom ?? '0px';
|
||||
const marginLeft = recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.left ?? '0px';
|
||||
const marginRight = recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.right ?? '0px';
|
||||
|
||||
const paddingTop = recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.top ?? '0px';
|
||||
const paddingBottom = recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.bottom ?? '0px';
|
||||
const paddingLeft = recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.left ?? '0px';
|
||||
const paddingRight = recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.right ?? '0px';
|
||||
|
||||
return {
|
||||
placeContent,
|
||||
flex: `0 1 ${width} !important;`,
|
||||
margin: `${marginTop} ${marginRight} ${marginBottom} ${marginLeft}`,
|
||||
padding: `${paddingTop} ${paddingRight} ${paddingBottom} ${paddingLeft}`,
|
||||
...(height ? { height: `${height} !important;` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
};
|
||||
}
|
||||
|
||||
@@ -805,6 +848,9 @@ export default defineComponent({
|
||||
getProdBySchedaRigaCol,
|
||||
generateStylePageScheda,
|
||||
generateStyleCatalogo,
|
||||
getStyleRow,
|
||||
getWidthPagina,
|
||||
getHeightPagina,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<q-tab-panel name="visu">
|
||||
<q-btn
|
||||
v-if="optcatalogo.pdf"
|
||||
label="Crea PDF"
|
||||
:label="`Crea PDF ${optcatalogo.pdf_filename}`"
|
||||
@click="generatePDF"
|
||||
></q-btn>
|
||||
<div class="row q-gutter-xs justify-center q-mx-auto bg-blue-1">
|
||||
@@ -229,7 +229,7 @@
|
||||
class="first_page"
|
||||
v-html="optcatalogo.first_page_html"
|
||||
></div>
|
||||
</div>
|
||||
\ </div>
|
||||
<div :style="generateStyleCatalogo(optcatalogo)">
|
||||
<div class="flex-container-book">
|
||||
<q-infinite-scroll
|
||||
@@ -298,7 +298,7 @@
|
||||
recscheda.scheda
|
||||
)"
|
||||
:key="pageIndex"
|
||||
:class="{ 'fixed-width': true, 'card-page': true }"
|
||||
:class="{ 'fixed-width': getWidthPagina(optcatalogo, recscheda.scheda), 'fixed-height': getHeightPagina(optcatalogo, recscheda.scheda), 'card-page': true }"
|
||||
:style="
|
||||
generateStylePageScheda(
|
||||
optcatalogo,
|
||||
@@ -311,33 +311,32 @@
|
||||
v-for="(row, rowIndex) in page"
|
||||
:key="`${pageIndex}-${rowIndex}`"
|
||||
class="card-row"
|
||||
:style="`margin-bottom: ${
|
||||
scheda.dimensioni.riga.bottom
|
||||
? scheda.dimensioni.riga.bottom
|
||||
: optcatalogo.dimensioni.riga.bottom
|
||||
};`"
|
||||
:style="
|
||||
'margin-bottom: ' +
|
||||
(scheda?.dimensioni?.riga?.bottom ?? '0px') +
|
||||
';'
|
||||
"
|
||||
>
|
||||
<!-- Itera sui prodotti di ogni riga -->
|
||||
|
||||
<div
|
||||
v-for="(indprod, colIndex) in row"
|
||||
:key="`${pageIndex}-${rowIndex}-${colIndex}`"
|
||||
class="flex-item-book image-container"
|
||||
:style="
|
||||
'place-content: center; ' +
|
||||
('flex: 0 1 ' +
|
||||
recscheda.scheda.dimensioni.scheda_prodotto.width
|
||||
|| '100px' + '; ')
|
||||
"
|
||||
:style="getStyleRow(recscheda)"
|
||||
>
|
||||
<!--pag: {{pageIndex}} - riga: {{rowIndex}} - col: {{colIndex}} - -->
|
||||
<CContainerCatalogoCard
|
||||
v-if="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda,
|
||||
pageIndex,
|
||||
rowIndex,
|
||||
colIndex
|
||||
) &&
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda,
|
||||
pageIndex,
|
||||
rowIndex,
|
||||
colIndex
|
||||
).active
|
||||
@@ -345,6 +344,7 @@
|
||||
:id="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda,
|
||||
pageIndex,
|
||||
rowIndex,
|
||||
colIndex
|
||||
)._id
|
||||
@@ -366,11 +366,13 @@
|
||||
v-else-if="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda,
|
||||
pageIndex,
|
||||
rowIndex,
|
||||
colIndex
|
||||
) &&
|
||||
(getProdBySchedaRigaCol(
|
||||
recscheda,
|
||||
pageIndex,
|
||||
rowIndex,
|
||||
colIndex
|
||||
).active ||
|
||||
@@ -379,6 +381,7 @@
|
||||
:id="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda,
|
||||
pageIndex,
|
||||
rowIndex,
|
||||
colIndex
|
||||
)._id
|
||||
@@ -430,33 +433,16 @@
|
||||
{{
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.backgroundimage
|
||||
optcatalogo.imgsfondo_def?.imagefile
|
||||
}}
|
||||
</div>
|
||||
|
||||
<q-img
|
||||
v-if="optcatalogo.backgroundimage"
|
||||
v-if="optcatalogo.imgsfondo_def?.imagefile"
|
||||
:src="
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.backgroundimage
|
||||
"
|
||||
>
|
||||
</q-img>
|
||||
<div v-if="optcatalogo.backgroundimage_printable">
|
||||
Sfondo Stampa:
|
||||
{{
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.backgroundimage_printable
|
||||
}}
|
||||
</div>
|
||||
|
||||
<q-img
|
||||
:src="
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.backgroundimage_printable
|
||||
optcatalogo.imgsfondo_def?.imagefile
|
||||
"
|
||||
>
|
||||
</q-img>
|
||||
|
||||
|
Before Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 107 KiB |