Magidoc

submitTimesheets
Mutation

Used for submit timesheets button timesheets in "timesheet" tab in "Timesheets" app.

Access: It requires user access.

Errors: Returns specific expected errors if: timesheets array is empty, user is not logged in, user doesn't have access to workspace, user trying to submit timesheets beyond 4 weeks period from start of current week, userId is different from current userId and user is not admin for current workspace, if one of timesheets is locked, approved or waiting for approval

Arguments

#

workspaceId

ID !
Non-null

workspace associated with timesheets

userId

ID !
Non-null

user associated with timesheets

startDate

Non-null

start of period for which data should be retrieved.

NOTE: Should be equal to start of the week date in requested workspace, works as an exact date match, not as a date range

endDate

Non-null

end of period for which data should be retrieved.

NOTE: Should be equal to end of the week date in requested workspace, works as an exact date match, not as a date range

timesheets

Non-null

timesheets to submit

isEditMode

Edit mode for admins

Response

#

Returns [ Timesheet !]!.

Example

#

    
  

3

    
  

3

    
  

3