added new permission to separate time and money budget (#3352)

This commit is contained in:
Kevin Papst
2022-06-11 12:23:02 +02:00
committed by GitHub
parent 3f827b3104
commit b46fdcefad
47 changed files with 853 additions and 346 deletions

View File

@@ -133,7 +133,7 @@ final class ActivityController extends AbstractController
$rates = $rateRepository->getRatesForActivity($activity);
}
if ($this->isGranted('budget', $activity)) {
if ($this->isGranted('budget', $activity) || $this->isGranted('time', $activity)) {
$stats = $statisticService->getBudgetStatisticModel($activity, $now);
}
@@ -424,7 +424,8 @@ final class ActivityController extends AbstractController
'action' => $url,
'method' => 'POST',
'currency' => $currency,
'include_budget' => $this->isGranted('budget', $activity)
'include_budget' => $this->isGranted('budget', $activity),
'include_time' => $this->isGranted('time', $activity),
]);
}
}