added setting to limit the maximum length of a timesheet record (#2612)

This commit is contained in:
Kevin Papst
2021-06-12 01:05:33 +02:00
committed by GitHub
parent 53e01177d9
commit 7460647d58
19 changed files with 366 additions and 28 deletions

View File

@@ -0,0 +1,26 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Validator\Constraints;
final class TimesheetLongRunning extends TimesheetConstraint
{
public const LONG_RUNNING = 'kimai-timesheet-long-running-01';
protected static $errorNames = [
self::LONG_RUNNING => 'TIMESHEET_LONG_RUNNING',
];
public $message = 'Maximum duration of {{ value }} hours exceeded.';
public function getTargets()
{
return self::CLASS_CONSTRAINT;
}
}