You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add in 'DueDateAssociate' and 'DueDateSupervisor' fields to internal (non-Dynamo) schemas; add in value defaulting on backend if no due date(s) are specified in Dynamo data
#21
Open
4 tasks
izzyconner opened this issue
Apr 3, 2024
· 0 comments
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
If a timesheet is requested from the database that contains a DueDateAssociate field, the DueDateAssociate field should be present in the API's response
If a timesheet is requested from the database that contains a DueDateSupervisor field, the DueDateSupervisor field should be present in the API's response
If a timesheet is requested from the database that does not contains a DueDateAssociate field, the DueDateAssociate field should be present in the API's response and be an epoch equivalent to 7 days after the Start of that timesheet
If a timesheet is requested from the database that does not contains a DueDateSupervisor field, the DueDateSupervisor field should be present in the API's response and be an epoch equivalent to 10 days after the Start of that timesheet
The text was updated successfully, but these errors were encountered:
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
/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 associateDueDateSupervisor
: an epoch representing the day and time that this timesheet must be reviewed by the supervisorYou will need to update the
TimesheetEntry
schema to include this new change, in both theDynamo
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 theStart
dateDueDateSupervisor
should be default to 10 days after theStart
dateConditions of Satisfaction
DueDateAssociate
field, theDueDateAssociate
field should be present in the API's responseDueDateSupervisor
field, theDueDateSupervisor
field should be present in the API's responseDueDateAssociate
field, theDueDateAssociate
field should be present in the API's response and be an epoch equivalent to 7 days after theStart
of that timesheetDueDateSupervisor
field, theDueDateSupervisor
field should be present in the API's response and be an epoch equivalent to 10 days after theStart
of that timesheetThe text was updated successfully, but these errors were encountered: