Skip to content

create course table / form refactor#176

Open
DAC098 wants to merge 4 commits into
mainfrom
t142_course_page
Open

create course table / form refactor#176
DAC098 wants to merge 4 commits into
mainfrom
t142_course_page

Conversation

@DAC098

@DAC098 DAC098 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

this updates the course create table and form to be separate pages and have a similar look and feel as the exercise pages.

  • new form fields and components have been added to assist with
    consistent behavior and function
    • text inputs
    • checkbox
    • select (not react-select)
    • submitting indicator (separate from the button)
  • modified the ReusableTable to have the delete action be optional. if neither of the edit or delete callbacks are provided then the table cell will not be rendered.
  • fixed an issue in the api that would cause errors if the course was not found when making the database query.
  • modified the course get api to have a top level rule that if the user is an admin then it will just respond with the course. (Note: the api endpoint is handling a fair bit of logic that will change what is sent back in the request. we should probably think about moving logic around so that it is easier to understand what the endpoint does)
  • updated interfaces with new information to better represent what is being sent in requests and responses
  • added the createdAt and updatedAt fields to the Course model (just declared them as they already existed).

the instructor and roster inputs have been changed to display more user information than just a username. I am not 100% on the layout / styling / information for those components but it is better than what was previously there. there will still be scaling issues later on as more users join the server at which point we should revisit them.

fixes #142

DAC098 added 4 commits June 4, 2026 15:29
this updates the course create table and form to be separate pages and
have a similar look and feel as the exercise pages.
- new form fields and components have been added to assist with
  consistent behavior and function
  - text inputs
  - checkbox
  - select (not react-select)
  - submitting indicator (separate from the button)
- modified the `ReusableTable` to have the delete action be optional. if
  niether of the edit or delete callbacks are provided then the table
  cell will not be rendered.
- fixed an issue in the api that would cause errors if the course was
  not found when making the database query.
- modified the course get api to have a top level rule that if the user
  is an admin then it will just responed with the course. (Note: the api
  endpoint is handling a fair bit of logic that will change what is sent
  back in the request. we should probably think about moving logic
  around so that it is easier to understand what the endpoint does)
- updated interfaces with new information to better represent what is
  being sent in requests and responses
- added the `createdAt` and `updatedAt` fields to the `Course` model
  (just declared them as they already existed).

the instructor and roster inputs have been changed to display more user
information than just a username. I am not 100% on the layout / styling
/ information for those components but it is better than what was
previously there. there will still be scailing issues later on as more
users join the server at which point we should revisit them.
fixes an issue with the course api endpoint messing with the previous
api calls by returning data that it was not previously receiving. added
an explicit query check to make sure to only return the admin related
data if it is being requested, otherwise continue to return the
previouse data.

also added in more documentation for various components
fixed the type errors that were reported by vite. still have to add int
ts-ignore for the tanstack form components since it does not seem to
deduce the types.
@DAC098 DAC098 requested a review from NickK21 June 9, 2026 22:58
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.

separate out course

1 participant