diff --git a/src/components/CCatalogoCard/CCatalogoCard.scss b/src/components/CCatalogoCard/CCatalogoCard.scss
index 5156832f..dbca8608 100755
--- a/src/components/CCatalogoCard/CCatalogoCard.scss
+++ b/src/components/CCatalogoCard/CCatalogoCard.scss
@@ -11,18 +11,18 @@
}
.prod_price {
- font-size: 1.25rem;
+ font-size: 1.1rem;
@media (max-width: 718px) {
- font-size: 1.15rem;
+ font-size: 1rem;
}
}
.prod_sale_price {
- font-size: 1.25rem;
+ font-size: 1.10rem;
@media (max-width: 718px) {
- font-size: 1.15rem;
+ font-size: 1.05rem;
}
}
@@ -161,7 +161,7 @@
}
.book-card {
- max-width: 300px;
+ width: 300px;
background-color: #f8f8f8;
}
@@ -173,6 +173,10 @@
flex: 1;
}
+.book-block {
+ display: flex;
+}
+
.book-image q-img {
max-width: 100%;
}
@@ -183,26 +187,40 @@
}
.book-title {
+ margin: 8px;
font-family: 'Poppins,sans-serif';
- font-size: 1rem;
+ font-size: 1.15rem;
line-height: 20px;
- font-weight: 400;
+ font-weight: bold;
color: #333;
- display: block;
+ display: flex;
text-align: center;
}
.book-author {
color: #263238;
- display: block;
+ display: flex;
font-family: Poppins, sans-serif;
- font-size: 0.85em;
+ font-size: 1em;
font-weight: 400;
line-height: 18px;
text-align: center;
+ font-style: italic;
}
.book-description {
font-size: 0.85rem;
color: #777;
+}
+
+.block-variazione{
+ border: 1px solid gray;
+ border-radius: 5px;
+ padding: 2px;
+ margin: 2px;
+ cursor: pointer;
+}
+
+.block-variazione-selected{
+ border: 1px solid red !important;
}
\ No newline at end of file
diff --git a/src/components/CCatalogoCard/CCatalogoCard.ts b/src/components/CCatalogoCard/CCatalogoCard.ts
index 3143d658..f1eea93e 100755
--- a/src/components/CCatalogoCard/CCatalogoCard.ts
+++ b/src/components/CCatalogoCard/CCatalogoCard.ts
@@ -11,7 +11,7 @@ import { CMyValueDb } from '../CMyValueDb'
import { func_tools, toolsext } from '@store/Modules/toolsext'
-import { IBaseOrder, IGasordine, IOrder, IOrderCart, IProduct } from '@src/model'
+import { IBaseOrder, IGasordine, IOrder, IOrderCart, IProduct, IVariazione } from '@src/model'
import { tools } from '@store/Modules/tools'
import { useProducts } from '@store/Products'
@@ -61,6 +61,8 @@ export default defineComponent({
const sumval = ref(0)
const editOn = ref(false)
+ const indvariazSel = ref(-1)
+
const site = ref(globalStore.site)
const $router = useRouter()
@@ -423,6 +425,10 @@ export default defineComponent({
$router.push(path)
}
+ function setvariazioneSelected(indvariaz: number) {
+ indvariazSel.value = indvariaz
+ }
+
onMounted(mounted)
onBeforeUnmount(beforeDestroy)
@@ -473,6 +479,8 @@ export default defineComponent({
isOrdineChiuso,
ricarica,
apriSchedaPDF,
+ setvariazioneSelected,
+ indvariazSel,
}
}
})
diff --git a/src/components/CCatalogoCard/CCatalogoCard.vue b/src/components/CCatalogoCard/CCatalogoCard.vue
index 0796baaa..e70aaa9d 100755
--- a/src/components/CCatalogoCard/CCatalogoCard.vue
+++ b/src/components/CCatalogoCard/CCatalogoCard.vue
@@ -25,25 +25,123 @@
{{ myproduct.productInfo.name }}
-
-
- {{ author.name }} {{ author.surname }}
-
-
- {{
- tools.firstchars(myproduct.productInfo.description, 300)
- }}
-
-
{{
- shared_consts.VERSIONI_PRODOTTO[myproduct.versione].label
- }}
+
- {{ myproduct.price }} €
+ {{ author.name }} {{ author.surname }}
+
+
+
{{
+ myproduct.productInfo.short_descr
+ }}
+
+
+
+
{{
+ shared_consts.VERSIONI_PRODOTTO[variazione.versione].label
+ }}
+
+ formato: {{ variazione.formato }}
+
+
+ tipologia: {{ variazione.tipologia }}
+
+
+ edizione: {{ variazione.edizione }}
+
+
+ status: {{ variazione.status }}
+
+
+ preOrderDate: {{ variazione.preOrderDate }}
+
+
+
+
+ {{
+ variazione.sale_price
+ ? variazione.sale_price.toFixed(2)
+ : 0
+ }}
+ €
+ {{ variazione.price ? variazione.price.toFixed(2) : 0 }} €
+
+ {{
+ myproduct.after_price
+ }}
+
+
+
+ {{ sconti.description }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -79,7 +177,7 @@
myproduct.productInfo.author
}}
- {{ myproduct.productInfo.description }}
+ {{ myproduct.productInfo.short_descr }}
ISBN: {{ myproduct.productInfo.code }}
Pages: {{ myproduct.productInfo.numpages }}
Published Date: {{ myproduct.productInfo.date_publishing }}
@@ -149,37 +247,6 @@
class="icone_prod"
/>
-
-
-
- {{
- myproduct.sale_price ? myproduct.sale_price.toFixed(2) : 0
- }}
- {{ myproduct.price ? myproduct.price.toFixed(2) : 0 }}
- {{
- myproduct.after_price
- }}
-
-
-
- {{ sconti.description }}
-
-
-
diff --git a/src/model/Products.ts b/src/model/Products.ts
index 2bf0935d..a1a5461e 100755
--- a/src/model/Products.ts
+++ b/src/model/Products.ts
@@ -28,8 +28,9 @@ export interface IProductInfo {
img4?: string
image_link?: string
ingredienti?: string
+ link?: string
link_scheda?: string
- valori_nutrizionali?: string
+ checkout_link?: string
authors?: string[]
collezione?: string
publisher?: string
@@ -38,6 +39,23 @@ export interface IProductInfo {
productType?: number
}
+export interface IVariazione {
+ active?: boolean
+ versione?: number
+ status?: string,
+ price?: number
+ sale_price?: number
+ quantita?: number
+ availability?: number
+ numpages?: number
+ formato?: string
+ tipologia?: string
+ edizione?: string
+ preOrderDate?: Date
+ addtocart_link?: string
+ eta?: string
+}
+
export interface IProduct {
_id?: any
active?: boolean
@@ -55,17 +73,15 @@ export interface IProduct {
gasordine: IGasordine | null,
provider?: IProvider,
price: number,
- sale_price?: number,
after_price?: string,
quantityAvailable?: number,
bookableAvailableQty?: number,
QuantitaOrdinateInAttesa?: number,
QuantitaPrenotateInAttesa?: number,
note?: string
- versione?: number
+ arrvariazioni?: IVariazione[]
stockQty: number, // UPDATING
- status?: string,
stockBloccatiQty: number, // UPDATING
bookedQtyOrdered: number // UPDATING
bookedQtyConfirmed: number // UPDATING
@@ -127,14 +143,15 @@ export interface IProductsState {
export interface IProducer {
_id?: any
idapp?: string
- name?: string,
- description?: string,
- referent?: string,
- username?: string,
- region?: string,
- city?: string,
- img?: string,
- website?: string,
+ name?: string
+ description?: string
+ short_descr?: string
+ referent?: string
+ username?: string
+ region?: string
+ city?: string
+ img?: string
+ website?: string
}
export interface IDepartment {
diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js
index d7117cf8..76650d33 100755
--- a/src/statics/lang/it.js
+++ b/src/statics/lang/it.js
@@ -94,6 +94,7 @@ const msg_it = {
select_gasordine: 'Scegli l\'Ordine del GAS',
productInfo: 'Info Prodotto',
link_scheda: 'Link Scheda',
+ addtocart_ext: 'Aggiungi',
},
storehouses: {
name: 'Magazzino',
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index e6c0e584..c3f51a8a 100755
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -2135,7 +2135,19 @@ export const colTableProducts = [
jointable: 'scontisticas',
}),
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: costanti.FieldType.number, required: true }),
- AddCol({ name: 'sale_price', label_trans: 'products.sale_price', fieldtype: costanti.FieldType.number, required: false }),
+
+
+ // arrvariazioni
+ /* AddCol({ name: 'sale_price', label_trans: 'products.sale_price', fieldtype: costanti.FieldType.number, required: false }),
+ AddCol({
+ name: 'versione',
+ label_trans: 'products.versione',
+ fieldtype: costanti.FieldType.select,
+ jointable: 'versions',
+ }),
+ AddCol({ name: 'status', label_trans: 'products.status', fieldtype: costanti.FieldType.string }),
+ */
+
AddCol({ name: 'price_acquistato', label_trans: 'products.price_acquistato', fieldtype: costanti.FieldType.number, required: true }),
AddCol({ name: 'after_price', label_trans: 'products.after_price' }),
AddCol({
@@ -2184,12 +2196,6 @@ export const colTableProducts = [
label_trans: 'ecomm.note',
fieldtype: costanti.FieldType.html
}),
- AddCol({
- name: 'versione',
- label_trans: 'products.versione',
- fieldtype: costanti.FieldType.select,
- jointable: 'versions',
- }),
AddCol({
name: 'maxbookableGASQty',
label_trans: 'ecomm.maxbookableGASQty',
@@ -2208,7 +2214,6 @@ export const colTableProducts = [
AddCol({ name: 'canBeShipped', label_trans: 'products.canBeShipped', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'canBeBuyOnline', label_trans: 'products.canBeBuyOnline', fieldtype: costanti.FieldType.boolean }),
- AddCol({ name: 'status', label_trans: 'products.status', fieldtype: costanti.FieldType.string }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
diff --git a/src/views/ecommerce/catalogo/catalogo.vue b/src/views/ecommerce/catalogo/catalogo.vue
index c90ed1f7..c2f62e43 100755
--- a/src/views/ecommerce/catalogo/catalogo.vue
+++ b/src/views/ecommerce/catalogo/catalogo.vue
@@ -6,7 +6,7 @@
@@ -48,18 +42,12 @@
-
+ -->
@@ -259,6 +247,7 @@
:offset="2000"
debounce="200"
class="q-pa-xs row items-start"
+ style="place-content: center"
>