automatic billable calculation (#3200)

This commit is contained in:
Kevin Papst
2022-03-18 22:31:50 +01:00
committed by GitHub
parent f7480902b4
commit 30c7782d6e
34 changed files with 409 additions and 53 deletions

View File

@@ -153,8 +153,9 @@ class TimesheetTeamController extends TimesheetAbstractController
return $this->createForm(TimesheetMultiUserEditForm::class, $entry, [
'action' => $this->generateUrl('admin_timesheet_create_multiuser'),
'include_rate' => $this->isGranted('edit_rate', $entry),
'include_exported' => $this->isGranted('edit_export', $entry),
'include_rate' => $this->isGranted($this->getPermissionEditRate()),
'include_exported' => $this->isGranted($this->getPermissionEditExport()),
'include_billable' => $this->isGranted($this->getPermissionEditBillable()),
'include_user' => $this->includeUserInForms('create'),
'allow_begin_datetime' => $mode->canEditBegin(),
'allow_end_datetime' => $mode->canEditEnd(),
@@ -205,6 +206,11 @@ class TimesheetTeamController extends TimesheetAbstractController
return 'edit_export_other_timesheet';
}
protected function getPermissionEditBillable(): string
{
return 'edit_billable_other_timesheet';
}
protected function getPermissionEditRate(): string
{
return 'edit_rate_other_timesheet';