From 30c1a85368ec67b3f926a44d28761aae2bf0063e Mon Sep 17 00:00:00 2001
From: Sarah Gloger <sarah.gloger@mni.thm.de>
Date: Wed, 29 Jan 2025 11:12:59 +0100
Subject: [PATCH] alles super jetzt

---
 .idea/sqldialects.xml                         |   1 +
 userman_all/client/index.html                 |   8 +-
 userman_all/client/stylesheet.css             |  30 +++++-
 userman_all/server/src/server.ts              |   6 +-
 userman_all/server/test/horizon_changers.http | 101 ++++++++----------
 5 files changed, 82 insertions(+), 64 deletions(-)

diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml
index a56ab6a..e641a40 100644
--- a/.idea/sqldialects.xml
+++ b/.idea/sqldialects.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="SqlDialectMappings">
+    <file url="file://$PROJECT_DIR$/datenbank-final-horizon_changers-dump.sql" dialect="MySQL" />
     <file url="file://$PROJECT_DIR$/userman_all/server/db/init.sql" dialect="MySQL" />
   </component>
 </project>
\ No newline at end of file
diff --git a/userman_all/client/index.html b/userman_all/client/index.html
index 913d12e..96bcb44 100644
--- a/userman_all/client/index.html
+++ b/userman_all/client/index.html
@@ -831,10 +831,10 @@
             <label for="country">Land auswählen</label>
             <select id="country" name="country">
                 <option value="">-- Bitte wählen --</option>
-                <option value="spanien">Spanien</option>
-                <option value="peru">Peru</option>
-                <option value="indien">Indien</option>
-                <option value="kenia">Kenia</option>
+                <option value="Spanien - Pfoten ohne Grenzen!">Spanien</option>
+                <option value="Peru - Bausteine der Gesundheit">Peru</option>
+                <option value="Indien - Bildungslicht für Frauen">Indien</option>
+                <option value="Kenia - Lebensquellen Kenia">Kenia</option>
             </select>
 
             <label for="titleReisebericht">Titel</label>
diff --git a/userman_all/client/stylesheet.css b/userman_all/client/stylesheet.css
index 8729a2d..da555c6 100644
--- a/userman_all/client/stylesheet.css
+++ b/userman_all/client/stylesheet.css
@@ -1725,7 +1725,6 @@ padding: 20px;
 }
 
 .small-button-edit {
-    color: #03355C;
     border: 1px solid #FB7300;
     border-radius: 50px;
     margin-top: 10px;
@@ -1739,4 +1738,33 @@ padding: 20px;
     font-size: 20px;
     border-radius: 50px;
     cursor: pointer;
+}
+
+#exampleModalLabelReisebericht {
+    font-family: "DM Sans", sans-serif;
+}
+#updateModalReisebericht {
+    background:#FCF3E4;
+    display: flex;
+    align-items: center;
+    border-radius: 20px;
+    flex-direction: column;
+
+}
+
+.modal-body.card {
+    border-color:#FCF3E4;
+    background-color: #FCF3E4;
+    border-radius: 10px;
+    box-shadow: none;
+    margin-top: 15px;
+}
+#saveButtonEditReisebericht {
+    color: #ffffff;
+    background-color: #fb7300;
+    border-radius: 50px;
+    border: none;
+}
+.modal-footer {
+    border-color:#FCF3E4;
 }
\ No newline at end of file
diff --git a/userman_all/server/src/server.ts b/userman_all/server/src/server.ts
index 0d7546d..525b50d 100644
--- a/userman_all/server/src/server.ts
+++ b/userman_all/server/src/server.ts
@@ -1059,11 +1059,11 @@ app.put('/reviews/:reviews_id', isLoggedIn, async (req: Request, res: Response):
 
       if (result.affectedRows != 1) {
         res.status(404).send({
-          message: 'der Reisebericht konnte nicht gefunden werden',
+          message: 'Der Reisebericht konnte nicht gefunden werden',
         });
       } else {
         res.status(200).send({
-          message: `erfolgreich bearbeitet`,
+          message: `Dein Reisebericht wurde erfolgreich bearbeitet! Danke :)`,
         });
       }
     } catch (error) {
@@ -1073,7 +1073,7 @@ app.put('/reviews/:reviews_id', isLoggedIn, async (req: Request, res: Response):
     }
   } else {
     res.status(400).send({
-      message: 'füll alle Felder aus',
+      message: 'Fülle bitte alle Felder aus.',
     });
   }
 });
diff --git a/userman_all/server/test/horizon_changers.http b/userman_all/server/test/horizon_changers.http
index 5f7ee50..a916efb 100644
--- a/userman_all/server/test/horizon_changers.http
+++ b/userman_all/server/test/horizon_changers.http
@@ -1,124 +1,113 @@
-### Login
+### Login User
 POST http://localhost:8080/login HTTP/1.1
 Content-Type: application/json
 
 {
-  "eMail": "amelieenders@gmail.com",
-  "password": "amelie"
+  "eMail": "jj@gmail.com",
+  "password": "???"
 }
 
