fordert bestätigung zur stornierung an
This commit is contained in:
parent
df707f28bb
commit
37649abbbf
|
@ -1,9 +1,25 @@
|
|||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="checkValidate" max-width="290">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
Willst du wirklich??
|
||||
</v-card-title>
|
||||
<v-card-text v-if="stornoMessage">
|
||||
Willst du wirklich den Betrag {{(stornoMessage.amount/100).toFixed(2)}}€ von {{stornoMessage.user.firstname}}
|
||||
{{stornoMessage.user.lastname}} stornieren?
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer/>
|
||||
<v-btn text @click="cancelStorno">Abbrechen</v-btn>
|
||||
<v-btn text @click="acceptStorno">Stornieren</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialog" max-width="290">
|
||||
<v-card>
|
||||
<v-card-title class="headline"
|
||||
>Transaktion ist länger als 1 Minute her!</v-card-title
|
||||
>Transaktion ist länger als 1 Minute her!</v-card-title
|
||||
>
|
||||
<v-card-text>
|
||||
Da die Transaktion länger als 1 Minuter her ist, kann eine Stornierung
|
||||
|
@ -240,7 +256,9 @@ export default {
|
|||
menu: true,
|
||||
dialog: false,
|
||||
componentRenderer: 0,
|
||||
timer: ''
|
||||
timer: '',
|
||||
stornoMessage: null,
|
||||
checkValidate: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -298,14 +316,25 @@ export default {
|
|||
if (!message.error) {
|
||||
if (!this.under5minutes(message.date)) this.dialog = true
|
||||
else {
|
||||
this.commitStorno({
|
||||
username: message.user.username,
|
||||
amount: message.amount,
|
||||
date: message.date
|
||||
})
|
||||
this.checkValidate = true
|
||||
this.stornoMessage = message
|
||||
}
|
||||
}
|
||||
},
|
||||
acceptStorno() {
|
||||
this.commitStorno({
|
||||
username: this.stornoMessage.user.username,
|
||||
amount: this.stornoMessage.amount,
|
||||
date: this.stornoMessage.date
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.cancelStorno()
|
||||
}, 300)
|
||||
},
|
||||
cancelStorno() {
|
||||
this.stornoMessage = null
|
||||
this.checkValidate = null
|
||||
},
|
||||
createMessage(message) {
|
||||
var text = ''
|
||||
if (message.error) {
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
<template>
|
||||
<v-container>
|
||||
<v-dialog v-model="checkValidate" max-width="290">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
Willst du wirklich??
|
||||
</v-card-title>
|
||||
<v-card-text v-if="stornoMessage">
|
||||
Willst du wirklich den Betrag {{(stornoMessage.amount/100).toFixed(2)}}€ von {{stornoMessage.user.firstname}}
|
||||
{{stornoMessage.user.lastname}} stornieren?
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer/>
|
||||
<v-btn text @click="cancelStorno">Abbrechen</v-btn>
|
||||
<v-btn text @click="acceptStorno">Stornieren</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialog" max-width="290">
|
||||
<v-card>
|
||||
<v-card-title class="headline"
|
||||
|
@ -209,7 +225,9 @@ export default {
|
|||
componentRenderer: 0,
|
||||
timer: '',
|
||||
menuIcon: mdiMenu,
|
||||
close: mdiClose
|
||||
close: mdiClose,
|
||||
checkValidate: false,
|
||||
stornoMessage: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -238,13 +256,24 @@ export default {
|
|||
if (!message.error) {
|
||||
if (!this.under5minutes(message.date)) this.dialog = true
|
||||
else {
|
||||
this.commitStorno({
|
||||
amount: message.amount,
|
||||
date: message.date
|
||||
})
|
||||
this.checkValidate = true
|
||||
this.stornoMessage = message
|
||||
}
|
||||
}
|
||||
},
|
||||
acceptStorno() {
|
||||
this.commitStorno({
|
||||
amount: this.stornoMessage.amount,
|
||||
date: this.stornoMessage.date
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.cancelStorno()
|
||||
}, 300)
|
||||
},
|
||||
cancelStorno() {
|
||||
this.stornoMessage = null
|
||||
this.checkValidate = null
|
||||
},
|
||||
addAmountMore() {
|
||||
this.addAmount(Math.abs(this.value * 100))
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in New Issue