allow to restrict usage of global activities for projects (#3437)

This commit is contained in:
Kevin Papst
2022-07-23 01:17:24 +02:00
committed by GitHub
parent 8d695d03df
commit ed7f89cfe1
12 changed files with 140 additions and 11 deletions

View File

@@ -27,6 +27,7 @@ class TimesheetBasic extends TimesheetConstraint
public const DISABLED_CUSTOMER_ERROR = 'kimai-timesheet-89';
public const PROJECT_NOT_STARTED = 'kimai-timesheet-91';
public const PROJECT_ALREADY_ENDED = 'kimai-timesheet-92';
public const PROJECT_DISALLOWS_GLOBAL_ACTIVITY = 'kimai-timesheet-93';
protected static $errorNames = [
self::MISSING_BEGIN_ERROR => 'You must submit a begin date.',
@@ -39,6 +40,7 @@ class TimesheetBasic extends TimesheetConstraint
self::DISABLED_CUSTOMER_ERROR => 'Cannot start a disabled customer.',
self::PROJECT_NOT_STARTED => 'The project has not started at that time.',
self::PROJECT_ALREADY_ENDED => 'The project is finished at that time.',
self::PROJECT_DISALLOWS_GLOBAL_ACTIVITY => 'Global activities are forbidden for the selected project.',
];
public $message = 'This timesheet has invalid settings.';