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

Feat: Created manage user by admin block/unblock users based on their activity successfully Issue 338 #388

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

MeetDOD
Copy link
Contributor

@MeetDOD MeetDOD commented Jul 7, 2024

Pull Request Resolves [#338]

Title: Created manage user by admin block/unblock users based on their activity successfully.

Description

  1. Modified the user prisma model, Added block boolean.
  2. In Admin backend, created route and controller to fetch all the users excluding the admin.
  3. Also I created the routes for block and unblock a user and also it's controller respectively.
  4. In Admin Frontend, fetching all the users from the api.
  5. Creating the patch api on button state so it will update block to true/false as per admin.
  6. User table has necessary info regarding the users and the table is responsive in nature.

Related Issues

Fixes #338

Changes Made

New features: Created manage user by admin block/unblock users based on their activity.

Screenshots

image

image

image

image

image

image

image

I certify that I have carried out the relevant code of conduct and provided the requisite screenshot for validation by submitting this pull request.

Thank You for this contribution.

Copy link

vercel bot commented Jul 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
style-share ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2024 6:04pm

Copy link

github-actions bot commented Jul 7, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jul 7, 2024

@VaibhavArora314 @Ultimateutkarsh11 @akbatra567 review this PR ASAP because I want to add this issue also #389

username: string;
email: string;
verified: boolean;
blocked: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We aren't using any naming convention in this project so, this isn't any issue from the beginning!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Naming convention comes from language irrespective of project.

Refer this for Typescript:

https://gist.github.com/anichitiandreea/e1d466022d772ea22db56399a7af576b#naming-booleans

Copy link
Owner

Choose a reason for hiding this comment

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

Hey @akbatra567, these variable names are coming from Prisma schema and to edit these, there will be a lot of changes in whole applications since these names are used in various places. I think that we can raise a separate issue for changing this throughout since this will be out of the scope of this pull request.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure then, if you feel that way. Approving this then.

@akbatra567
Copy link
Collaborator

@VaibhavArora314 @Ultimateutkarsh11 @akbatra567 review this PR ASAP because I want to add this issue also #389

It's 1am, @MeetDOD you need to be mindful of the time and not tag everyone on any random hour. Open Source is a community level initiatives. Don't force others to work on any random hour if you're working late. Everyone has their own personal and professional working hours.

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jul 7, 2024

@VaibhavArora314 @Ultimateutkarsh11 @akbatra567 review this PR ASAP because I want to add this issue also #389

It's 1am, @MeetDOD you need to be mindful of the time and not tag everyone on any random hour. Open Source is a community level initiatives. Don't force others to work on any random hour if you're working late. Everyone has their own personal and professional working hours.

If you are busy then ignore the dm, i am not forcing you to work or see the pr specifically you can also reply on morning also.
Also you only review when someone ping you that's why I have to ping you for every PR i create or others create !

Copy link
Owner

@VaibhavArora314 VaibhavArora314 left a comment

Choose a reason for hiding this comment

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

looks good to me, just one change create a separate file for types on admin and store IUser there

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jul 8, 2024

looks good to me, just one change create a separate file for types on admin and store IUser there

@VaibhavArora314 I created the interface in this pr https://github.com/MeetDOD/StyleShare/blob/issue-366/admin/src/types.ts
so i will merge it and then it will include this IUser and IPost.

@Ultimateutkarsh11 Ultimateutkarsh11 merged commit b929b52 into VaibhavArora314:main Jul 8, 2024
4 checks passed
Copy link

github-actions bot commented Jul 8, 2024

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jul 8, 2024

@VaibhavArora314 @Ultimateutkarsh11 add level 3 please 🙏

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jul 8, 2024

@Ultimateutkarsh11 Thank you for the guidence !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc GSSOC level3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Creating manage user by admin
4 participants