(SP: 3) Add review submission functionality to AddReviewModal.tsx #2917
Labels
feature
Frontend part
Functional
Something isn't working
Student
Implementation that regard to the student
Tutor
Implementation that regard to the tutor
Description: The
AddReviewModal.tsx
component needs to be updated to enable submitting reviews to the backend. This involves creating a service to handle the API POST request and integrating it with the modal so that review data is sent and saved in the reviews collection upon submission.Create the service:
Develop a function to send a POST request to the backend. The data sent must include:
comment
- string,rating
- number,targetUserId
- ObjectId,targetUserRole
- UserRoleEnum,offer
- ObjectIdEndpoints to send data to:
POST http://localhost:8080/reviews/
Integrate the service with the modal:
AddReviewModal.tsx
;The text was updated successfully, but these errors were encountered: