]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Добавил константы для смен админитстраторов
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 10 Dec 2025 08:01:50 +0000 (11:01 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 10 Dec 2025 08:01:50 +0000 (11:01 +0300)
erp24/records/Shift.php

index 78063bb8f6e5277035bdc26ffa667bb650916a10..991991a50cdcf7021168c0e2c001e72bffbd507d 100755 (executable)
@@ -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