refactors the /api/projects/[projectSlug]/events API routes to be closer to REST standards
updates the /api/projects/[projectSlug]/eventsPOST route to accept an array of events as well as a single event
adds a new SpreadsheetInput component that contains all the elements needed for both event imports and annotation imports
adds an event import form at /[lang]/projects/[projectSlug]/events/import
updates the way events are stored in state
project.events has been changed from an array to an object that uses UUIDs as keys and events as values
UUIDs have been removed from the event type - now that we're no longer inserting a uuid field into every event after reading the files, the event objects match their original JSON files
this made it easier to look up events by UUID without having to do Array.find everywhere
redesigns the ToggleInput component to match Chelsea's design
Notes
I had to regenerate package-lock.json after a messy rebase with #5. This might have ended up upgrading some dependencies by point releases, but nothing is noticeably different.
Summary
/api/projects/[projectSlug]/events
API routes to be closer to REST standards/api/projects/[projectSlug]/events
POST
route to accept an array of events as well as a single eventSpreadsheetInput
component that contains all the elements needed for both event imports and annotation imports/[lang]/projects/[projectSlug]/events/import
project.events
has been changed from an array to an object that uses UUIDs as keys and events as valuesevent
type - now that we're no longer inserting auuid
field into everyevent
after reading the files, theevent
objects match their original JSON filesArray.find
everywhereToggleInput
component to match Chelsea's designNotes
I had to regenerate
package-lock.json
after a messy rebase with #5. This might have ended up upgrading some dependencies by point releases, but nothing is noticeably different.Screenshot
Toggle Input
https://github.com/AVAnnotate/admin-client/assets/64725469/cd85fd49-442b-4ba4-aa79-eff9134094f9