- aggiornamento Cataloghi
- Gestione delle versioni del prodotto ("Nuovi","Usati","Epub", ecc..)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="18"
|
APP_ID="18"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="17"
|
APP_ID="17"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="18"
|
APP_ID="18"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="17"
|
APP_ID="17"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker_1.0.39.js"
|
SERVICE_WORKER_FILE="service-worker_1.0.39.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="15"
|
APP_ID="15"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="15"
|
APP_ID="15"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fioredellavita",
|
"name": "fioredellavita",
|
||||||
"version": "1.0.48",
|
"version": "1.0.49",
|
||||||
"description": "Fiore Della Vita",
|
"description": "Fiore Della Vita",
|
||||||
"productName": "Fiore Della Vita",
|
"productName": "Fiore Della Vita",
|
||||||
"author": "Paolo Arena",
|
"author": "Paolo Arena",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="18"
|
APP_ID="18"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="16"
|
APP_ID="16"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gruppomacro",
|
"name": "gruppomacro",
|
||||||
"version": "1.0.48",
|
"version": "1.0.49",
|
||||||
"description": "Gruppo Macro Editori",
|
"description": "Gruppo Macro Editori",
|
||||||
"productName": "Gruppo Macro",
|
"productName": "Gruppo Macro",
|
||||||
"author": "Paolo Arena",
|
"author": "Paolo Arena",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="17"
|
APP_ID="17"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="16"
|
APP_ID="16"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "riso",
|
"name": "riso",
|
||||||
"version": "1.0.48",
|
"version": "1.0.49",
|
||||||
"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.",
|
"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",
|
"productName": "Riso",
|
||||||
"author": "Paolo Arena",
|
"author": "Paolo Arena",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="1.0.48"
|
APP_VERSION="1.0.49"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="14"
|
APP_ID="14"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
2
now.txt
2
now.txt
@@ -1 +1 @@
|
|||||||
TERMINA DI LAVORARE SU gruppomacro.app: (Sovrascrivo !)
|
TERMINA DI LAVORARE SU riso.app: (Sovrascrivo !)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "riso",
|
"name": "riso",
|
||||||
"version": "1.0.48",
|
"version": "1.0.49",
|
||||||
"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.",
|
"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",
|
"productName": "Riso",
|
||||||
"author": "Paolo Arena",
|
"author": "Paolo Arena",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "riso",
|
"name": "riso",
|
||||||
"version": "1.0.48",
|
"version": "1.0.49",
|
||||||
"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.",
|
"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",
|
"productName": "Riso",
|
||||||
"author": "Paolo Arena",
|
"author": "Paolo Arena",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "riso",
|
"name": "riso",
|
||||||
"version": "1.0.48",
|
"version": "1.0.49",
|
||||||
"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.",
|
"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",
|
"productName": "Riso",
|
||||||
"author": "Paolo Arena",
|
"author": "Paolo Arena",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import 'animate.css';
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
appHeader: MyHeader,
|
appHeader: MyHeader,
|
||||||
appFooter: MyFooter,
|
MyFooter,
|
||||||
CFirstPageApp,
|
CFirstPageApp,
|
||||||
CProvaPao,
|
CProvaPao,
|
||||||
BannerCookies, /* , CPreloadImages */
|
BannerCookies, /* , CPreloadImages */
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</q-inner-loading>
|
</q-inner-loading>
|
||||||
</q-page-container>
|
</q-page-container>
|
||||||
|
|
||||||
<app-footer></app-footer>
|
<MyFooter></MyFooter>
|
||||||
|
|
||||||
</q-layout>
|
</q-layout>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2163,6 +2163,15 @@ export const shared_consts = {
|
|||||||
AUDIOLIBRO: 22,
|
AUDIOLIBRO: 22,
|
||||||
VIDEO: 23,
|
VIDEO: 23,
|
||||||
CARTE: 25,
|
CARTE: 25,
|
||||||
|
// -----------
|
||||||
|
NUOVO: 101,
|
||||||
|
USATO: 102,
|
||||||
|
DOWNLOAD: 103,
|
||||||
|
DVD: 104,
|
||||||
|
EPUB: 105,
|
||||||
|
MOBI: 106,
|
||||||
|
PDF: 107,
|
||||||
|
STREAMING: 108,
|
||||||
},
|
},
|
||||||
|
|
||||||
VERSIONE: {
|
VERSIONE: {
|
||||||
|
|||||||
@@ -1,8 +1,30 @@
|
|||||||
import { defineComponent } from 'vue'
|
import { PropType, defineComponent } from 'vue'
|
||||||
|
|
||||||
import { Catalogo } from '@src/views/ecommerce'
|
import { Catalogo } from '@src/views/ecommerce'
|
||||||
|
import { ICatalogo } from '@src/model'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CCatalogo',
|
name: 'CCatalogo',
|
||||||
components: { Catalogo },
|
components: { Catalogo },
|
||||||
|
props: {
|
||||||
|
// add options ICatalogo
|
||||||
|
options: {
|
||||||
|
type: Object as PropType<ICatalogo>,
|
||||||
|
required: false,
|
||||||
|
default: () => ({
|
||||||
|
//++AddCATALOGO_FIELDS
|
||||||
|
productTypes: [],
|
||||||
|
excludeproductTypes: [],
|
||||||
|
formato: [],
|
||||||
|
Categoria: [],
|
||||||
|
Editore: [],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props) {
|
||||||
|
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Catalogo>
|
<Catalogo :optcatalogo="optcatalogo">
|
||||||
|
|
||||||
</Catalogo>
|
</Catalogo>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { CPrice } from '../CPrice'
|
|||||||
|
|
||||||
import { func_tools, toolsext } from '@store/Modules/toolsext'
|
import { func_tools, toolsext } from '@store/Modules/toolsext'
|
||||||
|
|
||||||
import { IBaseOrder, IGasordine, IOrder, IOrderCart, IProduct, IVariazione } from '@src/model'
|
import { IBaseOrder, ICatalogo, IGasordine, IOrder, IOrderCart, IProduct, IVariazione } from '@src/model'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { useProducts } from '@store/Products'
|
import { useProducts } from '@store/Products'
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ import 'vue3-pdf-app/dist/icons/main.css'
|
|||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CCatalogoCard',
|
name: 'CCatalogoCard',
|
||||||
emits: ['selauthor'],
|
emits: ['selauthor', 'opendetail'],
|
||||||
props: {
|
props: {
|
||||||
product: {
|
product: {
|
||||||
type: Object as PropType<IProduct | null>,
|
type: Object as PropType<IProduct | null>,
|
||||||
@@ -54,7 +54,19 @@ export default defineComponent({
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
default: () => { }
|
default: () => { }
|
||||||
}
|
},
|
||||||
|
optcatalogo: {
|
||||||
|
type: Object as PropType<ICatalogo>,
|
||||||
|
required: false,
|
||||||
|
default: () => ({
|
||||||
|
//++AddCATALOGO_FIELDS
|
||||||
|
productTypes: [0],
|
||||||
|
excludeproductTypes: [],
|
||||||
|
formato: [],
|
||||||
|
Categoria: [],
|
||||||
|
Editore: [],
|
||||||
|
}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: { CTitleBanner, CCardState, CCopyBtn, CMyValueDb, VuePdfApp, CPrice },
|
components: { CTitleBanner, CCardState, CCopyBtn, CMyValueDb, VuePdfApp, CPrice },
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
@@ -477,6 +489,19 @@ export default defineComponent({
|
|||||||
emit('selauthor', id, autore)
|
emit('selauthor', id, autore)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function click_opendetail(id: any, autore: any) {
|
||||||
|
emit('opendetail')
|
||||||
|
}
|
||||||
|
function escludiArticolo(variazione: IVariazione) {
|
||||||
|
let hasExcludeProductTypes = !props.optcatalogo.excludeproductTypes || (props.optcatalogo.excludeproductTypes && (variazione.arrversioni || []).every((item: any) => props.optcatalogo.excludeproductTypes.includes(item)))
|
||||||
|
|
||||||
|
return hasExcludeProductTypes
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkIfVariazioneDaVisu(variazione: IVariazione) {
|
||||||
|
return !escludiArticolo(variazione)
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
onBeforeUnmount(beforeDestroy)
|
onBeforeUnmount(beforeDestroy)
|
||||||
|
|
||||||
@@ -531,6 +556,8 @@ export default defineComponent({
|
|||||||
indvariazSel,
|
indvariazSel,
|
||||||
checkifCartEnable,
|
checkifCartEnable,
|
||||||
click_author,
|
click_author,
|
||||||
|
click_opendetail,
|
||||||
|
checkIfVariazioneDaVisu,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -23,6 +23,10 @@
|
|||||||
dense
|
dense
|
||||||
>
|
>
|
||||||
</q-toggle>
|
</q-toggle>
|
||||||
|
<q-page-sticky v-if="complete" position="bottom-right" :offset="[18, 0]">
|
||||||
|
<q-btn fab icon="fas fa-arrow-up" class="semi-transparent" color="primary" v-close-popup/>
|
||||||
|
</q-page-sticky>
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div
|
<div
|
||||||
:class="{ 'flex q-pa-sm': true, 'shadow-2': options.in_3d }"
|
:class="{ 'flex q-pa-sm': true, 'shadow-2': options.in_3d }"
|
||||||
@@ -40,32 +44,39 @@
|
|||||||
'cursor-pointer': !complete,
|
'cursor-pointer': !complete,
|
||||||
'shadow-4': true,
|
'shadow-4': true,
|
||||||
}"
|
}"
|
||||||
@click="
|
@click="click_opendetail()"
|
||||||
|
>
|
||||||
|
<!--@click="
|
||||||
complete
|
complete
|
||||||
? toggleFullScreen
|
? toggleFullScreen
|
||||||
: naviga(`/catalogo/` + myproduct._id + '/' + cosa)
|
: naviga(`/catalogo/` + myproduct._id + '/' + cosa)
|
||||||
"
|
"-->
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
class="absolute transparent"
|
class="absolute transparent"
|
||||||
style="left: 90%; top: 0; transform: translateX(-50%)"
|
style="left: 90%; top: -18px; transform: translateX(-50%)"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="blue"
|
color="blue-6"
|
||||||
class="semi-transparent"
|
class="semi-transparent"
|
||||||
round
|
round
|
||||||
icon="search"
|
icon="search"
|
||||||
@click="toggleFullScreen"
|
@click.stop="toggleFullScreen"
|
||||||
size="md"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-img>
|
</q-img>
|
||||||
|
|
||||||
<div class="scheda-book">
|
<div class="scheda-book">
|
||||||
<q-card-title>
|
<q-card-title>
|
||||||
<span class="book-title" :data-col="options.quante_col">{{
|
<span class="book-title" :data-col="options.quante_col">
|
||||||
myproduct.productInfo.name
|
<span
|
||||||
}}</span>
|
v-if="!complete"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="click_opendetail()"
|
||||||
|
>{{ myproduct.productInfo.name }}
|
||||||
|
</span>
|
||||||
|
<span v-else>{{ myproduct.productInfo.name }} </span>
|
||||||
|
</span>
|
||||||
</q-card-title>
|
</q-card-title>
|
||||||
<q-card-subtitle
|
<q-card-subtitle
|
||||||
v-if="myproduct.productInfo.authors"
|
v-if="myproduct.productInfo.authors"
|
||||||
@@ -78,8 +89,11 @@
|
|||||||
:key="author._id"
|
:key="author._id"
|
||||||
>
|
>
|
||||||
<span v-if="index > 0">, </span>
|
<span v-if="index > 0">, </span>
|
||||||
<span class="author cursor-pointer text-primary"
|
<span
|
||||||
@click="click_author(author._id, author.name + ' ' + author.surname)"
|
class="author cursor-pointer text-primary"
|
||||||
|
@click="
|
||||||
|
click_author(author._id, author.name + ' ' + author.surname)
|
||||||
|
"
|
||||||
>{{ author.name }} {{ author.surname }}</span
|
>{{ author.name }} {{ author.surname }}</span
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
@@ -141,21 +155,21 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
@click="setvariazioneSelected(index)"
|
@click="setvariazioneSelected(index)"
|
||||||
>
|
>
|
||||||
<div class="flex justify-between items-center q-mx-sm">
|
<div v-if="checkIfVariazioneDaVisu(variazione)" class="flex justify-between items-center q-mx-sm">
|
||||||
<q-badge
|
<q-badge
|
||||||
class="q-badge--large"
|
class="q-badge--large"
|
||||||
:color="
|
:color="
|
||||||
shared_consts.VERSIONI_PRODOTTO[variazione.versione].color
|
shared_consts.VERSIONI_PRODOTTO[variazione.arrversioni[0]].color
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-icon
|
<q-icon
|
||||||
v-if="variazione.versione > 0"
|
v-if="variazione.arrversioni[0] > 0"
|
||||||
:name="tools.getIconByVersione(variazione.versione)"
|
:name="tools.getIconByVersione(variazione.arrversioni[0])"
|
||||||
color="white"
|
color="white"
|
||||||
></q-icon
|
></q-icon
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
shared_consts.VERSIONI_PRODOTTO[variazione.versione].label
|
shared_consts.VERSIONI_PRODOTTO[variazione.arrversioni[0]].label
|
||||||
}}
|
}}
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<div v-if="variazione.formato && false">
|
<div v-if="variazione.formato && false">
|
||||||
@@ -230,11 +244,9 @@
|
|||||||
v-for="(variazione, index) of myproduct.arrvariazioni"
|
v-for="(variazione, index) of myproduct.arrvariazioni"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div v-show="indvariazSel == index">
|
<div v-show="indvariazSel == index && checkIfVariazioneDaVisu(variazione)">
|
||||||
<div
|
<div
|
||||||
v-show="
|
v-show="tools.disponibStr(variazione.quantita)"
|
||||||
tools.disponibStr(variazione.quantita)
|
|
||||||
"
|
|
||||||
class="row justify-center q-mt-sm vertical-middle"
|
class="row justify-center q-mt-sm vertical-middle"
|
||||||
style="align-items: center"
|
style="align-items: center"
|
||||||
>
|
>
|
||||||
@@ -270,9 +282,9 @@
|
|||||||
>
|
>
|
||||||
<span class="q-mr-sm">{{ $t('products.formato') }}:</span>
|
<span class="q-mr-sm">{{ $t('products.formato') }}:</span>
|
||||||
<q-badge
|
<q-badge
|
||||||
v-show="variazione.versione > 0"
|
v-show="variazione.arrversioni[0] > 0"
|
||||||
:color="
|
:color="
|
||||||
shared_consts.VERSIONI_PRODOTTO[variazione.versione]
|
shared_consts.VERSIONI_PRODOTTO[variazione.arrversioni[0]]
|
||||||
.color
|
.color
|
||||||
"
|
"
|
||||||
>{{ variazione.formato }}</q-badge
|
>{{ variazione.formato }}</q-badge
|
||||||
@@ -281,9 +293,7 @@
|
|||||||
|
|
||||||
<div class="row justify-center q-mt-sm">
|
<div class="row justify-center q-mt-sm">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="variazione.addtocart_link && true"
|
||||||
variazione.addtocart_link && true
|
|
||||||
"
|
|
||||||
:href="variazione.addtocart_link"
|
:href="variazione.addtocart_link"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
1
src/components/CContainerCatalogoCard/CContainerCatalogoCard.scss
Executable file
1
src/components/CContainerCatalogoCard/CContainerCatalogoCard.scss
Executable file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
94
src/components/CContainerCatalogoCard/CContainerCatalogoCard.ts
Executable file
94
src/components/CContainerCatalogoCard/CContainerCatalogoCard.ts
Executable file
@@ -0,0 +1,94 @@
|
|||||||
|
import { defineComponent, ref, toRef, computed, PropType, watch, onMounted, reactive, onBeforeUnmount } from 'vue'
|
||||||
|
import { useI18n } from '@src/boot/i18n'
|
||||||
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
|
import { useQuasar } from 'quasar'
|
||||||
|
|
||||||
|
import { CCatalogoCard } from '../CCatalogoCard'
|
||||||
|
|
||||||
|
import { func_tools, toolsext } from '@store/Modules/toolsext'
|
||||||
|
|
||||||
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { useProducts } from '@store/Products'
|
||||||
|
|
||||||
|
import { shared_consts } from '@src/common/shared_vuejs'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
import { ICatalogo } from '@src/model'
|
||||||
|
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'CContainerCatalogoCard',
|
||||||
|
emits: ['selauthor'],
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
cosa: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
complete: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: () => { }
|
||||||
|
},
|
||||||
|
optcatalogo: {
|
||||||
|
type: Object as PropType<ICatalogo>,
|
||||||
|
required: false,
|
||||||
|
default: () => ({
|
||||||
|
//++AddCATALOGO_FIELDS
|
||||||
|
productTypes: [0],
|
||||||
|
excludeproductTypes: [],
|
||||||
|
formato: [],
|
||||||
|
Categoria: [],
|
||||||
|
Editore: [],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: { CCatalogoCard },
|
||||||
|
setup(props, { emit }) {
|
||||||
|
const $q = useQuasar()
|
||||||
|
const { t } = useI18n()
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
|
||||||
|
const opendetailbool = ref(false)
|
||||||
|
|
||||||
|
function selauthor(id: any, autore: any) {
|
||||||
|
emit('selauthor', id, autore)
|
||||||
|
}
|
||||||
|
|
||||||
|
function opendetail() {
|
||||||
|
opendetailbool.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function mounted() {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(mounted)
|
||||||
|
|
||||||
|
return {
|
||||||
|
tools,
|
||||||
|
t,
|
||||||
|
func_tools,
|
||||||
|
toolsext,
|
||||||
|
shared_consts,
|
||||||
|
globalStore,
|
||||||
|
costanti,
|
||||||
|
selauthor,
|
||||||
|
opendetail,
|
||||||
|
opendetailbool,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
49
src/components/CContainerCatalogoCard/CContainerCatalogoCard.vue
Executable file
49
src/components/CContainerCatalogoCard/CContainerCatalogoCard.vue
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<CCatalogoCard
|
||||||
|
:id="id"
|
||||||
|
:complete="complete"
|
||||||
|
:cosa="cosa"
|
||||||
|
:options="options"
|
||||||
|
@selauthor="selauthor"
|
||||||
|
@opendetail="opendetail"
|
||||||
|
:optcatalogo="optcatalogo"
|
||||||
|
>
|
||||||
|
</CCatalogoCard>
|
||||||
|
</div>
|
||||||
|
<q-dialog
|
||||||
|
v-model="opendetailbool"
|
||||||
|
position="top"
|
||||||
|
:maximized="true"
|
||||||
|
class="q-pt-none"
|
||||||
|
>
|
||||||
|
<q-card>
|
||||||
|
<q-card-section>
|
||||||
|
<div class="row justify-center">
|
||||||
|
<CCatalogoCard
|
||||||
|
:id="id"
|
||||||
|
:complete="true"
|
||||||
|
:cosa="cosa"
|
||||||
|
:options="{
|
||||||
|
show_short_descr: true,
|
||||||
|
show_price: true,
|
||||||
|
show_cat: true,
|
||||||
|
quante_col: 'c1',
|
||||||
|
in_3d: true,
|
||||||
|
}"
|
||||||
|
:optcatalogo="optcatalogo"
|
||||||
|
@selauthor="selauthor"
|
||||||
|
>
|
||||||
|
</CCatalogoCard>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./CContainerCatalogoCard.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './CContainerCatalogoCard.scss';
|
||||||
|
</style>
|
||||||
1
src/components/CContainerCatalogoCard/index.ts
Executable file
1
src/components/CContainerCatalogoCard/index.ts
Executable file
@@ -0,0 +1 @@
|
|||||||
|
export {default as CContainerCatalogoCard} from './CContainerCatalogoCard.vue'
|
||||||
@@ -177,6 +177,8 @@ export default defineComponent({
|
|||||||
// console.log('myrec', myrec)
|
// console.log('myrec', myrec)
|
||||||
myrec.value = ris
|
myrec.value = ris
|
||||||
notifStore.setAsRead(idnotif.value)
|
notifStore.setAsRead(idnotif.value)
|
||||||
|
}).catch((err) => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -115,23 +115,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
visuadd.value = false
|
visuadd.value = false
|
||||||
|
|
||||||
const newrec: IMyElem = {
|
let newrec = globalStore.prepareAddNewElem(order, $q, t, props.myelem, newtype.value)
|
||||||
_id: undefined,
|
|
||||||
type: newtype.value,
|
|
||||||
path: props.myelem.path,
|
|
||||||
order: order ? order : 1000,
|
|
||||||
active: true,
|
|
||||||
container: ''
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newrec.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS) {
|
|
||||||
newrec.container2 = '8'
|
|
||||||
newrec.height = 600
|
|
||||||
} else if (newrec.type === shared_consts.ELEMTYPE.CARD) {
|
|
||||||
newrec.class2 = 'row justify-center'
|
|
||||||
}
|
|
||||||
|
|
||||||
globalStore.addNewElem($q, t, newrec)
|
|
||||||
|
|
||||||
emit('selElemClick', newrec)
|
emit('selElemClick', newrec)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="myel.type === shared_consts.ELEMTYPE.CARD"
|
v-else-if="myel.type === shared_consts.ELEMTYPE.CARD"
|
||||||
:class="myel.span ? '' : ''"
|
:class="myel.span ? '' : ''"
|
||||||
>
|
>
|
||||||
<CSelectAnimation
|
<CSelectAnimation
|
||||||
@@ -360,7 +360,7 @@
|
|||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="myel.type === shared_consts.ELEMTYPE.MARGINI">
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MARGINI">
|
||||||
<div v-if="enableEdit">
|
<div v-if="enableEdit">
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
@@ -977,13 +977,56 @@
|
|||||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CHECKIFISLOGGED">
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CHECKIFISLOGGED">
|
||||||
<q-select
|
<q-select
|
||||||
v-model="myel.container"
|
v-model="myel.container"
|
||||||
:options="[{label: 'Mostra Sempre', value: true }, { label: 'Solo se Offline', value: false}]"
|
:options="[
|
||||||
|
{ label: 'Mostra Sempre', value: true },
|
||||||
|
{ label: 'Solo se Offline', value: false },
|
||||||
|
]"
|
||||||
label="Quando mostrarlo"
|
label="Quando mostrarlo"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
||||||
|
<div v-if="enableEdit" class="row">
|
||||||
|
<div>Cataloghi:</div><br>
|
||||||
|
|
||||||
|
<!--++AddCATALOGO_FIELDS-->
|
||||||
|
<q-select
|
||||||
|
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||||
|
v-if="enableEdit && myel.catalogo && myel.catalogo.productTypes"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
v-model="myel.catalogo.productTypes"
|
||||||
|
:options="tools.SelectListVersione"
|
||||||
|
@update:model-value="modifElem"
|
||||||
|
multiple
|
||||||
|
dense
|
||||||
|
label="Includi"
|
||||||
|
style="width: 150px"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||||
|
v-if="enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
v-model="myel.catalogo.excludeproductTypes"
|
||||||
|
:options="tools.SelectListVersione"
|
||||||
|
@update:model-value="modifElem"
|
||||||
|
multiple
|
||||||
|
dense
|
||||||
|
label="Escludi"
|
||||||
|
style="width: 150px"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const newtype = ref(<any>'')
|
const newtype = ref(<any>'')
|
||||||
|
|
||||||
const isAppRunning = computed(() => globalStore.isAppRunning )
|
const isAppRunning = computed(() => globalStore.isAppRunning)
|
||||||
|
|
||||||
watch(() => myel.value.order, (value, oldval) => {
|
watch(() => myel.value.order, (value, oldval) => {
|
||||||
mounted()
|
mounted()
|
||||||
@@ -150,21 +150,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
function addNewElem(order?: number) {
|
function addNewElem(order?: number) {
|
||||||
|
|
||||||
const newrec: IMyElem = {
|
let newrec = globalStore.prepareAddNewElem(order, $q, t, props.myelem, newtype.value)
|
||||||
_id: undefined,
|
|
||||||
type: newtype.value,
|
|
||||||
path: props.myelem.path,
|
|
||||||
order: order ? order : 1000,
|
|
||||||
active: true,
|
|
||||||
container: ''
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newrec.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS) {
|
|
||||||
newrec.container2 = '8'
|
|
||||||
newrec.height = 600
|
|
||||||
}
|
|
||||||
|
|
||||||
globalStore.addNewElem($q, t, newrec)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dupElem(order?: number) {
|
function dupElem(order?: number) {
|
||||||
|
|||||||
@@ -559,7 +559,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
||||||
<div v-if="editOn" class="elemEdit">PRODOTTI CATALOGO:</div>
|
<div v-if="editOn" class="elemEdit">PRODOTTI CATALOGO:</div>
|
||||||
<CCatalogo> </CCatalogo>
|
<CCatalogo
|
||||||
|
:optcatalogo="myel.catalogo"> </CCatalogo>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPA">
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPA">
|
||||||
<div v-if="editOn" class="elemEdit">MAPPA:</div>
|
<div v-if="editOn" class="elemEdit">MAPPA:</div>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<div v-if="!nofooter">
|
<div v-if="!nofooter">
|
||||||
<LandingFooter></LandingFooter>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -440,6 +440,8 @@ export default defineComponent({
|
|||||||
// if (!props.useinput) {
|
// if (!props.useinput) {
|
||||||
if (props.value) {
|
if (props.value) {
|
||||||
myvalue.value = props.value
|
myvalue.value = props.value
|
||||||
|
} else {
|
||||||
|
myvalue.value = ''
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
@@ -547,9 +549,9 @@ export default defineComponent({
|
|||||||
function filterFn(val: any, update: any, abort: any) {
|
function filterFn(val: any, update: any, abort: any) {
|
||||||
update(
|
update(
|
||||||
async () => {
|
async () => {
|
||||||
console.log('Filter val', val, val.length)
|
console.log('Filter val:', val, 'len=', val.length)
|
||||||
console.log('props.filter_extra', props.filter_extra)
|
console.log('props.filter_extra', props.filter_extra)
|
||||||
|
console.log('valori.value', valori.value)
|
||||||
|
|
||||||
let myarr: any = []
|
let myarr: any = []
|
||||||
|
|
||||||
@@ -743,6 +745,10 @@ export default defineComponent({
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectText(event: any) {
|
||||||
|
// Seleziona tutto il testo all'interno della casella di testo
|
||||||
|
event.target.select();
|
||||||
|
}
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|
||||||
|
|
||||||
@@ -758,6 +764,7 @@ export default defineComponent({
|
|||||||
newvaluefuncfirst,
|
newvaluefuncfirst,
|
||||||
getIcon,
|
getIcon,
|
||||||
tools,
|
tools,
|
||||||
|
selectText,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="pickup">
|
<div v-else-if="pickup">
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-if="pickup"
|
v-if="pickup"
|
||||||
:model-value="myvalue"
|
:model-value="myvalue"
|
||||||
@@ -95,9 +96,12 @@
|
|||||||
:option-value="optval"
|
:option-value="optval"
|
||||||
:option-label="optlab"
|
:option-label="optlab"
|
||||||
map-options
|
map-options
|
||||||
|
:use-chips="myvalue && myvalue !== '' ? true : false"
|
||||||
|
stack-label
|
||||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||||
@filter="filterFn"
|
@filter="filterFn"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<meta name="description" content="<%= productDescription %>">
|
<meta name="description" content="<%= productDescription %>">
|
||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no">
|
||||||
<meta name="msapplication-tap-highlight" content="no">
|
<meta name="msapplication-tap-highlight" content="no">
|
||||||
<meta name="version" content="1.0.48">
|
<meta name="version" content="1.0.49">
|
||||||
<meta name="viewport"
|
<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<% } %>">
|
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<% } %>">
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ export interface IMyElem {
|
|||||||
styleadd?: string
|
styleadd?: string
|
||||||
list?: IImgGallery[]
|
list?: IImgGallery[]
|
||||||
listcards?: IMyCard[]
|
listcards?: IMyCard[]
|
||||||
|
catalogo?: ICatalogo
|
||||||
elemsText?: IElemText[]
|
elemsText?: IElemText[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,6 +638,16 @@ export interface IMyCard {
|
|||||||
colorsub?: string
|
colorsub?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ICatalogo {
|
||||||
|
//++AddCATALOGO_FIELDS
|
||||||
|
productTypes: number[]
|
||||||
|
excludeproductTypes: number[]
|
||||||
|
formato: string[]
|
||||||
|
Categoria: string[]
|
||||||
|
Editore: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export interface IGallery {
|
export interface IGallery {
|
||||||
_id?: string
|
_id?: string
|
||||||
author_username?: string
|
author_username?: string
|
||||||
|
|||||||
@@ -38,12 +38,13 @@ export interface IProductInfo {
|
|||||||
publisher?: IPublisher
|
publisher?: IPublisher
|
||||||
date_publishing?: Date
|
date_publishing?: Date
|
||||||
numpages?: number
|
numpages?: number
|
||||||
productType?: number
|
productTypes?: number[]
|
||||||
|
versioneGM?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IVariazione {
|
export interface IVariazione {
|
||||||
active?: boolean
|
active?: boolean
|
||||||
versione?: number
|
arrversioni?: number[]
|
||||||
status?: string,
|
status?: string,
|
||||||
price?: number
|
price?: number
|
||||||
sale_price?: number
|
sale_price?: number
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<div>{{ risraw }}</div>
|
<div>{{ risraw }}</div>
|
||||||
|
|
||||||
<div v-html="risultato"></div>
|
<div v-html="risultato.substring(0, 1000)"></div>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
SelectListColors: [
|
SelectListColors: [
|
||||||
{ label: '[Nessuno]', value: '' },
|
{ label: '[Nessuno]', value: '' },
|
||||||
{ label: 'aliceblue', value: '#f0f8ff' },
|
{ label: 'aliceblue', value: '#f0f8ff' },
|
||||||
@@ -1391,6 +1392,13 @@ export const tools = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
SelectListVersione: [
|
||||||
|
{ label: '[Tutti]', value: 0 },
|
||||||
|
{ label: 'Nuovi', value: shared_consts.PRODUCTTYPE.NUOVO },
|
||||||
|
{ label: 'Usati', value: shared_consts.PRODUCTTYPE.USATO },
|
||||||
|
{ label: 'DVD', value: shared_consts.PRODUCTTYPE.DVD },
|
||||||
|
],
|
||||||
|
|
||||||
INDEX_MENU_DELETE: 4,
|
INDEX_MENU_DELETE: 4,
|
||||||
|
|
||||||
menuPopupTodo:
|
menuPopupTodo:
|
||||||
@@ -8644,8 +8652,9 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// get the last 2 digit fraction part, of a decimal number
|
// get the last 2 digit fraction part, of a decimal number
|
||||||
getDecPart2Digit(number: number) {
|
getDecPart2Digit(number: number): string {
|
||||||
return Math.round(number * 100) % 100
|
let parts = number.toFixed(2).split('.');
|
||||||
|
return parts.length > 1 ? parts[1] : '00';
|
||||||
},
|
},
|
||||||
|
|
||||||
getRecordByField(field: any, record: any) {
|
getRecordByField(field: any, record: any) {
|
||||||
|
|||||||
@@ -2096,5 +2096,38 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
prepareAddNewElem(order: any, $q: any, t: any, myelem: any, newtype: any) {
|
||||||
|
|
||||||
|
const newrec: IMyElem = {
|
||||||
|
_id: undefined,
|
||||||
|
type: newtype,
|
||||||
|
path: myelem.path,
|
||||||
|
order: order ? order : 1000,
|
||||||
|
active: true,
|
||||||
|
container: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newrec.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS) {
|
||||||
|
newrec.container2 = '8'
|
||||||
|
newrec.height = 600
|
||||||
|
} else if (newrec.type === shared_consts.ELEMTYPE.CARD) {
|
||||||
|
newrec.class2 = 'row justify-center'
|
||||||
|
} else if (newrec.type === shared_consts.ELEMTYPE.CATALOGO) {
|
||||||
|
newrec.catalogo = {
|
||||||
|
//++AddCATALOGO_FIELDS
|
||||||
|
productTypes: [0],
|
||||||
|
excludeproductTypes: [],
|
||||||
|
formato: [],
|
||||||
|
Categoria: [],
|
||||||
|
Editore: [],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.addNewElem($q, t, newrec)
|
||||||
|
|
||||||
|
return newrec
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -551,6 +551,11 @@
|
|||||||
color="primary"
|
color="primary"
|
||||||
@click="EseguiFunz('correggiCircuitiANull', '', '')"
|
@click="EseguiFunz('correggiCircuitiANull', '', '')"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
|
<br /><q-btn
|
||||||
|
label="Correggi i ProductType in ProductTypes"
|
||||||
|
color="primary"
|
||||||
|
@click="EseguiFunz('correggiProductTypes', '', '')"
|
||||||
|
></q-btn>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount } from 'vue'
|
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount, PropType } from 'vue'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
@@ -12,17 +12,30 @@ import { costanti } from '@costanti'
|
|||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
import { CProductCard } from '@src/components/CProductCard'
|
import { CProductCard } from '@src/components/CProductCard'
|
||||||
import { CMySelect } from '@src/components/CMySelect'
|
import { CMySelect } from '@src/components/CMySelect'
|
||||||
import { CCatalogoCard } from '@src/components/CCatalogoCard'
|
import { CContainerCatalogoCard } from '@src/components/CContainerCatalogoCard'
|
||||||
import { CSelectUserActive } from '@src/components/CSelectUserActive'
|
import { CSelectUserActive } from '@src/components/CSelectUserActive'
|
||||||
import { IProduct, ISearchList } from 'model'
|
import { ICatalogo, IProduct, ISearchList } from 'model'
|
||||||
|
|
||||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Catalogo',
|
name: 'Catalogo',
|
||||||
components: { CCatalogoCard, CProductCard, CSelectUserActive, CMySelect },
|
components: { CContainerCatalogoCard, CProductCard, CSelectUserActive, CMySelect },
|
||||||
props: {},
|
props: {
|
||||||
setup() {
|
optcatalogo: {
|
||||||
|
type: Object as PropType<ICatalogo>,
|
||||||
|
required: false,
|
||||||
|
default: () => ({
|
||||||
|
//++AddCATALOGO_FIELDS
|
||||||
|
productTypes: [0],
|
||||||
|
excludeproductTypes: [],
|
||||||
|
formato: [],
|
||||||
|
Categoria: [],
|
||||||
|
Editore: [],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup(props) {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
const productStore = useProducts()
|
const productStore = useProducts()
|
||||||
@@ -49,6 +62,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
const mycolumns = ref([])
|
const mycolumns = ref([])
|
||||||
|
|
||||||
|
const tabvisu = ref('categorie')
|
||||||
|
|
||||||
const searchList = ref([] as ISearchList[])
|
const searchList = ref([] as ISearchList[])
|
||||||
|
|
||||||
const arrProducts = ref<any>([])
|
const arrProducts = ref<any>([])
|
||||||
@@ -67,13 +82,6 @@ export default defineComponent({
|
|||||||
return lab
|
return lab
|
||||||
})
|
})
|
||||||
|
|
||||||
const getlist = computed(() => {
|
|
||||||
const mylist = searchList.value.find((rec: any) => rec.table === 'products')
|
|
||||||
|
|
||||||
return mylist
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
const arrLoaded = computed(() => {
|
const arrLoaded = computed(() => {
|
||||||
if (arrProducts.value && numRecLoaded.value)
|
if (arrProducts.value && numRecLoaded.value)
|
||||||
return arrProducts.value.slice(0, numRecLoaded.value)
|
return arrProducts.value.slice(0, numRecLoaded.value)
|
||||||
@@ -97,7 +105,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
if (cat.value) {
|
if (cat.value) {
|
||||||
filter.value.author = '' // disattivo il filtro autore
|
filter.value.author = '' // disattivo il filtro autore
|
||||||
search.value = '' // disattivo anche la ricerca per testo
|
resetSearch()
|
||||||
}
|
}
|
||||||
|
|
||||||
calcArrProducts()
|
calcArrProducts()
|
||||||
@@ -107,7 +115,7 @@ export default defineComponent({
|
|||||||
calcArrProducts()
|
calcArrProducts()
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => search.value, (newval, oldval) => {
|
watch(() => getSearchText(), (newval, oldval) => {
|
||||||
calcArrProducts()
|
calcArrProducts()
|
||||||
if (tools.scrollTop() > 300) {
|
if (tools.scrollTop() > 300) {
|
||||||
tools.scrollToTopValue(300)
|
tools.scrollToTopValue(300)
|
||||||
@@ -118,7 +126,7 @@ export default defineComponent({
|
|||||||
// Se filtroAuthor attivato, allora evito il filtro per Categoria
|
// Se filtroAuthor attivato, allora evito il filtro per Categoria
|
||||||
if (filter.value.author) {
|
if (filter.value.author) {
|
||||||
cat.value = '' // disattivo il filtro categoria
|
cat.value = '' // disattivo il filtro categoria
|
||||||
search.value = '' // disattivo anche la ricerca per testo
|
resetSearch()
|
||||||
}
|
}
|
||||||
|
|
||||||
calcArrProducts()
|
calcArrProducts()
|
||||||
@@ -134,22 +142,52 @@ export default defineComponent({
|
|||||||
calcArrProducts()
|
calcArrProducts()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function resetSearch() {
|
||||||
|
const mialista = getSearchList()
|
||||||
|
if (mialista && mialista.value && mialista.value.hasOwnProperty('name')) {
|
||||||
|
mialista.value = null
|
||||||
|
}
|
||||||
|
search.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSearchList() {
|
||||||
|
const mylist = searchList.value.find((rec: any) => rec.table === 'products' && rec.key === 'titolo')
|
||||||
|
|
||||||
|
return mylist
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSearchText(): string {
|
||||||
|
const lista = getSearchList()
|
||||||
|
return lista && lista.value && lista.value.hasOwnProperty('name') ? lista.value.name : ''
|
||||||
|
}
|
||||||
|
|
||||||
function calcArrProducts() {
|
function calcArrProducts() {
|
||||||
// console.log('calcArrProducts')
|
// console.log('calcArrProducts')
|
||||||
|
|
||||||
|
const searchtext = getSearchText()
|
||||||
|
|
||||||
refreshpage.value = true
|
refreshpage.value = true
|
||||||
let arrprod = productStore.getProducts(cosa.value) || [];
|
let arrprod = productStore.getProducts(cosa.value) || [];
|
||||||
let filtroAuthor = filter.value.author || '';
|
let filtroAuthor = filter.value.author || '';
|
||||||
|
|
||||||
let catstr = cat.value || '';
|
//++AddCATALOGO_FIELDS
|
||||||
|
|
||||||
|
let filtroProductTypes = props.optcatalogo.productTypes || [0]
|
||||||
|
let filtroExcludeProductTypes = props.optcatalogo.excludeproductTypes || [0]
|
||||||
|
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
|
||||||
|
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
|
||||||
|
|
||||||
|
//console.log('filtroVersione', filtroProductTypes)
|
||||||
|
|
||||||
|
let catstr = cat.value || ''
|
||||||
|
|
||||||
let gasselstr = ''
|
let gasselstr = ''
|
||||||
if (cosa.value === shared_consts.PROD.GAS) {
|
if (cosa.value === shared_consts.PROD.GAS) {
|
||||||
gasselstr = idGasSel.value || '';
|
gasselstr = idGasSel.value || '';
|
||||||
}
|
}
|
||||||
let lowerSearchText = (search.value || '').toLowerCase().trim();
|
let lowerSearchText = (searchtext || '').toLowerCase().trim();
|
||||||
lowerSearchText = lowerSearchText.replace(/[-@:=]/g, '');
|
lowerSearchText = lowerSearchText.replace(/[-@:=]/g, '');
|
||||||
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && !filtroAuthor && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
|
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && boolfiltroVuotoProductTypes && boolfiltroVuotoExcludeProductTypes && !filtroAuthor && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -159,6 +197,21 @@ export default defineComponent({
|
|||||||
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
|
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
|
||||||
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
|
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
|
||||||
|
|
||||||
|
let hasProductTypes = true
|
||||||
|
let hasExcludeProductTypes = false
|
||||||
|
|
||||||
|
//++AddCATALOGO_FIELDS
|
||||||
|
|
||||||
|
if (props.optcatalogo && !boolfiltroVuotoProductTypes) {
|
||||||
|
// check if productInfo.productTypes array includes some item in props.optcatalogo.ProductTypes array
|
||||||
|
hasProductTypes = !props.optcatalogo.productTypes || (props.optcatalogo.productTypes && (product.productInfo.productTypes || []).some((item: any) => props.optcatalogo.productTypes.includes(item)))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.optcatalogo && !boolfiltroVuotoExcludeProductTypes) {
|
||||||
|
// check if productInfo.productTypes array exclude some item in props.optcatalogo.ProductTypes array
|
||||||
|
hasExcludeProductTypes = !props.optcatalogo.excludeproductTypes || (props.optcatalogo.excludeproductTypes && (product.productInfo.productTypes || []).every((item: any) => props.optcatalogo.excludeproductTypes.includes(item)))
|
||||||
|
}
|
||||||
|
|
||||||
let productgassel = true
|
let productgassel = true
|
||||||
if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) {
|
if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) {
|
||||||
productgassel = (product.idGasordine === gasselstr)
|
productgassel = (product.idGasordine === gasselstr)
|
||||||
@@ -171,7 +224,7 @@ export default defineComponent({
|
|||||||
// Check if all words in lowerSearchText are present in lowerName
|
// Check if all words in lowerSearchText are present in lowerName
|
||||||
let allWordsPresent = lowerSearchText.split(/\s+/).every(word => new RegExp(`\\b${word}\\b`, 'i').test(lowerName));
|
let allWordsPresent = lowerSearchText.split(/\s+/).every(word => new RegExp(`\\b${word}\\b`, 'i').test(lowerName));
|
||||||
|
|
||||||
return (codeMatch.test(product.productInfo.code || '') || allWordsPresent) && hasCategoria && hasAuthor && productgassel;
|
return (codeMatch.test(product.productInfo.code || '') || allWordsPresent) && hasCategoria && hasAuthor && productgassel && hasProductTypes && !hasExcludeProductTypes;
|
||||||
} else {
|
} else {
|
||||||
console.error('product or product.productInfo is null');
|
console.error('product or product.productInfo is null');
|
||||||
return false;
|
return false;
|
||||||
@@ -214,7 +267,7 @@ export default defineComponent({
|
|||||||
key: 'titolo',
|
key: 'titolo',
|
||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
value: '',
|
value: '',
|
||||||
addall: true,
|
// addall: true,
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
useinput: true,
|
useinput: true,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -224,9 +277,12 @@ export default defineComponent({
|
|||||||
|
|
||||||
optauthors.value = productStore.getAuthors()
|
optauthors.value = productStore.getAuthors()
|
||||||
|
|
||||||
cosa.value = tools.getCookie(tools.COOK_COSA_PRODOTTI, shared_consts.PROD.GAS, true)
|
//++Todo: Per ora visualizzo solo il "Negozio" e non i GAS...
|
||||||
if (cosa.value === shared_consts.PROD.TUTTI)
|
cosa.value = shared_consts.PROD.BOTTEGA
|
||||||
cosa.value = shared_consts.PROD.GAS
|
|
||||||
|
//cosa.value = tools.getCookie(tools.COOK_COSA_PRODOTTI, shared_consts.PROD.GAS, true)
|
||||||
|
//if (cosa.value === shared_consts.PROD.TUTTI)
|
||||||
|
|
||||||
|
|
||||||
// Inizializza
|
// Inizializza
|
||||||
loadpage.value = true
|
loadpage.value = true
|
||||||
@@ -297,14 +353,16 @@ export default defineComponent({
|
|||||||
filter.value.author = id
|
filter.value.author = id
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchval(newval: any, table: any, tablesel: any) {
|
/*function searchval(newval: any, table: any, tablesel: any) {
|
||||||
console.log('REFRR searchval', newval, table, 'tablesel', tablesel)
|
console.log('REFRR searchval', newval, table, 'tablesel', tablesel)
|
||||||
if (newval === '') {
|
if (newval) {
|
||||||
search.value = ''
|
if (newval.hasOwnProperty('name')) {
|
||||||
|
search.value = newval.name
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
search.value = newval.name
|
resetSearch()
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
|
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
|
||||||
// console.log('valoriopt', item.table)
|
// console.log('valoriopt', item.table)
|
||||||
@@ -342,10 +400,10 @@ export default defineComponent({
|
|||||||
selauthor,
|
selauthor,
|
||||||
searchList,
|
searchList,
|
||||||
fieldsTable,
|
fieldsTable,
|
||||||
searchval,
|
|
||||||
valoriopt,
|
valoriopt,
|
||||||
labelcombo,
|
labelcombo,
|
||||||
mycolumns,
|
mycolumns,
|
||||||
|
tabvisu,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,131 +7,25 @@
|
|||||||
<div v-if="true"></div>
|
<div v-if="true"></div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<q-slide-transition>
|
<q-tabs v-model="tabvisu" dense class="bg-indigo text-white">
|
||||||
<div
|
<q-tab name="categorie" icon="fas fa-folder-open" label="Categorie" />
|
||||||
v-show="isFixed || tools.scrollTop() < 300"
|
<q-tab name="autori" icon="fas fa-user" label="Autori" />
|
||||||
:class="
|
<q-tab name="ricerca" icon="fas fa-search" label="Cerca" />
|
||||||
'column text-center q-mx-auto q-py-sm q-mb-sm ' +
|
</q-tabs>
|
||||||
(isFixed ? 'fixed-group ' : '')
|
<q-tab-panels v-model="tabvisu" animated class="">
|
||||||
"
|
<q-tab-panel name="categorie">
|
||||||
style="width: 350px; max-width: 100%"
|
<div class="row q-gutter-xs justify-center q-mx-auto bg-blue-1">
|
||||||
>
|
<div v-for="(reccat, index) in getCatProds()" :key="index">
|
||||||
<div>
|
<span
|
||||||
<q-input
|
:class="{
|
||||||
ref="componentToFixRef"
|
category: true,
|
||||||
filled
|
category_sel: cat === reccat.value,
|
||||||
stack-label
|
}"
|
||||||
rounded
|
@click="cat = reccat.value"
|
||||||
:dense="tools.isMobile() ? true : false"
|
>{{ reccat.label }}
|
||||||
:label="t('ecomm.code_o_text_search')"
|
</span>
|
||||||
v-model="search"
|
|
|
||||||
debounce="300"
|
<!--<q-btn
|
||||||
class="q-ml-md"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-slide-transition>
|
|
||||||
<div v-if="cosa === shared_consts.PROD.GAS">
|
|
||||||
<div v-if="!idGasSel">
|
|
||||||
<div class="text-center text-h6 text-red">Ordini Attivi:</div>
|
|
||||||
</div>
|
|
||||||
<div class="row q-gutter-xs justify-center q-mx-auto">
|
|
||||||
<div
|
|
||||||
v-for="(recgas, index) in productStore.getGasordinesActives()"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<q-btn
|
|
||||||
push
|
|
||||||
dense
|
|
||||||
:size="tools.isMobile() ? '0.9rem' : '1.05rem'"
|
|
||||||
:color="idGasSel === recgas._id ? 'primary' : undefined"
|
|
||||||
:text-color="idGasSel === recgas._id ? 'white' : 'black'"
|
|
||||||
:label="recgas.name"
|
|
||||||
@click="idGasSel = recgas._id"
|
|
||||||
>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-center q-py-sm prod_trov">
|
|
||||||
<span
|
|
||||||
v-show="productStore.getNumProdTot() !== arrProducts.length"
|
|
||||||
>{{
|
|
||||||
t('ecomm.prodotti_trovati', {
|
|
||||||
qta: arrProducts.length,
|
|
||||||
qtatot: productStore.getNumProdTot(),
|
|
||||||
})
|
|
||||||
}}</span
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="row justify-around" v-if="tools.isManager()">
|
|
||||||
<q-toggle
|
|
||||||
v-model="show_hide"
|
|
||||||
push
|
|
||||||
label="Mostra Nascosti"
|
|
||||||
rounded
|
|
||||||
glossy
|
|
||||||
toggle-color="primary"
|
|
||||||
></q-toggle>
|
|
||||||
</div>
|
|
||||||
<div class="row justify-around">
|
|
||||||
<q-infinite-scroll
|
|
||||||
v-if="arrLoaded && arrLoaded.length > 0"
|
|
||||||
ref="myinfscroll"
|
|
||||||
:initial-index="0"
|
|
||||||
@load="onLoadScroll"
|
|
||||||
:offset="2000"
|
|
||||||
debounce="200"
|
|
||||||
class="q-pa-xs row items-start"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="q-pa-xs"
|
|
||||||
v-for="(product, index) in arrLoaded"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<CCatalogoCard
|
|
||||||
v-if="
|
|
||||||
product.active ||
|
|
||||||
(show_hide &&
|
|
||||||
productInfo.productType ===
|
|
||||||
shared_consts.PRODUCTTYPE.PRODUCT)
|
|
||||||
"
|
|
||||||
:id="product._id"
|
|
||||||
:complete="false"
|
|
||||||
:cosa="cosa"
|
|
||||||
/>
|
|
||||||
<CProductCard
|
|
||||||
v-else-if="product.active || show_hide"
|
|
||||||
:id="product._id"
|
|
||||||
:complete="false"
|
|
||||||
:cosa="cosa"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<template v-slot:loading>
|
|
||||||
<div class="text-center">
|
|
||||||
<q-spinner-dots color="primary" size="40px" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</q-infinite-scroll>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<div class="category-title">Categorie</div>
|
|
||||||
<div class="row q-gutter-xs justify-center q-mx-auto bg-blue-1">
|
|
||||||
<div v-for="(reccat, index) in getCatProds()" :key="index">
|
|
||||||
<span
|
|
||||||
:class="{
|
|
||||||
category: true,
|
|
||||||
category_sel: cat === reccat.value,
|
|
||||||
}"
|
|
||||||
@click="cat = reccat.value"
|
|
||||||
>{{ reccat.label }}
|
|
||||||
</span>
|
|
||||||
|
|
|
||||||
<!--<q-btn
|
|
||||||
:push="cat === reccat.value"
|
:push="cat === reccat.value"
|
||||||
dense
|
dense
|
||||||
:size="tools.isMobile() ? '0.70rem' : '1rem'"
|
:size="tools.isMobile() ? '0.70rem' : '1rem'"
|
||||||
@@ -143,97 +37,37 @@
|
|||||||
@click="cat = reccat.value"
|
@click="cat = reccat.value"
|
||||||
>
|
>
|
||||||
</q-btn>-->
|
</q-btn>-->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</q-tab-panel>
|
||||||
<div class="text-center q-py-sm prod_trov">
|
<q-tab-panel name="autori">
|
||||||
<span
|
<q-toolbar>
|
||||||
v-show="productStore.getNumProdTot() !== arrProducts.length"
|
<q-select
|
||||||
>{{
|
class="full-width"
|
||||||
t('ecomm.prodotti_trovati', {
|
v-model="filter.author"
|
||||||
qta: arrProducts.length,
|
:options="optauthors"
|
||||||
qtatot: productStore.getNumProdTot(),
|
label="Autore"
|
||||||
})
|
placeholder="Tutti"
|
||||||
}}</span
|
emit-value
|
||||||
>
|
map-options
|
||||||
</div>
|
use-input
|
||||||
<div class="row justify-around" v-if="tools.isManager()">
|
hide-selected
|
||||||
<q-toggle
|
fill-input
|
||||||
v-model="show_hide"
|
stack-label
|
||||||
push
|
use-chips
|
||||||
label="Mostra Nascosti"
|
filled
|
||||||
rounded
|
rounded
|
||||||
glossy
|
@filter="filterFn"
|
||||||
toggle-color="primary"
|
>
|
||||||
></q-toggle>
|
<template v-slot:append>
|
||||||
</div>
|
<q-icon
|
||||||
|
v-if="filter.author !== ''"
|
||||||
<div class="col" v-for="(item, index) in searchList" :key="index">
|
class="cursor-pointer"
|
||||||
|
name="clear"
|
||||||
<CMySelect
|
@click.stop.prevent="filter.author = ''"
|
||||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
/> </template
|
||||||
v-if="
|
></q-select>
|
||||||
item.type === costanti.FieldType.select ||
|
<!--<q-select
|
||||||
item.type === costanti.FieldType.select_by_server
|
|
||||||
"
|
|
||||||
:label="
|
|
||||||
item.value && item.value._id > 0 ? undefined : labelcombo(item)
|
|
||||||
"
|
|
||||||
v-model:value="item.value"
|
|
||||||
@update:value="searchval(item.value, item.table, tablesel)"
|
|
||||||
:addall="item.addall"
|
|
||||||
:addnone="item.addnone"
|
|
||||||
:addlast="true"
|
|
||||||
:tablesel="
|
|
||||||
item.type === costanti.FieldType.select_by_server
|
|
||||||
? item.tablesel
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
:pickup="item.type === costanti.FieldType.select_by_server"
|
|
||||||
:label-color="$q.dark.isActive ? 'white' : 'black'"
|
|
||||||
myclass="comboselector"
|
|
||||||
color="primary"
|
|
||||||
|
|
||||||
:dense="true"
|
|
||||||
:icon_alternative="item.icon"
|
|
||||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
|
||||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
|
||||||
:options="valoriopt(item, false)"
|
|
||||||
:filter="item.filter"
|
|
||||||
:filter_extra="item.filter_extra"
|
|
||||||
style="font-size: 0.8rem !important"
|
|
||||||
:useinput="
|
|
||||||
item.useinput &&
|
|
||||||
item.type !== costanti.FieldType.select_by_server
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</CMySelect>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<q-toolbar>
|
|
||||||
<q-select
|
|
||||||
class="full-width"
|
|
||||||
v-model="filter.author"
|
|
||||||
:options="optauthors"
|
|
||||||
label="Autore"
|
|
||||||
placeholder="Tutti"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
hide-selected
|
|
||||||
fill-input
|
|
||||||
stack-label
|
|
||||||
filled
|
|
||||||
@filter="filterFn"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon
|
|
||||||
v-if="filter.author !== ''"
|
|
||||||
class="cursor-pointer"
|
|
||||||
name="clear"
|
|
||||||
@click.stop.prevent="filter.author = ''"
|
|
||||||
/> </template
|
|
||||||
></q-select>
|
|
||||||
<!--<q-select
|
|
||||||
v-model="filter.publisher"
|
v-model="filter.publisher"
|
||||||
:options="publishers"
|
:options="publishers"
|
||||||
label="Editore"
|
label="Editore"
|
||||||
@@ -254,57 +88,121 @@
|
|||||||
placeholder="Tutte"
|
placeholder="Tutte"
|
||||||
dense
|
dense
|
||||||
/>-->
|
/>-->
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
</q-tab-panel>
|
||||||
<div class="row justify-around">
|
<q-tab-panel name="ricerca">
|
||||||
<q-infinite-scroll
|
<div class="col" v-for="(item, index) in searchList" :key="index">
|
||||||
v-if="arrLoaded && arrLoaded.length > 0"
|
<CMySelect
|
||||||
ref="myinfscroll"
|
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||||
:initial-index="0"
|
v-if="
|
||||||
@load="onLoadScroll"
|
item.type === costanti.FieldType.select ||
|
||||||
:offset="2000"
|
item.type === costanti.FieldType.select_by_server
|
||||||
debounce="200"
|
"
|
||||||
class="q-pa-xs row items-start"
|
:label="
|
||||||
style="place-content: center"
|
item.value && item.value._id > 0
|
||||||
>
|
? undefined
|
||||||
<div
|
: labelcombo(item)
|
||||||
class="q-pa-xs"
|
"
|
||||||
v-for="(product, index) in arrLoaded"
|
v-model:value="item.value"
|
||||||
:key="index"
|
:addall="item.addall"
|
||||||
|
:addnone="item.addnone"
|
||||||
|
:addlast="true"
|
||||||
|
:tablesel="
|
||||||
|
item.type === costanti.FieldType.select_by_server
|
||||||
|
? item.tablesel
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
:pickup="item.type === costanti.FieldType.select_by_server"
|
||||||
|
:label-color="$q.dark.isActive ? 'white' : 'black'"
|
||||||
|
myclass="comboselector"
|
||||||
|
color="primary"
|
||||||
|
:dense="true"
|
||||||
|
:icon_alternative="item.icon"
|
||||||
|
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||||
|
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||||
|
:options="valoriopt(item, false)"
|
||||||
|
:filter="item.filter"
|
||||||
|
:filter_extra="item.filter_extra"
|
||||||
|
style="font-size: 0.8rem !important"
|
||||||
|
:useinput="
|
||||||
|
item.useinput &&
|
||||||
|
item.type !== costanti.FieldType.select_by_server
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<CCatalogoCard
|
</CMySelect>
|
||||||
v-if="
|
</div>
|
||||||
product.active ||
|
</q-tab-panel>
|
||||||
(show_hide &&
|
</q-tab-panels>
|
||||||
productInfo.productType ===
|
<div class="text-center q-py-sm prod_trov">
|
||||||
shared_consts.PRODUCTTYPE.PRODUCT)
|
<span v-show="productStore.getNumProdTot() !== arrProducts.length">{{
|
||||||
"
|
t('ecomm.prodotti_trovati', {
|
||||||
:id="product._id"
|
qta: arrProducts.length,
|
||||||
:complete="false"
|
qtatot: productStore.getNumProdTot(),
|
||||||
:cosa="cosa"
|
})
|
||||||
:options="{
|
}}</span>
|
||||||
show_short_descr: false,
|
</div>
|
||||||
show_price: false,
|
<div class="row justify-around" v-if="tools.isManager() && false">
|
||||||
show_cat: false,
|
<q-toggle
|
||||||
quante_col: 'c2',
|
v-model="show_hide"
|
||||||
in_3d: false,
|
push
|
||||||
}"
|
label="Mostra Nascosti"
|
||||||
@selauthor="selauthor"
|
rounded
|
||||||
/>
|
glossy
|
||||||
<CProductCard
|
toggle-color="primary"
|
||||||
v-else-if="product.active || show_hide"
|
></q-toggle>
|
||||||
:id="product._id"
|
</div>
|
||||||
:complete="false"
|
|
||||||
:cosa="cosa"
|
<div class="row justify-around">
|
||||||
/>
|
<q-infinite-scroll
|
||||||
|
v-if="arrLoaded && arrLoaded.length > 0"
|
||||||
|
ref="myinfscroll"
|
||||||
|
:initial-index="0"
|
||||||
|
@load="onLoadScroll"
|
||||||
|
:offset="2000"
|
||||||
|
debounce="200"
|
||||||
|
class="q-pa-xs row items-start"
|
||||||
|
style="place-content: center"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="q-pa-xs"
|
||||||
|
v-for="(product, index) in arrLoaded"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<CContainerCatalogoCard
|
||||||
|
v-if="
|
||||||
|
product.active ||
|
||||||
|
(show_hide &&
|
||||||
|
productInfo.productTypes.includes(
|
||||||
|
shared_consts.PRODUCTTYPE.PRODUCT
|
||||||
|
))
|
||||||
|
|
||||||
|
"
|
||||||
|
:id="product._id"
|
||||||
|
:complete="false"
|
||||||
|
:cosa="cosa"
|
||||||
|
:optcatalogo="optcatalogo"
|
||||||
|
:options="{
|
||||||
|
show_short_descr: false,
|
||||||
|
show_price: false,
|
||||||
|
show_cat: false,
|
||||||
|
quante_col: 'c2',
|
||||||
|
in_3d: false,
|
||||||
|
}"
|
||||||
|
@selauthor="selauthor"
|
||||||
|
/>
|
||||||
|
<CProductCard
|
||||||
|
v-else-if="product.active || show_hide"
|
||||||
|
:id="product._id"
|
||||||
|
:complete="false"
|
||||||
|
:cosa="cosa"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<template v-slot:loading>
|
||||||
|
<div class="text-center">
|
||||||
|
<q-spinner-dots color="primary" size="40px" />
|
||||||
</div>
|
</div>
|
||||||
<template v-slot:loading>
|
</template>
|
||||||
<div class="text-center">
|
</q-infinite-scroll>
|
||||||
<q-spinner-dots color="primary" size="40px" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</q-infinite-scroll>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import { CMyPage } from '@/components/CMyPage'
|
|||||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { shared_consts } from '@src/common/shared_vuejs'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'mypagegood',
|
name: 'mypagegood',
|
||||||
@@ -19,6 +21,7 @@ export default defineComponent({
|
|||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
|
||||||
const idGood = computed(() => $route.params.idGood ? $route.params.idGood.toString() : 0)
|
const idGood = computed(() => $route.params.idGood ? $route.params.idGood.toString() : 0)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -26,6 +29,7 @@ export default defineComponent({
|
|||||||
idGood,
|
idGood,
|
||||||
toolsext,
|
toolsext,
|
||||||
tools,
|
tools,
|
||||||
|
shared_consts,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user