mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
merge master
This commit is contained in:
parent
fb0a850057
commit
da1cb4e7b6
@ -16,7 +16,8 @@ export const store = new Vuex.Store({
|
||||
user : {
|
||||
name:"",
|
||||
email:"",
|
||||
sessionID: 0
|
||||
sessionID: 0,
|
||||
balance: 0
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
@ -30,7 +31,7 @@ export const store = new Vuex.Store({
|
||||
//console.log("logon TEST =>", logindata )
|
||||
axios.post("http://localhost/login_api/unsecureLogin", logindata).then((ldata) => {
|
||||
|
||||
//console.log("Im Store LOGIN() axios then.statusText ", ldata.statusText);
|
||||
console.log("Im Store LOGIN() axios then.statusText ", ldata);
|
||||
if (ldata.statusText === "OK") {
|
||||
//console.log("STORE login() ldatasession_id", ldata.data.session_id)
|
||||
state.is_auth = true
|
||||
@ -41,7 +42,7 @@ export const store = new Vuex.Store({
|
||||
$cookies.set('gdd_session_id', ldata.data.session_id);
|
||||
$cookies.set('gdd_email',logindata.email);
|
||||
console.log("cookie ? GRADIDO_LOGIN", $cookies.get('GRADIDO_LOGIN'))
|
||||
|
||||
//this.$store.commit('accountBalance')
|
||||
//console.log("STORE login() to " + state.is_auth)
|
||||
router.push('/KontoOverview')
|
||||
|
||||
@ -101,12 +102,13 @@ export const store = new Vuex.Store({
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
accountBalance1(state) {
|
||||
console.log("accountBalance1 => START")
|
||||
accountBalance(state) {
|
||||
console.log(" => START")
|
||||
state.url = "http://localhost/state-balances/ajaxGetBalance/"+ state.user.sessionID
|
||||
console.log(state.url)
|
||||
axios.get(state.url).then((req) => {
|
||||
console.log("accountBalance => ", req)
|
||||
console.log("accountBalance => ", req.data.balance)
|
||||
state.user.balance = req.data.balance
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
@ -31,12 +31,18 @@
|
||||
</div>
|
||||
</base-header>
|
||||
<div @click="$store.commit('accountBalance0')">this.$store.commit('accountBalance0')</div>
|
||||
<div @click="$store.commit('accountBalance1')">this.$store.commit('accountBalance1')</div>
|
||||
<div @click="$store.commit('accountBalance')">this.$store.commit('accountBalance')</div>
|
||||
<hr>
|
||||
<h3>User Data</h3>
|
||||
<small>/public/json-example/userdata.json</small>
|
||||
<h3>User Balanace</h3>
|
||||
<small>this.$store.state.user.balance</small>
|
||||
<p>
|
||||
{{userdata}}
|
||||
{{this.$store.state.user}}
|
||||
</p>
|
||||
<hr>
|
||||
<h3>User Balanace</h3>
|
||||
<small>this.$store.state.user.balance</small>
|
||||
<p>
|
||||
{{this.$store.state.user.balance}}
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
@ -4,13 +4,12 @@
|
||||
<b-col xl="6" md="6">
|
||||
<stats-card :title="$t('site.overview.current_balance')"
|
||||
type="gradient-red"
|
||||
sub-title="3500,897 GDD"
|
||||
sub-title="balance_gdd"
|
||||
img="img/icons/gradido/my_gradido.png"
|
||||
class="mb-4">
|
||||
|
||||
{{ balance_gdd }} GDD
|
||||
<template slot="footer">
|
||||
<span class="text-success mr-2">+ 3.48%</span>
|
||||
<span class="text-nowrap">{{ $t('site.overview.since_last_month') }}</span>
|
||||
<span class="text-success mr-2">{{ balance_gtt }} GTT</span>
|
||||
</template>
|
||||
</stats-card>
|
||||
</b-col>
|
||||
@ -34,5 +33,11 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'GddStatus',
|
||||
data(){
|
||||
return {
|
||||
balance_gdd: this.$store.state.user.balance,
|
||||
balance_gtt: 2000,
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1 +1 @@
|
||||
Subproject commit 2a033c34e4657e84a4387ecfda1cd6102032e95e
|
||||
Subproject commit 9b9115290c8d2ead756d64b70ae63a6571aa4693
|
||||
Loading…
x
Reference in New Issue
Block a user