Hi, I'm trying to create a staff holiday planner as we currently use whosoff.com which has now decided to charge.
I have made a start on the database and have set it out like this so far...
4 Tables..
tblDepartment (containing department names) ie.
1 Shop floor
2 Director
3 Staff
etc...
tblHolidayType (why someone is off)
1 Full Holiday
2 Holiday AM
3 Holiday PM
4 Full Sick
etc..
tblEmployee (staff records)
firstname - Joe
surname - Bloggs
department - 3
startdate - 01/01/09 (get more days off after 5 years)
holdays - 25
tblHolidays (days off)
employee - 1
holidaydate - 28/01/2009
holidaytype - 2
I have done it like this as I use drop down menus so its easy to add further options if needed.
I have coded up the employee input screen so you can change the days by clicking on the date box and then clicking on the type of leave. This seems to work very well.
So using the above form I can add or clear leave and also amend the users name / day / department.
What I need to create now is a form that shows all the users in a department and what days they have booked / are off. The easiest way to describe it maybe is something the picture below..
I'm just stuck on what the best way would be to go about it.
Any suggestions / sample would be very helpful.
I will also share the completed project for other's to use. I'm not the best coder in the world but if it helps anyone else then there very welcome to it.
I have made a start on the database and have set it out like this so far...
4 Tables..
tblDepartment (containing department names) ie.
1 Shop floor
2 Director
3 Staff
etc...
tblHolidayType (why someone is off)
1 Full Holiday
2 Holiday AM
3 Holiday PM
4 Full Sick
etc..
tblEmployee (staff records)
firstname - Joe
surname - Bloggs
department - 3
startdate - 01/01/09 (get more days off after 5 years)
holdays - 25
tblHolidays (days off)
employee - 1
holidaydate - 28/01/2009
holidaytype - 2
I have done it like this as I use drop down menus so its easy to add further options if needed.
I have coded up the employee input screen so you can change the days by clicking on the date box and then clicking on the type of leave. This seems to work very well.
So using the above form I can add or clear leave and also amend the users name / day / department.
What I need to create now is a form that shows all the users in a department and what days they have booked / are off. The easiest way to describe it maybe is something the picture below..
I'm just stuck on what the best way would be to go about it.
Any suggestions / sample would be very helpful.
I will also share the completed project for other's to use. I'm not the best coder in the world but if it helps anyone else then there very welcome to it.
Last edited: