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: add Programs page and 'tags' to seed data #471

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Conversation

CK-7vn
Copy link
Contributor

@CK-7vn CK-7vn commented Oct 29, 2024

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
image
Admin View List
image
User View Grid
image
User View List
image

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.

@jtucholski jtucholski self-requested a review October 30, 2024 13:42
Copy link
Contributor

@jtucholski jtucholski left a 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>(
Copy link
Contributor

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?

Copy link
Contributor

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!

Copy link
Member

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

@jtucholski
Copy link
Contributor

@CK-7vn I missed this in the initial review. Can you resolve the conflict with Navbar.tsx?

@CK-7vn CK-7vn force-pushed the program_page branch 3 times, most recently from 72992fb to 63e7574 Compare October 30, 2024 22:56
@PThorpe92 PThorpe92 merged commit de2ff1b into main Oct 31, 2024
7 checks passed
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.

Enhancement Request: Add Course Catalog to Admin Screen
4 participants