🐛 (transaction) set default locale

This commit is contained in:
2020-08-29 14:54:32 +02:00
parent 12e33cf1de
commit d764a817da
2 changed files with 4 additions and 11 deletions

View File

@@ -1,14 +1,5 @@
<template> <template>
<div class="transaction-create"> <div class="transaction-create">
<pre>
name: {{ name }}
amount: {{ amount }}
currency: {{ currency }}
date: {{ date }}
location: {{ transaction.location }}
payBy: {{ payBy }}
payFor: {{ payFor }}
</pre>
<nav class="breadcrumb" aria-label="breadcrumbs" v-if="account"> <nav class="breadcrumb" aria-label="breadcrumbs" v-if="account">
<ul> <ul>
<li> <li>

View File

@@ -11,6 +11,8 @@ import { hasGoodNetwork } from '@/utils/network'
import { toHex } from '@/utils' import { toHex } from '@/utils'
import queueNotifService from '@/services/QueueNotifService' import queueNotifService from '@/services/QueueNotifService'
const DEFAULT_LOCALE = 'fr'
Vue.use(Vuex) Vue.use(Vuex)
const SET_LOCALE: string = 'SET_LOCALE' const SET_LOCALE: string = 'SET_LOCALE'
@@ -29,14 +31,14 @@ interface IState {
export default new Vuex.Store<IState>({ export default new Vuex.Store<IState>({
state: { state: {
locale: '', locale: DEFAULT_LOCALE,
user: null, user: null,
hexUser: null, hexUser: null,
title: null, title: null,
publicAccountIds: [] publicAccountIds: []
}, },
getters: { getters: {
locale: ({ locale }) => locale, locale: ({ locale }) => locale || DEFAULT_LOCALE,
user: ({ user }) => user, user: ({ user }) => user,
title: ({ title }) => title, title: ({ title }) => title,
username: (state: IState) => username: (state: IState) =>