- Corretto la possibilità di effettuare un Ordine di libri, sul sito gruppomacro.app. arriverà una email a "info@gruppomacro.app".

This commit is contained in:
Surya Paolo
2025-06-03 01:01:40 +02:00
parent 94d844c104
commit 12f816b738
18 changed files with 1150 additions and 899 deletions

View File

@@ -29,7 +29,7 @@
<MyFooter></MyFooter> <MyFooter></MyFooter>
</q-layout> </q-layout>
</div> </div>
<!--<BannerCookies urlInfo="/policy"></BannerCookies>--> <BannerCookies urlInfo="/policy"></BannerCookies>
</template> </template>
<script lang="ts" src="./App.ts"> <script lang="ts" src="./App.ts">
</script> </script>

View File

@@ -2085,6 +2085,7 @@ export const shared_consts = {
}, },
MAX_QTA_PREORD: 5000, MAX_QTA_PREORD: 5000,
MAX_QTA_NON_IMPOSTATA: -1,
getStatusStr(status: number) { getStatusStr(status: number) {
const trovatorec = this.OrderStatusStr.find((rec) => rec.value === status) const trovatorec = this.OrderStatusStr.find((rec) => rec.value === status)

View File

@@ -4,6 +4,8 @@ import {
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
import { useGlobalStore } from '@store/globalStore'
// PropType, // PropType,
export default defineComponent({ export default defineComponent({
@@ -21,6 +23,8 @@ export default defineComponent({
const $q = useQuasar() const $q = useQuasar()
const globalStore = useGlobalStore()
const elementId = ref<string>('id'); const elementId = ref<string>('id');
const disableDecline = ref<boolean>(true); const disableDecline = ref<boolean>(true);
const debug = ref<boolean>(false); const debug = ref<boolean>(false);
@@ -38,6 +42,7 @@ export default defineComponent({
const init = (): void => { const init = (): void => {
const visitedType = getCookieStatus() const visitedType = getCookieStatus()
console.log('visitedType', visitedType)
if (visitedType && (visitedType === 'accept' || visitedType === 'decline' || visitedType === 'postpone')) { if (visitedType && (visitedType === 'accept' || visitedType === 'decline' || visitedType === 'postpone')) {
isOpen.value = false isOpen.value = false
} }
@@ -157,6 +162,7 @@ export default defineComponent({
removeCookie, removeCookie,
isOpen, isOpen,
t, t,
globalStore,
} }
}, },
}) })

View File

@@ -1,5 +1,5 @@
<template> <template>
<div v-if="isOpen" class="tothebottomfixed" role="dialog"> <div v-if="globalStore.showHeader && isOpen" class="tothebottomfixed" role="dialog">
<div class="q-pa-md q-gutter-sm"> <div class="q-pa-md q-gutter-sm">
<transition appear name="slide-up" mode="out-in" :duration="2000"> <transition appear name="slide-up" mode="out-in" :duration="2000">
<q-banner class="bg-primary text-white" transition-show="jump-down"> <q-banner class="bg-primary text-white" transition-show="jump-down">

View File

@@ -104,7 +104,7 @@
.card_titolo_prod { .card_titolo_prod {
text-align: center; text-align: center;
padding: 4px 4px 4px 4px; padding: 4px 4px 4px 4px;
height: 70px; min-height: 70px;
} }
.book-image-fixed { .book-image-fixed {
@@ -115,7 +115,7 @@
.img-pic { .img-pic {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: contain; // cover
} }
.q-card__section--vert { .q-card__section--vert {

View File

@@ -214,40 +214,40 @@
</div> </div>
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.verifica"> <div v-else-if="col.fieldtype === costanti.FieldType.verifica">
<div> <div v-if="myvalue">
<div> <div>
<q-chip <q-chip
dense dense
class="q-ma-xs q-pa-xs" class="q-ma-xs q-pa-xs"
:color=" :color="
myvalue.esito === costanti.VALIDATO.SI myvalue?.esito === costanti.VALIDATO.SI
? 'green' ? 'green'
: myvalue.esito === costanti.VALIDATO.TO_RESOLV : myvalue?.esito === costanti.VALIDATO.TO_RESOLV
? 'red' ? 'red'
: 'grey-7' : 'grey-7'
" "
text-color="white" text-color="white"
:icon=" :icon="
myvalue.esito === costanti.VALIDATO.NO myvalue?.esito === costanti.VALIDATO.NO
? 'fas fa-question-circle' ? 'fas fa-question-circle'
: myvalue.esito === costanti.VALIDATO.SI : myvalue.esito === costanti.VALIDATO.SI
? 'fas fa-check-circle' ? 'fas fa-check-circle'
: 'fas fa-exclamation-circle' : 'fas fa-exclamation-circle'
" "
:label=" :label="
myvalue.esito === costanti.VALIDATO.NO myvalue?.esito === costanti.VALIDATO.NO
? $t('validazione.NO') ? $t('validazione.NO')
: myvalue.esito === costanti.VALIDATO.SI : myvalue?.esito === costanti.VALIDATO.SI
? $t('validazione.SI') ? $t('validazione.SI')
: $t('validazione.TO_RESOLV') : $t('validazione.TO_RESOLV')
" "
></q-chip> ></q-chip>
</div> </div>
<div v-if="myvalue.username"> <div v-if="myvalue?.username">
<span>(Utente: {{ myvalue.username }} - in Data: {{ tools.getstrDateTime(myvalue.data) }})</span> <span>(Utente: {{ myvalue.username }} - in Data: {{ tools.getstrDateTime(myvalue.data) }})</span>
</div> </div>
<div v-if="myvalue.note"> <div v-if="myvalue?.note">
<span>Note: {{ myvalue.note }}</span> <span>Note: {{ myvalue.note }}</span>
</div> </div>
</div> </div>

View File

@@ -124,14 +124,18 @@
.card_titolo_prod { .card_titolo_prod {
text-align: center; text-align: center;
padding: 4px 4px 4px 4px; padding: 4px 4px 4px 4px;
height: 70px; min-height: 90px;
} }
.image-container { .image-container {
width: 316px; width: 216px;
height: 316px; height: 216px;
position: relative; position: relative;
overflow: auto;
border-radius: 10px;
overflow: hidden;
background-color: #fff;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
@media (max-width: 718px) { @media (max-width: 718px) {
width: 200px; width: 200px;
@@ -143,16 +147,16 @@
.img-pic { .img-pic {
width: 98%; width: 98%;
height: 98%; height: 98%;
transition: all 0.3s ease;
object-fit: cover; object-fit: cover;
padding: 0px; padding: 0px;
border-radius: 15px; border-radius: 15px;
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
transition: transform 0.3s ease, box-shadow 0.3s ease;
z-index: 2; z-index: 2;
} }
.img-pic:hover { .img-pic:hover {
transform: scale(1.5); transform: scale(1.05);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25), 0 8px 30px rgba(0, 0, 0, 0.22); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25), 0 8px 30px rgba(0, 0, 0, 0.22);
} }

View File

@@ -10,6 +10,7 @@ import { CCardState } from '../CCardState'
import { CCopyBtn } from '../CCopyBtn' import { CCopyBtn } from '../CCopyBtn'
import { CMyFieldRec } from '../CMyFieldRec' import { CMyFieldRec } from '../CMyFieldRec'
import { CBarCode } from '../CBarCode' import { CBarCode } from '../CBarCode'
import { CText } from '../CText'
import { CMyValueDb } from '../CMyValueDb' import { CMyValueDb } from '../CMyValueDb'
import { func_tools, toolsext } from '@store/Modules/toolsext' import { func_tools, toolsext } from '@store/Modules/toolsext'
@@ -51,7 +52,7 @@ export default defineComponent({
}, },
components: { components: {
CTitleBanner, CCardState, CCopyBtn, CTitleBanner, CCardState, CCopyBtn,
CMyFieldRec, CMyValueDb, CBarCode, CMyFieldRec, CMyValueDb, CBarCode, CText,
}, },
setup(props, { emit }) { setup(props, { emit }) {
const $q = useQuasar() const $q = useQuasar()
@@ -186,6 +187,7 @@ export default defineComponent({
async function updateproduct() { async function updateproduct() {
console.log('props.id', props.id)
myproduct.value = await products.getProductById(props.id) myproduct.value = await products.getProductById(props.id)
// products.updateQuantityAvailable(myproduct.value._id) // products.updateQuantityAvailable(myproduct.value._id)

View File

@@ -1,12 +1,16 @@
<template> <template>
<div class="row"> <div class="row">
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" /> <q-spinner
v-if="!endload"
color="primary"
size="3em"
:thickness="2"
/>
<q-card <q-card
:class="{ :class="{
'my-card-big': complete, 'my-card-big': complete,
'my-card-prod': !complete, 'my-card-prod': !complete,
'my-card-selected': 'my-card-selected': myorder && myorder.quantity + myorder.quantitypreordered > 0,
myorder && myorder.quantity + myorder.quantitypreordered > 0,
}" }"
v-if="!!myproduct && endload && !!myproduct.productInfo" v-if="!!myproduct && endload && !!myproduct.productInfo"
bordered bordered
@@ -25,8 +29,14 @@
t('ecomm.not_active') t('ecomm.not_active')
}}</span> }}</span>
</div> </div>
<q-card-section horizontal :class="'image-section'"> <q-card-section
<div v-if="hasImage()" :class="hasImage() ? 'image-container' : ''"> horizontal
:class="'image-section'"
>
<div
v-if="hasImage()"
:class="hasImage() ? 'image-container' : ''"
>
<q-img <q-img
:src=" :src="
myproduct.productInfo.imagefile myproduct.productInfo.imagefile
@@ -37,6 +47,7 @@
: myproduct.productInfo.image_link : myproduct.productInfo.image_link
" "
:alt="myproduct.productInfo.name" :alt="myproduct.productInfo.name"
fit="contain"
class="cursor-pointer img-pic" class="cursor-pointer img-pic"
@click=" @click="
complete complete
@@ -51,12 +62,7 @@
class="absolute semi-transparent" class="absolute semi-transparent"
size="md" size="md"
@click="toggleFullScreen" @click="toggleFullScreen"
style=" style="bottom: -10px; right: 0px; transform: translateY(-50%); z-index: 2"
bottom: -10px;
right: 0px;
transform: translateY(-50%);
z-index: 2;
"
/> />
</div> </div>
@@ -72,17 +78,15 @@
<q-item-section> <q-item-section>
<q-item-label> <q-item-label>
<span class="prod_price" v-if="!!myproduct.price">{{ <span
myproduct.price ? myproduct.price.toFixed(2) : 0 class="prod_price"
}}</span> v-if="!!myproduct.price"
<span v-if="!!myproduct.after_price">{{ >{{ myproduct.price ? myproduct.price.toFixed(2) : 0 }}</span
myproduct.after_price >
}}</span> <span v-if="!!myproduct.after_price">{{ myproduct.after_price }}</span>
</q-item-label> </q-item-label>
<q-item-label <q-item-label
v-if=" v-if="myproduct.scontisticas && myproduct.scontisticas.length > 0"
myproduct.scontisticas && myproduct.scontisticas.length > 0
"
> >
<div <div
class="prod_sconti" class="prod_sconti"
@@ -94,9 +98,15 @@
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item> <q-item v-if="myproduct.productInfo.weight">
<q-item-section avatar v-if="myproduct.productInfo.weight"> <q-item-section
<q-icon name="fas fa-balance-scale" class="icone_prod" /> avatar
v-if="myproduct.productInfo.weight"
>
<q-icon
name="fas fa-balance-scale"
class="icone_prod"
/>
</q-item-section> </q-item-section>
<q-item-section v-if="myproduct.productInfo.weight"> <q-item-section v-if="myproduct.productInfo.weight">
<q-item-label> <q-item-label>
@@ -126,10 +136,10 @@
v-if=" v-if="
(cosa === shared_consts.PROD.TUTTI && !isOrdGas()) || (cosa === shared_consts.PROD.TUTTI && !isOrdGas()) ||
cosa === shared_consts.PROD.BOTTEGA || cosa === shared_consts.PROD.BOTTEGA ||
(cosa === shared_consts.PROD.GAS && (cosa === shared_consts.PROD.GAS && products.getQtyAvailable(myproduct) > 0)
products.getQtyAvailable(myproduct) > 0)
" "
:clickable="tools.isManager()" :clickable="tools.isManager()"
style="padding: 16px !important;"
@click=" @click="
tools.isManager() && tools.isManager() &&
!editOn && !editOn &&
@@ -140,7 +150,11 @@
" "
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon color="green" name="fas fa-store" class="icone_prod" /> <q-icon
color="green"
name="fas fa-store"
class="icone_prod"
/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
@@ -148,7 +162,10 @@
{{ t('ecomm.available') }} {{ t('ecomm.available') }}
</q-item-label> </q-item-label>
<q-item-label> <q-item-label>
<span v-if="!editOn" class="prod_disp"> <span
v-if="!editOn"
class="prod_disp"
>
{{ products.getQtyAvailable(myproduct) }} {{ products.getQtyAvailable(myproduct) }}
</span> </span>
<CMyValueDb <CMyValueDb
@@ -165,11 +182,7 @@
> >
</CMyValueDb> </CMyValueDb>
<div class="prod_qtywarn"> <div class="prod_qtywarn">
<div <div v-if="tools.isManager() && !!myproduct.QuantitaOrdinateInAttesa">
v-if="
tools.isManager() && !!myproduct.QuantitaOrdinateInAttesa
"
>
{{ {{
t('ecomm.qta_in_attesa', { t('ecomm.qta_in_attesa', {
qty: myproduct.QuantitaOrdinateInAttesa, qty: myproduct.QuantitaOrdinateInAttesa,
@@ -180,10 +193,7 @@
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
<q-item-section <q-item-section
v-if=" v-if="tools.isManager() && products.getQtyBloccataAvailable(myproduct) > 0"
tools.isManager() &&
products.getQtyBloccataAvailable(myproduct) > 0
"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon <q-icon
@@ -193,13 +203,15 @@
</q-item-section> </q-item-section>
<q-item-section <q-item-section
v-if=" v-if="
tools.isManager() && tools.isManager() && products.getQtyBloccataAvailable(myproduct) > 0
products.getQtyBloccataAvailable(myproduct) > 0
" "
> >
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label> <q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
<q-item-label> <q-item-label>
<span v-if="!editOn" class="text-black q-ml-xs text-h8"> <span
v-if="!editOn"
class="text-black q-ml-xs text-h8"
>
{{ myproduct.stockBloccatiQty }}</span {{ myproduct.stockBloccatiQty }}</span
> >
</q-item-label> </q-item-label>
@@ -227,13 +239,22 @@
<div class="text-h7 boldhigh titolo_prod"> <div class="text-h7 boldhigh titolo_prod">
{{ myproduct.productInfo.name }} {{ myproduct.productInfo.name }}
</div> </div>
<div v-if="myproduct?.productInfo?.authors" class="text-h8 text-italic titolo_prod q-mb-sm">
{{ products.getAutoriByArrayAuthors(myproduct.productInfo.authors) }}
</div>
<div class="product_code"> <div class="product_code">
&nbsp; {{ t('ecomm.codice') }}: {{ myproduct.productInfo.code }} &nbsp; {{ t('ecomm.codice') }}: {{ myproduct.productInfo.code }}
</div> </div>
<div v-if="false" class="barcode"> <div
<CBarCode :value="myproduct.productInfo.code" format="EAN-13" text="ISBN:"> v-if="false"
class="barcode"
>
<CBarCode
:value="myproduct.productInfo.code"
format="EAN-13"
text="ISBN:"
>
</CBarCode> </CBarCode>
</div> </div>
<div <div
v-if=" v-if="
@@ -261,7 +282,11 @@
</q-card-section> </q-card-section>
<q-card-section v-if="complete && myproduct.productInfo.ingredienti"> <q-card-section v-if="complete && myproduct.productInfo.ingredienti">
<div class="text-blue text-title row"> <div class="text-blue text-title row">
<q-icon size="sm" name="fas fa-list-ul" class="q-mr-sm" /> <q-icon
size="sm"
name="fas fa-list-ul"
class="q-mr-sm"
/>
{{ t('products.ingredienti') }} {{ t('products.ingredienti') }}
</div> </div>
<div class="row items-center"> <div class="row items-center">
@@ -274,23 +299,34 @@
</div> </div>
</q-card-section> </q-card-section>
<q-card-section v-if="complete && myproduct.productInfo.link_scheda"> <q-card-section v-if="complete && myproduct.productInfo.link_scheda">
<div v-if="complete" class="text-blue text-title row"> <div
<q-icon size="sm" name="fas fa-list-ul" class="q-mr-sm" /> v-if="complete"
class="text-blue text-title row"
>
<q-icon
size="sm"
name="fas fa-list-ul"
class="q-mr-sm"
/>
{{ t('products.link_scheda') }} {{ t('products.link_scheda') }}
</div> </div>
<div class="row items-center"> <div class="row items-center">
<div class="text-title text-grey-9"> <div class="text-title text-grey-9">
<a :href="myproduct.productInfo.link_scheda" target="_blank" <a
:href="myproduct.productInfo.link_scheda"
target="_blank"
>Apri Scheda</a >Apri Scheda</a
> >
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-card-section <q-card-section v-if="complete && myproduct.productInfo.valori_nutrizionali">
v-if="complete && myproduct.productInfo.valori_nutrizionali"
>
<div class="text-blue text-title row"> <div class="text-blue text-title row">
<q-icon size="sm" name="fas fa-info" class="q-mr-sm" /> <q-icon
size="sm"
name="fas fa-info"
class="q-mr-sm"
/>
{{ t('products.valori_nutrizionali') }} {{ t('products.valori_nutrizionali') }}
</div> </div>
<div class="row items-center"> <div class="row items-center">
@@ -302,14 +338,24 @@
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-card-section v-if="complete || getnumstore() > 1"> <q-card-section v-if="complete && myproduct.descr_trafiletto_catalogo">
<CText
:rectext="myproduct.descr_trafiletto_catalogo"
:myproduct="myproduct"
:show_at_right="scheda.barcode?.show_at_right"
>
</CText>
</q-card-section>
<q-card-section v-if="(complete && getnumstore() > 1) || getnumstore() >= 1">
<div class="text-blue text-title row items-center q-mr-md centeritems"> <div class="text-blue text-title row items-center q-mr-md centeritems">
<q-icon size="sm" name="fas fa-people-carry" class="q-mr-sm" /> <q-icon
size="sm"
name="fas fa-people-carry"
class="q-mr-sm"
/>
{{ t('products.ritiro_presso') }}: {{ t('products.ritiro_presso') }}:
</div> </div>
<div <div class="text-green-6 text-title row items-center q-my-sm centeritems">
class="text-green-6 text-title row items-center q-my-sm centeritems"
>
<div v-if="getnumstore() > 1"> <div v-if="getnumstore() > 1">
<q-select <q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" :behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
@@ -323,21 +369,20 @@
</q-select> </q-select>
</div> </div>
<div v-else> <div v-else>
<span class="text-title text-center">{{ <span class="text-title text-center">{{ getSingleStorehouse() }}</span>
getSingleStorehouse()
}}</span>
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-card-section v-if="complete && myproduct.producer"> <q-card-section v-if="complete && myproduct.producer">
<div v-if="myproduct.producer.city"> <div v-if="myproduct.producer.city">
<div class="text-grey text-title row items-center q-mt-sm"> <div class="text-grey text-title row items-center q-mt-sm">
<q-icon name="map" class="q-mr-xs" /> <q-icon
name="map"
class="q-mr-xs"
/>
{{ t('products.origine') }}: {{ t('products.origine') }}:
<span class="text-blue q-ml-xs text-h8"> <span class="text-blue q-ml-xs text-h8">
{{ myproduct.producer.city }} ({{ {{ myproduct.producer.city }} ({{ myproduct.producer.region }})</span
myproduct.producer.region
}})</span
> >
</div> </div>
</div> </div>
@@ -345,18 +390,25 @@
v-if="complete && myproduct.producer && myproduct.producer.name" v-if="complete && myproduct.producer && myproduct.producer.name"
class="text-grey text-title row items-center" class="text-grey text-title row items-center"
> >
<q-icon name="place" class="q-mr-xs" /> <q-icon
name="place"
class="q-mr-xs"
/>
{{ t('products.producer') }}: {{ t('products.producer') }}:
<span class="text-black q-ml-xs text-h8"> <span class="text-black q-ml-xs text-h8"> {{ myproduct.producer.name }}</span>
{{ myproduct.producer.name }}</span
>
</div> </div>
</q-card-section> </q-card-section>
<q-card-section v-if="myproduct.productInfo.note" class="q-pa-none"> <q-card-section
v-if="myproduct.productInfo.note"
class="q-pa-none"
>
<q-item> <q-item>
<q-item-section avatar> <q-item-section avatar>
<q-icon color="black" name="fas fa-book" /> <q-icon
color="black"
name="fas fa-book"
/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
@@ -374,7 +426,10 @@
:type="costanti.FieldType.string" :type="costanti.FieldType.string"
> >
</CMyValueDb> </CMyValueDb>
<div v-if="!editOn" v-html="myproduct.productInfo.note"></div> <div
v-if="!editOn"
v-html="myproduct.productInfo.note"
></div>
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
@@ -382,8 +437,7 @@
<q-card-section <q-card-section
v-if=" v-if="
editOn && editOn &&
(!!myproduct.productInfo.imagefile || (!!myproduct.productInfo.imagefile || myproduct.productInfo.imagefile === '')
myproduct.productInfo.imagefile === '')
" "
> >
<div class="text-center"> <div class="text-center">
@@ -442,7 +496,10 @@
" "
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon color="blue" name="fas fa-edit" /> <q-icon
color="blue"
name="fas fa-edit"
/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
@@ -450,7 +507,10 @@
{{ t('ecomm.preorders') }} {{ t('ecomm.preorders') }}
</q-item-label> </q-item-label>
<q-item-label> <q-item-label>
<span v-if="!editOn" class="prod_preorder"> <span
v-if="!editOn"
class="prod_preorder"
>
{{ myproduct.bookableAvailableQty }} {{ myproduct.bookableAvailableQty }}
</span> </span>
<CMyValueDb <CMyValueDb
@@ -480,11 +540,7 @@
> >
</CMyValueDb> </CMyValueDb>
<div class="prod_qtywarn"> <div class="prod_qtywarn">
<div <div v-if="tools.isManager() && !!myproduct.QuantitaPrenotateInAttesa">
v-if="
tools.isManager() && !!myproduct.QuantitaPrenotateInAttesa
"
>
{{ {{
t('ecomm.qta_prenotate_in_attesa', { t('ecomm.qta_prenotate_in_attesa', {
qty: myproduct.QuantitaPrenotateInAttesa, qty: myproduct.QuantitaPrenotateInAttesa,
@@ -496,8 +552,7 @@
</q-item-section> </q-item-section>
<q-item-section <q-item-section
v-if=" v-if="
tools.isManager() && tools.isManager() && products.getQtyBloccataBookableAvailable(myproduct) > 0
products.getQtyBloccataBookableAvailable(myproduct) > 0
" "
> >
<q-item-section avatar> <q-item-section avatar>
@@ -511,7 +566,10 @@
{{ t('ecomm.bloccati') }}: {{ t('ecomm.bloccati') }}:
</q-item-label> </q-item-label>
<q-item-label> <q-item-label>
<span v-if="!editOn" class="text-black q-ml-xs text-h8"> <span
v-if="!editOn"
class="text-black q-ml-xs text-h8"
>
{{ myproduct.bookableGASBloccatiQty }}</span {{ myproduct.bookableGASBloccatiQty }}</span
> >
<CMyValueDb <CMyValueDb
@@ -545,22 +603,21 @@
</q-item> </q-item>
<q-item <q-item
v-if=" v-if="
myproduct.gasordine && myproduct.gasordine && myproduct.gasordine.active && myproduct.idGasordine
myproduct.gasordine.active &&
myproduct.idGasordine
" "
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon color="blue" name="fas fa-shipping-fast" /> <q-icon
color="blue"
name="fas fa-shipping-fast"
/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label class="subtit_prod"> <q-item-label class="subtit_prod">
{{ t('products.gasordine') }} {{ t('products.gasordine') }}
</q-item-label> </q-item-label>
<q-item-label> <q-item-label>
<span class="text-title text-center">{{ <span class="text-title text-center">{{ myproduct.gasordine.name }}</span>
myproduct.gasordine.name
}}</span>
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
@@ -572,15 +629,18 @@
color="orange" color="orange"
name="fas fa-lightbulb" name="fas fa-lightbulb"
/> />
<q-icon v-else color="green" name="fas fa-check" /> <q-icon
v-else
color="green"
name="fas fa-check"
/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label class="subtit_prod text-blue text-bold"> <q-item-label class="subtit_prod text-blue text-bold">
<span v-if="getpercqtaraggiunta() >= 1">{{ <span v-if="getpercqtaraggiunta() >= 1">{{
t('ecomm.offerta_gas_raggiunta', { t('ecomm.offerta_gas_raggiunta', {
qta: qta: myproduct.qtyToReachForGas * myproduct.productInfo.weight,
myproduct.qtyToReachForGas * myproduct.productInfo.weight,
unit: tools.getUnitsMeasure( unit: tools.getUnitsMeasure(
myproduct.productInfo.unit, myproduct.productInfo.unit,
true, true,
@@ -590,8 +650,7 @@
}}</span> }}</span>
<span v-else>{{ <span v-else>{{
t('ecomm.offerta_gas', { t('ecomm.offerta_gas', {
qta: qta: myproduct.qtyToReachForGas * myproduct.productInfo.weight,
myproduct.qtyToReachForGas * myproduct.productInfo.weight,
unit: tools.getUnitsMeasure( unit: tools.getUnitsMeasure(
myproduct.productInfo.unit, myproduct.productInfo.unit,
true, true,
@@ -636,18 +695,16 @@
(myproduct.bookableGASBloccatiQty + (myproduct.bookableGASBloccatiQty +
myproduct.QuantitaPrenotateInAttesa) * myproduct.QuantitaPrenotateInAttesa) *
myproduct.productInfo.weight, myproduct.productInfo.weight,
qtatot: qtatot: myproduct.qtyToReachForGas * myproduct.productInfo.weight,
myproduct.qtyToReachForGas * myproduct.productInfo.weight,
}) })
}} }}
<q-linear-progress size="10px" :value="getpercqtaraggiunta()" /> <q-linear-progress
size="10px"
:value="getpercqtaraggiunta()"
/>
</span> </span>
<div class="prod_qtywarn"> <div class="prod_qtywarn">
<div <div v-if="tools.isManager() && !!myproduct.QuantitaOrdinateInAttesa">
v-if="
tools.isManager() && !!myproduct.QuantitaOrdinateInAttesa
"
>
{{ {{
t('ecomm.qta_in_attesa', { t('ecomm.qta_in_attesa', {
qty: myproduct.QuantitaOrdinateInAttesa, qty: myproduct.QuantitaOrdinateInAttesa,
@@ -658,10 +715,7 @@
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
<q-item-section <q-item-section
v-if=" v-if="tools.isManager() && products.getQtyBloccataAvailable(myproduct) > 0"
tools.isManager() &&
products.getQtyBloccataAvailable(myproduct) > 0
"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon <q-icon
@@ -670,10 +724,7 @@
/> />
</q-item-section> </q-item-section>
<q-item-section <q-item-section
v-if=" v-if="tools.isManager() && products.getQtyBloccataAvailable(myproduct) > 0"
tools.isManager() &&
products.getQtyBloccataAvailable(myproduct) > 0
"
> >
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label> <q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
<q-item-label> <q-item-label>
@@ -692,15 +743,16 @@
" "
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon color="blue" name="fas fa-hourglass-half" /> <q-icon
color="blue"
name="fas fa-hourglass-half"
/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label class="countdown_scadenza"> <q-item-label class="countdown_scadenza">
<span v-if="timerLabelScadenza">{{ timerLabelScadenza }}</span> <span v-if="timerLabelScadenza">{{ timerLabelScadenza }}</span>
<span v-else-if="isOrdineChiuso()">{{ <span v-else-if="isOrdineChiuso()">{{ t('ecomm.ordine_scaduto') }}</span>
t('ecomm.ordine_scaduto')
}}</span>
<CMyValueDb <CMyValueDb
:editOn="editOn" :editOn="editOn"
:title="t('gas.dataora_chiusura_ordini')" :title="t('gas.dataora_chiusura_ordini')"
@@ -726,7 +778,10 @@
" "
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon color="red" name="fas fa-shipping-fast" /> <q-icon
color="red"
name="fas fa-shipping-fast"
/>
</q-item-section> </q-item-section>
<q-item-section class="subtit_prod"> <q-item-section class="subtit_prod">
@@ -755,7 +810,10 @@
" "
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon color="green" name="fas fa-people-carry" /> <q-icon
color="green"
name="fas fa-people-carry"
/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
@@ -801,9 +859,16 @@
> >
</q-btn> </q-btn>
<q-field outlined dense class="q-mx-xs"> <q-field
outlined
dense
class="q-mx-xs"
>
<template v-slot:control> <template v-slot:control>
<div class="no-outline label-qta text-center" tabindex="0"> <div
class="no-outline label-qta text-center"
tabindex="0"
>
{{ myorder.quantity + myorder.quantitypreordered }} {{ myorder.quantity + myorder.quantitypreordered }}
</div> </div>
</template> </template>
@@ -816,9 +881,7 @@
? 'grey' ? 'grey'
: 'positive' : 'positive'
" "
:disable=" :disable="checkifCartDisable() || !products.enableAddQty(myorder, myproduct)"
checkifCartDisable() || !products.enableAddQty(myorder, myproduct)
"
rounded rounded
size="md" size="md"
:label=" :label="
@@ -860,7 +923,10 @@
</div> </div>
</q-card-section> </q-card-section>
<div v-if="editOn"> <div v-if="editOn">
<div v-if="!isOrdGas()" class="row"> <div
v-if="!isOrdGas()"
class="row"
>
<CMyValueDb <CMyValueDb
:editOn="editOn" :editOn="editOn"
:title="t('products.bookedQtyOrdered')" :title="t('products.bookedQtyOrdered')"
@@ -913,13 +979,22 @@
</CMyValueDb> </CMyValueDb>
</q-card> </q-card>
<q-dialog v-if="myproduct" v-model="openlistorders"> <q-dialog
v-if="myproduct"
v-model="openlistorders"
>
<q-card class="dialog_card"> <q-card class="dialog_card">
<q-toolbar class="bg-primary text-white"> <q-toolbar class="bg-primary text-white">
<q-toolbar-title> <q-toolbar-title>
{{ t('ecomm.listaord') }} - {{ myproduct.productInfo.name }} {{ t('ecomm.listaord') }} - {{ myproduct.productInfo.name }}
</q-toolbar-title> </q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn> <q-btn
flat
round
color="white"
icon="close"
v-close-popup
></q-btn>
</q-toolbar> </q-toolbar>
<q-card-section class="q-pa-xs inset-shadow"> <q-card-section class="q-pa-xs inset-shadow">
<q-markup-table <q-markup-table
@@ -955,12 +1030,13 @@
}}</strong> }}</strong>
</td> </td>
<td class="text-center"> <td class="text-center">
<strong>{{ <strong>{{ shared_consts.getStatusStr(ordcart.status) }}</strong>
shared_consts.getStatusStr(ordcart.status)
}}</strong>
</td> </td>
<td class="text-center"> <td class="text-center">
<div v-for="(singleord, index) in ordcart.items" :key="index"> <div
v-for="(singleord, index) in ordcart.items"
:key="index"
>
<span <span
v-if=" v-if="
singleord.order.idProduct === myproduct._id && singleord.order.idProduct === myproduct._id &&
@@ -1000,10 +1076,7 @@
<q-dialog <q-dialog
v-if=" v-if="
true && true && myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda
myproduct &&
myproduct.productInfo &&
myproduct.productInfo.link_scheda
" "
v-model="apriSchedaPDF" v-model="apriSchedaPDF"
maximized maximized
@@ -1032,16 +1105,17 @@
</q-card-section> </q-card-section>
</q-card> </q-card>
<q-card-actions align="center"> <q-card-actions align="center">
<q-btn color="primary" label="Chiudi" @click="apriSchedaPDF = false" /> <q-btn
color="primary"
label="Chiudi"
@click="apriSchedaPDF = false"
/>
</q-card-actions> </q-card-actions>
</q-dialog> </q-dialog>
<q-dialog <q-dialog
v-if=" v-if="
false && false && myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda
myproduct &&
myproduct.productInfo &&
myproduct.productInfo.link_scheda
" "
v-model="apriSchedaPDF" v-model="apriSchedaPDF"
fullscreen fullscreen
@@ -1112,8 +1186,7 @@
</div> </div>
</template> </template>
<script lang="ts" src="./CProductCard.ts"> <script lang="ts" src="./CProductCard.ts"></script>
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import './CProductCard.scss'; @import './CProductCard.scss';

View File

@@ -598,10 +598,12 @@ export default defineComponent({
return tools.getstrDate(element.productInfo?.date_pub); return tools.getstrDate(element.productInfo?.date_pub);
case 'prezzo': case 'prezzo':
return element.price ? '€ ' + element.price.toFixed(2) : ''; // return element.price ? '€ ' + element.price.toFixed(2) : '';
return '€ ' + element.arrvariazioni?.[0]?.price.toFixed(2);
case 'prezzo_sconto': case 'prezzo_sconto':
return element.sale_price ? '€ ' + element.sale_price.toFixed(2) : ''; // return element.sale_price ? '€ ' + element.sale_price.toFixed(2) : '';
return '€ ' + element.arrvariazioni?.[0]?.sale_price.toFixed(2);
case 'rank3M': case 'rank3M':
return element.productInfo?.rank3M; return element.productInfo?.rank3M;
@@ -794,8 +796,9 @@ export default defineComponent({
'stato', 'stato',
'date_pub', 'date_pub',
'pagine', 'pagine',
'trafiletto', // 'trafiletto',
'quantity', 'quantity',
'prezzo',
] ]
); );
const selectedColumns_Catalogs = ref( const selectedColumns_Catalogs = ref(

View File

@@ -48,3 +48,6 @@
font-size: 1.15rem; font-size: 1.15rem;
font-weight: bold; font-weight: bold;
} }
.autori{
font-style: italic;
}

View File

@@ -5,14 +5,23 @@
> >
<div v-if="order.product"> <div v-if="order.product">
<q-item> <q-item>
<q-item-section top thumbnail class="q-ml-none"> <q-item-section
top
thumbnail
class="q-ml-none"
>
<img <img
v-if=" v-if="
order.product && order.product &&
order.product.productInfo && order.product.productInfo &&
order.product.productInfo.imagefile order.product.productInfo.imagefile
" "
:src="tools.getFullFileNameByImageFile('productInfos', order.product.productInfo.imagefile)" :src="
tools.getFullFileNameByImageFile(
'productInfos',
order.product.productInfo.imagefile
)
"
:alt="order.product.productInfo.name" :alt="order.product.productInfo.name"
:class="myimgclass()" :class="myimgclass()"
/> />
@@ -20,10 +29,22 @@
<q-item-section> <q-item-section>
<q-item-label> <q-item-label>
<div v-if="order.idGasordine" class="gasordine"> <div
v-if="order.idGasordine"
class="gasordine"
>
{{ products.getSingleGasordine(order, true) }}<br /> {{ products.getSingleGasordine(order, true) }}<br />
</div> </div>
{{ order.product.productInfo.name }} {{ order.product.productInfo.name }}
<span
class="autori"
v-if="order.product.productInfo.idAuthors"
>
- {{ products.getAutoriByIdAuthors(order.product.productInfo.idAuthors) }}
</span>
</q-item-label>
<q-item-label>
{{ order.product.productInfo.code }}
</q-item-label> </q-item-label>
<q-item-label caption> <q-item-label caption>
@@ -137,7 +158,10 @@
> >
</q-btn> </q-btn>
</div> </div>
<div v-else-if="showall" :class="`q-mx-sm text-blue-14 qta`"> <div
v-else-if="showall"
:class="`q-mx-sm text-blue-14 qta`"
>
{{ order.quantity + order.quantitypreordered }} {{ order.quantity + order.quantitypreordered }}
</div> </div>
@@ -166,11 +190,7 @@
</span> </span>
<span :class="isApplicatoSconto() ? 'ordine_scontato_nuovo' : ''"> <span :class="isApplicatoSconto() ? 'ordine_scontato_nuovo' : ''">
= € = €
{{ {{ order.TotalPriceProduct ? order.TotalPriceProduct.toFixed(2) : 0 }}
order.TotalPriceProduct
? order.TotalPriceProduct.toFixed(2)
: 0
}}
</span> </span>
<span <span
v-if=" v-if="
@@ -204,9 +224,7 @@
<span <span
v-if="isApplicatoSconto() && !editmode" v-if="isApplicatoSconto() && !editmode"
class="ordine_scritta_sconto" class="ordine_scritta_sconto"
>{{ >{{ $t('ecomm.sconto_applicato', { risparmio: getRisparmio() }) }}</span
$t('ecomm.sconto_applicato', { risparmio: getRisparmio() })
}}</span
> >
</div> </div>
</q-item-label> </q-item-label>
@@ -236,8 +254,7 @@
</div> </div>
</template> </template>
<script lang="ts" src="./CSingleCart.ts"> <script lang="ts" src="./CSingleCart.ts"></script>
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import './CSingleCart.scss'; @import './CSingleCart.scss';

View File

@@ -409,9 +409,9 @@ h3 {
} }
.my-card-prod { .my-card-prod {
transition: box-shadow 0.3s; transition: box-shadow 0.3s ease, transform 0.3s ease;
/* Add a transition for a smooth effect */ /* Add a transition for a smooth effect */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important; box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
width: 100%; width: 100%;
max-width: 300px; max-width: 300px;
padding: 0.5rem 0.5rem; padding: 0.5rem 0.5rem;
@@ -2568,3 +2568,32 @@ body.body--dark {
.no-print { .no-print {
// display: none !important; // display: none !important;
} }
.macro-junior {
font-family: 'Comic Sans MS', cursive, sans-serif;
font-size: 12px;
color: #ccc;
line-height: 1.3;
}
.macro-junior h2 {
font-style: italic;
font-weight: bold;
margin: 0 0 6px 0;
font-size: 16px;
}
.macro-junior p {
margin: 0 0 8px 0;
}
.macro-junior blockquote {
font-style: italic;
font-weight: bold;
margin: 6px 0;
padding-left: 12px;
border-left: 3px solid #333;
color: #ccc;
font-size: 12px;
line-height: 1.3;
}

View File

@@ -1882,7 +1882,7 @@ const msg_it = {
ord_not_confirmed: 'E\' avvenuto un errore. Ordine non Confermato. Ricaricare la pagina e riprovare.', ord_not_confirmed: 'E\' avvenuto un errore. Ordine non Confermato. Ricaricare la pagina e riprovare.',
btn_cassa: 'Procedi all\'Ordine', btn_cassa: 'Procedi all\'Ordine',
btn_ordini: 'I tuoi Ordini', btn_ordini: 'I tuoi Ordini',
available: 'Disponib.', available: 'Disponib',
preorders: 'Quantità Massima Pre-Ordinabili', preorders: 'Quantità Massima Pre-Ordinabili',
preord: 'Pre-Ordinate', preord: 'Pre-Ordinate',
di_cui_x_in_carrello: '(nel tuo carrello: {qty})', di_cui_x_in_carrello: '(nel tuo carrello: {qty})',

File diff suppressed because it is too large Load Diff

View File

@@ -2063,6 +2063,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
// User not exist !! // User not exist !!
} }
Products.init();
// const isLogged = localStorage.getItem(toolsext.localStorage.username) // const isLogged = localStorage.getItem(toolsext.localStorage.username)
// console.log('isLogged', isLogged) // console.log('isLogged', isLogged)

View File

@@ -368,10 +368,10 @@ export default defineComponent({
clcol = `text-white`; clcol = `text-white`;
} }
if (catalog?.backcolor) { if (catalog?.backcolor) {
mystyle = `background-color: ` + catalog?.backcolor + '; '; mystyle = `background-color: ${catalog?.backcolor};`;
} }
testo = testo =
`<span class="book-text-up ${clcol}" style=${mystyle}>` + testo + `</span>`; `<span class="book-text-up ${clcol}" style="${mystyle}">` + testo + `</span>`;
} }
} }

View File

@@ -3,7 +3,7 @@
<div class="panel"> <div class="panel">
<div class="container"> <div class="container">
<div class="row justify-center"> <div class="row justify-center">
<CProductCard :id="id" :cosa="cosa" :complete="true"/> <CProductCard v-if="id" :id="id" :cosa="cosa" :complete="true"/>
</div> </div>
</div> </div>
</div> </div>