mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-02-02 10:32:28 +00:00
🤖 Auto commit for release 'develop' on 2026-01-23
This commit is contained in:
@@ -80,11 +80,11 @@ class IndexController extends Controller
|
||||
*/
|
||||
public function index(Request $request): Factory|\Illuminate\Contracts\View\View
|
||||
{
|
||||
$page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');
|
||||
$pageSize = (int) Preferences::get('listPageSize', 50)->data;
|
||||
$collection = $this->repository->get();
|
||||
$today = today(config('app.timezone'));
|
||||
$year = today(config('app.timezone'));
|
||||
$page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');
|
||||
$pageSize = (int) Preferences::get('listPageSize', 50)->data;
|
||||
$collection = $this->repository->get();
|
||||
$today = today(config('app.timezone'));
|
||||
$year = today(config('app.timezone'));
|
||||
|
||||
// split collection
|
||||
$total = $collection->count();
|
||||
@@ -92,8 +92,8 @@ class IndexController extends Controller
|
||||
|
||||
// enrich
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
$enrichment = new RecurringEnrichment();
|
||||
$admin = auth()->user();
|
||||
$enrichment = new RecurringEnrichment();
|
||||
$enrichment->setUser($admin);
|
||||
$recurrences = $enrichment->enrich($recurrences);
|
||||
|
||||
@@ -101,7 +101,7 @@ class IndexController extends Controller
|
||||
$transformer = app(RecurrenceTransformer::class);
|
||||
$transformer->setParameters(new ParameterBag());
|
||||
|
||||
$recurring = [];
|
||||
$recurring = [];
|
||||
|
||||
/** @var Recurrence $recurrence */
|
||||
foreach ($recurrences as $recurrence) {
|
||||
@@ -111,12 +111,12 @@ class IndexController extends Controller
|
||||
$year = clone $today;
|
||||
$year->addYear();
|
||||
}
|
||||
$array = $transformer->transform($recurrence);
|
||||
$array['first_date'] = new Carbon($array['first_date']);
|
||||
$array = $transformer->transform($recurrence);
|
||||
$array['first_date'] = new Carbon($array['first_date']);
|
||||
$array['repeat_until'] = null === $array['repeat_until'] ? null : new Carbon($array['repeat_until']);
|
||||
$array['latest_date'] = null === $array['latest_date'] ? null : new Carbon($array['latest_date']);
|
||||
$array['latest_date'] = null === $array['latest_date'] ? null : new Carbon($array['latest_date']);
|
||||
// lazy but OK
|
||||
$array['attachments'] = $recurrence->attachments()->count();
|
||||
$array['attachments'] = $recurrence->attachments()->count();
|
||||
|
||||
// make carbon objects out of occurrences
|
||||
foreach ($array['repetitions'] as $repIndex => $repetition) {
|
||||
@@ -125,11 +125,11 @@ class IndexController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$recurring[] = $array;
|
||||
$recurring[] = $array;
|
||||
}
|
||||
$paginator = new LengthAwarePaginator($recurring, $total, $pageSize, $page);
|
||||
$paginator = new LengthAwarePaginator($recurring, $total, $pageSize, $page);
|
||||
$paginator->setPath(route('recurring.index'));
|
||||
$today = today(config('app.timezone'));
|
||||
$today = today(config('app.timezone'));
|
||||
|
||||
$this->verifyRecurringCronJob();
|
||||
|
||||
@@ -138,7 +138,7 @@ class IndexController extends Controller
|
||||
'today' => $today,
|
||||
'page' => $page,
|
||||
'pageSize' => $pageSize,
|
||||
'total' => $total
|
||||
'total' => $total,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user