Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimesheetAPI: Supervisor/Admin getTimesheet endpoint #34

Open
izzyconner opened this issue May 12, 2023 · 0 comments
Open

TimesheetAPI: Supervisor/Admin getTimesheet endpoint #34

izzyconner opened this issue May 12, 2023 · 0 comments
Assignees

Comments

@izzyconner
Copy link
Collaborator

izzyconner commented May 12, 2023

Linked to Story Item 14

Goal: We would like to allow supervisors/admins to be able to retrieve employees timesheet(s) efficiently with simply querying for their user id(s). All users should be able to retrieve their own timesheets.

Scope: Backend codebase
getTimesheet

Shema
Request Data: Should take in one or more uuid(s) as a parameter
Return Data:
employees - (userID, useridTimesheet(s))
admins - list of mapping objects (user id, userid timesheet(s))
supervisors - should get back a list of mappings similar to admins back but with no employee time but all other data.

Conditions of Acceptance:

  • Associates should not be able to access this new endpoint. Thow 401 unauthorized error if they try to.

  • If supervisors request timesheets from users they have access to, they should receive all relevant timesheet data (except clock in, clock out of associates).

  • If supervisors request outside their company, we have two options we should consider. Either throw an error or return valid user ids (this would require having error, valid, and warnings as three separate fields).

  • Admins can get anyone's user ids, but if they request a user id that does not exist, throw some type of an error or just return nothing.

  • One or more timesheets requested will get those corresponding mapping objects.

  • By default we should get all tickets for time period but should add date filtering in the future

@kayleewuhu kayleewuhu self-assigned this May 30, 2023
@izzyconner izzyconner assigned circlegov and neetidesai and unassigned kayleewuhu Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants