From c76d140d0b6cdc8855aea8fcf1f700294b7c074a Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 7 Apr 2021 18:24:06 +0200 Subject: [PATCH] Allow a new config var --- .env.example | 8 ++++++++ app/Support/Binder/EitherConfigKey.php | 3 ++- config/firefly.php | 7 +++++-- frontend/src/{components => }/shared/transactions.js | 0 4 files changed, 15 insertions(+), 3 deletions(-) rename frontend/src/{components => }/shared/transactions.js (100%) diff --git a/.env.example b/.env.example index c349c993fd..e9f1dd6cb9 100644 --- a/.env.example +++ b/.env.example @@ -155,8 +155,16 @@ SEND_REPORT_JOURNALS=true # Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places. # If you use Docker or similar, you can set this variable from a file by appending it with _FILE +# Take note: it is no longer necessary to set this value, and it will be removed in future versions. MAPBOX_API_KEY= +# +# Instead of the mapbox API key, just set this value to true if you want to set the location +# of certain things, like transactions. Since this involves an external service, it's optional +# and disabled by default. +# +ENABLE_EXTERNAL_MAP=false + # The map will default to this location: MAP_DEFAULT_LAT=51.983333 MAP_DEFAULT_LONG=5.916667 diff --git a/app/Support/Binder/EitherConfigKey.php b/app/Support/Binder/EitherConfigKey.php index c706cba554..8c19feb0f3 100644 --- a/app/Support/Binder/EitherConfigKey.php +++ b/app/Support/Binder/EitherConfigKey.php @@ -37,7 +37,8 @@ class EitherConfigKey 'firefly.allowed_opposing_types', 'firefly.accountRoles', 'firefly.valid_liabilities', - 'firefly.interest_periods' + 'firefly.interest_periods', + 'firefly.enable_external_map' ]; /** * @param string $value diff --git a/config/firefly.php b/config/firefly.php index ec9a153cdd..192361c718 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -99,8 +99,8 @@ return [ 'webhooks' => false, ], - 'version' => '5.5.3', - 'api_version' => '1.5.1', + 'version' => '5.5.4', + 'api_version' => '1.5.2', 'db_version' => 16, 'maxUploadSize' => 1073741824, // 1 GB 'send_error_message' => env('SEND_ERROR_MESSAGE', true), @@ -113,6 +113,7 @@ return [ 'demo_password' => env('DEMO_PASSWORD', ''), 'fixer_api_key' => env('FIXER_API_KEY', ''), 'mapbox_api_key' => env('MAPBOX_API_KEY', ''), + 'enable_external_map' => env('ENABLE_EXTERNAL_MAP', false), 'trusted_proxies' => env('TRUSTED_PROXIES', ''), 'send_report_journals' => envNonEmpty('SEND_REPORT_JOURNALS', true), 'tracker_site_id' => env('TRACKER_SITE_ID', ''), @@ -209,7 +210,9 @@ return [ ], 'list_length' => 10, 'bill_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'], + 'interest_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'], 'accountRoles' => ['defaultAsset', 'sharedAsset', 'savingAsset', 'ccAsset', 'cashWalletAsset'], + 'valid_liabilities' => [AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE], 'ccTypes' => [ 'monthlyFull' => 'Full payment every month', ], diff --git a/frontend/src/components/shared/transactions.js b/frontend/src/shared/transactions.js similarity index 100% rename from frontend/src/components/shared/transactions.js rename to frontend/src/shared/transactions.js