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/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/store/store.js b/frontend/src/store/store.js index a1dc02a68..76a50bc2c 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -45,11 +45,11 @@ export const store = new Vuex.Store({ }, user_balance: (state,balance) => { //console.log('mutation: user_balance') - state.user.balance = balance + state.user.balance = (balance)/10000 }, user_balance_gdt: (state,balance) => { //console.log('mutation: user_balance_gdt') - state.user.balance_gdt = balance + state.user.balance_gdt = (balance)/10000 }, transactions: (state,transactions) => { //console.log('mutation: transactions') @@ -102,27 +102,6 @@ export const store = new Vuex.Store({ }, ajaxCreate: async ({ dispatch, state }) => { //console.log('action: ajaxCreate') - //console.log("dispatch", dispatch) - //console.log("state.ajaxCreateData", state.ajaxCreateData) - /* - const result = await communityAPI.create( - state.ajaxCreateData.session_id, - state.ajaxCreateData.email, - state.ajaxCreateData.amount, - state.ajaxCreateData.target_date, - state.ajaxCreateData.memo - ) - */ - - /* - this.ajaxCreateData.session_id : '', - this.ajaxCreateData.email: "max.musterman@gmail.de", - this.ajaxCreateData.amount: 10000000, - this.ajaxCreateData.target_date:"2021-02-19T13:25:36+00:00", - this.ajaxCreateData.memo:"AGE", - this.ajaxCreateData.auto_sign: true - */ - axios.post("http://localhost/transaction-creations/ajaxCreate", state.ajaxCreateData).then((result) => { console.log("store ajaxCreate result", result) @@ -138,10 +117,7 @@ export const store = new Vuex.Store({ }, ajaxListTransactions: async ({commit, dispatch, state}) => { // console.log('action: ajaxListTransactions', state.session_id) - // const result = await communityAPI.transactions(state.session_id) - - - + // const result = await communityAPI.transactions(state.session_id) }, accountBalance: async ({ commit, dispatch, state }) => { //console.log('action: accountBalance') diff --git a/frontend/src/views/KontoOverview/GddStatus.vue b/frontend/src/views/KontoOverview/GddStatus.vue index a1ced9d99..8f2c84c71 100644 --- a/frontend/src/views/KontoOverview/GddStatus.vue +++ b/frontend/src/views/KontoOverview/GddStatus.vue @@ -6,7 +6,7 @@ type="gradient-red" sub-title="balance_gdd" class="mb-4"> - {{ setComma($store.state.user.balance) }} GDD + {{ $n($store.state.user.balance) }} GDD @@ -17,13 +17,14 @@ type="gradient-orange" sub-title="balance_gdt" class="mb-4"> - {{ setComma($store.state.user.balance_gdt) }} GDT + {{ $n($store.state.user.balance_gdt) }} GDT + @@ -35,15 +36,6 @@ export default { balance_gdd: this.$store.state.user.balance, balance_gdt: this.$store.state.user.balance_gdt, } - }, - methods: { - setComma(int){ - if (int !== '' || int !== undefined || int !== 0 || int !== '0' || int !== null) { - int = int /10000 - return int.toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,") - //return int / 10000 - } - } - }, + } }; \ No newline at end of file diff --git a/frontend/src/views/KontoOverview/GddTable.vue b/frontend/src/views/KontoOverview/GddTable.vue index 563931866..656bb17b9 100644 --- a/frontend/src/views/KontoOverview/GddTable.vue +++ b/frontend/src/views/KontoOverview/GddTable.vue @@ -6,7 +6,7 @@
-

{{ setComma(item.balance) }} GDD

+

{{ $n((item.balance)/1000) }} GDD

{{item.name}}

i
@@ -80,12 +80,6 @@ export default { toogle(item) { const temp = 'xxx porta' - }, - setComma(int){ - if (int !== '' || int !== undefined || int !== 0 || int !== '0' || int !== null) { - int = int /10000 - return int.toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,") - } } } }; diff --git a/frontend/src/views/Layout/ContentFooter.vue b/frontend/src/views/Layout/ContentFooter.vue index 1424984d2..2190a4a40 100755 --- a/frontend/src/views/Layout/ContentFooter.vue +++ b/frontend/src/views/Layout/ContentFooter.vue @@ -8,16 +8,16 @@ - + Gradido - + Impressum - + Datenschutzerklärung - + License diff --git a/frontend/src/views/Pages/UserProfile/UserCard.vue b/frontend/src/views/Pages/UserProfile/UserCard.vue index 66d3c48c0..e55a9f1f5 100755 --- a/frontend/src/views/Pages/UserProfile/UserCard.vue +++ b/frontend/src/views/Pages/UserProfile/UserCard.vue @@ -29,7 +29,7 @@ Community
- {{ setComma(this.$store.state.user.balance) }} + {{ $n(this.$store.state.user.balance) }} GDD
@@ -63,15 +63,7 @@ export default { name: "profilecard", components: { VueQrcode, - }, - methods: { - setComma(int){ - if (int !== '' || int !== undefined || int !== 0 || int !== '0' || int !== null) { - int = int /10000 - return int.toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,") - } - } - } + } };