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

@@ -315,7 +315,7 @@ final class CustomerController extends AbstractController
$timezone = new \DateTimeZone($customer->getTimezone());
}
if ($this->isGranted('budget', $customer)) {
if ($this->isGranted('budget', $customer) || $this->isGranted('time', $customer)) {
$stats = $statisticService->getBudgetStatisticModel($customer, $now);
}
@@ -530,7 +530,8 @@ final class CustomerController extends AbstractController
return $this->createForm(CustomerEditForm::class, $customer, [
'action' => $url,
'method' => 'POST',
'include_budget' => $this->isGranted('budget', $customer)
'include_budget' => $this->isGranted('budget', $customer),
'include_time' => $this->isGranted('time', $customer),
]);
}
}