-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Milestone
Description
Office access cards currently have an "alias" property that gives a unique name to each registered card in the form of [adjective] [noun]. However this is arbitrary and it would help to allow officers to edit their card's alias so they can better track its activity. So we need to update both the frontend page and the backend routes to allow for this.
The Gameplan
- create an endpoint in
/api/main_endpoints/routes/OfficeAccessCard.jscalled "/edit" that expects a post request, with a json body containing the updated alias and document _id, then updates the MongoDB document for that alias - add a pencil (edit) button to the frontend page's table at
/src/Pages/CardReader/CardReader.jsso that, when clicked, the alias can be edited. when in edit mode, the pencil/edit button changes to a "save" button, and clicking save calls the /changeAlias api route - include tests to see if the endpoint works as intended to change the alias of a dummy document
Metadata
Metadata
Assignees
Labels
No labels