diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b4c26ef8e..a7658a130 100755 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -22,7 +22,7 @@ export default { this.$router.push('/KontoOverview') // } }else { - this.$router.push("/Landing") + this.$router.push("/Login") } //var user = { id:1, name:'Journal',session:'25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX' }; diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index c571acc30..1ce4875a1 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -11,17 +11,21 @@ const routes = [ redirect: 'landing', component: AuthLayoutGDD, children: [ - { - path: '/Landing', - name: 'Landing', - component: () => import(/* webpackChunkName: "demo" */ '../views/Landing.vue') - }, { path: '/login', name: 'login', component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Login.vue') }, - + { + path: '/Landing', + name: 'Landing', + component: () => import(/* webpackChunkName: "demo" */ '../views/Landing.vue') + }, + { + path: '/register', + name: 'register', + component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Register.vue') + }, ] }, { @@ -41,12 +45,7 @@ const routes = [ path: '/profile', name: 'profile', component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/UserProfile.vue') - }, - { - path: '/register', - name: 'register', - component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Register.vue') - }, + } ] }, , diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index 82a25c42c..902004594 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -18,6 +18,14 @@ export const store = new Vuex.Store({ email:"", sessionID: 0, balance: 0 + }, + ajaxCreateData: { + session_id : '', + email: "max.musterman@gmail.de", + amount: 10000000, + target_date:"2021-02-19T13:25:36+00:00", + memo:"AGE", + auto_sign: true } }, mutations: { @@ -68,7 +76,7 @@ export const store = new Vuex.Store({ console.log("Im Store creatUser() axios then ", ldata); // this.ldata = ldata.data; - return true + router.push('/Login') }, (error) => { console.log(error); @@ -88,16 +96,25 @@ export const store = new Vuex.Store({ $cookies.set('gdd_is_auth','false'); $cookies.remove('gdd_email'); $cookies.remove('gdd_session_id'); - router.push('/Landing') + router.push('/Login') }, (error) => { console.log(error); }); }, - accountBalance0(state) { - console.log("accountBalance0 => START") - axios.get("http://localhost/state-balances/ajaxGetBalance/739420303").then((req) => { - console.log("accountBalance => ", req) + ajaxCreate(state){ + state.ajaxCreateData.session_id = state.user.sessionID + console.log(" state.ajaxCreateData => ", state.ajaxCreateData) + axios.post(" http://localhost/transaction-creations/ajaxCreate/", state.ajaxCreateData).then((req) => { + console.log("ajaxCreate => ", req) + }, (error) => { + console.log(error); + }); + }, + ajaxListTransactions(state) { + console.log("ajaxListTransactions => START") + axios.get("http://localhost/state-balances/ajaxListTransactions/"+ state.user.sessionID).then((req) => { + console.log("ajaxListTransactions => ", req) }, (error) => { console.log(error); }); diff --git a/frontend/src/views/KontoOverview.vue b/frontend/src/views/KontoOverview.vue index 8ad94fe3a..6b7e2ded9 100644 --- a/frontend/src/views/KontoOverview.vue +++ b/frontend/src/views/KontoOverview.vue @@ -30,7 +30,8 @@ -
Du bist die Community
+Werde teil der Community
...
+