From 4a05fe5dcf54ed1f9754b67e926a4a8a93d7ff5b Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 26 Mar 2021 09:14:36 +0100 Subject: [PATCH 1/5] bug fix, store.tate.email not null --- frontend/src/store/store.js | 10 ++++++++-- frontend/src/views/KontoOverview/GddAddWork2.vue | 4 ++-- frontend/src/views/KontoOverview/GddSend.vue | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index 01cc6ff10..87029b35b 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -8,7 +8,7 @@ import communityAPI from '../apis/communityAPI' export const store = new Vuex.Store({ state: { session_id: null, - email: null, + email: '', language: 'en', sizeDE: 'normal', sizeGB: 'big', @@ -153,9 +153,15 @@ export const store = new Vuex.Store({ state.ajaxCreateData.amount, state.ajaxCreateData.memo, ) + console.log(result) + if (result.success) { + console.log('send success') + } else { + console.log('send error') + } return result - //console.log(result) + }, ajaxListTransactions: async ({ commit, dispatch, state }) => { // console.log('action: ajaxListTransactions', state.session_id) diff --git a/frontend/src/views/KontoOverview/GddAddWork2.vue b/frontend/src/views/KontoOverview/GddAddWork2.vue index 2e328cc9a..a7b8f77ad 100644 --- a/frontend/src/views/KontoOverview/GddAddWork2.vue +++ b/frontend/src/views/KontoOverview/GddAddWork2.vue @@ -9,7 +9,7 @@ type="number" size="lg" placeholder="23" - style="font-size: xx-large; padding-left: 20px" + style="font-size: xx-large; padding-left: 5px" /> @@ -17,7 +17,7 @@ class="form-control" v-model="date" :config="config" - style="font-size: x-large; padding-left: 20px" + style="font-size: 0.5em; padding-left: 5px" > diff --git a/frontend/src/views/KontoOverview/GddSend.vue b/frontend/src/views/KontoOverview/GddSend.vue index 7dc36efc7..5f8208366 100644 --- a/frontend/src/views/KontoOverview/GddSend.vue +++ b/frontend/src/views/KontoOverview/GddSend.vue @@ -226,7 +226,7 @@ export default { }, methods: { async onDecode(decodedString) { - //console.log('onDecode JSON.parse(decodedString)', JSON.parse(decodedString)) + console.log('onDecode JSON.parse(decodedString)', JSON.parse(decodedString)) const arr = JSON.parse(decodedString) //console.log('qr-email', arr[0].email) //console.log('qr-amount', arr[0].amount) From d18be8bcd2e397d0e62e160aa741fcf24952f9d4 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 30 Mar 2021 15:13:12 +0200 Subject: [PATCH 2/5] =?UTF-8?q?store=20aufger=C3=A4umt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.vue | 7 + frontend/src/routes/routes.js | 13 +- frontend/src/routes/starterRouter.js | 33 ---- frontend/src/store/store.js | 32 ---- frontend/src/views/GoogleMaps.vue | 169 ----------------- frontend/src/views/KontoOverview.vue | 47 ++--- frontend/src/views/KontoOverview/GddSend.vue | 82 ++++---- .../src/views/KontoOverview/GddStatus.vue | 5 +- frontend/src/views/KontoOverview/GddTable.vue | 5 +- frontend/src/views/Landing.vue | 178 ------------------ frontend/src/views/NotFoundPage.vue | 38 +--- frontend/src/views/RegularTables.vue | 115 ----------- 12 files changed, 97 insertions(+), 627 deletions(-) delete mode 100644 frontend/src/routes/starterRouter.js delete mode 100755 frontend/src/views/GoogleMaps.vue delete mode 100644 frontend/src/views/Landing.vue delete mode 100755 frontend/src/views/RegularTables.vue diff --git a/frontend/src/App.vue b/frontend/src/App.vue index e11e03d3d..f9cc4216f 100755 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -32,6 +32,13 @@ export default { components: { ParticlesBg, }, + data() { + return { + session_id: null, + email: '', + language: 'en', + } + }, created() { //console.log('xx', $cookies.get('gdd_lang')) //console.log('%cWillkommen bei Gradido %cgreen text', 'font-weight:bold', 'color: green') diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index 887c23655..ecb3e7bba 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -2,7 +2,7 @@ import DashboardLayout from '@/views/Layout/DashboardLayout.vue' import AuthLayoutGDD from '@/views/Layout/AuthLayout_gdd.vue' import AuthLayout from '@/views/Layout/AuthLayout.vue' -// import NotFound from '@/views/NotFoundPage.vue' +import NotFound from '@/views/NotFoundPage.vue' const routes = [ { @@ -31,6 +31,11 @@ const routes = [ name: 'Explorer', component: () => import('../views/Pages/Explorer.vue'), }, + { + path: '/icons', + name: 'Icons', + component: () => import('../views/Icons.vue'), + }, ], }, { @@ -63,10 +68,9 @@ const routes = [ }, ], }, - , { - path: '/', - redirect: 'AdminOverview', + path: '/admin', + redirect: 'admin', component: AuthLayout, children: [ { @@ -79,6 +83,7 @@ const routes = [ }, ], }, + { path: '*', component: NotFound }, ] export default routes diff --git a/frontend/src/routes/starterRouter.js b/frontend/src/routes/starterRouter.js deleted file mode 100644 index 15cf360a9..000000000 --- a/frontend/src/routes/starterRouter.js +++ /dev/null @@ -1,33 +0,0 @@ -import Vue from 'vue' -import Router from 'vue-router' -import DashboardLayout from '../views/Starter/SampleLayout.vue' -import Starter from '../views/Starter/SamplePage.vue' - -Vue.use(Router) - -export default new Router({ - routes: [ - { - path: '/', - name: 'home', - redirect: '/dashboard', - component: DashboardLayout, - children: [ - { - path: 'dashboard', - name: 'dashboard', - components: { default: Starter }, - }, - ], - }, - ], - scrollBehavior: (to, from, savedPosition) => { - if (savedPosition) { - return savedPosition - } - if (to.hash) { - return { selector: to.hash } - } - return { x: 0, y: 0 } - }, -}) diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index 4c5b190fa..cc65ad353 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -13,22 +13,11 @@ export const store = new Vuex.Store({ sizeDE: 'normal', sizeGB: 'big', loginfail: false, - row_form: true, - row_check: false, - row_thx: false, user: { name: '', balance: 0, balance_gdt: 0, }, - ajaxCreateData: { - session_id: '', - email: '', - amount: 0, - target_date: '', - memo: '', - auto_sign: true, - }, transactions: [], modals: false, optionAxios: { @@ -142,27 +131,6 @@ export const store = new Vuex.Store({ $cookies.remove('gdd_lang') router.push('/Login') }, - ajaxCreate: async ({ dispatch, state }) => { - //console.log('action: ajaxCreate') - - state.ajaxCreateData.amount = state.ajaxCreateData.amount * 10000 - - const result = await communityAPI.send( - state.session_id, - state.ajaxCreateData.email, - state.ajaxCreateData.amount, - state.ajaxCreateData.memo, - ) - console.log(result) - - if (result.success) { - console.log('send success') - } else { - console.log('send error') - } - return result - - }, ajaxListTransactions: async ({ commit, dispatch, state }) => { // console.log('action: ajaxListTransactions', state.session_id) // const result = await communityAPI.transactions(state.session_id) diff --git a/frontend/src/views/GoogleMaps.vue b/frontend/src/views/GoogleMaps.vue deleted file mode 100755 index 10302622d..000000000 --- a/frontend/src/views/GoogleMaps.vue +++ /dev/null @@ -1,169 +0,0 @@ - - diff --git a/frontend/src/views/KontoOverview.vue b/frontend/src/views/KontoOverview.vue index 91cfc88b6..e546b4f4e 100644 --- a/frontend/src/views/KontoOverview.vue +++ b/frontend/src/views/KontoOverview.vue @@ -2,25 +2,16 @@
- +
- +
- - - - +
@@ -28,21 +19,35 @@ import GddStatus from './KontoOverview/GddStatus.vue' import GddSend from './KontoOverview/GddSend.vue' import GddTable from './KontoOverview/GddTable.vue' -// import GddAddWork2 from './KontoOverview/GddAddWork2.vue'; -// import GddWorkTable from './KontoOverview/GddWorkTable.vue'; export default { name: 'Overview', + data() { + return { + row_form: true, + row_check: false, + row_thx: false, + transactions: [], + } + }, components: { GddStatus, GddSend, GddTable, - //GddAddWork2, - //GddWorkTable }, created() { this.$store.dispatch('accountBalance', $cookies.get('gdd_session_id')) }, + methods: { + setRows(rows) { + this.row_form = rows.row_form + this.row_check = rows.row_check + this.row_thx = rows.row_thx + }, + setTransactions(transactions) { + this.transactions = transactions + }, + }, } diff --git a/frontend/src/views/KontoOverview/GddSend.vue b/frontend/src/views/KontoOverview/GddSend.vue index 5f8208366..46cd106c9 100644 --- a/frontend/src/views/KontoOverview/GddSend.vue +++ b/frontend/src/views/KontoOverview/GddSend.vue @@ -1,6 +1,6 @@ diff --git a/frontend/src/views/RegularTables.vue b/frontend/src/views/RegularTables.vue deleted file mode 100755 index 69a493337..000000000 --- a/frontend/src/views/RegularTables.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - From 1c7a689621693a55dd4bf6dfab0889d16b0dc834 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 30 Mar 2021 15:13:47 +0200 Subject: [PATCH 3/5] fix lint --- frontend/src/views/KontoOverview.vue | 6 +++++- frontend/src/views/KontoOverview/GddSend.vue | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/views/KontoOverview.vue b/frontend/src/views/KontoOverview.vue index e546b4f4e..c4fd481ac 100644 --- a/frontend/src/views/KontoOverview.vue +++ b/frontend/src/views/KontoOverview.vue @@ -11,7 +11,11 @@ @change-rows="setRows" />
- + diff --git a/frontend/src/views/KontoOverview/GddSend.vue b/frontend/src/views/KontoOverview/GddSend.vue index 46cd106c9..17596ba17 100644 --- a/frontend/src/views/KontoOverview/GddSend.vue +++ b/frontend/src/views/KontoOverview/GddSend.vue @@ -226,8 +226,7 @@ export default { send: false, } }, - computed: { - }, + computed: {}, methods: { async onDecode(decodedString) { const arr = JSON.parse(decodedString) @@ -244,7 +243,7 @@ export default { this.$emit('change-rows', { row_form: false, row_check: true, row_thx: false }) }, - async sendTransaction() { + async sendTransaction() { this.ajaxCreateData.amount = this.ajaxCreateData.amount * 10000 const result = await communityAPI.send( @@ -261,7 +260,7 @@ export default { this.$emit('change-rows', { row_form: false, row_check: false, row_thx: true }) } else { // console.log('send error') - alert("error") + alert('error') this.$emit('change-rows', { row_form: true, row_check: false, row_thx: false }) } }, From d4f850d200d2811c58ffd05c74337b3b3b2c21b1 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 31 Mar 2021 08:08:02 +0200 Subject: [PATCH 4/5] elender murks --- frontend/DEV-README.md | 21 +++++++++++++++++++++ frontend/src/store/store.js | 23 +---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 frontend/DEV-README.md diff --git a/frontend/DEV-README.md b/frontend/DEV-README.md new file mode 100644 index 000000000..ab2b3e225 --- /dev/null +++ b/frontend/DEV-README.md @@ -0,0 +1,21 @@ +DEV README von Alex + +default Page: +´´´ + + + + +´´´ + diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index cc65ad353..f24eecb5b 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -18,7 +18,6 @@ export const store = new Vuex.Store({ balance: 0, balance_gdt: 0, }, - transactions: [], modals: false, optionAxios: { headers: { @@ -29,9 +28,7 @@ export const store = new Vuex.Store({ }, }, getters: { - //isLoggedIn: (state /*, getters */) => { - // return state.session_id !== null; - //} + }, // Syncronous mutation of the state mutations: { @@ -67,10 +64,6 @@ export const store = new Vuex.Store({ //console.log('mutation: user_balance_gdt') state.user.balance_gdt = balance / 10000 }, - transactions: (state, transactions) => { - //console.log('mutation: transactions') - state.transactions = transactions - }, }, // Asyncronous actions - used for api calls actions: { @@ -118,7 +111,6 @@ export const store = new Vuex.Store({ }, logout: async ({ commit, state }) => { //console.log('action: logout') - // Are we actually logged in? if (state.session_id) { const result = await loginAPI.logout(state.session_id) // The result can be error, but thats ok with us @@ -131,24 +123,11 @@ export const store = new Vuex.Store({ $cookies.remove('gdd_lang') router.push('/Login') }, - 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: 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) if (result.success) { commit('user_balance', result.result.data.balance) } else { - //console.log('action accountBalance to logout start') dispatch('logout') } }, From 2630809d6743a0b580ee0c0ece7c1347f779aeee Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 31 Mar 2021 08:13:54 +0200 Subject: [PATCH 5/5] yarn lint --- frontend/src/store/store.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index f24eecb5b..ecddfba22 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -27,9 +27,7 @@ export const store = new Vuex.Store({ }, }, }, - getters: { - - }, + getters: {}, // Syncronous mutation of the state mutations: { language: (state, language) => {