aggio
This commit is contained in:
@@ -43,6 +43,8 @@ export default defineComponent({
|
|||||||
const myrec = ref(<any[string]>[])
|
const myrec = ref(<any[string]>[])
|
||||||
const oldrec = ref(<any[string]>[])
|
const oldrec = ref(<any[string]>[])
|
||||||
const note = ref('')
|
const note = ref('')
|
||||||
|
const note_per_gestore = ref('')
|
||||||
|
const note_per_admin = ref('')
|
||||||
const endload = ref(false)
|
const endload = ref(false)
|
||||||
const recOrderCart = ref(<IOrderCart>{})
|
const recOrderCart = ref(<IOrderCart>{})
|
||||||
|
|
||||||
@@ -86,7 +88,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function change_field(fieldname: string) {
|
function change_field(fieldname: string) {
|
||||||
if (myrec.value[fieldname] !== oldrec.value[fieldname]) {
|
if ((!oldrec.value.hasOwnProperty(fieldname)) || (myrec.value[fieldname] !== oldrec.value[fieldname])) {
|
||||||
myrec.value[fieldname] = oldrec.value[fieldname]
|
myrec.value[fieldname] = oldrec.value[fieldname]
|
||||||
|
|
||||||
const mydata = {
|
const mydata = {
|
||||||
@@ -129,6 +131,8 @@ export default defineComponent({
|
|||||||
if (recOrderCart.value) {
|
if (recOrderCart.value) {
|
||||||
oldrec.value = myrec.value
|
oldrec.value = myrec.value
|
||||||
note.value = recOrderCart.value.note!
|
note.value = recOrderCart.value.note!
|
||||||
|
note_per_gestore.value = recOrderCart.value.note_per_gestore!
|
||||||
|
note_per_admin.value = recOrderCart.value.note_per_admin!
|
||||||
}
|
}
|
||||||
allTotalPrice.value = recOrderCart.value.totalPrice
|
allTotalPrice.value = recOrderCart.value.totalPrice
|
||||||
endload.value = true
|
endload.value = true
|
||||||
@@ -254,6 +258,8 @@ export default defineComponent({
|
|||||||
changeTotalPrice,
|
changeTotalPrice,
|
||||||
updateTotalPrice,
|
updateTotalPrice,
|
||||||
myTotalPriceCalc,
|
myTotalPriceCalc,
|
||||||
|
note_per_gestore,
|
||||||
|
note_per_admin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -54,20 +54,21 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 q-mr-sm" style="text-align: right">
|
<div class="col-6 q-mr-sm" style="text-align: right">
|
||||||
<span class="text-grey q-mr-xs">{{ t('ecomm.totale') }}:</span>
|
|
||||||
<span class="text-subtitle1 q-mr-sm">€ {{ myTotalPrice() }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<q-input
|
<q-input
|
||||||
v-if="editOn && getNumItems() > 0"
|
v-if="editOn && getNumItems() > 0"
|
||||||
v-model="allTotalPrice"
|
v-model="allTotalPrice"
|
||||||
:label="t('ecomm.totalPrice')"
|
:label="t('ecomm.totalPrice')"
|
||||||
filled
|
filled
|
||||||
dense
|
dense
|
||||||
|
style="width: 150px;"
|
||||||
debounce="1000"
|
debounce="1000"
|
||||||
@change="changeTotalPrice"
|
@change="changeTotalPrice"
|
||||||
>
|
>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
<span class="text-grey q-mr-xs">{{ t('ecomm.totale') }}:</span>
|
||||||
|
<span class="text-subtitle1 q-mr-sm">€ {{ myTotalPrice() }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="editOn"
|
v-if="editOn"
|
||||||
outline
|
outline
|
||||||
@@ -82,7 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
v-if="tools.isManager() && getNumItems() > 0"
|
v-if="editOn && tools.isManager() && getNumItems() > 0"
|
||||||
v-model="note"
|
v-model="note"
|
||||||
style="max-width: 400px"
|
style="max-width: 400px"
|
||||||
:label="t('ecomm.note')"
|
:label="t('ecomm.note')"
|
||||||
@@ -94,6 +95,31 @@
|
|||||||
>
|
>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-label v-else> Note: {{ note }} </q-label>
|
<q-label v-else> Note: {{ note }} </q-label>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
v-if="editOn && tools.isManager() && getNumItems() > 0"
|
||||||
|
v-model="note_per_gestore"
|
||||||
|
style="max-width: 400px"
|
||||||
|
:label="t('ecomm.note_per_gestore')"
|
||||||
|
filled
|
||||||
|
dense
|
||||||
|
debounce="1000"
|
||||||
|
autogrow
|
||||||
|
@input="change_field('note_per_gestore')"
|
||||||
|
>
|
||||||
|
</q-input>
|
||||||
|
<q-input
|
||||||
|
v-if="editOn && tools.isAdmin() && getNumItems() > 0"
|
||||||
|
v-model="note_per_admin"
|
||||||
|
style="max-width: 400px"
|
||||||
|
:label="t('ecomm.note_per_admin')"
|
||||||
|
filled
|
||||||
|
dense
|
||||||
|
debounce="1000"
|
||||||
|
autogrow
|
||||||
|
@input="change_field('note_per_admin')"
|
||||||
|
>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1714,11 +1714,14 @@ const msg_it = {
|
|||||||
offerta_gas: 'Offerta valida al raggiungimento di {qta} {unit}',
|
offerta_gas: 'Offerta valida al raggiungimento di {qta} {unit}',
|
||||||
offerta_gas_raggiunta: 'Complimenti! Gli ordini hanno superato il minimo quantitativo di {qta} {unit}',
|
offerta_gas_raggiunta: 'Complimenti! Gli ordini hanno superato il minimo quantitativo di {qta} {unit}',
|
||||||
note: 'Note',
|
note: 'Note',
|
||||||
|
note_per_gestore: 'Note per il Gestore',
|
||||||
|
note_per_admin: 'Note per l\'Admin',
|
||||||
apriordine: 'Vedi Ordine',
|
apriordine: 'Vedi Ordine',
|
||||||
ordine_scaduto: 'l\'Ordine è Chiuso !',
|
ordine_scaduto: 'l\'Ordine è Chiuso !',
|
||||||
ricarica: 'Ricarica',
|
ricarica: 'Ricarica',
|
||||||
active: 'Prodotto Acquistabile',
|
active: 'Prodotto Acquistabile',
|
||||||
not_active: 'Prodotto Non Acquistabile',
|
not_active: 'Prodotto Non Acquistabile',
|
||||||
|
totalPrice: 'Totale',
|
||||||
},
|
},
|
||||||
gas: {
|
gas: {
|
||||||
name: 'Ordine Gas',
|
name: 'Ordine Gas',
|
||||||
|
|||||||
Reference in New Issue
Block a user