lista ordini aggiornata
This commit is contained in:
@@ -43,6 +43,8 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
const products = useProducts()
|
||||
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
const myorder = reactive(<IOrder>{
|
||||
idapp: process.env.APP_ID,
|
||||
quantity: 0,
|
||||
@@ -214,7 +216,12 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function enableAddQty() {
|
||||
return getQtyAvailable() > 0
|
||||
if (site.value.ecomm!.enablePreOrders) {
|
||||
return true
|
||||
} else {
|
||||
return getQtyAvailable() > 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onMounted(load)
|
||||
@@ -244,6 +251,7 @@ export default defineComponent({
|
||||
arrordersCart,
|
||||
endload,
|
||||
shared_consts,
|
||||
site,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -97,18 +97,31 @@
|
||||
@click="tools.isManager() ? (openlistorders = true) : null"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="green" name="fas fa-store" />
|
||||
<q-icon
|
||||
:color="getQtyAvailable() >= 0 ? 'green' : 'blue'"
|
||||
:name="getQtyAvailable() >= 0 ? 'fas fa-store' : 'fas fa-edit'"
|
||||
/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
{{ t('ecomm.available') }}
|
||||
<span v-if="getQtyAvailable() < 0">
|
||||
{{ t('ecomm.preorders') }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ t('ecomm.available') }}
|
||||
</span>
|
||||
</q-item-label>
|
||||
<q-item-label>
|
||||
<span class="prod_disp">
|
||||
{{ getQtyAvailable() }}
|
||||
<span v-if="getQtyAvailable() < 0">
|
||||
{{ -getQtyAvailable() }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ getQtyAvailable() }}
|
||||
</span>
|
||||
</span>
|
||||
<span class="prod_qtywarn">
|
||||
<div class="prod_qtywarn">
|
||||
{{ getQtyWarn() }}
|
||||
|
||||
<div
|
||||
@@ -116,10 +129,10 @@
|
||||
tools.isManager() && myproduct.QuantitaOrdinateInAttesa > 0
|
||||
"
|
||||
>
|
||||
Quantita Ordinate In Attesa :
|
||||
{{ myproduct.QuantitaOrdinateInAttesa }}
|
||||
{{ $t('ecomm.qta_in_attesa', {qty: myproduct.QuantitaOrdinateInAttesa }) }}
|
||||
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</q-item-label>
|
||||
<q-item-label> </q-item-label>
|
||||
</q-item-section>
|
||||
@@ -245,9 +258,9 @@
|
||||
>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong
|
||||
>{{ shared_consts.getStatusStr(ordcart.status) }}</strong
|
||||
>
|
||||
<strong>{{
|
||||
shared_consts.getStatusStr(ordcart.status)
|
||||
}}</strong>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div v-for="(singleord, index) in ordcart.items" :key="index">
|
||||
|
||||
Reference in New Issue
Block a user