- piuchebuono: possiblità di modificare l'immagine dalla scheda direttamente

- migliorata di poco la grafica dell'immagine.
This commit is contained in:
Surya Paolo
2024-10-02 23:26:52 +02:00
parent e29de7e0f6
commit d09f4831cf
53 changed files with 1736 additions and 124 deletions

View File

@@ -28,7 +28,11 @@
<q-card-section horizontal :class="'image-section'">
<div v-if="hasImage()" :class="hasImage() ? 'image-container' : ''">
<q-img
:src="myproduct.productInfo.img ? `` + myproduct.productInfo.img : myproduct.productInfo.image_link"
:src="
myproduct.productInfo.imagefile
? tools.getFullFileNameByImageFile(myproduct.productInfo.imagefile, 'productInfos')
: myproduct.productInfo.image_link
"
:alt="myproduct.productInfo.name"
class="cursor-pointer img-pic"
@click="
@@ -41,10 +45,11 @@
color="primary"
round
icon="fas fa-eye"
class="absolute semi-transparent"
size="md"
@click="toggleFullScreen"
style="bottom: -10px; right: 0px; transform: translateY(-50%)"
style="bottom: -10px; right: 0px; transform: translateY(-50%); z-index: 2"
/>
</div>
@@ -120,6 +125,7 @@
:clickable="tools.isManager()"
@click="
tools.isManager() &&
!editOn &&
myproduct.QuantitaOrdinateInAttesa &&
myproduct.QuantitaOrdinateInAttesa > 0
? visuListDisponibili()
@@ -217,8 +223,17 @@
<div class="product_code">
&nbsp; {{ t('ecomm.codice') }}: {{ myproduct.productInfo.code }}
</div>
<div v-if="myproduct.productInfo.subcatprods && myproduct.productInfo.subcatprods.length > 0" class="subcat">
<span style="color: #333333;">{{ t('ecomm.subcat') }}:</span> <span class="subcat_color">{{ myproduct.productInfo.subcatprods[0].name }}</span>
<div
v-if="
myproduct.productInfo.subcatprods &&
myproduct.productInfo.subcatprods.length > 0
"
class="subcat"
>
<span style="color: #333333">{{ t('ecomm.subcat') }}:</span>
<span class="subcat_color">{{
myproduct.productInfo.subcatprods[0].name
}}</span>
</div>
</div>
</q-card-section>
@@ -302,9 +317,7 @@
</div>
</div>
</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 class="text-grey text-title row items-center q-mt-sm">
<q-icon name="map" class="q-mr-xs" />
@@ -349,12 +362,53 @@
:type="costanti.FieldType.string"
>
</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-section>
</q-item>
</q-card-section>
<q-card-section
v-if="
editOn &&
(!!myproduct.productInfo.imagefile || myproduct.productInfo.imagefile === '')
"
>
<div class="text-center">
<div class="col">
<strong>Scegli l'Immagine:</strong>
</div>
<div class="row justify-center">
<CMyValueDb
v-if="editOn"
:editOn="editOn"
:title="t('products.imagefile')"
table="productinfos"
:id="myproduct.productInfo._id"
:rec="myproduct.productInfo"
mykey="imagefile"
debounce="1000"
:save="updateproductmodif()"
:type="costanti.FieldType.image"
>
</CMyValueDb>
</div>
{{ myproduct.productInfo.imagefile }}
</div>
<!--<CMyFieldRec
title="Immagine:"
table="myelems"
:id="myproduct.productInfo._id"
:rec="myproduct.productInfo"
field="imagefile"
@update:model-value="modifElem"
:canEdit="true"
:canModify="true"
:fieldtype="costanti.FieldType.image"
>
</CMyFieldRec>-->
</q-card-section>
<q-card-section v-if="isOrdGas()">
<q-item
v-if="
@@ -367,6 +421,7 @@
:clickable="tools.isManager()"
@click="
tools.isManager() &&
!editOn &&
myproduct.QuantitaPrenotateInAttesa &&
myproduct.QuantitaPrenotateInAttesa > 0
? visuListBookable()
@@ -511,7 +566,8 @@
<q-item-label class="subtit_prod text-blue text-bold">
<span v-if="getpercqtaraggiunta() >= 1">{{
t('ecomm.offerta_gas_raggiunta', {
qta: myproduct.qtyToReachForGas * myproduct.productInfo.weight,
qta:
myproduct.qtyToReachForGas * myproduct.productInfo.weight,
unit: tools.getUnitsMeasure(
myproduct.productInfo.unit,
true,
@@ -521,7 +577,8 @@
}}</span>
<span v-else>{{
t('ecomm.offerta_gas', {
qta: myproduct.qtyToReachForGas * myproduct.productInfo.weight,
qta:
myproduct.qtyToReachForGas * myproduct.productInfo.weight,
unit: tools.getUnitsMeasure(
myproduct.productInfo.unit,
true,
@@ -562,8 +619,12 @@
<span class="prod_disp">
{{
t('ecomm.bookedGASQtyOrdered_str', {
qta: (myproduct.bookableGASBloccatiQty + myproduct.QuantitaPrenotateInAttesa) * myproduct.productInfo.weight,
qtatot: myproduct.qtyToReachForGas * myproduct.productInfo.weight,
qta:
(myproduct.bookableGASBloccatiQty +
myproduct.QuantitaPrenotateInAttesa) *
myproduct.productInfo.weight,
qtatot:
myproduct.qtyToReachForGas * myproduct.productInfo.weight,
})
}}
<q-linear-progress size="10px" :value="getpercqtaraggiunta()" />
@@ -643,7 +704,7 @@
</q-item-label>
</q-item-section>
</q-item>
<q-item
v-if="
myproduct.gasordine &&
@@ -923,8 +984,11 @@
</q-dialog>
<q-dialog
v-if="true &&
myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda
v-if="
true &&
myproduct &&
myproduct.productInfo &&
myproduct.productInfo.link_scheda
"
v-model="apriSchedaPDF"
maximized
@@ -958,8 +1022,11 @@
</q-dialog>
<q-dialog
v-if="false &&
myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda
v-if="
false &&
myproduct &&
myproduct.productInfo &&
myproduct.productInfo.link_scheda
"
v-model="apriSchedaPDF"
fullscreen
@@ -980,7 +1047,7 @@
<q-card-section>
<vue-pdf-app
:pdf="myproduct.productInfo.link_scheda"
style="height: 100vh;"
style="height: 100vh"
></vue-pdf-app>
</q-card-section>
</q-dialog>
@@ -998,7 +1065,11 @@
@click="toggleFullScreen"
>
<q-img
:src="myproduct.productInfo.img ? `` + myproduct.productInfo.img : myproduct.productInfo.image_link"
:src="
myproduct.productInfo.imagefile
? tools.getFullFileNameByImageFile(myproduct.productInfo.imagefile, 'productInfos')
: myproduct.productInfo.image_link
"
:alt="myproduct.productInfo.name"
:fit="tools.isMobile() ? 'fill' : 'cover'"
class="fullscreen-image"