Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some fixes for #9747
James Colea6d450ba180c
diff --git a/config/translations.php b/config/translations.phpindex 519b9826ba..d459268d0b 100644--- a/config/translations.php+++ b/config/translations.php@@ -155,6 +155,8 @@ return ['is_reconciled','split','single_split',+ 'not_enough_currencies',+ 'not_enough_currencies_enabled','transaction_stored_link','webhook_stored_link','webhook_updated_link',diff --git a/resources/assets/v1/mix-manifest.json b/resources/assets/v1/mix-manifest.jsonindex ff2938f703..9f22a4fe0f 100644--- a/resources/assets/v1/mix-manifest.json+++ b/resources/assets/v1/mix-manifest.json@@ -20,8 +20,12 @@"/public/v1/js/app.js.LICENSE.txt": "/public/v1/js/app.js.LICENSE.txt","/public/v1/js/app_vue.js": "/public/v1/js/app_vue.js","/public/v1/js/app_vue.js.LICENSE.txt": "/public/v1/js/app_vue.js.LICENSE.txt",+ "/public/v1/js/create.js": "/public/v1/js/create.js",+ "/public/v1/js/create.js.LICENSE.txt": "/public/v1/js/create.js.LICENSE.txt","/public/v1/js/create_transaction.js": "/public/v1/js/create_transaction.js","/public/v1/js/create_transaction.js.LICENSE.txt": "/public/v1/js/create_transaction.js.LICENSE.txt",+ "/public/v1/js/edit.js": "/public/v1/js/edit.js",+ "/public/v1/js/edit.js.LICENSE.txt": "/public/v1/js/edit.js.LICENSE.txt","/public/v1/js/edit_transaction.js": "/public/v1/js/edit_transaction.js","/public/v1/js/edit_transaction.js.LICENSE.txt": "/public/v1/js/edit_transaction.js.LICENSE.txt","/public/v1/js/exchange-rates/index.js": "/public/v1/js/exchange-rates/index.js",@@ -96,6 +100,8 @@"/public/v1/js/ff/transactions/mass/edit-bulk.js": "/public/v1/js/ff/transactions/mass/edit-bulk.js","/public/v1/js/ff/transactions/mass/edit.js": "/public/v1/js/ff/transactions/mass/edit.js","/public/v1/js/ff/transactions/show.js": "/public/v1/js/ff/transactions/show.js",+ "/public/v1/js/index.js": "/public/v1/js/index.js",+ "/public/v1/js/index.js.LICENSE.txt": "/public/v1/js/index.js.LICENSE.txt","/public/v1/js/lib/Chart.bundle.min.js": "/public/v1/js/lib/Chart.bundle.min.js","/public/v1/js/lib/accounting.min.js": "/public/v1/js/lib/accounting.min.js","/public/v1/js/lib/bootstrap-multiselect.js": "/public/v1/js/lib/bootstrap-multiselect.js",@@ -154,6 +160,8 @@"/public/v1/js/lib/vue.js": "/public/v1/js/lib/vue.js","/public/v1/js/profile.js": "/public/v1/js/profile.js","/public/v1/js/profile.js.LICENSE.txt": "/public/v1/js/profile.js.LICENSE.txt",+ "/public/v1/js/show.js": "/public/v1/js/show.js",+ "/public/v1/js/show.js.LICENSE.txt": "/public/v1/js/show.js.LICENSE.txt","/public/v1/js/webhooks/create.js": "/public/v1/js/webhooks/create.js","/public/v1/js/webhooks/create.js.LICENSE.txt": "/public/v1/js/webhooks/create.js.LICENSE.txt","/public/v1/js/webhooks/edit.js": "/public/v1/js/webhooks/edit.js",diff --git a/resources/assets/v1/src/components/exchange-rates/Index.vue b/resources/assets/v1/src/components/exchange-rates/Index.vueindex 80afc156d9..2a656ae5df 100644--- a/resources/assets/v1/src/components/exchange-rates/Index.vue+++ b/resources/assets/v1/src/components/exchange-rates/Index.vue@@ -33,15 +33,33 @@</div></div><div class="row">- <div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12 col-xs-12">+ <div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12 col-xs-12" v-if="currencies.length < 2">+ <div class="box box-default" v-for="currency in currencies" :key="currency.id">+ <div class="box-header with-border">+ <h3 class="box-title">{{ $t('firefly.not_enough_currencies') }}</h3>+ </div>+ <div class="box-body">+ <p>+ {{ $t('firefly.not_enough_currencies_enabled') }}+ </p>+ </div>+ </div>+ </div>+ <div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12 col-xs-12" v-if="currencies.length > 1"><div class="box box-default" v-for="currency in currencies" :key="currency.id"><div class="box-header with-border"><h3 class="box-title">{{ currency.name }}</h3></div><div class="box-body">- <ul v-if="currencies.length > 0">+ <ul v-if="currencies.length > 1"><li v-for="sub in currencies" :key="sub.id" v-show="sub.id !== currency.id">- <a :href="'exchange-rates/' + currency.code + '/' + sub.code" :title="$t('firefly.exchange_rates_from_to', {from: currency.name, to: sub.name})">{{ $t('firefly.exchange_rates_from_to', {from: currency.name, to: sub.name}) }}</a>+ <a :href="'exchange-rates/' + currency.code + '/' + sub.code"+ :title="$t('firefly.exchange_rates_from_to', {from: currency.name, to: sub.name})">{{+ $t('firefly.exchange_rates_from_to', {+ from: currency.name,+ to: sub.name+ })+ }}</a></li></ul></div>@@ -74,12 +92,14 @@ export default {for (let i in response.data.data) {if (response.data.data.hasOwnProperty(i)) {let current = response.data.data[i];- let currency = {- id: current.id,- name: current.attributes.name,- code: current.attributes.code,- };- this.currencies.push(currency);+ if (current.attributes.enabled) {+ let currency = {+ id: current.id,+ name: current.attributes.name,+ code: current.attributes.code,+ };+ this.currencies.push(currency);+ }}}diff --git a/resources/assets/v1/src/components/exchange-rates/Rates.vue b/resources/assets/v1/src/components/exchange-rates/Rates.vueindex 150af3e8eb..51cd0c6131 100644--- a/resources/assets/v1/src/components/exchange-rates/Rates.vue+++ b/resources/assets/v1/src/components/exchange-rates/Rates.vue@@ -218,8 +218,8 @@ export default {// get from and to code from URLthis.newDate = format(new Date, 'yyyy-MM-dd');let parts = window.location.href.split('/');- this.from_code = parts[parts.length - 2].substring(0, 3);- this.to_code = parts[parts.length - 1].substring(0, 3);+ this.from_code = parts[parts.length - 2];+ this.to_code = parts[parts.length - 1];const params = new Proxy(new URLSearchParams(window.location.search), {get: (searchParams, prop) => searchParams.get(prop),diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex ced49e5599..ad3bf5fdca 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -1474,6 +1474,8 @@ return ['help_rate_form' => 'On this day, how many {to} will you get for one {from}?','save_new_rate' => 'Save new rate','add_new_rate' => 'Add a new exchange rate',+ 'not_enough_currencies' => 'Not enough currencies',+ 'not_enough_currencies_enabled' => 'If you have just one currency enabled, there is no need to add exchange rates.',// Financial administrations'administration_index' => 'Financial administration',