-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ FIX ][ AIR- 1] finalisation parti frontend pour client home - resul…
…ts - vol description confirmation
- Loading branch information
e.elhjoujy
committed
Oct 20, 2023
1 parent
a233305
commit 149900d
Showing
12 changed files
with
659 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/main/java/ma/yc/airafraik/web/RservationConfirmationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package ma.yc.airafraik.web; | ||
|
||
import jakarta.servlet.ServletConfig; | ||
import jakarta.servlet.ServletException; | ||
import jakarta.servlet.annotation.WebServlet; | ||
import jakarta.servlet.http.HttpServlet; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import ma.yc.airafraik.core.Print; | ||
import ma.yc.airafraik.entities.VolEntity; | ||
import ma.yc.airafraik.service.SearchVolsService; | ||
import ma.yc.airafraik.service.impl.SearchVolsServiceImpl; | ||
|
||
import java.io.IOException; | ||
import java.util.Collection; | ||
|
||
@WebServlet(name = "RservationConfirmationController", value = "/reservation-confirmation") | ||
public class RservationConfirmationController extends HttpServlet { | ||
|
||
private SearchVolsService searchVolsService ; | ||
@Override | ||
public void init(ServletConfig config) throws ServletException { | ||
super.init(config); | ||
this.searchVolsService = new SearchVolsServiceImpl(); | ||
} | ||
|
||
@Override | ||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
String id = req.getParameter("id"); | ||
|
||
if (id != null) { | ||
Print.log("id : " + id); | ||
VolEntity vols = searchVolsService.searchVolParId(id); | ||
req.setAttribute("vols",vols); | ||
req.getRequestDispatcher("reservation-confirmation.jsp").forward(req, resp); | ||
|
||
}else{ | ||
resp.sendRedirect("/"); | ||
} | ||
super.doGet(req, resp); | ||
} | ||
|
||
@Override | ||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
super.doPost(req, resp); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<%@ page import="java.util.Collection" %> | ||
<%@ page import="ma.yc.airafraik.entities.VolEntity" %> | ||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> | ||
<% | ||
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); | ||
%> | ||
|
||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<link rel="stylesheet" href="./static/css/vol-card.css"> | ||
<link rel="stylesheet" href="./static/css/reservation-details.css"> | ||
|
||
<jsp:include page="templates/head.jsp"/> | ||
|
||
<body> | ||
<div class="site-wrap"> | ||
<jsp:include page="templates/header.jsp"/> | ||
<div class="container mt-4"> | ||
<h2>Contact Details</h2> | ||
<form id="reservation-form" method="post" action="reservation-confirmation"> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<div class="form-group"> | ||
<label for="name">Full Name</label> | ||
<input type="text" class="form-control" id="name" name="name" placeholder="Enter your full name" required> | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="form-group"> | ||
<label for="email">Email Address</label> | ||
<input type="email" class="form-control" id="email" name="email" placeholder="Enter your email address" required> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label for="phone">Phone Number</label> | ||
<input type="tel" class="form-control" id="phone" name="phone" placeholder="Enter your phone number" required> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<div class="form-group"> | ||
<label for="flight">Flight Number</label> | ||
<input type="text" class="form-control" id="flight" name="flight" placeholder="Enter your flight number" required> | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="form-group"> | ||
<label for="date">Flight Date</label> | ||
<input type="date" class="form-control" id="date" name="date" required> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label for="comments">Additional Comments</label> | ||
<textarea class="form-control" id="comments" name="comments" rows="4" placeholder="Any additional comments or special requests"></textarea> | ||
</div> | ||
<button type="submit" class="btn btn-primary">Submit</button> | ||
</form> | ||
<jsp:include page="templates/footer.jsp"/> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,157 @@ | ||
<%-- | ||
Created by IntelliJ IDEA. | ||
User: pc | ||
Date: 19/10/2023 | ||
Time: 14:42 | ||
To change this template use File | Settings | File Templates. | ||
--%> | ||
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | ||
<html> | ||
<head> | ||
<title>Title</title> | ||
</head> | ||
<%@ page import="java.util.Collection" %> | ||
<%@ page import="ma.yc.airafraik.entities.VolEntity" %> | ||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> | ||
<% | ||
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); | ||
VolEntity vol = request.getAttribute("vol") != null ? (VolEntity) request.getAttribute("vol") : null; | ||
%> | ||
|
||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<link rel="stylesheet" href="./static/css/vol-card.css"> | ||
<link rel="stylesheet" href="./static/css/reservation-details.css"> | ||
|
||
<jsp:include page="templates/head.jsp"/> | ||
|
||
<body> | ||
<h1> | ||
Reservation effectuée avec succès ! | ||
</h1> | ||
<div class="site-wrap"> | ||
<jsp:include page="templates/header.jsp"/> | ||
<% assert vol != null; %> | ||
<div class="container"> | ||
<div class="container m-4 reservation-details-container"> | ||
<div class="flight-details"> | ||
<h2> | ||
This is the flight you have selected : | ||
</h2> | ||
<div class="flight-details-container"> | ||
<div class="flight-information-card"> | ||
<div class="vol-card"> | ||
<div class="vols-info"> | ||
<div class="vol-info"> | ||
<div class="logo-vol-comapny"> | ||
<img src="https://beebom.com/wp-content/uploads/2018/12/IranAir.jpg" alt="logo"> | ||
</div> | ||
<div class="vol-info-heure-depart"> | ||
<p>12:00</p> | ||
<p> | ||
Safi (SFI) | ||
</p> | ||
</div> | ||
<div class="rounded-divider"></div> | ||
<div class="vol-info-heure-arrive"> | ||
<p>14:00</p> | ||
<p> | ||
Casablanca (CMN) | ||
</p> | ||
</div> | ||
<div class="vol-duration"> | ||
<p>2h</p> | ||
</div> | ||
</div> | ||
<div class="vol-info"> | ||
<div class="logo-vol-comapny"> | ||
<img src="https://beebom.com/wp-content/uploads/2018/12/IranAir.jpg" alt="logo"> | ||
</div> | ||
<div class="vol-info-heure-depart"> | ||
<p>12:00</p> | ||
<p> | ||
Casablanca (CMN) | ||
</p> | ||
</div> | ||
<div class="rounded-divider"></div> | ||
<div class="vol-info-heure-arrive"> | ||
<p>14:00</p> | ||
<p> | ||
Rabat (RBA) | ||
</p> | ||
</div> | ||
<div class="vol-duration"> | ||
<p>2h</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="vol-reservation"> | ||
<h3> 435 - MAD </h3> | ||
<p> | ||
Lorem ipsum dolor, sit amet consectetur . | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="customzie-your-flight-conatainer"> | ||
<div class="basic"> | ||
<h2>Basic </h2> | ||
</div> | ||
<div class="smart"> | ||
<h2>smart</h2> | ||
</div> | ||
<div class="permium"> | ||
<h2>Permium</h2> | ||
</div> | ||
</div> | ||
<div class="for-passangers"> | ||
<h2>For the passanagers </h2> | ||
</div> | ||
<div class="more-extracs"> | ||
<h2>Special meal on the board </h2> | ||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
Rerum, maiores itaque eaque, id adipisci cumque atque mollitia | ||
impedit blanditiis sint odio, autem eveniet dolorum earum pariatur | ||
quisquam accusantium similique nemo. | ||
</p> | ||
</div> | ||
</div> | ||
<div class="your-booking"> | ||
<h2> | ||
Your booking details : | ||
</h2> | ||
<div class="your-booking-container"> | ||
<img src="" alt="" class="your-booking-image"> | ||
<div class="your-booking-header"> | ||
<div class="from-info"> | ||
<p>Marrakech</p> | ||
<p>From</p> | ||
<p>17-10-2023</p> | ||
</div> | ||
<div class="logo-info"> | ||
🛫 | ||
</div> | ||
<div class="to-info"> | ||
<p>Istanbul </p> | ||
<p>to</p> | ||
<p>18-10-2023</p> | ||
</div> | ||
</div> | ||
<div class="booking-details"> | ||
<hr> | ||
<div class="passnger"> | ||
<p>1 Passenger</p> | ||
<p>430.33</p> | ||
</div> | ||
<hr> | ||
<div class="your-booking-total"> | ||
<p>Total </p> | ||
<h2>494.22$</h2> | ||
</div> | ||
<div> | ||
<p>Payment method</p> | ||
<p>Visa</p> | ||
</div> | ||
<form class="confirmation" method="get" action="reservation-confirmation"> | ||
<input type="hidden" name="id" value="<%=vol.getId()%>" > | ||
<input class="button-reservation btn btn-sm btn-primary" type="submit" value="Confirm"> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<jsp:include page="templates/footer.jsp"/> | ||
</div> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.