Auto commit for release 'develop' on 2024-03-25

This commit is contained in:
github-actions
2024-03-25 04:10:34 +01:00
parent 87be478dd8
commit 14d3312a10
111 changed files with 462 additions and 1035 deletions

View File

@@ -138,13 +138,14 @@ class AccountTransformer extends AbstractTransformer
});
}
if ('last_activity' === $column) {
$dates = $this->lastActivity;
$objects = $objects->sort(function (Account $left, Account $right) use ($dates, $direction) {
$dates = $this->lastActivity;
$objects = $objects->sort(function (Account $left, Account $right) use ($dates, $direction) {
$leftDate = $dates[$left->id] ?? Carbon::create(1900, 1, 1, 0, 0, 0);
$rightDate = $dates[$right->id] ?? Carbon::create(1900, 1, 1, 0, 0, 0);
if ('asc' === $direction) {
return $leftDate->gt($rightDate) ? 1 : -1;
}
return $rightDate->gt($leftDate) ? 1 : -1;
});
}