Index: src/main/resources/static/ReviewPage.html
===================================================================
--- src/main/resources/static/ReviewPage.html	(revision 3a749593fe57b29d0502b4b05f222bb26b82c2d2)
+++ src/main/resources/static/ReviewPage.html	(revision ff72ad22be2dd2834b88f3fb35649e04c88be44b)
@@ -11,5 +11,4 @@
     <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-2/css/all.min.css'>
     <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
-</head>
 <style>
     .popup-overlay {
@@ -71,4 +70,5 @@
 
 </style>
+</head>
 <body>
 
@@ -76,5 +76,5 @@
     <header class="app-header">
         <button class="logout-btn" @click="logout">Log Out</button>
-        <button class="logout-btn" @click="leaveReview">Leave a review</button>
+        <button class="show-popup" @click="leaveReview">Leave a review</button>
     </header>
 
@@ -92,27 +92,29 @@
         </div>
     </div>
-</div>
+    <div v-if="showPopup" class="popup-overlay">
+        <div class="popup">
+            <h3>Leave a review</h3>
 
-<div v-if="showPopup" class="popup-overlay">
-    <div class="popup">
-        <h3>Leave a review</h3>
+            <select v-model="selectedFlightId" id="flightNumbers">
+                <option value="" disabled selected>Select a flight</option>
+                <option v-for="flight in flights" :key="flight.flightId" :value="flight.flightId">
+                    {{ flight.flightNumber }}
+                </option>
+            </select>
 
-        <select v-model="selectedFlightNumber" id="flights">
-            <option value="" disabled selected>Select a flight</option>
-            <option v-for="flight in flights" :key="flight.flightNumber" :value="flight.flightNumber">
-                {{ flight.flightNumber }}
-            </option>
-        </select>
 
-        <textarea v-model="reviewComment" placeholder="Leave a comment here..." rows="5"></textarea>
 
-        <textarea v-model="rating" placeholder="Rate 1-5" rows="1"></textarea>
+            <textarea v-model="reviewComment" placeholder="Leave a comment here..." rows="5"></textarea>
 
-        <div class="popup-actions">
-            <button @click="submitReview" class="submit-btn">Submit</button>
-            <button @click="closePopup" class="cancel-btn">Cancel</button>
+            <textarea v-model="rating" placeholder="Rate 1-5" rows="1"></textarea>
+
+            <div class="popup-actions">
+                <button @click="submitReview" class="submit-btn">Submit</button>
+                <button @click="closePopup" class="cancel-btn">Cancel</button>
+            </div>
         </div>
     </div>
 </div>
+
 
 <script>
@@ -126,5 +128,6 @@
             rating: '',
             flights: [],
-            selectedFlightNumber: ''
+            selectedFlightId: '',
+            flightNumbers:''
         },
         methods: {
@@ -142,4 +145,5 @@
             leaveReview() {
                 this.showPopup = true;
+                this.selectedFlightNumber = '';
             },
             closePopup() {
@@ -147,11 +151,12 @@
             },
             submitReview() {
-                if (this.reviewComment.trim() && this.selectedFlightNumber) {
+                if (this.reviewComment.trim() && this.selectedFlightId) {
                     const reviewData = {
-                        userId: this.userId,
-                        flightNumber: this.selectedFlightNumber,
+                        userID: this.userId,
+                        targetID: this.selectedFlightId,
                         reviewComment: this.reviewComment,
                         rating: this.rating
                     };
+                    console.log(reviewData);
 
                     axios.post('/api/reviews', reviewData)
@@ -169,5 +174,8 @@
                 try {
                     const response = await axios.get('/api/flights');
-                    this.flights = response.data;
+                    this.flights = response.data.map(flight => ({
+                        flightId: flight.flightID,
+                        flightNumber: flight.flightNumber
+                    }));
                     console.log(this.flights);
                 } catch (error) {
@@ -181,4 +189,5 @@
             this.fetchReviews();
             this.fetchFlights();
+            this.showPopup = false;
         }
     });
