-
Notifications
You must be signed in to change notification settings - Fork 19
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: add Programs page and 'tags' to seed data #471
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved after there's a response to my comment from @PThorpe92 or @calisio
const [activeView, setActiveView] = useState<ViewType>(ViewType.Grid); | ||
const [searchTerm, setSearchTerm] = useState(''); | ||
const [order, setOrder] = useState('asc'); | ||
const { data, error, mutate } = useSWR<ServerResponse<Program>, AxiosError>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PThorpe92 or @calisio This is modeled after the course catalog. In the case where there's no search term provided (using default) should there be a route loader included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I'm interpreting this correctly, but if you are asking if instead of using useSWR we should use the routeLoader, my answer is its not necessary right now. Preston and I are going to decide if we're going to fully implement react-router or switch to a different library, so for now the use of useSWR is okay. If that didn't answer the question let me know!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can probably handle that when we decide whatever our path is after evaluating our use of useSWR
/ react router
@CK-7vn I missed this in the initial review. Can you resolve the conflict with |
72992fb
to
63e7574
Compare
Description of the change
Added the Programs page, in the Admin view there is a Add Program button, in the User view the Add Program button is removed. Added Course Catalog view for Admin users to view courses. Added program tags in the seeder functions for Programs.
Screenshot(s)
Admin View Grid
Admin View List
User View Grid
User View List
Additional context
A base implementation of the Programs Page without the ability to explicitly add or edit a program, if Add Program is clicked the user is prompted that the feature will be implemented soon.