diff --git a/web/html/addevent.html b/web/html/addevent.html new file mode 100644 index 0000000..e0178d0 --- /dev/null +++ b/web/html/addevent.html @@ -0,0 +1,228 @@ + + + + + + + + + Dashboard Template · Bootstrap v5.2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+

Évènement

+
+ +
+ Nom + +
+ +
+ Lieu +
+
+ +
+ Organisateurs + +
+ +
+ Date de début de l'évènement + +
+ +
+ Date de fin de l'évènement + +
+ + +
+ + +
+ + + +
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/web/html/adduser.html b/web/html/adduser.html index c9a56c2..3454e42 100644 --- a/web/html/adduser.html +++ b/web/html/adduser.html @@ -27,6 +27,7 @@ + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+

Évènement

+
+ +
+ ID + +
+ +
+ Nom + +
+ +
+ Lieu +
+
+ +
+ Organisateurs + +
+ +
+ Date de début + +
+ +
+ Date de fin + +
+ + +
+ Dernière connexion + +
+ +
+ Date de création + +
+ +
+ Date de mise à jour + +
+ +
+ Date de désactivation + +
+ +
+ Date de suppression + +
+ +
+ + +
+
+ + + + + +
+ + + + + + + + + + +
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/web/html/events.html b/web/html/events.html new file mode 100644 index 0000000..9a2a2bc --- /dev/null +++ b/web/html/events.html @@ -0,0 +1,217 @@ + + + + + + + + + Dashboard Template · Bootstrap v5.2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+
+

Évènements

+
+
+ +
+
+
+ + + +

Liste d'évènement

+
+
+
+ + +
+
+ + +
+
+
+
+ + + + +


+ + + + + + + + + + + + + + + + + + + + + + + + + + +
IDNomLieuDate de débutDate de finStatut
+
+ + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/web/html/user.html b/web/html/user.html index 2519a17..34b612f 100644 --- a/web/html/user.html +++ b/web/html/user.html @@ -109,6 +109,13 @@ Utilisateurs + + @@ -234,6 +241,11 @@ +
+ Date de désactivation + +
+
Date de suppression @@ -357,5 +369,5 @@ - + \ No newline at end of file diff --git a/web/html/users.html b/web/html/users.html index 1704286..73f92f5 100644 --- a/web/html/users.html +++ b/web/html/users.html @@ -112,9 +112,12 @@ Utilisateurs - - - + @@ -138,7 +141,7 @@
- +
- +
-
-
- - - - -


+
+ + +
+
+

+
+
+ +
+
+ +
+
+ +
+
+


@@ -206,5 +226,5 @@ - + \ No newline at end of file diff --git a/web/js/addItem.js b/web/js/addItem.js new file mode 100644 index 0000000..fec3e43 --- /dev/null +++ b/web/js/addItem.js @@ -0,0 +1,145 @@ +checkToken(); +signOut(); +closeButton(); +pathURL = document.location.pathname.split("/")[document.location.pathname.split("/").length-1].split(".")[0].replace("add","") + +if (pathURL == "event"){ + lastdate = new Date(); + document.getElementById("start_dateUpdateInput").value=lastdate.getFullYear()+"-"+lastdate.getMonth()+"-"+lastdate.getDate()+"T00:00"; + document.getElementById("end_dateUpdateInput").value=lastdate.getFullYear()+"-"+lastdate.getMonth()+"-"+lastdate.getDate()+"T06:00"; +} + +document.getElementById("addUser").addEventListener("click", function(){ + switch (pathURL){ + case "user": + var updateProfil = ["username", "email", "firstName", "birth", "password"]; + break; + case "event": + var updateProfil = ["name", "place", "start_date", "end_date"]; + + break; + default: + var updateProfil = [] + break; + } + var updateOk = true; + for (var i=0; i 0){ + document.getElementById("displayUser").textContent=user; + } + break; + case 204: + idAlert="notModified" + break; + default: + idAlert="unknown"; + break + } + document.getElementById(idAlert+"Alert").classList.remove("hidden"); + }).catch(function(error){ + console.log(error); + switch(error.status){ + case 401: + listExist = [ "username", "email" ]; + for(var i=0; i 0){ - document.getElementById("displayUser").textContent=user; - } - break; - case 204: - idAlert="notModified" - break; - default: - idAlert="unknown"; - break - } - document.getElementById(idAlert+"Alert").classList.remove("hidden"); - }).catch(function(error){ - console.log(error); - switch(error.response.status){ - case 401: - listExist = [ "username", "email" ]; - for(var i=0; i { + place.setAttribute("data-latitude", e.result.center[1]); + place.setAttribute("data-longitude", e.result.center[0]); + +}); + +geocoder.on("clear", () => { + place.setAttribute("data-latitude", ""); + place.setAttribute("data-longitude", ""); +}); \ No newline at end of file diff --git a/web/js/item.js b/web/js/item.js new file mode 100644 index 0000000..b99bc5f --- /dev/null +++ b/web/js/item.js @@ -0,0 +1,266 @@ +checkToken(); +signOut(); +closeButton(); +pathURL = document.location.pathname.split("/")[document.location.pathname.split("/").length-1].split(".")[0] + +var id = getQuery("id"); + +if(id.length > 0){ + instance.get(pathURL + "s/"+id, {withCredentials: true}) + .then(function(response){ + switch(pathURL){ + case "user": + var listValue = [ "id", "username", "name", "firstName", "email", "birth"]; + break; + case "event": + var listValue = [ "id", "name", "organizers", "place", "start_date", "end_date"]; + break; + default: + var listValue = [] + break; + } + var listTime = ["connected_at", "created_at", "updated_at", "deleted_at", "disabled_at"]; + for (var i=0; i 0 ){ + listOrga = [] + for (var j=0; j 0){ + document.getElementById(buttonUser).classList.remove("hidden"); + } + + var listModalButton = ["disable", "enable", "cancel", "remove"]; + + for (var i=0; i 0){ - var select = document.getElementById(id); - var getId = select.options[select.selectedIndex].value; - if(id == "inputRoles"){ - var status = e.target.value; - if(status != "-2"){ - param = param + "status="+status+"&"; - } - if(getId != "All"){ - param = param + "roles="+getId; + var listParam = ["skip"]; + if(typeInput.length > 0){ + listId =["inputRoles", "inputStatus", "inputPages"] + for (var i=0; i 0){ if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(search)){ param = param + "email="+search+"&"; - } else { + } else if (/^[a-fA-F0-9]{24}$/.test(search)){ param = param + "id="+search+"&"; - } + } else { + param = param + "name="+search+"&"; + } } else { - listParam.push("email"); listParam.push("id"); + listParam.push("email"); listParam.push("id"); listParam.push("name"); } for (var i=0; i 0){ - instance.get("users/"+id, {withCredentials: true}) - .then(function(response){ - var listValue = [ "id", "username", "name", "firstName", "email", "birth"]; - var listTime = ["connected_at", "created_at", "updated_at", "deleted_at"]; - for (var i=0; i 0){ - document.getElementById(buttonUser).classList.remove("hidden"); - } - - var listModalButton = ["disable", "enable", "cancel", "remove"]; - - for (var i=0; i