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

[Frontend] Add Q&A section in admin panel #901

Merged
merged 9 commits into from
May 17, 2024

Conversation

Hemu21
Copy link
Contributor

@Hemu21 Hemu21 commented May 16, 2024

Issue that this pull request solves

Issue Link resolve #888

Closes: #888

Brief description of what is fixed or changed

I created the manage Q&A for admin.

Types of changes

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (Documentation content changed)
  • Other (please describe):

Checklist

Put an x in the boxes that apply

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • My changes does not break the current system and it passes all the current test cases.

@auto-assign auto-assign bot requested a review from Kajol-Kumari May 16, 2024 12:31
@Hemu21
Copy link
Contributor Author

Hemu21 commented May 16, 2024

@Kajol-Kumari can you please check my pr.

Copy link
Member

@Kajol-Kumari Kajol-Kumari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the requested changes along with below ones -

  1. The title of this right panel should be Questions & Answers
  2. The delete and approve buttons should appear in the card in place of Manage Q&A (both button horizontally aligned, you can take reference from below attached screenshot)
Screenshot 2024-05-16 at 8 49 28 PM
  1. I don't see the answers being fetched in here. Each questions should show the list of answers when clicked on answers and each of those answers should also have delete and approve buttons
Screenshot 2024-05-16 at 8 47 32 PM

@Kajol-Kumari Kajol-Kumari added level3 New features, major bug fixing. gssoc GSSoC'24 Label labels May 16, 2024
@Hemu21
Copy link
Contributor Author

Hemu21 commented May 16, 2024

Please make the requested changes along with below ones -

  1. The title of this right panel should be Questions & Answers
  2. The delete and approve buttons should appear in the card in place of Manage Q&A (both button horizontally aligned, you can take reference from below attached screenshot)
Screenshot 2024-05-16 at 8 49 28 PM 3. I don't see the answers being fetched in here. Each questions should show the list of answers when clicked on `answers` and each of those answers should also have delete and approve buttons Screenshot 2024-05-16 at 8 47 32 PM

For This You need to click on the manage Q&A then it open that particular quation and it's answers. You seeing the all questions. If I implement all at one place then it will be clumsy and reduce website ui. I created To tabs one for all data and another for quetion and its answers.

@Hemu21
Copy link
Contributor Author

Hemu21 commented May 16, 2024

@Kajol-Kumari I already mentioned you about the backend problem If you click on the manage Q&A then you will get. error Why because code is not merged for backend. I hope you get my point

Copy link
Contributor Author

@Hemu21 Hemu21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kajol-Kumari can you please check and merge it.

backend/app/routes/Q&A/answers/index.js Show resolved Hide resolved
@Kajol-Kumari
Copy link
Member

Please make the requested changes along with below ones -

  1. The title of this right panel should be Questions & Answers
  2. The delete and approve buttons should appear in the card in place of Manage Q&A (both button horizontally aligned, you can take reference from below attached screenshot)
Screenshot 2024-05-16 at 8 49 28 PM 3. I don't see the answers being fetched in here. Each questions should show the list of answers when clicked on `answers` and each of those answers should also have delete and approve buttons Screenshot 2024-05-16 at 8 47 32 PM

For This You need to click on the manage Q&A then it open that particular quation and it's answers. You seeing the all questions. If I implement all at one place then it will be clumsy and reduce website ui. I created To tabs one for all data and another for quetion and its answers.

I don't want that manageQ&A extra and want to replace it with the ui i shared. I see most of my review comented have not been addressed, please address all the ui comments i have shared above

@Hemu21
Copy link
Contributor Author

Hemu21 commented May 17, 2024

@Kajol-Kumari if we do like that then website will be slow why because we are fetching all questions at once. to achive the thing you asked. we have to fetch all the questions and then loop all questions and get all questionbyid and get answerby id. I will leads to complete slow down of website. once thing website performace also important. I made ui as you expect with website performance. please click on manage Q&A. then you will understand.

@Kajol-Kumari
Copy link
Member

Kajol-Kumari commented May 17, 2024

@Hemu21 incorporate
#901 (comment) and #901 (review)

Also, the number of questions and answers won't be that much as it is rn, as currently its just test dats, so please do the requested change.

Also, i don't see any loader, while the data is getting fetched, please don't forget to add that as well

Also, note that the approve and delete should be present for each question and answer

@Hemu21
Copy link
Contributor Author

Hemu21 commented May 17, 2024

@Kajol-Kumari ok done

@Hemu21
Copy link
Contributor Author

Hemu21 commented May 17, 2024

@Kajol-Kumari Can you please check I made it as per your wish.

Note: I already Intimated you about the website slowness. Don't blame me if website loads too slow. And important thing is please check you network connect while testing. If data doesn't load because of slow data please check your connection. previously it took seconds now it takes mins.

@Hemu21
Copy link
Contributor Author

Hemu21 commented May 17, 2024

proof preview works fine. check the url in screenshot.

kajolcheck

@Kajol-Kumari
Copy link
Member

Screenshot 2024-05-17 at 5 06 47 PM Hey @Hemu21 the getanswer call is giving error. So can we do something like below -

fetch all the questions as soon as i go to manage Q&A and there in each question card, add a button saying answer, and once i click on that, the list of answers, each having its one approve and delete button should come up

@Hemu21
Copy link
Contributor Author

Hemu21 commented May 17, 2024

@Kajol-Kumari I updated this. can you please check. I had already answered you regarding get answers not working Here that getanswer was i fixed in this issue itself.

Copy link
Member

@Kajol-Kumari Kajol-Kumari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for incorporating the requested changes. LGTM 👍

@Kajol-Kumari Kajol-Kumari merged commit 24a9f89 into HITK-TECH-Community:main May 17, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc GSSoC'24 Label level3 New features, major bug fixing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Frontend] Add Q&A section in admin panel
2 participants