mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Various code cleanup and fixed alignments.
This commit is contained in:
		| @@ -61,8 +61,8 @@ class HomeController extends Controller | ||||
|      */ | ||||
|     public function dateRange(Request $request): JsonResponse | ||||
|     { | ||||
|         $stringStart = ''; | ||||
|         $stringEnd   = ''; | ||||
|         $stringStart   = ''; | ||||
|         $stringEnd     = ''; | ||||
| 
 | ||||
|         try { | ||||
|             $stringStart = e((string)$request->get('start')); | ||||
| @@ -97,7 +97,7 @@ class HomeController extends Controller | ||||
|             app('log')->debug('Range is now marked as "custom".'); | ||||
|         } | ||||
| 
 | ||||
|         $diff = $start->diffInDays($end) + 1; | ||||
|         $diff          = $start->diffInDays($end) + 1; | ||||
| 
 | ||||
|         if ($diff > 50) { | ||||
|             $request->session()->flash('warning', (string)trans('firefly.warning_much_data', ['days' => $diff])); | ||||
| @@ -120,8 +120,8 @@ class HomeController extends Controller | ||||
|      */ | ||||
|     public function index(AccountRepositoryInterface $repository): mixed | ||||
|     { | ||||
|         $types = config('firefly.accountTypesByIdentifier.asset'); | ||||
|         $count = $repository->count($types); | ||||
|         $types          = config('firefly.accountTypesByIdentifier.asset'); | ||||
|         $count          = $repository->count($types); | ||||
|         Log::channel('audit')->info('User visits homepage.'); | ||||
| 
 | ||||
|         if (0 === $count) { | ||||
| @@ -136,15 +136,15 @@ class HomeController extends Controller | ||||
|         } | ||||
| 
 | ||||
|         /** @var Carbon $start */ | ||||
|         $start = session('start', today(config('app.timezone'))->startOfMonth()); | ||||
|         $start          = session('start', today(config('app.timezone'))->startOfMonth()); | ||||
| 
 | ||||
|         /** @var Carbon $end */ | ||||
|         $end      = session('end', today(config('app.timezone'))->endOfMonth()); | ||||
|         $accounts = $repository->getAccountsById($frontPageArray); | ||||
|         $today    = today(config('app.timezone')); | ||||
|         $end            = session('end', today(config('app.timezone'))->endOfMonth()); | ||||
|         $accounts       = $repository->getAccountsById($frontPageArray); | ||||
|         $today          = today(config('app.timezone')); | ||||
| 
 | ||||
|         // sort frontpage accounts by order
 | ||||
|         $accounts = $accounts->sortBy('order'); | ||||
|         $accounts       = $accounts->sortBy('order'); | ||||
| 
 | ||||
|         app('log')->debug('Frontpage accounts are ', $frontPageArray); | ||||
| 
 | ||||
| @@ -154,14 +154,14 @@ class HomeController extends Controller | ||||
|         // collect groups for each transaction.
 | ||||
|         foreach ($accounts as $account) { | ||||
|             /** @var GroupCollectorInterface $collector */ | ||||
|             $collector = app(GroupCollectorInterface::class); | ||||
|             $collector      = app(GroupCollectorInterface::class); | ||||
|             $collector->setAccounts(new Collection([$account]))->withAccountInformation()->setRange($start, $end)->setLimit(10)->setPage(1); | ||||
|             $set            = $collector->getExtractedJournals(); | ||||
|             $transactions[] = ['transactions' => $set, 'account' => $account]; | ||||
|         } | ||||
| 
 | ||||
|         /** @var User $user */ | ||||
|         $user = auth()->user(); | ||||
|         $user           = auth()->user(); | ||||
|         event(new RequestedVersionCheckStatus($user)); | ||||
| 
 | ||||
|         return view('index', compact('count', 'subTitle', 'transactions', 'billCount', 'start', 'end', 'today')); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user