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/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 c38f5f7be..ecddfba22 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -8,28 +8,16 @@ import communityAPI from '../apis/communityAPI' export const store = new Vuex.Store({ state: { session_id: null, - email: null, + email: '', language: 'en', 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: { headers: { @@ -39,11 +27,7 @@ export const store = new Vuex.Store({ }, }, }, - getters: { - //isLoggedIn: (state /*, getters */) => { - // return state.session_id !== null; - //} - }, + getters: {}, // Syncronous mutation of the state mutations: { language: (state, language) => { @@ -78,10 +62,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: { @@ -129,7 +109,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 @@ -142,39 +121,11 @@ 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, - ) - - 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: 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') } }, 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..c4fd481ac 100644 --- a/frontend/src/views/KontoOverview.vue +++ b/frontend/src/views/KontoOverview.vue @@ -2,25 +2,20 @@
- +
- +
- - - - +
@@ -28,21 +23,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/GddAddWork2.vue b/frontend/src/views/KontoOverview/GddAddWork2.vue index 749265b88..6acbeec2d 100644 --- a/frontend/src/views/KontoOverview/GddAddWork2.vue +++ b/frontend/src/views/KontoOverview/GddAddWork2.vue @@ -8,8 +8,8 @@ @@ -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..17596ba17 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 @@ - - -