Add population of hour shift, depending on selected shift schedule. #531
This commit is contained in:
parent
f31891393d
commit
f5759c8cea
2 changed files with 40 additions and 2 deletions
|
|
@ -672,5 +672,43 @@ class AnalyticsController extends Controller
|
|||
|
||||
protected function populateHourShift($shift)
|
||||
{
|
||||
$hour_shift = [];
|
||||
|
||||
if ($shift == '24_7') {
|
||||
$hour_shift = [
|
||||
['00:00 - 09:00', 0, 1, 2, 3, 4, 5, 6, 7, 8],
|
||||
['01:00 - 10:00', 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
||||
['02:00 - 11:00', 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
['03:00 - 12:00', 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
||||
['04:00 - 13:00', 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
['05:00 - 14:00', 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
['06:00 - 15:00', 6, 7, 8, 9, 10, 11, 12, 13, 14],
|
||||
['07:00 - 16:00', 7, 8, 9, 10, 11, 12, 13, 14, 15],
|
||||
['08:00 - 17:00', 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
['09:00 - 18:00', 9, 10, 11, 12, 13, 14, 15, 16, 17],
|
||||
['10:00 - 19:00', 10, 11, 12, 13, 14, 15, 16, 17, 18],
|
||||
['11:00 - 20:00', 11, 12, 13, 14, 15, 16, 17, 18, 19],
|
||||
['12:00 - 21:00', 12, 13, 14, 15, 16, 17, 18, 19, 20],
|
||||
['13:00 - 22:00', 13, 14, 15, 16, 17, 18, 19, 20, 21],
|
||||
['14:00 - 23:00', 14, 15, 16, 17, 18, 19, 20, 21, 22],
|
||||
['15:00 - 00:00', 15, 16, 17, 18, 19, 20, 21, 22, 23],
|
||||
['16:00 - 01:00', 16, 17, 18, 19, 20, 21, 22, 23, 0],
|
||||
['17:00 - 02:00', 17, 18, 19, 20, 21, 22, 23, 0, 1],
|
||||
['18:00 - 03:00', 18, 19, 20, 21, 22, 23, 0, 1, 2],
|
||||
['19:00 - 04:00', 19, 20, 21, 22, 23, 0, 1, 2, 3],
|
||||
['20:00 - 05:00', 20, 21, 22, 23, 0, 1, 2, 3, 4],
|
||||
['21:00 - 06:00', 21, 22, 23, 0, 1, 2, 3, 4, 5],
|
||||
['22:00 - 07:00', 22, 23, 0, 1, 2, 3, 4, 5, 6],
|
||||
['23:00 - 08:00', 23, 0, 1, 2, 3, 4, 5, 6, 7],
|
||||
];
|
||||
}
|
||||
if ($shift == '8AM_5PM') {
|
||||
$hour_shift = [
|
||||
['07:00 - 16:00', 7, 8, 9, 10, 11, 12, 13, 14, 15],
|
||||
['08:00 - 17:00', 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
];
|
||||
}
|
||||
|
||||
return $hour_shift;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace App\Ramcar;
|
|||
class ShiftSchedule extends NameValue
|
||||
{
|
||||
const SCHED_24_7 = '24_7';
|
||||
const SCHED_8_5 = '8_5';
|
||||
const SCHED_8_5 = '8AM_5PM';
|
||||
|
||||
const COLLECTION = [
|
||||
'24_7' => '24/7 Schedule',
|
||||
'8_5' => '8-5 Schedule',
|
||||
'8AM_5PM' => '8AM-5PM Schedule',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue