Hi Everyone,
I have a bit of a problem on my hands. I've been tasked with making a team rota program and will be using a web based PHP/MySQL system.
My current database set up is as follows:
==========================================
Table 1: Staff_List
Fields: StaffID, Firstname, Surname, NumShifts, ContractHours, InitialDeptID, PayRate, PIN, LastDate, InRota, BreakPaid, HolidayHours
NumShifts is number of shifts the person works per week for the manager's reference when building the rota, InitialDeptID is the department the staff member belongs to on the rota (as some team members are multiskilled and may be used in other departments), InRota for this purpose is always 1, and LastDate is if the team member has stopped working for the company so they no longer appear on the rota from this date.
Table 2: Rota_List
Fields: RotaID, MondayDate, TuesdayDate, WednesdayDate, ThursdayDate, FridayDate, SaturdayDate, SundayDate, Status, LastUpdate, Budget, Target
The dates are stored in DD/MM/YYYY format
Table 3: Hours_List
Fields: EntryID, RotaID, StaffID, DeptID, Date, StartTime, FinishTime, TotalHours, HoursDec, PayRate, ShiftCost, Requested
Table 4: Dept_List
Fields: DeptID, DeptName, DeptShort, InRota
For this purpose, InRota can be regarded as 1. DeptShort is for admin purposes.
==========================================
Now, at the moment my buildrota.php page outputs a table (see attached - sorry about the quality, couldnt get it any better as max 100kb file size!) divided into departments. Team member names are down the side of the table and the dates are across the top Monday to Sunday. Team Members are given an initial department ID to determine which department their name comes under.
Then the manager building the rota has to click the "add a shift" link next to the persons name for the date they want them to work. This pops up a page for the shift to be created.
As you can appreciate this is a long winded process. So I wanted to condense the process down by doing the following:
Instead of saying "add shift", have an input box for start time, input box for finish time and drop down menu for department, for each day, for each team member in the table.
Then once all the shifts have been filled in that are needed, the manager clicks the submit button and then the script would have to insert a new entry into the "hours_list" table for each day for each team member with fields completed...
I was wondering if anyone could help me in regards to this?
Many thanks!