136 kitchen staff view permission page adding categories and appropriate filtering#152
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I implemented permissions based on Admin/Kitchen Staff role, but I noticed that on the permissions page that there is a yes/no option. Sorting is based on the schema in mongodb because theres a createdAt and updatedAt. I think how we're currently showing users and perms deviates from schema so lmk what to do with merge conflicts. |
will get back to you after our client meeting tomorrow! |
|
Hi Ida, we discussed and for permissions in order of most restrictive to least restrictive here are the actions that each should be able to do. In my opinion, the yes/no flags are not necessary and permissions should just be role-based. logged out/viewer – menu calendar and allergen/restrictions/etc. flags |
…ding-categories-and-appropriate-filtering
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ding-categories-and-appropriate-filtering
Developer: Ida Voong
Closes #136
Pull Request Summary
Modifications
src/app/drafts/page.tsx: move client code intosrc/components/DraftsPageClient.tsx, fetch user rolesrc/app/permissions/page.tsx: move client code intosrc/components/PermissionsClient.tsx, edit test userssrc/components/PermissionsClient.tsx: filter and sort userssrc/app/recipe/page.tsx: fetch user rolesrc/components/CardGrid.tsx: pass user role to componentssrc/components/CategoryToggle.tsx: accept RoleValue as a type to reuse code from recipe pagesrc/components/ComboCard.tsx: only admin can edit, publish, and delete draft combossrc/components/MealBrowser.tsx: only admin can create new recipe; pass user role to componentssrc/components/RecipeCard.tsx: only admin can edit, publish, and delete draft recipessrc/components/RecipePageClient.tsx: pass user role to componentssrc/components/SortPermissionsButton.tsx: edit onSortChange to expose the selected sort type to parent componentsrc/components/ViewRecipePopUp.tsx: only admin can edit recipes (pop ups in recipe page)src/lib/types.ts: add new type for user rolessrc/components/menuPlanning/RecipeDatabase.tsx: edit component typeTesting Considerations
Pull Request Checklist
Screenshots/Screencast
Notes: