Description
This component will be used when an admin adds or edits an event. If the component is being used to edit, the fields will be auto filled with the current event information.
If adding an event, it will collect the following information:
- name from a text field
- start and end date/time from a datetimepicker
- description from a text field
- select drop down event type
- select dropdown to add new requirements/preferences
- chips to display added requirements/preferences
Here's a basic idea of what we're needing:

Technical Details
- add component to
src/components/addeditevent.tsx
- make a
AddEditEvent function that will return this component
- use a Text Field mui component to collect the name and description for the event
- use the Select mui component to collect the event type
- use the Date Time Picker mui component to collect the start and end of the event
- use the Select mui component to collect the requirements and preferences
- use the Grid mui component to configure the page layout
- use the Button mui component for the submit button and the button to add a requirement/preference
- Remember to only format in comparison to other things in the component so that we can freely grow/shrink/format the component when it's put on the page :)
- to fill in the info for the event when editing, use an interface and props to fill in info from the event type
- you can look at this pull request for an idea of how you can handle optionally autofilling the component with event informtion
- to test the component, import and display it in
src/app/page.tsx, you will call the getEvent function in this file and not the component
Description
This component will be used when an admin adds or edits an event. If the component is being used to edit, the fields will be auto filled with the current event information.
If adding an event, it will collect the following information:
Here's a basic idea of what we're needing:
Technical Details
src/components/addeditevent.tsxAddEditEventfunction that will return this componentsrc/app/page.tsx, you will call thegetEventfunction in this file and not the component