Skip to content

Firefly III: a personal finances manager

updated views

Sander Dorigo17e3e974d18c
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php
index be73ce8f4a..810a19d458 100644
--- a/app/Helpers/Collector/GroupCollector.php
+++ b/app/Helpers/Collector/GroupCollector.php
@@ -1086,7 +1086,7 @@ class GroupCollector implements GroupCollectorInterface
->whereNull('destination.deleted_at')
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
- ->orderBy('transaction_journals.id', 'DESC')
+ ->orderBy('transaction_journals.id', 'ASC')
->orderBy('transaction_journals.description', 'DESC')
->orderBy('source.amount', 'DESC')
;
@@ -1118,7 +1118,7 @@ class GroupCollector implements GroupCollectorInterface
->whereNull('destination.deleted_at')
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
- ->orderBy('transaction_journals.id', 'DESC')
+ ->orderBy('transaction_journals.id', 'ASC')
->orderBy('transaction_journals.description', 'DESC')
->orderBy('source.amount', 'DESC')
;
diff --git a/app/Helpers/Functions/helpers.php b/app/Helpers/Functions/helpers.php
index 67b220e23d..8210d79e44 100644
--- a/app/Helpers/Functions/helpers.php
+++ b/app/Helpers/Functions/helpers.php
@@ -32,6 +32,7 @@ use FireflyIII\Support\Facades\Steam;
use FireflyIII\Support\Search\OperatorQuerySearch;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
+use Illuminate\Support\Facades\Route;
use League\CommonMark\GithubFlavoredMarkdownConverter;
use function Safe\mb_ord;
@@ -104,6 +105,43 @@ if (!function_exists('account_get_meta_field')) {
return $result;
}
}
+if(!function_exists('menu_sub_item_active')) {
+ function menu_sub_item_active(string $route, string $objectType): string
+ {
+ $name = Route::getCurrentRoute()->getName() ?? '';
+ Log::debug(sprintf('menuSubItemActive("%s" = "%s","%s" = "%s")', $route, $name, $objectType, Route::getCurrentRoute()->parameter('objectType')));
+ if ($name === $route && $objectType === Route::getCurrentRoute()->parameter('objectType')) {
+ return 'active';
+ }
+
+ return '';
+ }
+}
+
+if(!function_exists('menu_item_active_partial')) {
+ function menu_item_active_partial(string $route): string
+ {
+ $name = Route::getCurrentRoute()->getName() ?? '';
+ Log::debug(sprintf('menuItemActivePartial("%s" starts with "%s")', $name, $route));
+ if (str_starts_with($name, $route)) {
+ return 'active';
+ }
+
+ return '';
+ }
+}
+
+if(!function_exists('menu_open_partial')) {
+ function menu_open_partial(string $route): string {
+ $name = Route::getCurrentRoute()->getName() ?? '';
+ Log::debug(sprintf('menuOpenPartial("%s" starts with "%s")', $name, $route));
+ if (str_starts_with($name, $route)) {
+ return 'menu-open';
+ }
+
+ return '';
+ }
+}
if (!function_exists('account_balance')) {
function account_balance(Account $account): string
diff --git a/app/Http/Controllers/Transaction/ShowController.php b/app/Http/Controllers/Transaction/ShowController.php
index df0b9fe158..7cb48140b0 100644
--- a/app/Http/Controllers/Transaction/ShowController.php
+++ b/app/Http/Controllers/Transaction/ShowController.php
@@ -122,7 +122,6 @@ final class ShowController extends Controller
/** @var TransactionGroupTransformer $transformer */
$transformer = app(TransactionGroupTransformer::class);
- $transformer->setParameters(new ParameterBag());
$groupArray = $transformer->transformObject($transactionGroup);
// do some calculations:
diff --git a/config/translations.php b/config/translations.php
index 86fa751c83..4c00107120 100644
--- a/config/translations.php
+++ b/config/translations.php
@@ -59,6 +59,7 @@ return [
'interest_calc_yearly',
'loading',
'errors_upload',
+ 'updated_journal_js',
'upload_too_large',
'interest_calc_',
'wait_attachments',
diff --git a/public/v1/js/ff/rules/index.js b/public/v1/js/ff/rules/index.js
index ae610c2e4e..66d240ce3d 100644
--- a/public/v1/js/ff/rules/index.js
+++ b/public/v1/js/ff/rules/index.js
@@ -100,29 +100,29 @@ $(function () {
// show rule triggers
$('.rule-triggers-show').click(function (e) {
var obj = $(e.currentTarget);
- $('.rule-trigger-list[data-id="' + obj.data('id') + '"]').removeClass('hidden');
- $('.rule-triggers-show[data-id="' + obj.data('id') + '"]').addClass('hidden');
+ $('.rule-trigger-list[data-id="' + obj.data('id') + '"]').removeClass('d-none');
+ $('.rule-triggers-show[data-id="' + obj.data('id') + '"]').addClass('d-none');
});
$('.rule-trigger-list').each(function(i,v) {
var obj = $(v);
if(obj.data('count') > 2) {
- obj.addClass('hidden');
- $('.rule-triggers-show[data-id="' + obj.data('id') + '"]').removeClass('hidden');
+ obj.addClass('d-none');
+ $('.rule-triggers-show[data-id="' + obj.data('id') + '"]').removeClass('d-none');
}
});
// show rule actions
$('.rule-actions-show').click(function (e) {
var obj = $(e.currentTarget);
- $('.rule-action-list[data-id="' + obj.data('id') + '"]').removeClass('hidden');
- $('.rule-actions-show[data-id="' + obj.data('id') + '"]').addClass('hidden');
+ $('.rule-action-list[data-id="' + obj.data('id') + '"]').removeClass('d-none');
+ $('.rule-actions-show[data-id="' + obj.data('id') + '"]').addClass('d-none');
});
$('.rule-action-list').each(function(i,v) {
var obj = $(v);
if(obj.data('count') > 1) {
- obj.addClass('hidden');
- $('.rule-actions-show[data-id="' + obj.data('id') + '"]').removeClass('hidden');
+ obj.addClass('d-none');
+ $('.rule-actions-show[data-id="' + obj.data('id') + '"]').removeClass('d-none');
}
});
@@ -194,9 +194,9 @@ function testRuleTriggers(e) {
// Show warning if appropriate
if (data.warning) {
modal.find(".transaction-warning .warning-contents").text(data.warning);
- modal.find(".transaction-warning").removeClass('hidden');
+ modal.find(".transaction-warning").removeClass('d-none');
} else {
- modal.find(".transaction-warning").addClass('hidden');
+ modal.find(".transaction-warning").addClass('d-none');
}
// Show the modal dialog