1 | <?php |
||
11 | class DutyUsers extends DutyHelper |
||
12 | { |
||
13 | public function __construct(Duty $duty) |
||
14 | { |
||
15 | parent::__construct($duty); |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * Generate a collection to be used for our view 'duty.show'. |
||
20 | * |
||
21 | * @return Collection |
||
22 | */ |
||
23 | public function HTMLOutput() |
||
42 | |||
43 | /** |
||
44 | * Generate a collection to be used for emails. View is either emails.duty_future or emails.duty_today. |
||
45 | * |
||
46 | * @return \Illuminate\Support\Collection |
||
47 | */ |
||
48 | public function emailOutput() |
||
59 | |||
60 | /** |
||
61 | * Get function for the list. List is stored on the helper class. |
||
62 | * |
||
63 | * @return Collection |
||
64 | */ |
||
65 | public function getList() |
||
69 | |||
70 | /** |
||
71 | * Grab the next user to work the duty roster and record them in our database so they are the current worker. |
||
72 | */ |
||
73 | public function recordNextEntry() |
||
78 | |||
79 | /** |
||
80 | * Get the current user in our database who is working the duty roster. |
||
81 | * |
||
82 | * @return DutyUsers |
||
83 | */ |
||
84 | public function getLastWorked() |
||
90 | |||
91 | /** |
||
92 | * Get a list of all users for a specific duty sorted by the user's last name. |
||
93 | * |
||
94 | * @return DutyUsers |
||
95 | */ |
||
96 | public function queryList() |
||
102 | |||
103 | /** |
||
104 | * Take our list of users and merge them with dates so that each user is assigned a duty date. |
||
105 | * |
||
106 | * @return DutyUsers |
||
107 | */ |
||
108 | public function combineListWithDates() |
||
124 | |||
125 | /** |
||
126 | * Query a list of users who we swapped around and insert them into our current duty list of users. |
||
127 | */ |
||
128 | public function insertFromDutySwap() |
||
149 | } |
||
150 |