- edit campi prodotti
- edit ordini
This commit is contained in:
@@ -87,9 +87,19 @@
|
||||
class="text-black q-ml-xs text-h8"
|
||||
v-if="myproduct.productInfo.unit"
|
||||
>
|
||||
{{ tools.getWeightByUnit(myproduct.productInfo.unit, true, myproduct.productInfo.weight) }}
|
||||
{{
|
||||
tools.getUnitsMeasure(myproduct.productInfo.unit, true, myproduct.productInfo.weight)
|
||||
tools.getWeightByUnit(
|
||||
myproduct.productInfo.unit,
|
||||
true,
|
||||
myproduct.productInfo.weight
|
||||
)
|
||||
}}
|
||||
{{
|
||||
tools.getUnitsMeasure(
|
||||
myproduct.productInfo.unit,
|
||||
true,
|
||||
myproduct.productInfo.weight
|
||||
)
|
||||
}}</span
|
||||
>
|
||||
</q-item-label>
|
||||
@@ -270,7 +280,7 @@
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section v-if="myproduct.note">
|
||||
<q-card-section v-if="myproduct.note" class="q-pa-none">
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="black" name="fas fa-book" />
|
||||
@@ -429,13 +439,21 @@
|
||||
<span v-if="getpercqtaraggiunta() >= 1">{{
|
||||
t('ecomm.offerta_gas_raggiunta', {
|
||||
qta: myproduct.qtyToReachForGas,
|
||||
unit: tools.getUnitsMeasure(myproduct.productInfo.unit, true, myproduct.productInfo.weight),
|
||||
unit: tools.getUnitsMeasure(
|
||||
myproduct.productInfo.unit,
|
||||
true,
|
||||
myproduct.productInfo.weight
|
||||
),
|
||||
})
|
||||
}}</span>
|
||||
<span v-else>{{
|
||||
t('ecomm.offerta_gas', {
|
||||
qta: myproduct.qtyToReachForGas,
|
||||
unit: tools.getUnitsMeasure(myproduct.productInfo.unit, true, myproduct.productInfo.weight),
|
||||
unit: tools.getUnitsMeasure(
|
||||
myproduct.productInfo.unit,
|
||||
true,
|
||||
myproduct.productInfo.weight
|
||||
),
|
||||
})
|
||||
}}</span>
|
||||
</q-item-label>
|
||||
@@ -496,16 +514,35 @@
|
||||
<q-icon color="blue" name="fas fa-hourglass-half" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-section v-if="!!recgasordineSelected.dataora_chiusura_ordini">
|
||||
<q-item-label class="subtit_prod">
|
||||
{{ t('gas.dataora_chiusura_ordini') }}
|
||||
</q-item-label>
|
||||
<q-item-label class="countdown_scadenza">
|
||||
{{ timerLabelScadenza }}
|
||||
<span v-if="timerLabelScadenza">{{ timerLabelScadenza }}</span>
|
||||
<span v-else-if="isOrdineChiuso()">{{
|
||||
t('ecomm.ordine_scaduto', {
|
||||
date: tools.getstrshortDateTime(
|
||||
recgasordineSelected.dataora_chiusura_ordini
|
||||
),
|
||||
})
|
||||
}}</span>
|
||||
<CMyValueDb
|
||||
v-if="editOn"
|
||||
:title="t('gas.dataora_chiusura_ordini')"
|
||||
table="gasordines"
|
||||
:id="recgasordineSelected._id"
|
||||
:rec="recgasordineSelected"
|
||||
mykey="dataora_chiusura_ordini"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.date"
|
||||
>
|
||||
</CMyValueDb>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="labelDataArrivoMerce">
|
||||
<q-item v-if="labelDataArrivoMerce || editOn">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="red" name="fas fa-shipping-fast" />
|
||||
</q-item-section>
|
||||
@@ -515,11 +552,25 @@
|
||||
{{ t('gas.data_arrivo_merce') }}
|
||||
</q-item-label>
|
||||
<q-item-label class="countdown_scadenza">
|
||||
{{ labelDataArrivoMerce }}
|
||||
<CMyValueDb
|
||||
v-if="editOn"
|
||||
:title="t('gas.data_arrivo_merce')"
|
||||
table="gasordines"
|
||||
:id="recgasordineSelected._id"
|
||||
:rec="recgasordineSelected"
|
||||
mykey="data_arrivo_merce"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.date"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<div v-else>
|
||||
{{ labelDataArrivoMerce }}
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="labelDataRitiro">
|
||||
<q-item v-if="labelDataRitiro || editOn">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="green" name="fas fa-people-carry" />
|
||||
</q-item-section>
|
||||
@@ -529,7 +580,21 @@
|
||||
{{ t('gas.dataora_ritiro') }}
|
||||
</q-item-label>
|
||||
<q-item-label class="countdown_scadenza">
|
||||
{{ labelDataRitiro }}
|
||||
<CMyValueDb
|
||||
v-if="editOn"
|
||||
:title="t('gas.dataora_ritiro')"
|
||||
table="gasordines"
|
||||
:id="recgasordineSelected._id"
|
||||
:rec="recgasordineSelected"
|
||||
mykey="dataora_ritiro"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.date"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<div v-else>
|
||||
{{ labelDataRitiro }}
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
@@ -563,6 +628,122 @@
|
||||
<div class="no-outline label-qta text-center" tabindex="0">
|
||||
{{ myorder.quantity + myorder.quantitypreordered }}
|
||||
</div>
|
||||
<div v-if="editOn">
|
||||
<CMyValueDb
|
||||
:title="t('products.note')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="note"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.string"
|
||||
>
|
||||
</CMyValueDb>
|
||||
|
||||
<div v-if="!isOrdGas()">
|
||||
<CMyValueDb
|
||||
:title="t('products.stockQty')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="stockQty"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<CMyValueDb
|
||||
:title="t('products.stockBloccatiQty')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="stockBloccatiQty"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<CMyValueDb
|
||||
:title="t('products.bookedQtyOrdered')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="bookedQtyOrdered"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<CMyValueDb
|
||||
:title="t('products.bookedQtyConfirmed')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="bookedQtyConfirmed"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
</div>
|
||||
<q-separator> </q-separator>
|
||||
<div v-if="isOrdGas()">
|
||||
<CMyValueDb
|
||||
:title="t('products.maxbookableGASQty')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="maxbookableGASQty"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<CMyValueDb
|
||||
:title="t('products.bookableGASBloccatiQty')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="bookableGASBloccatiQty"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<CMyValueDb
|
||||
:title="t('ecomm.bookedGASQtyOrdered')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="bookedGASQtyOrdered"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
<CMyValueDb
|
||||
:title="t('products.bookedGASQtyConfirmed')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="bookedGASQtyConfirmed"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
rounded
|
||||
icon="fas fa-sync-alt"
|
||||
color="primary"
|
||||
:label="t('ecomm.ricarica')"
|
||||
@click="ricarica()"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-field>
|
||||
|
||||
@@ -597,6 +778,26 @@
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-toggle
|
||||
v-if="tools.isManager()"
|
||||
v-model="editOn"
|
||||
color="green"
|
||||
icon="fas fa-pencil-alt"
|
||||
dense
|
||||
>
|
||||
</q-toggle>
|
||||
<CMyValueDb
|
||||
v-if="editOn"
|
||||
:title="t('ecomm.active')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="active"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.boolean"
|
||||
>
|
||||
</CMyValueDb>
|
||||
</q-card>
|
||||
|
||||
<q-dialog v-model="openlistorders">
|
||||
|
||||
Reference in New Issue
Block a user