Dynamic Admin Dashboard for events
derogative404 opened this issue · comments
Description
As an admin
I want to see a dynamic list of events that I have created
So that I can view the events I have created
Proposed Solution
Acceptance Criteria
- Dashboard should contain a list of events in a table like form as in figma
- Calls
/api/get-all-events
to gather all the events - It should contain 6 columns labelled (Name, QR Code, Stamp Image, Status (active and inactive), # of people attended, edit/delete)
- Dashboard should also have a button on the top right-hand corner to create a new event. Upon being pressed, user is taken to the QR code generator form
- Upon creating an event, the user is redirected to the dashboard page and a row is created in the events table
- Rows are added dynamically to the events table, proceeding to the previous row
- When a row is added, edit and delete buttons are displayed automatically for an event (do not have to be functioning yet)
- Should utilise the
/dashboard/events
route - Add hamburger menu to
/dashboard/events
,/dashboard/prizes
,/leaderboard
Notes
Helpful resources:
- package: https://www.npmjs.com/package/react-data-table-component?activeTab=readme
- Fetching Mongo DB data and displaying it in react: https://www.youtube.com/watch?v=51JCCLjImnA&pp=ygUucmVhY3QgY3JlYXRlIHRhYmxlIGluIHRoZSBmcm9udCBlbmQgd2l0aCBtb25nbw%3D%3D
- Edit/Delete buttons: https://www.youtube.com/watch?v=2aIjW_w_-Rg&pp=ygUucmVhY3QgY3JlYXRlIHRhYmxlIGluIHRoZSBmcm9udCBlbmQgd2l0aCBtb25nbw%3D%3D