-### Update specific user admin
-PUT http://localhost:8080/user/10 HTTP/1.1
-Content-Type: application/json
-
-{
-  "firstName": "Bruce",
-  "lastName": "Kayne",
-  "eMail": "bato",
-  "adress": "Fetzwiesen 4",
-  "role": "user"
-}
-
-### Update user
+### Update user Data in Profile
 PUT http://localhost:8080/user HTTP/1.1
 Content-Type: application/json
 
 {
-  "firstName": "Amelie",
-  "lastName": "Dralle",
-  "eMail": "amelie@gmail.com",
-  "password": "amelie"
+  "firstName": "Peter",
+  "lastName": "Shawn",
+  "eMail": "ps@gmail.com",
+  "password": "???"
 }
 
 ### Read User
-GET http://localhost:8080/user/76 HTTP/1.1
+GET http://localhost:8080/user/21 HTTP/1.1
 
 ### Read User
 GET http://localhost:8080/user/500 HTTP/1.1
 
 
-### Login
+### Login Admin
 POST http://localhost:8080/login HTTP/1.1
 Content-Type: application/json
 
 {
-  "eMail": "lilith@fa.gmx.de",
-  "password": "passwort"
+  "eMail": "sarah.gloger@outlook.com",
+  "password": "1234"
 }
 
-### Create a new user richtige Route
+### Create a new user / Registrieren Erfolgsfall
 POST http://localhost:8080/user HTTP/1.1
 Content-Type: application/json
 
 {
-  "firstName": "Daria",
-  "lastName": "Krawtschenko",
-  "eMail": "daria@gmail.com",
+  "firstName": "Bruce",
+  "lastName": "Wayne",
+  "eMail": "bat@mail.de",
   "password": "1234",
   "repeatPassword": "1234"
 }
 
-### Create a new user verschiedene Paswörter
+### Create a new user / Fehlerhafte Passwortwiederholung (Fehlerfall)
 POST http://localhost:8080/user HTTP/1.1
 Content-Type: application/json
 
 {
-  "firstName": "Leonie",
-  "lastName": "Lutz",
-  "eMail": "lutzleo@gmail.com",
-  "password": "1234",
-  "repeatPassword": "123456"
+  "firstName": "Clemens",
+  "lastName": "Witzel",
+  "eMail": "clemens.witzel@gmail.com",
+  "password": "clemi",
+  "repeatPassword": "clemi"
 }
 
-### Create a new user eMail fehlt
+### Create a new user / Fehlerfall, nicht alle Felder ausgefüllt
 POST http://localhost:8080/user HTTP/1.1
 Content-Type: application/json
 
 {
-"firstName": "Bruce",
-"lastName": "Wayne",
-"password": "1234",
-"repeatPassword": "1234"
+"firstName": "Leo",
+"lastName": "Roth",
+"password": "Leo",
+"repeatPassword": "Leo"
 }
 
-### Logout
+### Logout User
 POST http://localhost:8080/logout HTTP/1.1
 
-### Delete user Nutzer
+
+### Delete User (eigenes Profil löschen)
 DELETE  http://localhost:8080/user HTTP/1.1
 
 
-####Read Users Nutzerliste Admin
+####Read Users Admin Liste
 GET http://localhost:8080/users HTTP/1.1
 
-### Update specific user Admin
-PUT http://localhost:8080/user/70 HTTP/1.1
+### Update specific user (User 10 updaten) Admin
+PUT http://localhost:8080/user/10 HTTP/1.1
 Content-Type: application/json
 
 {
-  "firstName": "Minette",
-  "lastName": "Stark",
-  "eMail": "minette@gmail.com",
-  "adress": "Fetzwiesen 4",
+  "firstName": "Jörg",
+  "lastName": "Gloger",
+  "eMail": "jörg",
+  "adress": "Waldstraße 9, 35799 Merenberg",
   "role": "user"
 }
 
 
-### Update specific user
-PUT http://localhost:8080/user/79 HTTP/1.1
+### Update specific user (User 1 updaten, existiert nicht)
+PUT http://localhost:8080/user/1 HTTP/1.1
 Content-Type: application/json
 
 {
-  "givenName": "Selina",
-  "familyName": "Kyle"
+  "givenName": "Alina",
+  "familyName": "Hoffmann"
 }
 
-### Delete specific user
-DELETE  http://localhost:8080/user/80 HTTP/1.1
+### Delete specific user (User 7)
+DELETE  http://localhost:8080/user/7 HTTP/1.1
 
 
-### Delete specific user
-DELETE  http://localhost:8080/user/76 HTTP/1.1
+### Delete specific user (User 1)
+DELETE  http://localhost:8080/user/1 HTTP/1.1
 
 
 
-- 
GitLab