Skip to content

Feature 10 - Frontend: Request Types CRUD #37

@Mike-Petrus

Description

@Mike-Petrus

User Story

  • As an admin or instructor
  • I can manage new request types for the request dropdown
  • To more easily manage and categorize request types.

Discussion

The page where new requests are created should have a dropdown menu with a variety of request types.

The request types should come from the request type table, which will be populated on application start up with the following hard coded values:

CS Department BS/MS program
Scholarship or Fellowship
MS program (other than CS Dept BS/MS)
PhD program
Other

As more types are discovered, it should be possible to add them to the table without having to change the code.

So, we want basic CRUD operations for this table.

The table should have just two fields:

  • id (auto-assigned long)
  • requestType (String)

There should be a menu item that appears only for Instructors and Admins labelled as Settings, and on the Settings menu should be an option "Request Types".

That will go to the RequestTypeIndexPage, which should be modelled like the CRUD operations from team02/team03.

Acceptance Criteria

  • As an Admin or Instructor, I can add new request types to the Request Types dropdown.
  • The list of hardcoded request types above is added into the Request Type table at startup (check for each one to see if is already there before loading it).

For an example of how to add code that runs once at startup, see: CoursesApplicationRunner.java. You should create a "service" class with a service method that iterates through the list of strings; for each one look in the RequestTypes table and see if it is there. If not, then add it to the RequestType table.

Acceptance Criteria

  • There is a Request Type dropdown component
  • It has a hardcoded list of initial dropdown types
  • There is a way to add new request types to the dropdown component

Implementation Todos

Frontend:

  • Create RequestTypeForm (team02 style)
  • Create RequestTypeTable (team02 style)
  • Create RequestTypeCreatePage, RequestTypeIndexPage, RequestTypeEditPage
  • Create a Request Type dropdown component (the SingleSubjectDropdown.js may be a good example. Note that the code that fetches the list of SubjectAreas (or RequestTypes) is typically in the page that uses the component, not the component itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions