diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 000000000..71af2b808 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,12 @@ +name: on-push +on: push +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build the stack + run: docker-compose up -d + - name: Test + run: docker run gradido-node-test +timeout-minutes: 2 diff --git a/configs/login_server/grd_login.properties b/configs/login_server/grd_login.properties index a181c6eee..eccde7fb8 100644 --- a/configs/login_server/grd_login.properties +++ b/configs/login_server/grd_login.properties @@ -47,3 +47,5 @@ session.timeout = 15 unsecure.allow_passwort_via_json_request = 1 unsecure.allow_auto_sign_transactions = 1 unsecure.allow_cors_all = 1 +# default disable, passwords must contain a number, a lower character, a high character, special character, and be at least 8 characters long +unsecure.allow_all_passwords = 1 \ No newline at end of file diff --git a/configs/node_server/.gradido/sibling_nodes.txt b/configs/node_server/.gradido/sibling_nodes.txt new file mode 100644 index 000000000..e69de29bb diff --git a/configs/node_server/gradido.conf b/configs/node_server/gradido.conf new file mode 100644 index 000000000..3edf0897c --- /dev/null +++ b/configs/node_server/gradido.conf @@ -0,0 +1,20 @@ +worker_count = 2 +io_worker_count = 1 +data_root_folder = /opt/instance/.gradido +hedera_mirror_endpoint = hcs.testnet.mirrornode.hedera.com:5600 +sibling_node_file = /opt/instance/.gradido/sibling_nodes.txt +#group_requests_endpoint = 0.0.0.0:13701 +#record_requests_endpoint = 0.0.0.0:13702 +#manage_network_requests_endpoint = 0.0.0.0:13703 +grpc_endpoint = 0.0.0.0:13701 +json_rpc_port = 13702 + + +# larger value, larger batch, less concurrency +blockchain_append_batch_size = 1000 +#blochchain_init_batch_size = 1000 +#block_record_outbound_batch_size = 100 +general_batch_size = 1000 +group_register_topic_id = 0.0.79574 + +topic_reset_allowed = 1 diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 2672f0651..97cdb3155 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -49,7 +49,7 @@ services: container_name: phpmyadmin environment: - PMA_ARBITRARY=1 - restart: always + #restart: always ports: - 8074:80 networks: diff --git a/docu/login_server.api.md b/docu/login_server.api.md index c78d56a24..49a390c3a 100644 --- a/docu/login_server.api.md +++ b/docu/login_server.api.md @@ -47,13 +47,20 @@ Registrieren kannst du einen neuen Benutzer mit: POST http://localhost/login_api/createUser ```json -data: {"email":"max.musterman@gmail.de", "first_name":"Max", "last_name":"Musterman" , - "emailType": 2, "password":"123abcDE&"} +data: { + "email":"max.musterman@gmail.de", + "first_name":"Max", + "last_name":"Musterman" , + "emailType": 2, + "password":"123abcDE&" + "login_after_register":true + } ``` - emailType: control email-text sended with email verification code - 2: default, if user has registered directly - 5: if user was registered by an admin +- login_after_register: if set to true auto-login after create user was successfull, means session cookie is set and session_id returned Wenn alles okay ist erhältst du: ```json diff --git a/frontend/README.md b/frontend/README.md index 75d17f120..71dfcd39c 100755 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,14 +1,14 @@ # Vue Gradido Wallet -## install mit npm +## install mit yarn ```bash cd frontend -npm install -npm run serve +yarn install +yarn run serve # build -npm run build +yarn run build ``` ## install mit docker diff --git a/frontend/package.json b/frontend/package.json index 3974ba151..6d6897726 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -42,7 +42,9 @@ "vue-flatpickr-component": "^8.1.2", "vue-good-table": "^2.21.3", "vue-i18n": "^8.22.4", + "qrcode": "^1.4.4", "vue-qrcode-reader": "^2.3.16", + "vue-qrcode": "^0.3.5", "vue-router": "^3.0.6", "vue2-transitions": "^0.2.3", "vuex": "^3.6.0" @@ -52,6 +54,7 @@ "@vue/cli-plugin-eslint": "^3.7.0", "@vue/cli-service": "^3.7.0", "@vue/eslint-config-prettier": "^4.0.1", + "babel-eslint": "^10.1.0", "babel-plugin-component": "^1.1.0", "node-sass": "^4.12.0", "sass-loader": "^7.1.0", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b4c26ef8e..b77f88ea9 100755 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -13,43 +13,14 @@ export default { name: 'app', created () { - if (this.$cookies.get('gdd_is_auth') == 'true' && this.$store.state.is_auth == true) { - this.$store.state.user.email = this.$cookies.get('gdd_email') - - // if ( this.$store.state.is_auth == false && this.$store.state.is_admin == false) { - // this.$router.push("/Landing") - // } else { - this.$router.push('/KontoOverview') - // } - }else { - this.$router.push("/Landing") - } - - //var user = { id:1, name:'Journal',session:'25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX' }; - //this.$cookies.set('user',user); - //// print user name - //console.log("APP.vue START created get cookie is_auth=>",this.$cookies.get('gdd_is_auth')) - - }, - methods: { - /* - login() { - //console.log("app.vue user login() : " + this.$store.state.is_auth) - this.$store.commit('login') - //this.$router.push('/KontoOverview') - }, - loginAsAdmin () { - // console.log("app.vue admin login(): " + this.$store.state.is_admin) - this.$store.state.modals = true - //this.$store.commit('loginAsAdmin') - //this.$router.push('/AdminOverview') - }, - - logout(){ - // console.log("app.vue user logout() : ") - this.$store.commit('logout') - } - */ + //console.log("this.$cookies.get('gdd_session_id') ", this.$cookies.get('gdd_session_id') ) + //console.log(" $cookies.isKey('gdd_session_id') == true", this.$cookies.isKey("gdd_session_id") == true ) + if ( this.$cookies.get('gdd_session_id') == this.$store.state.session_id ) { + //this.$store.state.email = this.$cookies.get('gdd_u') + this.$router.push('/KontoOverview') + }else { + this.$router.push("/Login") + } } } diff --git a/frontend/src/apis/communityAPI.js b/frontend/src/apis/communityAPI.js new file mode 100644 index 000000000..15284a663 --- /dev/null +++ b/frontend/src/apis/communityAPI.js @@ -0,0 +1,57 @@ +import axios from 'axios'; + +// TODO move this +const COMMUNITY_API_STATE_BALANCE_URL = 'http://localhost/state-balances/' +const COMMUNITY_API_TRANSACTION_CREATION_URL = 'http://localhost/transaction-creations/' + +const apiGet = async (url) => { + try { + const result = await axios.get(url); + if(result.status !== 200){ + throw new Error('HTTP Status Error '+result.status) + } + if(result.data.state !== 'success'){ + throw new Error(result.data.msg) + } + return { success: true, result } + } catch(error){ + return { success: false, result: error} + } +} + +const apiPost = async (url, payload) => { + try { + const result = await axios.post(url, payload); + if(result.status !== 200){ + throw new Error('HTTP Status Error '+result.status) + } + if(result.data.state !== 'success'){ + throw new Error(result.data.msg) + } + return { success: true, result } + } catch(error){ + return { success: false, result: error} + } +} + +const communityAPI = { + balance: async (session_id) => { + return apiGet(COMMUNITY_API_STATE_BALANCE_URL + 'ajaxGetBalance/' + session_id) + }, + transactions: async (session_id) => { + return apiGet(COMMUNITY_API_STATE_BALANCE_URL + 'ajaxListTransactions/' + session_id) + }, + create: async (session_id, email, amount, memo, target_date = new Date() ) => { + const payload = { + session_id, + email, + amount, + target_date, + memo, + auto_sign: true + } + return apiPost(COMMUNITY_API_TRANSACTION_CREATION_URL + 'ajaxCreate/', payload) + } +} + +export default communityAPI \ No newline at end of file diff --git a/frontend/src/apis/loginAPI.js b/frontend/src/apis/loginAPI.js new file mode 100644 index 000000000..ef0d35045 --- /dev/null +++ b/frontend/src/apis/loginAPI.js @@ -0,0 +1,52 @@ +import axios from 'axios'; + +// TODO move this +const LOGIN_API_URL = 'http://localhost/login_api/' + +// control email-text sended with email verification code +const EMAIL_TYPE = { + DEFAULT: 2, // if user has registered directly + ADMIN: 5, // if user was registered by an admin +} + +const apiPost = async (url, payload) => { + try { + const result = await axios.post(url, payload); + if(result.status !== 200){ + throw new Error('HTTP Status Error '+result.status) + } + if(result.data.state !== 'success'){ + throw new Error(result.data.msg) + } + return { success: true, result } + } catch(error){ + return { success: false, result: error} + } +} + +const loginAPI = { + login: async (email, password) => { + const payload = { + email, + password, + } + return apiPost(LOGIN_API_URL + 'unsecureLogin', payload) + }, + logout: async (session_id) => { + const payload= { session_id } + return apiPost(LOGIN_API_URL + 'logout', payload) + }, + create : async (email, first_name, last_name, password) => { + const payload = { + email, + first_name, + last_name, + password, + emailType: EMAIL_TYPE.DEFAULT, + login_after_register: true + } + return apiPost(LOGIN_API_URL + 'createUser', payload) + }, +} + +export default loginAPI \ No newline at end of file diff --git a/frontend/src/components/BaseTable.vue b/frontend/src/components/BaseTable.vue index 40cb6eae4..979cb6618 100644 --- a/frontend/src/components/BaseTable.vue +++ b/frontend/src/components/BaseTable.vue @@ -13,7 +13,6 @@ {{ itemValue(item, column) }} diff --git a/frontend/src/components/Inputs/BaseCheckbox.vue b/frontend/src/components/Inputs/BaseCheckbox.vue index dd39f21b4..5de6ef500 100755 --- a/frontend/src/components/Inputs/BaseCheckbox.vue +++ b/frontend/src/components/Inputs/BaseCheckbox.vue @@ -66,6 +66,7 @@ if (this.inline) { return `form-check-inline`; } + return '' } }, created() { diff --git a/frontend/src/components/SidebarPlugin/SideBar.vue b/frontend/src/components/SidebarPlugin/SideBar.vue index e28d733e4..9ff6a6710 100755 --- a/frontend/src/components/SidebarPlugin/SideBar.vue +++ b/frontend/src/components/SidebarPlugin/SideBar.vue @@ -159,10 +159,10 @@ }, setLocale(locale) { this.$i18n.locale = locale - this.$router.push({ - params: { lang: locale } - }) - this.hideDropdown() + //this.$router.push({ + // params: { lang: locale } + //}) + //this.hideDropdown() } }, beforeDestroy() { diff --git a/frontend/src/components/SidebarPlugin/SidebarItem.vue b/frontend/src/components/SidebarPlugin/SidebarItem.vue index aea2ccfb4..2699bef25 100755 --- a/frontend/src/components/SidebarPlugin/SidebarItem.vue +++ b/frontend/src/components/SidebarPlugin/SidebarItem.vue @@ -116,6 +116,7 @@ export default { let words = this.link.name.split(' '); return words.map(word => word.substring(0, 1)).join(''); } + return '' }, isMenu() { return this.children.length > 0 || this.menu === true; diff --git a/frontend/src/components/SwitchLang.vue b/frontend/src/components/SwitchLang.vue deleted file mode 100644 index cd3c19c89..000000000 --- a/frontend/src/components/SwitchLang.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - - \ No newline at end of file diff --git a/frontend/src/i18n.js b/frontend/src/i18n.js index dbdced961..8925618ce 100644 --- a/frontend/src/i18n.js +++ b/frontend/src/i18n.js @@ -16,8 +16,23 @@ function loadLocaleMessages () { return messages } +const numberFormats = { + 'en-US': { + currency: { + style: 'currency' + } + }, + 'de-DE': { + currency: { + style: 'currency' + } + } +} + + export default new VueI18n({ locale: 'en', fallbackLocale: 'en', - messages: loadLocaleMessages() + messages: loadLocaleMessages(), + numberFormats }) \ No newline at end of file diff --git a/frontend/src/mixins/loginAPI.js b/frontend/src/mixins/loginAPI.js deleted file mode 100644 index 69c5e1441..000000000 --- a/frontend/src/mixins/loginAPI.js +++ /dev/null @@ -1,19 +0,0 @@ -// TODO move this -const LOGIN_API_URL = 'http://localhost/login_api/' - -// define a mixin object -const loginAPI = { - mutations: { - login: async () => { - return axios.post(LOGIN_API_URL + 'unsecureLogin', data); - }, - creatUser : async () => { - return axios.post(LOGIN_API_URL + 'createUser', data); - }, - logout: async () => { - return axios.post(LOGIN_API_URL + 'logout', data); - }, - } -} - -export default loginAPI \ No newline at end of file diff --git a/frontend/src/plugins/dashboard-plugin.js b/frontend/src/plugins/dashboard-plugin.js index 41cfe0509..c3190fafa 100755 --- a/frontend/src/plugins/dashboard-plugin.js +++ b/frontend/src/plugins/dashboard-plugin.js @@ -27,6 +27,7 @@ import * as rules from 'vee-validate/dist/rules'; import { messages } from 'vee-validate/dist/locale/en.json'; import VueQrcodeReader from "vue-qrcode-reader"; +import VueQrcode from "vue-qrcode"; import VueGoodTablePlugin from 'vue-good-table'; @@ -50,6 +51,7 @@ export default { Vue.use(IconsPlugin); Vue.use(VueGoodTablePlugin); Vue.use(VueQrcodeReader); + Vue.use(VueQrcode); configure({ classes: { valid: 'is-valid', diff --git a/frontend/src/routes/router.js b/frontend/src/routes/router.js index 497d323b2..aa0ed2486 100644 --- a/frontend/src/routes/router.js +++ b/frontend/src/routes/router.js @@ -1,7 +1,6 @@ import Vue from 'vue' import VueRouter from 'vue-router' import routes from './routes' -import {store} from '../store/store'; Vue.use(VueRouter) @@ -26,22 +25,7 @@ router.beforeEach((to, from, next) => { if (!language) { language = 'de' } - - //console.log("----------------") - //("ROUTER.js to", to) - //console.log("ROUTER.js store.state.is_auth", store.state.is_auth) - //console.log("ROUTER.js store.commit('isActive')", store.commit('isActive')) - - //if (store.commit('isActive') ) { - // next() - //} else { - // next("/login") - //} - //console.log(from) - //console.log(next) - - next() - + next() }) -export default router +export default router \ No newline at end of file diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index c571acc30..086910286 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -8,20 +8,24 @@ import NotFound from '@/views/NotFoundPage.vue' const routes = [ { path: '/', - redirect: 'landing', + redirect: 'login', 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') + component: () => import('../views/Pages/Login.vue') + }, + { + path: '/thx', + name: 'Thanks', + component: () => import('../views/Pages/thx.vue') + }, + { + path: '/register', + name: 'register', + component: () => import('../views/Pages/Register.vue') }, - ] }, { @@ -32,7 +36,7 @@ const routes = [ { path: '/KontoOverview', name: 'Kontoübersicht', - component: () => import(/* webpackChunkName: "demo" */ '../views/KontoOverview.vue'), + component: () => import('../views/KontoOverview.vue'), meta: { requiresAuth: true } @@ -40,13 +44,18 @@ const routes = [ { path: '/profile', name: 'profile', - component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/UserProfile.vue') - }, + component: () => import('../views/Pages/UserProfileCard.vue') + }, { - path: '/register', - name: 'register', - component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Register.vue') - }, + path: '/profileedit', + name: 'profileedit', + component: () => import('../views/Pages/UserProfileEdit.vue') + }, + { + path: '/activity', + name: 'activity', + component: () => import('../views/Pages/UserProfileActivity.vue') + } ] }, , @@ -58,7 +67,7 @@ const routes = [ { path: '/AdminOverview', name: 'Adminübersicht', - component: () => import(/* webpackChunkName: "demo" */ '../views/AdminOverview.vue'), + component: () => import('../views/AdminOverview.vue'), meta: { requiresAuth: true } diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index b97bf47a1..76a50bc2c 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -1,92 +1,133 @@ import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) -import axios from 'axios'; -import VueCookies from 'vue-cookies'; -import router from '../routes/router.js'; +import router from '../routes/router.js' +import loginAPI from '../apis/loginAPI' +import communityAPI from '../apis/communityAPI' +import axios from 'axios' + export const store = new Vuex.Store({ state: { - path: 'http://192.168.0.89/account/', - is_auth: false, - is_admin: false, - active: false, - modals: false, + session_id: null, + email: null, user : { name:"", - email:"" + balance: 0, + balance_gdt: 0 }, - dataLogout: {"session_id": -127182} + ajaxCreateData: { + session_id : '', + email: "", + amount: 0, + target_date:"2021-02-19T13:25:36+00:00", + memo:"", + auto_sign: true + }, + transactions: [], + modals: false }, - mutations: { - isActive(state) { - //("Im Store PRÜFEN PRÜFEN" ) - return true + // Retrieve a state variable + getters: { + //isLoggedIn: (state /*, getters */) => { + // return state.session_id !== null; + //} + }, + // Syncronous mutation of the state + mutations: { + email: (state, email) => { + //console.log('mutation: email') + state.email = email }, - login (state, logindata) { - //console.log("Im Store LOGIN() start " ) - //console.log("logon state =>", state ) - //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); - if (ldata.statusText === "OK") { - console.log("STORE login() ldatasession_id", ldata.data.session_id) - state.is_auth = true - state.active = true - $cookies.set('gdd_is_auth','true'); - $cookies.set('gdd_session_id', ldata.data.session_id); - $cookies.set('gdd_email',logindata.email); - state.user.email = logindata.email - - //console.log("STORE login() to " + state.is_auth) - router.push('/KontoOverview') - - } - - return true - }, (error) => { - console.log(error); - }); - //console.log("STORE login() from" + state.is_auth) - //if (state.is_auth) { - // state.is_auth = false - // state.active = false - //} else { - // state.is_auth = true - // state.active = true - //} - // console.log("STORE login() to " + state.is_auth) + session_id: (state,session_id) => { + //console.log('mutation: session_id') + state.session_id = session_id }, - creatUser( state, formdata) { - //console.log("Im Store creatUser() start " ) - axios.post("http://localhost/login_api/createUser", formdata).then((ldata) => { - - console.log("Im Store creatUser() axios then ", ldata); - // this.ldata = ldata.data; - return true - - }, (error) => { - console.log(error); - }); - }, - logout(state){ - axios.post("http://localhost/login_api/logout", this.dataLogout).then((ldata) => { - - //console.log("Im Store logout() axios then ", ldata); - // this.ldata = ldata.data; - //return true - state.is_auth = false - state.is_admin = false - state.active = false - $cookies.set('gdd_is_auth','false'); - $cookies.remove('gdd_email'); - $cookies.remove('gdd_session_id'); - router.push('/Landing') - }, (error) => { - console.log(error); - }); - + user_balance: (state,balance) => { + //console.log('mutation: user_balance') + state.user.balance = (balance)/10000 + }, + user_balance_gdt: (state,balance) => { + //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: { + login: async ({ dispatch, commit }, data) => { + //console.log('action: login') + const result = await loginAPI.login(data.email,data.password) + if( result.success ){ + commit('session_id', result.result.data.session_id) + commit('email', data.email) + $cookies.set('gdd_session_id', result.result.data.session_id); + $cookies.set('gdd_u', data.email); + router.push('/KontoOverview') + } else { + // Register failed, we perform a logout + dispatch('logout') + } + }, + createUser: async ({ commit, dispatch }, data) => { + console.log('action: createUser') + const result = await loginAPI.create(data.email,data.first_name,data.last_name,data.password) + if( result.success ){ + commit('session_id', result.result.data.session_id) + commit('email', data.email) + $cookies.set('gdd_session_id', result.result.data.session_id); + $cookies.set('gdd_u', data.email); + router.push('/KontoOverview') + } else { + // Register failed, we perform a logout + dispatch('logout') + } + }, + 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 + } + + commit('session_id', null) + commit('email', null) + $cookies.remove('gdd_session_id'); + $cookies.remove('gdd_u'); + router.push('/Login') + }, + ajaxCreate: async ({ dispatch, state }) => { + //console.log('action: ajaxCreate') + + axios.post("http://localhost/transaction-creations/ajaxCreate", state.ajaxCreateData).then((result) => { + console.log("store ajaxCreate result", result) + + if( result.success ){ + // TODO + } else { + //dispatch('logout') + } + }, (error) => { + console.log(error); + }); + }, + 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') + const result = await communityAPI.balance(state.session_id) + //console.log(result) + if(result.success) { + commit('user_balance', result.result.data.balance) + } else { + dispatch('logout') + } + } + } }) \ No newline at end of file diff --git a/frontend/src/views/AdminOverview.vue b/frontend/src/views/AdminOverview.vue index b54920a9d..888df8380 100644 --- a/frontend/src/views/AdminOverview.vue +++ b/frontend/src/views/AdminOverview.vue @@ -232,12 +232,12 @@ components: { LineChart, BarChart, - BaseProgress, + //BaseProgress, StatsCard, - PageVisitsTable, + //PageVisitsTable, AdminUserSearch, AdminUserCreation, - SearchUser + //SearchUser }, data() { return { diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 0e9e6c012..b52871131 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -153,7 +153,7 @@ components: { LineChart, BarChart, - BaseProgress, + //BaseProgress, StatsCard, PageVisitsTable, SocialTrafficTable diff --git a/frontend/src/views/KontoOverview.vue b/frontend/src/views/KontoOverview.vue index b568bf8f0..39dee08b9 100644 --- a/frontend/src/views/KontoOverview.vue +++ b/frontend/src/views/KontoOverview.vue @@ -8,52 +8,31 @@ -
-
+
-
-
- + + + --> + +
-

