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

Implement review submission logic by creating AddReviewModal.tsx #2915

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

dudchakk
Copy link
Contributor

@dudchakk dudchakk commented Nov 30, 2024

Description: This PR implements the design and functionality of the Add review modal, allowing users to leave feedback after a collaboration.

!! Important: For testing purposes, for now the modal opens when clicking on the Close cooperation button. After the functional will be finished, the modal will open after the user confirmes that he wants to close the cooperation.

UI part:

  • Developed the UI and layout of the modal based on the design specifications;
  • Added controlled inputs for rating and review fields;
  • Implemented conditional descriptions for students and tutors;
  • Included Ukrainian translations for all text.

How it looks:

image

Logic part:

Required fields for a review on backend:

image

  • Created ReviewService && submitReview function to send review data according to backend requirements`;
  • Integrated data from two sources: CooperationDetails (information about the target user & offer) and input data in AddReviewModal (comment & rating);
  • Utilized the useAxios hook to handle API communication, handle errors and give feedback for the user, indicating the success or failure of the submission;
  • Used the useForm hook to manage the modal’s form state including input values, validation and submission logic.

How it works:

Recording.submit-review.mp4

@dudchakk dudchakk added Frontend part feature design Task for designers Tutor Implementation that regard to the tutor Student Implementation that regard to the student Functional Something isn't working labels Nov 30, 2024
@dudchakk dudchakk self-assigned this Nov 30, 2024
@dudchakk dudchakk linked an issue Nov 30, 2024 that may be closed by this pull request
Copy link

sonarqubecloud bot commented Dec 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
34.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@dudchakk dudchakk changed the title Implement AddReviewModal Implement review submission logic by creating AddReviewModal.tsx Dec 4, 2024
@dudchakk dudchakk linked an issue Dec 4, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Task for designers feature Frontend part Functional Something isn't working Student Implementation that regard to the student Tutor Implementation that regard to the tutor
Projects
None yet
2 participants