Visually it would work like a project raising thermometer bar with the length of the bar being the maximum amount of days that can be charged out (capacity = team member quantity * 220) and usage being the amount of days that have been charged to projects.
Can work out how many days have been charged so far in the year and then compute that to annual usage to get a percentage of current utilisation. There would be a filled up bar which equates to the amount of days charged and then a dotted line that represents the target for the end of the year. It would also keep track of where the usage should be to reach the utilisation target via a greyed out bar which would only appear if usage was behind target.
Notes:
The financial year is from 1st of August to 31st of July.
The finance team works out the facility data so there is no need to perform the calculations ourselves as the data sets must match.
The maximum days that can be worked per year are 220 days for full-time employees of educational institutes.
We need to take into account the entire year for progress as some months have more bank holidays, and December includes a lot of days off for Christmas.
There is a government API endpoint that shows all UK bank holidays.
Add 2 weeks hardcoded into Christmas (remove the Christmas bank holidays). Should be Christmas Eve -> 3rd or the fourth depending on if it's the weekend or not. Also need to remove all of the weekends and only work out the targetDaysBooked based on the amount of possible working days that have passed.
data: {
id: 1,
year: 2023,
annualCapacity: 2200, (the full length of the thermometer)
daysBooked: 100, (the filled in block starting from the bottom)
targetDaysBooked: 96, (the greyed out block which wouldn't show as it's below the days booked)
targetAnnualDays: 1760, (using a 80% utilisation)
onTarget: true, (
}
TargetDaysBooked
The targetDaysBooked is the amount of days that should have been booked so far to reach the target days. This needs to be dynamic as each year has different valid working days.
Each valid working day can be multiplied by the amount of team members to get the maximum value that day could have given the team. If there are 10 team members and 220 valid working days then annualCapacity would be 2200. We can then work out how many working days have occurred so far in the year by counting all days that are not bank holidays, weekends or the Christmas break. If 120 possible working days have occurred (12 actual working days 10 team members), then the target amount of working days to have been worked for this period would be 120 0.8 = 96 days. If 100 working days have occurred, that would be over the target.
Further Features
Sending a month as a parameter and receiving the same information but for a specified month. We could add monthlyCapacity and other fields.
Feature
Visually it would work like a project raising thermometer bar with the length of the bar being the maximum amount of days that can be charged out (capacity = team member quantity * 220) and usage being the amount of days that have been charged to projects.
Can work out how many days have been charged so far in the year and then compute that to annual usage to get a percentage of current utilisation. There would be a filled up bar which equates to the amount of days charged and then a dotted line that represents the target for the end of the year. It would also keep track of where the usage should be to reach the utilisation target via a greyed out bar which would only appear if usage was behind target.
Notes:
Mock Request
GET: http://localhost:8080/api/annualProgress?populate=* Headers: Key: Content-Type | Value: application/json
Sample Input
utilisation: 0.8
Sample Output
data: { id: 1, year: 2023, annualCapacity: 2200, (the full length of the thermometer) daysBooked: 100, (the filled in block starting from the bottom) targetDaysBooked: 96, (the greyed out block which wouldn't show as it's below the days booked) targetAnnualDays: 1760, (using a 80% utilisation) onTarget: true, ( }
TargetDaysBooked
The targetDaysBooked is the amount of days that should have been booked so far to reach the target days. This needs to be dynamic as each year has different valid working days.
Each valid working day can be multiplied by the amount of team members to get the maximum value that day could have given the team. If there are 10 team members and 220 valid working days then annualCapacity would be 2200. We can then work out how many working days have occurred so far in the year by counting all days that are not bank holidays, weekends or the Christmas break. If 120 possible working days have occurred (12 actual working days 10 team members), then the target amount of working days to have been worked for this period would be 120 0.8 = 96 days. If 100 working days have occurred, that would be over the target.
Further Features
Sending a month as a parameter and receiving the same information but for a specified month. We could add monthlyCapacity and other fields.