Now that we have the review route and frontend done, it's time to connect the two. In proposalTable.tsx, there's a handler function called handleReviewOKClick where you'll make the API call. When the user makes a selection for a review status, it'll open up a modal to confirm their selection. When they click OK, it should call this handler to make the PUT request (/api/projects).
Requirements:
[x] Handler invoked after confirming selection in the confirmation Dialog
[x] Handler takes care of the API call
[x] The state of the review for the given row is updated after a successful response from the endpoint
Make sure the state is properly updated on success. If you have some extra time, please add error handling using a shadcn toast() to trigger an error for an unsuccessful project update.
Now that we have the review route and frontend done, it's time to connect the two. In
proposalTable.tsx
, there's a handler function calledhandleReviewOKClick
where you'll make the API call. When the user makes a selection for a review status, it'll open up a modal to confirm their selection. When they clickOK
, it should call this handler to make the PUT request (/api/projects
).Requirements:
Make sure the state is properly updated on success. If you have some extra time, please add error handling using a shadcn
toast()
to trigger an error for an unsuccessful project update.