mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
send-gdd-sendmessage-step-one
This commit is contained in:
parent
eb7539d0ba
commit
053193dea2
@ -22,7 +22,7 @@ export const store = new Vuex.Store({
|
||||
session_id : '',
|
||||
email: "",
|
||||
amount: 0,
|
||||
target_date:"2021-02-19T13:25:36+00:00",
|
||||
target_date:"",
|
||||
memo:"",
|
||||
auto_sign: true
|
||||
},
|
||||
@ -137,24 +137,28 @@ export const store = new Vuex.Store({
|
||||
},
|
||||
ajaxCreate: async ({ dispatch, state }) => {
|
||||
//console.log('action: ajaxCreate')
|
||||
state.ajaxCreateData.amount = (state.ajaxCreateData.amount)*10000
|
||||
const result = await communityAPI.create($cookies.get("gdd_session_id", email, amount, memo))
|
||||
console.log(result)
|
||||
|
||||
state.ajaxCreateData.amount = (state.ajaxCreateData.amount)*10000
|
||||
|
||||
const result = await communityAPI.create(state.session_id, state.ajaxCreateData.email, state.ajaxCreateData.amount, state.ajaxCreateData.memo)
|
||||
|
||||
return result
|
||||
//console.log(result)
|
||||
},
|
||||
ajaxListTransactions: async ({commit, dispatch, state}) => {
|
||||
// console.log('action: ajaxListTransactions', state.session_id)
|
||||
// const result = await communityAPI.transactions(state.session_id)
|
||||
},
|
||||
accountBalance: async ({ commit, dispatch, state }) => {
|
||||
console.log('action: accountBalance')
|
||||
//console.log('action: accountBalance')
|
||||
// console.log('action: dispatch', dispatch)
|
||||
// console.log('action: state.session_id', state.session_id)
|
||||
// console.log(" action: $cookies.get('gdd_session_id') ", $cookies.get("gdd_session_id") )
|
||||
// commit('session_id', $cookies.get("gdd_session_id"))
|
||||
// commit('email', $cookies.get("gdd_u"))
|
||||
const result = await communityAPI.balance($cookies.get("gdd_session_id"))
|
||||
console.log("accountBalance result", result)
|
||||
console.log("aresult.result.data.balance", result.result.data.balance)
|
||||
//console.log("accountBalance result", result)
|
||||
//console.log("aresult.result.data.balance", result.result.data.balance)
|
||||
if(result.success) {
|
||||
commit('user_balance', result.result.data.balance)
|
||||
} else {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-row>
|
||||
<b-col xl="12" md="12">
|
||||
<b-row v-show="row_form">
|
||||
<b-col xl="12" md="12" >
|
||||
|
||||
<b-alert variant="warning" show dismissible >
|
||||
<strong>Achtung!</strong> Bitte überprüfe alle deine Eingaben sehr genau. Du bist alleine Verantwortlich für deine Entscheidungen. Versendete Gradidos können nicht wieder zurück geholt werden.
|
||||
@ -126,6 +126,46 @@
|
||||
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row v-show="row_thx">
|
||||
<b-col>
|
||||
<div class="display-1 p-4">
|
||||
Danke <hr>
|
||||
Deine Zahlung wurde erfolgreich versendet.</div>
|
||||
|
||||
<b-button variant="success" @click="onReset">schließen</b-button>
|
||||
<hr>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row v-show="row_check">
|
||||
<b-col >
|
||||
<div class="display-4 p-4">
|
||||
|
||||
Bestätige dein Zahlung. Prüfe bitte nochmal alle Daten!</div>
|
||||
|
||||
<b-list-group>
|
||||
<b-list-group-item href="javascript:;" active>Meine Zahlung</b-list-group-item>
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ $store.state.ajaxCreateData.email}}
|
||||
<b-badge variant="primary" pill>Empfänger</b-badge>
|
||||
</b-list-group-item>
|
||||
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ ($store.state.ajaxCreateData.amount)}} GDD
|
||||
<b-badge variant="primary" pill>Betrag</b-badge>
|
||||
</b-list-group-item>
|
||||
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ $store.state.ajaxCreateData.memo}}
|
||||
<b-badge variant="primary" pill>Nachricht</b-badge>
|
||||
</b-list-group-item>
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ $moment($store.state.ajaxCreateData.target_date).format("DD.MM.YYYY - HH:mm:ss")}}
|
||||
<b-badge variant="primary" pill>Datum</b-badge>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
<b-button variant="success" @click="sendTransaction">jetzt versenden</b-button>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -151,12 +191,15 @@ export default {
|
||||
amount: '',
|
||||
memo:''
|
||||
},
|
||||
sent: false,
|
||||
send: false,
|
||||
row_form: true,
|
||||
row_check: false,
|
||||
row_thx: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sendbutton(){
|
||||
this.sent = true
|
||||
this.send = true
|
||||
},
|
||||
async onDecode (decodedString) {
|
||||
console.log('onDecode JSON.parse(decodedString)',JSON.parse(decodedString) )
|
||||
@ -191,7 +234,18 @@ export default {
|
||||
this.$store.state.ajaxCreateData.memo = this.form.memo
|
||||
this.$store.state.ajaxCreateData.target_date = Date.now()
|
||||
|
||||
this.$store.dispatch('ajaxCreate')
|
||||
this.row_form = false
|
||||
this.row_check = true
|
||||
this.row_thx = false
|
||||
|
||||
|
||||
console.log(ref)
|
||||
},
|
||||
sendTransaction() {
|
||||
this.$store.dispatch('ajaxCreate')
|
||||
this.row_form = false
|
||||
this.row_check = false
|
||||
this.row_thx = true
|
||||
},
|
||||
onReset(event) {
|
||||
event.preventDefault()
|
||||
@ -201,6 +255,9 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.show = true
|
||||
})
|
||||
this.row_form = true
|
||||
this.row_check = false
|
||||
this.row_thx = false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user