From: Vladimir Fomichev Date: Wed, 10 Dec 2025 08:01:50 +0000 (+0300) Subject: Добавил константы для смен админитстраторов X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=a5eef5e415cddc8a8fd797190704e7c25cca694d;p=erp24_rep%2Fyii-erp24%2F.git Добавил константы для смен админитстраторов --- diff --git a/erp24/records/Shift.php b/erp24/records/Shift.php index 78063bb8..991991a5 100755 --- a/erp24/records/Shift.php +++ b/erp24/records/Shift.php @@ -21,6 +21,8 @@ class Shift extends ActiveRecord { const DAY = 1; const NIGHT = 2; + const ADMINISTRATOR_8_17 = 5; + const ADMINISTRATOR_9_18 = 8; private array $hours = []; @@ -111,6 +113,6 @@ class Shift extends ActiveRecord } public static function getShiftIdsByShiftType ($shiftType) { - return $shiftType == 0 ? [1, 2, 5, 8] : ($shiftType == 1 ? [1, 5, 8] : [2]); + return $shiftType == 0 ? [self::DAY, self::NIGHT, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18] : ($shiftType == self::DAY ? [self::DAY, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18] : [self::NIGHT]); } } \ No newline at end of file