- corretto visualizzazione dei prodotti,
- inserimento nuovi prodotti nella tabella.
This commit is contained in:
@@ -192,7 +192,7 @@ export default defineComponent({
|
||||
quantity: 0,
|
||||
quantitypreordered: 0,
|
||||
idStorehouse: '',
|
||||
idGasordine: '',
|
||||
idGasordine: null,
|
||||
storehouse: {},
|
||||
gasordine: { active: false },
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -808,12 +808,14 @@
|
||||
</CGallery>
|
||||
</div>
|
||||
<div v-else>
|
||||
img: {{tools.getDirectoryGall(myrow, table, mypath) + myvalue}}
|
||||
|
||||
<div
|
||||
v-if="myvalue"
|
||||
class="text-center"
|
||||
>
|
||||
<q-img
|
||||
:src="myvalue"
|
||||
:src="tools.getDirectoryGall(myrow, table, mypath) + myvalue"
|
||||
class="text-center"
|
||||
style="height: 100px; width: 100px"
|
||||
alt="foto"
|
||||
|
||||
@@ -91,7 +91,7 @@ export default defineComponent({
|
||||
quantity: 0,
|
||||
quantitypreordered: 0,
|
||||
idStorehouse: '',
|
||||
idGasordine: '',
|
||||
idGasordine: null,
|
||||
storehouse: {},
|
||||
gasordine: { active: false },
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<main id="main-content">
|
||||
<!-- Visione/Mission -->
|
||||
<section v-if="sectionsEnabled.vision" class="section section--vision" aria-labelledby="vision-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="vision-heading" class="section-title">Visione & Mission</h2>
|
||||
<q-skeleton v-if="loading && !data?.pillars?.length" type="text" class="q-mb-md" />
|
||||
<div class="row q-col-gutter-md">
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
<!-- Pillars -->
|
||||
<section v-if="sectionsEnabled.pillars" class="section section--pillars" aria-labelledby="pillars-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="pillars-heading" class="section-title">Il nostro Progetto</h2>
|
||||
<q-skeleton v-if="loading && !data?.pillars?.length" type="rect" height="120px" class="q-mb-md" />
|
||||
<div v-else class="row q-col-gutter-md">
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
<!-- Eventi -->
|
||||
<section v-if="sectionsEnabled.events" class="section section--events" aria-labelledby="events-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<div class="row items-end justify-between q-mb-md">
|
||||
<h2 id="events-heading" class="section-title col-auto">Eventi</h2>
|
||||
<div class="col-auto">
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
<!-- Collabora / Unisciti -->
|
||||
<section v-if="sectionsEnabled.collabora" class="section section--collabora" aria-labelledby="collabora-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="collabora-heading" class="section-title">Collabora / Unisciti</h2>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div v-for="opt in collaboraOptions" :key="opt.key" class="col-12 col-md-4">
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
<!-- Testimonianze -->
|
||||
<section v-if="sectionsEnabled.testimonials" class="section section--testi" aria-labelledby="testi-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="testi-heading" class="section-title">Testimonianze</h2>
|
||||
<q-carousel
|
||||
v-model="carouselSlide"
|
||||
@@ -239,7 +239,7 @@
|
||||
|
||||
<!-- Galleria -->
|
||||
<section v-if="sectionsEnabled.gallery" class="section section--gallery" aria-labelledby="gallery-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="gallery-heading" class="section-title">Galleria</h2>
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div v-for="g in data?.gallery" :key="g.id" class="col-6 col-md-3">
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
<!-- FAQ -->
|
||||
<section v-if="sectionsEnabled.faq" class="section section--faq" aria-labelledby="faq-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="faq-heading" class="section-title">FAQ</h2>
|
||||
<q-list bordered class="rounded-xl">
|
||||
<q-expansion-item
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
<!-- News / Blog -->
|
||||
<section v-if="sectionsEnabled.posts" class="section section--news" aria-labelledby="news-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<div class="row items-end justify-between q-mb-md">
|
||||
<h2 id="news-heading" class="section-title">News / Blog</h2>
|
||||
<div class="col-auto">
|
||||
@@ -319,7 +319,7 @@
|
||||
|
||||
<!-- Mappa / Sedi -->
|
||||
<section v-if="sectionsEnabled.map" class="section section--map" aria-labelledby="map-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="map-heading" class="section-title">Dove siamo</h2>
|
||||
<div class="map-wrap rounded-xl">
|
||||
<slot name="map">
|
||||
@@ -341,7 +341,7 @@
|
||||
|
||||
<!-- Newsletter -->
|
||||
<section v-if="sectionsEnabled.newsletter" class="section section--newsletter" aria-labelledby="newsletter-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<h2 id="newsletter-heading" class="section-title">Newsletter</h2>
|
||||
<q-form @submit.prevent="subscribe">
|
||||
<div class="row items-center q-col-gutter-sm">
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
<!-- CTA finale -->
|
||||
<section v-if="sectionsEnabled.finalCta" class="section section--cta" aria-labelledby="cta-heading">
|
||||
<div class="container">
|
||||
<div class="containerhome">
|
||||
<div class="cta-card rounded-xl">
|
||||
<h2 id="cta-heading" class="cta-title">Progettiamo insieme un nuovo mondo</h2>
|
||||
<div class="q-gutter-sm">
|
||||
|
||||
@@ -2759,7 +2759,7 @@ body.body--dark {
|
||||
}
|
||||
|
||||
// Stili aggiuntivi per la pagina
|
||||
.container {
|
||||
.containerhome {
|
||||
background: white;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.09);
|
||||
@@ -2768,6 +2768,13 @@ body.body--dark {
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.container:hover {
|
||||
.containerhome:hover {
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export default defineComponent({
|
||||
|
||||
const { setmeta } = MixinMetaTags()
|
||||
const filtroOrdini = ref(<any[]>[])
|
||||
const idGasordine = ref('')
|
||||
const idGasordine = ref(null)
|
||||
|
||||
function mounted() {
|
||||
let queryord = []
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
prop_mytable="products"
|
||||
prop_mytitle="Lista Prodotti"
|
||||
:prop_mycolumns="colTableProdShort"
|
||||
prop_colkey="name"
|
||||
prop_colkey="date_updated"
|
||||
nodataLabel="Nessun Prodotto"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
|
||||
@@ -4254,6 +4254,7 @@ export const colTableVariazioni = [
|
||||
}),
|
||||
];
|
||||
|
||||
/*
|
||||
export const colTableProductInfos = [
|
||||
AddCol({ name: 'code', label_trans: 'products.code', required: true }),
|
||||
AddCol({ name: 'codice_EAN', label_trans: 'products.codice_EAN' }),
|
||||
@@ -4392,6 +4393,7 @@ export const colTableProductInfos = [
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
];
|
||||
*/
|
||||
|
||||
export const colTableOrdersCart = [
|
||||
AddCol({ name: '_id', label_trans: 'others.value' }),
|
||||
@@ -4438,38 +4440,109 @@ export const colTableProdShort = [
|
||||
label_trans: 'products.active',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
}),
|
||||
AddCol({ name: 'name', label_trans: 'products.name' }),
|
||||
AddCol({
|
||||
name: 'productInfo.code',
|
||||
field: 'productInfo',
|
||||
subfield: 'code',
|
||||
label_trans: 'products.code',
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'productInfo.name',
|
||||
label_trans: 'products.name',
|
||||
field: 'productInfo',
|
||||
subfield: 'name',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'price',
|
||||
label_trans: 'products.price',
|
||||
fieldtype: costanti.FieldType.number,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'stockQty',
|
||||
label_trans: 'products.stockQty',
|
||||
fieldtype: costanti.FieldType.number,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'price_acquistato',
|
||||
label_trans: 'products.price_acquistato',
|
||||
fieldtype: costanti.FieldType.number,
|
||||
required: true,
|
||||
}),
|
||||
|
||||
AddCol({ name: 'productInfo.code', label_trans: 'products.code', required: true }),
|
||||
AddCol({
|
||||
name: 'idProducer',
|
||||
label_trans: 'products.producer',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'producers',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idStorehouses',
|
||||
label_trans: 'storehouses.name',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'storehouses',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idGasordine',
|
||||
label_trans: 'gas.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'gasordines',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idProvider',
|
||||
label_trans: 'provider.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'providers',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'productInfo.description',
|
||||
label_trans: 'products.description',
|
||||
fieldtype: costanti.FieldType.html,
|
||||
field: 'productInfo',
|
||||
subfield: 'description',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'productInfo.imagefile',
|
||||
field: 'productInfo',
|
||||
subfield: 'imagefile',
|
||||
label_trans: 'products.img',
|
||||
fieldtype: costanti.FieldType.imgfile_sfuso,
|
||||
path: 'products/',
|
||||
path: 'upload/products/',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'productInfo.idCatProds',
|
||||
field: 'productInfo',
|
||||
subfield: 'idCatProds',
|
||||
label_trans: 'products.category',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'catprods',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'date_pub',
|
||||
field: 'productInfo',
|
||||
subfield: 'date_pub',
|
||||
label_trans: 'reg.pub_created',
|
||||
fieldtype: costanti.FieldType.onlydate,
|
||||
required: false,
|
||||
sortable: true,
|
||||
showWhen:
|
||||
costanti.showWhen.InPage +
|
||||
costanti.showWhen.InEdit +
|
||||
costanti.showWhen.InView_OnlyifExist,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'date_updated',
|
||||
field: 'productInfo',
|
||||
subfield: 'date_updated',
|
||||
label_trans: 'reg.pub_updated',
|
||||
fieldtype: costanti.FieldType.onlydate,
|
||||
required: false,
|
||||
sortable: true,
|
||||
showWhen:
|
||||
costanti.showWhen.InPage +
|
||||
costanti.showWhen.InEdit +
|
||||
costanti.showWhen.InView_OnlyifExist,
|
||||
}),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
];
|
||||
@@ -4482,12 +4555,6 @@ export const colTableProducts = [
|
||||
}),
|
||||
AddCol({ name: 'isbn', label_trans: 'products.isbn' }),
|
||||
AddCol({ name: 'name', label_trans: 'products.name' }),
|
||||
/*AddCol({
|
||||
name: 'idProductInfo',
|
||||
label_trans: 'products.productInfo',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'productinfos',
|
||||
}),*/
|
||||
AddCol({
|
||||
name: 'idProducer',
|
||||
label_trans: 'products.producer',
|
||||
@@ -4540,7 +4607,6 @@ export const colTableProducts = [
|
||||
name: 'price_acquistato',
|
||||
label_trans: 'products.price_acquistato',
|
||||
fieldtype: costanti.FieldType.number,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({ name: 'after_price', label_trans: 'products.after_price' }),
|
||||
AddCol({
|
||||
@@ -7147,7 +7213,7 @@ export const fieldsTable = {
|
||||
label: 'Prodotti',
|
||||
columns: colTableProducts,
|
||||
colkey: '_id',
|
||||
collabel: 'name',
|
||||
collabel: (rec: any) => `${rec.productInfo.name}`,
|
||||
},
|
||||
{
|
||||
value: 'orderscarts',
|
||||
|
||||
@@ -8984,6 +8984,8 @@ export const tools = {
|
||||
ris = 'pages/' + path;
|
||||
} else if (table === 'imgs') {
|
||||
ris = path;
|
||||
} else if (path) {
|
||||
ris = path;
|
||||
} else {
|
||||
ris = table;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ function getRecordProductEmpty(): IProduct {
|
||||
active: false,
|
||||
idProducer: '',
|
||||
idStorehouses: [],
|
||||
idGasordine: '',
|
||||
idGasordine: null,
|
||||
idScontisticas: [],
|
||||
scontisticas: [],
|
||||
idProvider: '',
|
||||
@@ -458,8 +458,9 @@ export const useProducts = defineStore('Products', {
|
||||
item.order.idGasordine === idGasordine) ||
|
||||
!mostra_solo_ordini_produttore)
|
||||
) {
|
||||
const qtyparz = item.order.quantity + item.order.quantitypreordered;
|
||||
subtotalPrice += item.order.price * qtyparz;
|
||||
//const qtyparz = item.order.quantity + item.order.quantitypreordered;
|
||||
// subtotalPrice += item.order.price * qtyparz;
|
||||
subtotalPrice += item.order.TotalPriceProduct;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -2609,7 +2610,7 @@ export const useProducts = defineStore('Products', {
|
||||
quantity: 0,
|
||||
quantitypreordered: 0,
|
||||
idStorehouse: '',
|
||||
idGasordine: '',
|
||||
idGasordine: null,
|
||||
storehouse: {},
|
||||
gasordine: { active: false },
|
||||
});
|
||||
@@ -2621,7 +2622,7 @@ export const useProducts = defineStore('Products', {
|
||||
myorder.quantity = 0;
|
||||
myorder.quantitypreordered = 0;
|
||||
myorder.idStorehouse = '';
|
||||
myorder.idGasordine = '';
|
||||
myorder.idGasordine = null;
|
||||
},
|
||||
|
||||
setMyOrder(
|
||||
|
||||
Reference in New Issue
Block a user