- ordinamento aggiornare la pagina "templates" per Fatturati ultimo anno
- bestseller
This commit is contained in:
4
.env
4
.env
@@ -1,6 +1,6 @@
|
||||
VITE_APP_VERSION="1.2.34"
|
||||
VITE_APP_VERSION="1.2.35"
|
||||
VITE_LANG_DEFAULT="it"
|
||||
VITE_PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||
VITE_SERVICE_WORKER_FILE="sw-1.2.34.js"
|
||||
VITE_SERVICE_WORKER_FILE="sw-1.2.35.js"
|
||||
VITE_PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||
VITE_VUE_ROUTER_MODE="history"
|
||||
@@ -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.34">
|
||||
<meta name="version" content="1.2.35">
|
||||
<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<% } %>">
|
||||
|
||||
|
||||
14
package.json
14
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gruppomacro",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.35",
|
||||
"description": "Gruppo Macro",
|
||||
"productName": "Gruppo Macro",
|
||||
"author": "Surya",
|
||||
@@ -9,20 +9,20 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8089 APP_VERSION='1.2.34' quasar dev",
|
||||
"dev": "PORT=8089 APP_VERSION='1.2.35' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "APP_VERSION='1.2.34' quasar build -m spa",
|
||||
"buildspa": "APP_VERSION='1.2.35' 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.34' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.34' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.35' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.35' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cnm",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.35",
|
||||
"description": "Comunita Nuovo Mondo",
|
||||
"productName": "ComunitaNuovoMondo",
|
||||
"author": "Surya",
|
||||
@@ -9,7 +9,7 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8083 APP_VERSION='1.2.34' quasar dev",
|
||||
"dev": "PORT=8083 APP_VERSION='1.2.35' 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.34' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.34' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.35' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.35' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "freeplanet",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.35",
|
||||
"description": "freeplanet",
|
||||
"productName": "freeplanet",
|
||||
"author": "Surya",
|
||||
@@ -9,11 +9,11 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8087 APP_VERSION='1.2.34' quasar dev",
|
||||
"dev": "PORT=8087 APP_VERSION='1.2.35' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.35' 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.34' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.34' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8097 APP_VERSION='1.2.35' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.35' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gruppomacro",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.35",
|
||||
"description": "Gruppo Macro",
|
||||
"productName": "Gruppo Macro",
|
||||
"author": "Surya",
|
||||
@@ -9,20 +9,20 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8089 APP_VERSION='1.2.34' quasar dev",
|
||||
"dev": "PORT=8089 APP_VERSION='1.2.35' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "APP_VERSION='1.2.34' quasar build -m spa",
|
||||
"buildspa": "APP_VERSION='1.2.35' 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.34' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.34' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.35' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.35' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kolibrilab",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.35",
|
||||
"description": "kolibrilab",
|
||||
"productName": "kolibrilab",
|
||||
"author": "Surya Paolo",
|
||||
@@ -8,11 +8,11 @@
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "PORT=8083 APP_VERSION='1.2.34' quasar dev",
|
||||
"dev": "PORT=8083 APP_VERSION='1.2.35' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.35' 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.34' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.34' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.35' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.35' 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"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "piuchebuono",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.35",
|
||||
"description": "PiuCheBuono",
|
||||
"productName": "PiuCheBuono",
|
||||
"author": "Surya",
|
||||
@@ -9,11 +9,11 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8085 APP_VERSION='1.2.34' quasar dev",
|
||||
"dev": "PORT=8085 APP_VERSION='1.2.35' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.35' 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.34' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.34' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.35' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.35' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.35",
|
||||
"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.34' PORT=8084 quasar dev",
|
||||
"dev": "APP_VERSION='1.2.35' PORT=8084 quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.34' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.35' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.35' 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.34' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.34' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.35' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.35' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/* global workbox */
|
||||
/* global cfgenv */
|
||||
|
||||
const VITE_APP_VERSION = "1.2.34";
|
||||
const VITE_APP_VERSION = "1.2.35";
|
||||
|
||||
// Costanti di configurazione
|
||||
const DYNAMIC_CACHE = 'dynamic-cache-v2';
|
||||
|
||||
@@ -630,12 +630,18 @@ export default defineComponent({
|
||||
function isProductBestseller() {
|
||||
|
||||
try {
|
||||
// diventa un bestseller quando il rank6M è tra i primi 10 ordinandoli per rank6M
|
||||
return myproduct.value!.productInfo.rank6M! > 0 && (myproduct.value!.productInfo.rank6M!)
|
||||
if (props.scheda.etichette?.bestseller?.show) {
|
||||
// diventa un bestseller quando il numero di fatturati Annuali è superiore a
|
||||
const numfatturati = props.scheda.etichette?.bestseller?.quantiFattRaggiunti ?? 50;
|
||||
|
||||
return myproduct.value!.productInfo.fatLast6M > numfatturati
|
||||
}
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
}
|
||||
|
||||
function getScale() {
|
||||
|
||||
@@ -294,7 +294,7 @@ export default defineComponent({
|
||||
}
|
||||
recscheda.scheda.etichette!.bestseller = {
|
||||
show: false,
|
||||
primiNInClassifica: 0,
|
||||
quantiFattRaggiunti: 0,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2284,7 +2284,7 @@
|
||||
</q-toggle>
|
||||
<CMySlider
|
||||
label="Primi N in Classifica"
|
||||
v-model="recscheda.scheda.etichette.bestseller.primiNInClassifica"
|
||||
v-model="recscheda.scheda.etichette.bestseller.quantiFattRaggiunti"
|
||||
:min="1"
|
||||
:max="100"
|
||||
color="green"
|
||||
|
||||
@@ -140,6 +140,7 @@ export default defineComponent({
|
||||
//{ name: "rank1Y", label: "Class. 1Y", field: "rank1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "pagine", label: "Pag.", field: "pagine", align: "right" },
|
||||
{ name: "totVen", label: "Vend", field: "totVen", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "vLast6M", label: "Ven 6M", field: "vLast6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "fatLast6M", label: "Fat 6M", field: "fatLast6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "fatLast1Y", label: "Fat 1A", field: "fatLast1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "fatLast2Y", label: "Fat 2A", field: "fatLast2Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
@@ -332,7 +333,7 @@ export default defineComponent({
|
||||
cookieValue = []; // In caso di errore, inizializza come array vuoto
|
||||
}
|
||||
|
||||
const selectedColumns = ref(cookieValue.length > 0 ? cookieValue : ["pos", "drag", "image", "name", "authors", "catprods", "isbn", "actions"]);
|
||||
const selectedColumns = ref(cookieValue.length > 0 ? cookieValue : ["pos", "drag", "image", "name", "authors", "isbn", "catprods", "stato", "date_pub", "pagine", "trafiletto", "vLast6M", "quantity", "actions"]);
|
||||
|
||||
|
||||
// 3. Funzione per verificare se una colonna è visibile (isColumnVisible)
|
||||
|
||||
@@ -728,7 +728,7 @@ export interface INovita {
|
||||
|
||||
export interface IBestseller {
|
||||
show?: boolean
|
||||
primiNInClassifica?: number
|
||||
quantiFattRaggiunti?: number
|
||||
}
|
||||
|
||||
export interface IEtichette {
|
||||
@@ -850,6 +850,7 @@ export interface ISchedaSingola {
|
||||
|
||||
export interface IOptRigenera {
|
||||
visibilitaDisp?: string
|
||||
rig_mod?: string
|
||||
stato?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -251,18 +251,19 @@ export interface ICatProd {
|
||||
export interface ICatPrTotali {
|
||||
_id: string,
|
||||
name: string,
|
||||
quanti: number,
|
||||
quanti?: number,
|
||||
}
|
||||
export interface ICollaneTotali {
|
||||
_id: string,
|
||||
name: string,
|
||||
quanti: number,
|
||||
quanti?: number,
|
||||
}
|
||||
|
||||
export interface ICollana {
|
||||
_id?: any
|
||||
idCollana: number,
|
||||
title: string,
|
||||
quanti?: number,
|
||||
}
|
||||
|
||||
export interface ICatAI {
|
||||
|
||||
@@ -533,6 +533,11 @@ export const costanti = {
|
||||
ESAURITI: '2',
|
||||
},
|
||||
|
||||
RIGENERAMOD: {
|
||||
SOVRASCRIVI: '0',
|
||||
AGGIUNGI_SOLO: '1',
|
||||
},
|
||||
|
||||
STATO: {
|
||||
TUTTI: '0',
|
||||
IN_COMMERCIO: '1',
|
||||
|
||||
@@ -1926,7 +1926,7 @@ export const useProducts = defineStore('Products', {
|
||||
},
|
||||
bestseller: {
|
||||
show: false,
|
||||
primiNInClassifica: 20
|
||||
quantiFattRaggiunti: 50
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
getters: {
|
||||
|
||||
sovrascriviSchedaFromTemplate: (state: IGlobalState) => (idTemplate: string, origScheda: ISchedaSingola) => {
|
||||
sovrascriviSchedaFromTemplate: (state: IGlobalState) => (idTemplate: string, origScheda: ISchedaSingola, optcatalogo: IOptCatalogo) => {
|
||||
|
||||
const arrschede: ISchedaSingola[] = state.myschedas
|
||||
const myfindscheda = arrschede.find((recscheda: ISchedaSingola) => recscheda.scheda?._id === idTemplate)
|
||||
|
||||
@@ -77,6 +77,11 @@ export default defineComponent({
|
||||
{ label: 'Disponibili', value: costanti.DISP.DISPONIBILI },
|
||||
{ label: 'Esauriti', value: costanti.DISP.ESAURITI }])
|
||||
|
||||
const optRigeneraModalita = ref([
|
||||
{ label: 'Sovrascrivi', value: costanti.RIGENERAMOD.SOVRASCRIVI },
|
||||
{ label: 'Aggiungi solo', value: costanti.RIGENERAMOD.AGGIUNGI_SOLO },
|
||||
])
|
||||
|
||||
const optStato = ref([
|
||||
{ label: 'Tutti', value: costanti.STATO.TUTTI },
|
||||
{ label: 'In Commercio', value: costanti.STATO.IN_COMMERCIO },
|
||||
@@ -87,7 +92,7 @@ export default defineComponent({
|
||||
|
||||
const generatinglist = ref(false)
|
||||
|
||||
const optrigenera = ref<IOptRigenera>({ visibilitaDisp: costanti.DISP.DISPONIBILI, stato: costanti.STATO.IN_COMMERCIO })
|
||||
const optrigenera = ref<IOptRigenera>({ visibilitaDisp: costanti.DISP.DISPONIBILI, stato: costanti.STATO.IN_COMMERCIO, rig_mod: false })
|
||||
|
||||
const optcatalogo = ref(<IOptCatalogo>{ ...props.modelValue });
|
||||
|
||||
@@ -110,6 +115,7 @@ export default defineComponent({
|
||||
watch(optrigenera.value, (newVal) => {
|
||||
tools.setCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_DISP', newVal.visibilitaDisp);
|
||||
tools.setCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_STATO', newVal.stato);
|
||||
tools.setCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'RIG_MOD', newVal.rig_mod);
|
||||
if (showListaArgomenti.value)
|
||||
calcArrProducts()
|
||||
}, { deep: true });
|
||||
@@ -185,7 +191,7 @@ export default defineComponent({
|
||||
// Cerca se la descrizione introduttiva è stata impostata
|
||||
testo = catalog.descr_introduttiva
|
||||
let clcol = ''
|
||||
if (catalog.pagina_introduttiva_sfondo_nero) {
|
||||
if (catalog?.pagina_introduttiva_sfondo_nero) {
|
||||
clcol = `text-white`
|
||||
}
|
||||
testo = `<span class="book-text-up ${clcol}">` + testo + `</span>`
|
||||
@@ -218,7 +224,7 @@ export default defineComponent({
|
||||
|
||||
let clcol = ''
|
||||
|
||||
if (catalog.pagina_introduttiva_sfondo_nero) {
|
||||
if (catalog?.pagina_introduttiva_sfondo_nero) {
|
||||
clcol = `text-white`
|
||||
}
|
||||
|
||||
@@ -480,7 +486,7 @@ export default defineComponent({
|
||||
for (const recscheda of optcatalogo.value.arrSchede!) {
|
||||
if (recscheda.scheda?.linkIdTemplate) {
|
||||
// ricopia da Template:
|
||||
const myscheda = globalStore.sovrascriviSchedaFromTemplate(recscheda.scheda?.linkIdTemplate, recscheda)
|
||||
const myscheda = globalStore.sovrascriviSchedaFromTemplate(recscheda.scheda?.linkIdTemplate, recscheda, optcatalogo.value)
|
||||
if (myscheda) {
|
||||
recscheda.scheda = { ...myscheda }
|
||||
}
|
||||
@@ -730,6 +736,8 @@ export default defineComponent({
|
||||
// console.log('arrprod', arrprod)
|
||||
|
||||
populateDataWithlinkIdTemplate();
|
||||
|
||||
// Ordina la lista
|
||||
generatearrProdToViewSorted(!generalista, salva, !optcatalogo.value.showListaArgomenti);
|
||||
loaddata();
|
||||
|
||||
@@ -743,9 +751,15 @@ export default defineComponent({
|
||||
// chiedi prima "Sei sicuro di rigenerare il catalogo?"
|
||||
let risposta_si = false
|
||||
|
||||
let msg = 'Sicuri di RIGENERARE Sovrascrivendo questa lista di libri ?'
|
||||
|
||||
if (optrigenera.value.rig_mod == costanti.RIGENERAMOD.AGGIUNGI_SOLO) {
|
||||
msg = 'Aggiungere i libri di questa nuova generazione ?'
|
||||
}
|
||||
|
||||
$q.dialog({
|
||||
title: 'Rigenera lista',
|
||||
message: 'Sicuri di rigenerare questa lista di libri, perdendo l\'ordinamento attuale ?',
|
||||
message: msg,
|
||||
cancel: true,
|
||||
persistent: false
|
||||
}).onOk(() => {
|
||||
@@ -753,6 +767,21 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
function reSortList() {
|
||||
let risposta_si = false
|
||||
|
||||
let msg = 'Sicuri di Riordinare questa lista ?'
|
||||
|
||||
$q.dialog({
|
||||
title: 'Riordina lista',
|
||||
message: msg,
|
||||
cancel: true,
|
||||
persistent: false
|
||||
}).onOk(() => {
|
||||
calcArrProducts(false)
|
||||
})
|
||||
}
|
||||
|
||||
function arraysEqual(arr1, arr2) {
|
||||
return (
|
||||
Array.isArray(arr1) &&
|
||||
@@ -1050,7 +1079,13 @@ export default defineComponent({
|
||||
|
||||
if (!usaprodottiSalvati && salva) {
|
||||
if (trovatocatalogo) {
|
||||
trovatocatalogo.lista_prodotti = arrprod
|
||||
if (optrigenera.value.rig_mod === costanti.RIGENERAMOD.AGGIUNGI_SOLO) {
|
||||
// aggiungi solo i record che non sono presenti su lista_prodotti
|
||||
trovatocatalogo.lista_prodotti = trovatocatalogo.lista_prodotti.filter(p => !arrprod.some(ap => ap._id === p._id))
|
||||
trovatocatalogo.lista_prodotti.push(...arrprod.filter(ap => !trovatocatalogo.lista_prodotti.some(p => p._id === ap._id)))
|
||||
} else {
|
||||
trovatocatalogo.lista_prodotti = arrprod
|
||||
}
|
||||
|
||||
if (salvasudb) {
|
||||
salvaListaProdotti(false)
|
||||
@@ -1119,6 +1154,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
optrigenera.value.visibilitaDisp = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_DISP', costanti.DISP.DISPONIBILI)
|
||||
optrigenera.value.rig_mod = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'RIG_MOD', costanti.RIGENERAMOD.AGGIUNGI_SOLO)
|
||||
optrigenera.value.stato = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_STATO', costanti.STATO.IN_COMMERCIO)
|
||||
|
||||
loadpage.value = false
|
||||
@@ -1530,9 +1566,11 @@ export default defineComponent({
|
||||
optrigenera,
|
||||
generatinglist,
|
||||
optDisp,
|
||||
optRigeneraModalita,
|
||||
optStato,
|
||||
getCatalogoByMyPage,
|
||||
getReferentiCatalogo,
|
||||
reSortList,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -146,6 +146,14 @@
|
||||
@click="rigeneraLibri = true"
|
||||
></q-btn>
|
||||
|
||||
<!--<q-btn
|
||||
v-if="!showListaArgomenti"
|
||||
rounded
|
||||
label="Riordina"
|
||||
color="primary"
|
||||
@click="reSortList"
|
||||
></q-btn>-->
|
||||
|
||||
<q-btn
|
||||
v-if="!showListaArgomenti"
|
||||
rounded
|
||||
@@ -841,6 +849,7 @@
|
||||
</CMyValueDb>
|
||||
</div>
|
||||
|
||||
<div>Filtra per Disponibilità Magazzino:</div>
|
||||
<q-btn-toggle
|
||||
v-model="optrigenera.visibilitaDisp"
|
||||
toggle-color="green"
|
||||
@@ -848,6 +857,14 @@
|
||||
:options="optDisp"
|
||||
>
|
||||
</q-btn-toggle>
|
||||
<div>Modalità di Creazione:</div>
|
||||
<q-btn-toggle
|
||||
v-model="optrigenera.rig_mod"
|
||||
toggle-color="red"
|
||||
class="q-my-md"
|
||||
:options="optRigeneraModalita"
|
||||
>
|
||||
</q-btn-toggle>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
|
||||
Reference in New Issue
Block a user