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
Currently, only the TimeTable component is controlled by the disabled state. We need to add a way to switch the SubmitCard to a custom disabled state.
Description
When the timesheet should be disabled, the SubmitCard should still display information about the current status of the timesheet. However, the 'submit' button should be greyed out.
Most likely, the solution for this will be to add in a disabled field into the props for the SubmitCard component.
Conditions of Satisfaction