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