From 3d1ac7d2ffa65f7c1e0b555104ee95bd0763232f Mon Sep 17 00:00:00 2001 From: Tristan Klein Date: Tue, 14 Mar 2023 22:18:07 +0100 Subject: [PATCH] Modification readme --- README.md | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b550f48..108ae87 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,49 @@ -# ENcarteS - Web Interface +ENcarteS - Web Interface ========================== The interface is made with React and Material UI. It also uses Leaflet to display the map. -## Public Interface +# Public Interface -Write something so powerful I'll feel smarter than I am when reading it. +The public interface is what everyone will see when connecting to the website. -## Admin Interface +## Purpose + +Display a map that people can interact with in many ways, so they can find their way in the maze that is the ENSL. + +## Usage + +Go to encartes.aliens-lyon.fr , a map of the default floor will be selected (currently Monod -1, where our beloved Foyer is). +One can change the floor by clicking on the top right menu for floors, and then choose another one. Currently only floors 2, 3 and 4 are displayed entirely. +One can then click a displayed room to show its information : name(s), people who are typically in those rooms (if they work there for example). +They can then choose to edit this information, which will send edition requests to the database, which an admin can accept or deny. + +On the right, you can also find a way to look for a room, by typing a bunch of characters, and you will find all rooms that match. You can then click one to display it and its floor. + +## Things that can be improved + +We're missing the data for a lot of floors (and the entier Descartes site), and our current data is pulled from fire and emergency signs. + +When searching for rooms, the same room may appear twice if several of its names match the search string. + +# Admin Interface The admin interface is what administrators will see when managing the editing requests. -### Purpose +## Purpose The objective of this interface is to have a buffer, where any edition to the database goes to, before being actually applied to the database. When a regular user makes an edition on the public website, a JSON is sent to the database, telling it to add the edition to the buffer. What the interface displays is the list of all editions the database holds at the time, and the admin can decide whether to apply each edition or not. -### Usage +## Usage Go to encartes.aliens-lyon.fr/admin , there you'll be able to see all the edition requests, if there are any. If there are none, the website will simply tell you "Aucune requĂȘte !". If there are edition requests, the interface will display all of them and the meaningful information, mode, room ID, room name(s), and editing value. The mode can be one of four things : add/remove a name to a room, or add/remove a user name to a room. For example an edition can be "add Amphi B to room of ID 4932". Next to each edition, there will be a tick sign and a cross sign. Click the tick to accept, click the cross to deny. -### How it works - -First, we get all the editions by using a Javascript fetch to call the API's "get_all_editions" function, which sends back a JSON containing a table of editions. -Each edition is a dictionnary, with the four keys being "mode", "placeId", "placeNames" and "editorValue". - -We then display all these using a list of MUI Grid components to align them properly, each list item has 2 callback buttons (one to accept, the other to deny). -Both buttons will remove the edition from the database list, but also from the displayed list (using removeElement). -If the edition is accepted, we make a new call to the API with the right info to change the database. In both cases we use the API to remove the edition from the buffer. - -### Things that can be improved +## Things that can be improved The page is fully functionnal but it isn't particularly beautiful. Everything is aligned yes, but it could be a bit better.