mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 14:26:58 +00:00
Make sure user interface works for new recurring transactions.
This commit is contained in:
@@ -68,6 +68,7 @@ class IndexController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO the notes of a recurrence are pretty pointless at this moment.
|
||||
* Show all recurring transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
@@ -108,33 +109,4 @@ class IndexController extends Controller
|
||||
return view('recurring.index', compact('paginator', 'page', 'pageSize', 'total'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a single recurring transaction.
|
||||
*
|
||||
* @param Recurrence $recurrence
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function show(Recurrence $recurrence)
|
||||
{
|
||||
/** @var RecurrenceTransformer $transformer */
|
||||
$transformer = app(RecurrenceTransformer::class);
|
||||
$transformer->setParameters(new ParameterBag);
|
||||
|
||||
$array = $transformer->transform($recurrence);
|
||||
$groups = $this->recurring->getTransactions($recurrence);
|
||||
|
||||
// transform dates back to Carbon objects:
|
||||
foreach ($array['recurrence_repetitions'] as $index => $repetition) {
|
||||
foreach ($repetition['occurrences'] as $item => $occurrence) {
|
||||
$array['recurrence_repetitions'][$index]['occurrences'][$item] = new Carbon($occurrence);
|
||||
}
|
||||
}
|
||||
|
||||
$subTitle = (string)trans('firefly.overview_for_recurrence', ['title' => $recurrence->title]);
|
||||
|
||||
return view('recurring.show', compact('recurrence', 'subTitle', 'array', 'groups'));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user