Skip to content

Dropdown menu implementation - #434

Merged
v-patel merged 13 commits into
stagefrom
dropdown-menu-implementation
Jul 20, 2026
Merged

Dropdown menu implementation#434
v-patel merged 13 commits into
stagefrom
dropdown-menu-implementation

Conversation

@nevins321

Copy link
Copy Markdown
Collaborator
  • Aidan changed the schema a little bit
  • Added a class-management dropdown to the top header of admin pages
  • Added support for switching between Universal Admin and individual classes
  • Added a Create New Class option to the dropdown
  • Connected class creation to the database
  • Added separate GET and POST API endpoints for classes
  • Automatically redirects users without classes to the class creation page
  • Preserves the selected class while navigating between poster/admin pages
  • Updated routing for the access hierarchy:Admins can access Universal Admin, poster tools, and reader pages
  • Posters can access class-management tools and reader pages
  • Readers can access reader pages only
  • Faculty & Admin signup now creates a poster account
  • Restricted public signup from creating administrator accounts
  • Added server-side authorization for class management endpoints

@nevins321
nevins321 requested a review from AidanLoran July 18, 2026 06:01
@AidanLoran

Copy link
Copy Markdown
Collaborator

^^Schema change was:

  • added missing relationship between poster and user tables (poster now has a required reference to a user)
  • removed unused boolean attribute "admin" on user table

@AidanLoran AidanLoran linked an issue Jul 18, 2026 that may be closed by this pull request
3 tasks
@nevins321 nevins321 self-assigned this Jul 18, 2026
@nevins321

Copy link
Copy Markdown
Collaborator Author

this PR is implementing the class dropdown, class creation, and context navigation. it doesn't include complete class level data isolation. forms, students, progress, raffles, and announcements are still using shared data until class scoped queries, enrollment, and submission validation are implemented, which will be in another pr. i have it pretty much done (its the draft pr called class data isolation) but i need this one reviewed so if there are changes i need to do that before i can finish that one.

@nevins321

Copy link
Copy Markdown
Collaborator Author

so essentially to be clear our not being able to publish forms and announcements problem isn't fixed till class data isolation pr is done and merged in

@AidanLoran

Copy link
Copy Markdown
Collaborator

putting it here instead of in every file it occurs. Now that we are actually implementing a functional difference between coaches and admins, we really need to use the correct labelling for each (including fixing the deprecated language). This is a separate issue, but it is important.

@AidanLoran

Copy link
Copy Markdown
Collaborator

putting it here instead of in every file it occurs. Now that we are actually implementing a functional difference between coaches and admins, we really need to use the correct labelling for each (including fixing the deprecated language). This is a separate issue, but it is important.

[old] "admin" > "coach", "universal-admin" > "admin"

@nevins321

Copy link
Copy Markdown
Collaborator Author

yes but thats a later problem

Comment thread app/layouts/universal-admin.vue Outdated
Comment thread app/layouts/admin.vue Outdated
Comment thread app/layouts/universal-admin.css Outdated
Comment thread app/layouts/admin.vue Outdated
Comment thread app/components/ClassContextSelect.vue Outdated
Comment thread app/pages/coach/create-class.vue
Comment thread server/utils/schemas.ts
Comment thread server/utils/schemas.ts
Comment thread server/api/universal-admin/classes.get.ts Outdated
Comment thread server/api/universal-admin/classes.post.ts Outdated
@AidanLoran
AidanLoran self-requested a review July 19, 2026 17:20
@AidanLoran

AidanLoran commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

when I first logged in (with admin role && no associated classes), I was directed to "create a class" page and was redirected back each time I tried to navigate out. Good for first time signups, but should not do this to admins. After I created a class, navigation worked as intended

Comment thread app/components/LogoutButton.vue Outdated
Comment thread app/layouts/admin.vue Outdated
Comment thread app/middleware/auth.global.ts Outdated
Comment thread app/components/ClassContextSelect.vue Outdated
@AidanLoran
AidanLoran self-requested a review July 20, 2026 19:57
@AidanLoran

Copy link
Copy Markdown
Collaborator

unable to create a class as an admin with no classes

@AidanLoran AidanLoran left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

as an admin with no classes, unable to navigate to create class page. I get redirected back to admin homepage

@v-patel
v-patel merged commit a39c888 into stage Jul 20, 2026
1 check passed
@v-patel
v-patel deleted the dropdown-menu-implementation branch July 20, 2026 21:59
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.

[Feature] "admin" option in role-selector dropdown

3 participants