Context
In Timesheet.tsx, there's a calculated variable disabled, which determines if a user is able to edit and submit the timesheet.
// use this to control whether the timesheet is disabled or not
const disabled = false;
Right now, cases where they will not be able to disable it are:
- A supervisor cannot edit or submit before an associate has submitted their timesheet
- A user cannot submit the timesheet once the corresponding deadline has passed
Description
The backend /timesheet endpoint will now return additional fields in the Timesheet schema to track deadlines, in addition to the Start field that is currently included.
DueDateAssociate : an epoch representing the day and time that this timesheet must be submitted by the associate
DueDateSupervisor: an epoch representing the day and time that this timesheet must be reviewed by the supervisor

The frontend should expect these fields to be passed in when making a GET request to the /timesheet endpoint (you may need to create mock data and stub out a testing endpoint in apiClient.tsx that return the mock data if the backend has not been updated yet). Then, for the current timesheet, there should be a disabled variable that replaces the current const disabled whose value is calculated based on the current user's role, and the appropriate deadline for the user.
Conditions of Satisfaction
(optional)
Context
In Timesheet.tsx, there's a calculated variable disabled, which determines if a user is able to edit and submit the timesheet.
Right now, cases where they will not be able to disable it are:
Description
The backend
/timesheetendpoint will now return additional fields in the Timesheet schema to track deadlines, in addition to the Start field that is currently included.DueDateAssociate: an epoch representing the day and time that this timesheet must be submitted by the associateDueDateSupervisor: an epoch representing the day and time that this timesheet must be reviewed by the supervisorThe frontend should expect these fields to be passed in when making a
GETrequest to the/timesheetendpoint (you may need to create mock data and stub out a testing endpoint inapiClient.tsxthat return the mock data if the backend has not been updated yet). Then, for the current timesheet, there should be adisabledvariable that replaces the current constdisabledwhose value is calculated based on the current user's role, and the appropriate deadline for the user.Conditions of Satisfaction
(optional)