Creating Work Shift Calendar to be used wit MySQL Database
Greetings, I would like to ask on how do I create a work shift calendar to be used with MySQL database. What I am trying to achieve is that when user access my page on a specific date, the script will check work shift calendar on what is the shift on that date, and input into the database on the shift type.
The shift pattern is: 3 shifts: A, B, C. Each shift work 4 days morning shift, then rest 2 day开发者_运维问答s and work 4 days night shift, and repeat.
Appreciate if anyone can give me some advice on this. Thanks in advance.
You can generate the standard work pattern for each worker mathematically.
Usually, there's a supervisor interface to override the standard work pattern. People get sick, need time off for other reasons.
You would have the worker interface so a worker can see when she's working for the upcoming month.
The data that you'd want to store in the database for a work shift is worker id, timestamp for the start of the shift.
精彩评论