User Data

- /public/json-example/userdata.json -

- {{userdata}} -

- -
-

User Transactions List

- /public/json-example/usertransactions.json -

- {{usertransactions}} -

- - -
-

User Participation List

- /public/json-example/userparticipation.json -

- {{userparticipation}} -

- - - + diff --git a/frontend/src/views/KontoOverview/GddAddWork.vue b/frontend/src/views/KontoOverview/GddAddWork.vue index a0bfb2f43..01f716946 100644 --- a/frontend/src/views/KontoOverview/GddAddWork.vue +++ b/frontend/src/views/KontoOverview/GddAddWork.vue @@ -19,9 +19,7 @@ -
- -
+
@@ -58,10 +56,7 @@ export default { return { show: true, form: { - img: '', - email: '', - amount1: '', - amount2: '' + } }; }, @@ -69,28 +64,18 @@ export default { onSubmit(event) { event.preventDefault() alert(JSON.stringify(this.form)) - this.modal = true - this.modal.h4 = 'TODO 1' + }, onReset(event) { event.preventDefault() // Reset our form values - this.form.email = '' - this.form.amount1 = '' - this.form.amount2 = '' + // Trick to reset/clear native browser form validation state this.show = false this.$nextTick(() => { this.show = true }) - }, - adressbook() { - this.modal = true - this.modaldata.h4 = 'Adressbuch' - this.modaldata.p = 'TODO ADRESSBUCH LISTE' } - }, - watch: { } }; \ No newline at end of file diff --git a/frontend/src/views/KontoOverview/GddSent.vue b/frontend/src/views/KontoOverview/GddSent.vue index c94a48729..a90ceb563 100644 --- a/frontend/src/views/KontoOverview/GddSent.vue +++ b/frontend/src/views/KontoOverview/GddSent.vue @@ -1,83 +1,107 @@ @@ -100,8 +124,8 @@ export default { form: { img: '', email: '', - amount1: '', - amount2: '' + amount: '', + memo:'' } } }, @@ -135,28 +159,32 @@ export default { // ... } }, - onSubmit(event) { - event.preventDefault() - alert(JSON.stringify(this.form)) - this.modal = true - this.modal.h4 = 'TODO 1' + async onSubmit() { + //event.preventDefault() + console.log("onSubmit", this.form) + //console.log("this.form.img", this.form.img) + //console.log("this.form.email", this.form.email) + //console.log("this.form.amount", this.form.amount) + //console.log("this.form.memo", this.form.memo) + + this.$store.state.ajaxCreateData.session_id = this.$cookies.get('gdd_session_id') + this.$store.state.ajaxCreateData.email = this.form.email + this.$store.state.ajaxCreateData.amount = this.form.amount + this.$store.state.ajaxCreateData.memo = this.form.memo + this.$store.state.ajaxCreateData.target_date = Date.now() + + this.$store.dispatch('ajaxCreate') }, onReset(event) { event.preventDefault() // Reset our form values this.form.email = '' - this.form.amount1 = '' - this.form.amount2 = '' + this.form.amount = '' // Trick to reset/clear native browser form validation state this.show = false this.$nextTick(() => { this.show = true }) - }, - adressbook() { - this.modal = true - this.modaldata.h4 = 'Adressbuch' - this.modaldata.p = 'TODO ADRESSBUCH LISTE' } }, computed: { diff --git a/frontend/src/views/KontoOverview/GddStatus.vue b/frontend/src/views/KontoOverview/GddStatus.vue index 1b0985665..8f2c84c71 100644 --- a/frontend/src/views/KontoOverview/GddStatus.vue +++ b/frontend/src/views/KontoOverview/GddStatus.vue @@ -4,35 +4,38 @@ - + {{ $n($store.state.user.balance) }} GDD - - \ No newline at end of file diff --git a/frontend/src/views/KontoOverview/GddTable.vue b/frontend/src/views/KontoOverview/GddTable.vue index ccc29d67e..82a7c0b22 100644 --- a/frontend/src/views/KontoOverview/GddTable.vue +++ b/frontend/src/views/KontoOverview/GddTable.vue @@ -1,86 +1,87 @@ diff --git a/frontend/src/views/Pages/UserProfile.vue b/frontend/src/views/Pages/UserProfile.vue index dd20ae8e9..9a4683a3e 100755 --- a/frontend/src/views/Pages/UserProfile.vue +++ b/frontend/src/views/Pages/UserProfile.vue @@ -9,7 +9,7 @@ -

Hello {{this.$store.state.user.email}}

+

Hello {{this.$store.state.email}}

This is your profile page. You can see the progress you've made with your work and manage your projects or assigned tasks

Edit profile diff --git a/frontend/src/views/Pages/UserProfile/ImageUploaderAvatar.vue b/frontend/src/views/Pages/UserProfile/ImageUploaderAvatar.vue new file mode 100644 index 000000000..1e6fa8620 --- /dev/null +++ b/frontend/src/views/Pages/UserProfile/ImageUploaderAvatar.vue @@ -0,0 +1,71 @@ + + + diff --git a/frontend/src/views/Pages/UserProfile/UserCard.vue b/frontend/src/views/Pages/UserProfile/UserCard.vue index a56ac61f4..e55a9f1f5 100755 --- a/frontend/src/views/Pages/UserProfile/UserCard.vue +++ b/frontend/src/views/Pages/UserProfile/UserCard.vue @@ -4,7 +4,7 @@ @@ -12,8 +12,7 @@ @@ -23,22 +22,22 @@
22 - Friends + Transactions
10 - Photos + Community
- 89 - Comments + {{ $n(this.$store.state.user.balance) }} + GDD
- {{this.$store.state.user.email}} + {{this.$store.state.email}}
Bucharest, Romania @@ -58,6 +57,13 @@ diff --git a/frontend/src/views/Pages/UserProfileActivity.vue b/frontend/src/views/Pages/UserProfileActivity.vue new file mode 100644 index 000000000..37177dca4 --- /dev/null +++ b/frontend/src/views/Pages/UserProfileActivity.vue @@ -0,0 +1,47 @@ + + + diff --git a/frontend/src/views/Pages/UserProfileCard.vue b/frontend/src/views/Pages/UserProfileCard.vue new file mode 100644 index 000000000..75ac47a41 --- /dev/null +++ b/frontend/src/views/Pages/UserProfileCard.vue @@ -0,0 +1,38 @@ + + + diff --git a/frontend/src/views/Pages/UserProfileEdit.vue b/frontend/src/views/Pages/UserProfileEdit.vue new file mode 100644 index 000000000..7eac3b675 --- /dev/null +++ b/frontend/src/views/Pages/UserProfileEdit.vue @@ -0,0 +1,44 @@ + + + diff --git a/frontend/src/views/Pages/thx.vue b/frontend/src/views/Pages/thx.vue new file mode 100644 index 000000000..78f4701b1 --- /dev/null +++ b/frontend/src/views/Pages/thx.vue @@ -0,0 +1,23 @@ + diff --git a/frontend/src/views/Starter/SampleLayout.vue b/frontend/src/views/Starter/SampleLayout.vue index f0faaaa55..5b3d69f21 100755 --- a/frontend/src/views/Starter/SampleLayout.vue +++ b/frontend/src/views/Starter/SampleLayout.vue @@ -2,7 +2,7 @@
-