diff --git a/config/translations.php b/config/translations.php index 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.json index 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.vue index 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 @@
-
+
+
+
+

{{ $t('firefly.not_enough_currencies') }}

+
+
+

+ {{ $t('firefly.not_enough_currencies_enabled') }} +

+
+
+
+

{{ currency.name }}

@@ -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.vue index 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 URL this.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.php index 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',