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

Auth 2.0 extension #29

Merged
merged 20 commits into from
Dec 8, 2024
Merged

Auth 2.0 extension #29

merged 20 commits into from
Dec 8, 2024

Conversation

RespectMathias
Copy link
Contributor

✨ Description

Adds admin dashboard and additional CRUD Operations. Also adds the moderator role with its own moderation pages.

Linked Issue: Individual extension, not in issues.

🔄 Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 🔧 Improvement

✅ Checklist

  • 📝 Code follows project style guidelines
  • 🔗 Relevant issue is linked and moved to 'In Progress'
  • 🧪 All relevant tests have been added or updated
  • ✔️ Continuous integration (CI) tests have passed
  • 👀 Ready for review

📄 Additional Information

For the individual extension. Need to work on the merge.

**Create Review**
* Add a form to create a new review with fields for `GameId`, `UserId`, `Rating`, and `Content`
* Add a submit button to save the review

**Edit Review**
* Add a form to edit an existing review with fields for `GameId`, `UserId`, `Rating`, and `Content`
* Add a submit button to save the changes

**Delete Review**
* Add a confirmation page to delete a review
* Display the review details and a delete button

**List Reviews**
* Add a table to list all reviews with columns for `GameId`, `UserId`, `Rating`, and `Content`
* Add links to edit and delete each review

**Create User Library Entry**
* Add a form to create a new user library entry with fields for `UserId`, `GameId`, `Status`, and `IsUpcoming`
* Add a submit button to save the entry

**Edit User Library Entry**
* Add a form to edit an existing user library entry with fields for `UserId`, `GameId`, `Status`, and `IsUpcoming`
* Add a submit button to save the changes

**Delete User Library Entry**
* Add a confirmation page to delete a user library entry
* Display the entry details and a delete button

**List User Library Entries**
* Add a table to list all user library entries with columns for `UserId`, `GameId`, `Status`, and `IsUpcoming`
* Add links to edit and delete each entry

**Create User Favorite Entry**
* Add a form to create a new user favorite entry with fields for `UserId` and `GameId`
* Add a submit button to save the entry
Nav in admin panel
Move image preview to site.js, since image preview is likely to be used multiple places.

Remove unused js:
* details.js
* library.js

Change site.css to simple.css in order to switch to Tailwind and DaisyUI for UI
Can be undone if needed
Moved filtering to server-side, as the data is already queried from the database

Updated colors to match current color-scheme
Fix
* Compile warnings

Moved
* css into files for eventual tailwind transformation
Base style will be changed when/if bootstrap is replaced with tailwind, but only then. (Should be its own branch too)
Fix account not enabled
Fixed:
- Using workaround, by creating instance in model instead of form, due to required fields

Added:
- Navigation link to admin panel in user manage
Fixed:
- Index display
- Workaround for object init
Fixed:
- Remaining UserLib crud
Add a new "Moderator" directory under "Pages" with limited CRUD operations for moderators.

* **Layout and Navigation:**
  - Add `_Layout.cshtml` for moderator pages.
  - Add `_ManageNav.cshtml` for moderator navigation with links to Reviews and Users index pages.

* **Reviews Management:**
  - Add `Index.cshtml` and `Index.cshtml.cs` for listing reviews with limited actions.
  - Add `Edit.cshtml` and `Edit.cshtml.cs` for approving or denying reviews.

* **Users Management:**
  - Add `Index.cshtml` and `Index.cshtml.cs` for listing users with limited actions.
  - Add `Edit.cshtml` and `Edit.cshtml.cs` for editing user information.
* Include navigation logic for Reviews and Users
* Define methods to get navigation class for Index, Reviews, and Users pages
* Implement logic to determine active page based on ViewContext
* **Index.cshtml**
  - Add a page to display the moderator dashboard
  - Display total reviews and total users
  - Include a chart for review ratings

* **Index.cshtml.cs**
  - Add a code-behind file to fetch and display summary information for moderators
  - Fetch total reviews and total users
  - Fetch review ratings and group them by rating
Added:
 - Seeded Moderator role
 - Restriction of moderator pages
 - Moved Role tools into its own tab/section/page
Add moderator pages with limited CRUD operations
@RespectMathias RespectMathias merged commit 0df5021 into main Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant