Skip to content

Timesheet: UpdateTimesheet Endpoint / DB Uploads / Frontend & Backend Type Conversions #30

@kennedyry

Description

@kennedyry

When a user is interacting with the timesheet, we need to be saving what they are updating to our DB to allow persistence across the timesheet.

There are also differences between the frontend and backend schemas, we need conversions defined in the types for the backend for inputting and outputting what was changed with mappings.

Terms of Acceptance:

  • Backend Endpoint for updating timesheets refactored to accept the fields it will be overwriting / mutating only those. POST: timesheets and GET: timesheets for what we are retrieving.
  • Plan outline to ensure that only fields that should be overwritten are - they shouldnt be able to overwrite fields like state, etc.
  • Frontend updated to actually make the relevant API calls when updates are received.
  • Mappings defined for converting from backend to frontend fields and vice versa. This is for both retrieving and uploading timesheets. .pick and .transform in zod would be useful here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions