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 should 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

You will need to update the TimesheetEntry schema to include this new change, in both the Dynamo schemas and the internal shared schemas (if the shared schemas ticket still isn't out when you start working on this, please bug Izzy to get it pushed). Update any zod parsers to parse for it optionally.
Then, once the schemas have been updated, we will also need to update the return value of the backend timesheets in the GET request response to default to the following values if not DueDates are received from the database date:
DueDateAssociate should be defaulted to 7 days after the Start date
DueDateSupervisor should be default to 10 days after the Start date
Conditions of Satisfaction
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 should 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 supervisorYou will need to update the
TimesheetEntryschema to include this new change, in both theDynamoschemas and the internal shared schemas (if the shared schemas ticket still isn't out when you start working on this, please bug Izzy to get it pushed). Update any zod parsers to parse for it optionally.Then, once the schemas have been updated, we will also need to update the return value of the backend timesheets in the
GETrequest response to default to the following values if not DueDates are received from the database date:DueDateAssociateshould be defaulted to 7 days after theStartdateDueDateSupervisorshould be default to 10 days after theStartdateConditions of Satisfaction
DueDateAssociatefield, theDueDateAssociatefield should be present in the API's responseDueDateSupervisorfield, theDueDateSupervisorfield should be present in the API's responseDueDateAssociatefield, theDueDateAssociatefield should be present in the API's response and be an epoch equivalent to 7 days after theStartof that timesheetDueDateSupervisorfield, theDueDateSupervisorfield should be present in the API's response and be an epoch equivalent to 10 days after theStartof that timesheet