fixes for budgets

This commit is contained in:
2022-03-03 10:37:10 +01:00
parent ac12e75714
commit 0833bb49ca
13 changed files with 97 additions and 84 deletions

View File

@@ -36,16 +36,16 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
/** @var Person $person */
$person = $parameters['person'];
// if ($this->authorizationChecker->isGranted(BudgetElementVoter::SHOW, $person)) {
$menu->addChild(
$this->translator->trans('Budget'),
[
'route' => 'chill_budget_elements_index',
'routeParameters' => ['id' => $person->getId()],
]
)
->setExtra('order', 4000);
// }
if ($this->authorizationChecker->isGranted(BudgetElementVoter::SEE, $person)) {
$menu->addChild(
$this->translator->trans('Budget'),
[
'route' => 'chill_budget_elements_index',
'routeParameters' => ['id' => $person->getId()],
]
)
->setExtra('order', 4000);
}
}
public static function getMenuIds(): array