This commit is contained in:
Paolo Arena
2021-01-18 00:48:53 +01:00
parent 9828f4818a
commit d02044ae17
49 changed files with 1318 additions and 142 deletions

View File

@@ -1,50 +1,49 @@
<template>
<q-card class="my-card">
<img :src="`statics/` + product.img" :alt="product.name">
<q-card :class="getmycardcl" v-if="!!myproduct">
<img :src="`statics/` + myproduct.img" :alt="myproduct.name">
<q-card-section>
<q-btn
v-if="!complete"
fab
color="primary"
icon="fas fa-info"
class="absolute"
style="top: 0; right: 12px; transform: translateY(-50%);"
@click="infoproduct"
:to="`/product/`+ myproduct.code"
/>
<div class="row items-center">
<div class="text-h7">
{{ product.name }}
<div class="row items-center centeritems">
<div class="text-h7 boldhigh">
{{ myproduct.name }}
</div>
</div>
<div class="row items-center">
<div v-if="complete" class="row items-center">
<div class="text-title text-grey-9">
<span class="text-grey-7">{{ product.description }}</span>
<span class="text-grey-7">{{ myproduct.description }}</span>
</div>
</div>
<div>
<div>
<div v-if="complete">
<div class="text-grey text-title row items-center q-mt-sm">
<q-icon name="map" class="q-mr-xs"/>
Origine: <span class="text-blue q-ml-xs text-h8"> {{ product.producer.city }} ({{
product.producer.region
Origine: <span class="text-blue q-ml-xs text-h8"> {{ myproduct.producer.city }} ({{
myproduct.producer.region
}})</span>
</div>
</div>
<div class="text-grey text-title row items-center">
<div v-if="complete" class="text-grey text-title row items-center">
<q-icon name="place" class="q-mr-xs"/>
Produttore: <span class="text-black q-ml-xs text-h8"> {{ product.producer.name }}</span>
Produttore: <span class="text-black q-ml-xs text-h8"> {{ myproduct.producer.name }}</span>
</div>
</div>
<!--<q-rating v-model="product.stars" :max="5" size="32px" readonly/>-->
</q-card-section>
<!--<q-rating v-model="myproduct.stars" :max="5" size="32px" readonly/>-->
<q-card-section class="q-pt-none">
<div class="row q-mb-sm no-wrap items-center centeritems">
<div class="text-price q-mr-md no-wrap">
{{ product.price.toFixed(2) }}
<div class="text-price no-wrap">
{{ myproduct.price.toFixed(2) }}
</div>
</div>
<div class="row q-mb-sm no-wrap items-center centeritems">
@@ -56,21 +55,23 @@
</q-field>
<q-btn round size="xs" text-color="grey" icon="fas fa-plus" @click="addqty"></q-btn>
</div>
<div class="text-blue text-title row items-center q-mr-md centeritems">
<q-icon size="sm" name="fas fa-shipping-fast" class="q-mr-sm"/>
Ritiro presso:
</div>
<div class="text-green-6 text-title row items-center q-my-sm centeritems">
<div v-if="getnumstore() > 1">
<q-select
outlined v-model="order.idStorehouse"
:options="getStorehouses()"
label="Magazzino:" emit-value map-options>
</q-select>
<div v-if="complete || getnumstore() > 1">
<div class="text-blue text-title row items-center q-mr-md centeritems">
<q-icon size="sm" name="fas fa-shipping-fast" class="q-mr-sm"/>
Ritiro presso:
</div>
<div v-else>
<span class="text-title text-center">{{ getSingleStorehouse() }}</span>
<div class="text-green-6 text-title row items-center q-my-sm centeritems">
<div v-if="getnumstore() > 1">
<q-select
outlined v-model="order.idStorehouse"
:options="getStorehouses()"
label="Magazzino:" emit-value map-options>
</q-select>
</div>
<div v-else>
<span class="text-title text-center">{{ getSingleStorehouse() }}</span>
</div>
</div>
</div>
</q-card-section>
@@ -78,9 +79,10 @@
<q-separator/>
<q-card-actions vertical align="center">
<q-btn icon="fas fa-cart-plus" color="primary" :disable="checkifCartDisable" rounded size="md" label="Aggiungi al Carrello" @click="addtoCart">
<q-btn icon="fas fa-cart-plus" color="primary" :disable="checkifCartDisable" rounded size="md"
label="Aggiungi al Carrello" @click="addtoCart">
</q-btn>
<q-btn :icon="iconWhishlist(product)" flat color="primary" rounded label="Lista Desideri">
<q-btn :icon="iconWhishlist(myproduct)" flat color="primary" rounded label="Lista Desideri">
</q-btn>
</q-card-actions>
</q-card>