|
| 1 | +<!DOCTYPE html> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml" |
| 3 | + xmlns:th="http://www.thymeleaf.org"> |
| 4 | + |
| 5 | +<head> |
| 6 | +<title>Rentals</title> |
| 7 | +<link rel="stylesheet" type="text/css" th:href="@{/css/dashboard.css}" /> |
| 8 | +<link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" /> |
| 9 | +<link |
| 10 | + href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" |
| 11 | + rel="stylesheet" |
| 12 | + integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" |
| 13 | + crossorigin="anonymous"> |
| 14 | + |
| 15 | +<link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" /> |
| 16 | +<link rel="stylesheet" type="text/css" th:href="@{/css/filter.css}" /> |
| 17 | +<link |
| 18 | + href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" |
| 19 | + rel="stylesheet"> |
| 20 | + |
| 21 | +<link rel="shortcut icon" th:href="@{/images/favicon.ico}" |
| 22 | + type="image/png"> |
| 23 | +<link rel="stylesheet" |
| 24 | + href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker3.css" /> |
| 25 | +</head> |
| 26 | +<style> |
| 27 | +table th { |
| 28 | + user-select: none; |
| 29 | + background: #eee; |
| 30 | +} |
| 31 | + |
| 32 | +.content { |
| 33 | + margin-right: 20px; |
| 34 | + margin-left: 20px; |
| 35 | + width: 100px; |
| 36 | +} |
| 37 | +</style> |
| 38 | + |
| 39 | + |
| 40 | +<body> |
| 41 | + |
| 42 | + <div th:replace="admin/header :: navbar"></div> |
| 43 | + <span class="glyphicon glyphicon-envelope"></span> |
| 44 | + <nav class="bodyMargin" aria-label="breadcrumb"> |
| 45 | + <ol class="breadcrumb"> |
| 46 | + <li class="breadcrumb-item"><a th:href="@{/admin/dashboard}">Home</a></li> |
| 47 | + <li class="breadcrumb-item active" aria-current="page">Find Due Date of Vehicle</li> |
| 48 | + </ol> |
| 49 | + </nav> |
| 50 | + |
| 51 | + <main role="main" class="container-fluid"> |
| 52 | + |
| 53 | + <h2> |
| 54 | + Find Due Date of Vehicle |
| 55 | + </h3> |
| 56 | + |
| 57 | + |
| 58 | + <div class="jumbotron"> |
| 59 | + <form id="filterForm" th:action="@{/admin/checkVehicleDueDate}" |
| 60 | + method="post"> |
| 61 | + <div class="form-group"> |
| 62 | + <label class="control-label" for="vehicle">Select Vehicle</label> <select |
| 63 | + class="form-control" name="vehicleId" id="vehicle"> |
| 64 | + <option th:each="t : ${vehicles}" |
| 65 | + th:text="${t.id + ' - ' + t.plateNo + ' - ' + t.make + ' - ' + t.model + ' - ' + t.color + ' - ' + t.year }" |
| 66 | + th:value="${t.id}" th:selected="${vehicleId} == ${t.id}"> |
| 67 | + </option> |
| 68 | + </select> |
| 69 | + <br/><br/> |
| 70 | + <button type="submit" class="btn btn-primary" value="Go"> |
| 71 | + <i class="fa fa-search" aria-hidden="true"></i> Search |
| 72 | + </button> |
| 73 | + |
| 74 | + <button id="resetButton" type="button" class="btn btn-primary" |
| 75 | + onclick="customReset()"> |
| 76 | + <i class="fa fa-refresh" aria-hidden="true"></i> Reset |
| 77 | + </button> |
| 78 | + </div> |
| 79 | + </form> |
| 80 | + </div> |
| 81 | + |
| 82 | + <table class="table table-bordered" id="filterableTable"> |
| 83 | + <thead> |
| 84 | + <tr> |
| 85 | + <th data-sort-prop="id">Id</th> |
| 86 | + <th data-sort-prop="firstName">FirstName</th> |
| 87 | + <th data-sort-prop="lastName">LastName</th> |
| 88 | + <th data-sort-prop="driverLicienceNo">Driver Licence No</th> |
| 89 | + |
| 90 | + <th data-sort-prop="phoneNo">Phone No</th> |
| 91 | + <th data-sort-prop="color">Color</th> |
| 92 | + <th data-sort-prop="plateNo">Plate No</th> |
| 93 | + <th data-sort-prop="make">Make</th> |
| 94 | + <th data-sort-prop="expiryDate">Model</th> |
| 95 | + <th data-sort-prop="year">Year</th> |
| 96 | + <th data-sort-prop="fromDateTime">Booking From</th> |
| 97 | + <th data-sort-prop="toDateTime">Booking Due</th> |
| 98 | + <th data-sort-prop="createdOn">Reservation Created</th> |
| 99 | + </tr> |
| 100 | + </thead> |
| 101 | + <tbody> |
| 102 | + <tr th:each="record : ${records}"> |
| 103 | + <td th:text="${record.id}"></td> |
| 104 | + <td th:text="${record.client.firstName}"></td> |
| 105 | + <td th:text="${record.client.lastName}"></td> |
| 106 | + <td th:text="${record.client.driverLicienceNo}"></td> |
| 107 | + <!-- <td th:text="${#dates.format(record.client.expiryDate, 'MM/dd/yyyy')}"></td> --> |
| 108 | + <td th:text="${record.client.phoneNo}"></td> |
| 109 | + <td th:text="${record.vehicle.color}"></td> |
| 110 | + <td th:text="${record.vehicle.plateNo}"></td> |
| 111 | + <td th:text="${record.vehicle.make}"></td> |
| 112 | + <td th:text="${record.vehicle.model}"></td> |
| 113 | + <td th:text="${record.vehicle.year}"></td> |
| 114 | + <td th:text="${record.fromDateTime}"></td> |
| 115 | + <td th:text="${record.toDateTime}"></td> |
| 116 | + <td th:text="${record.createdOn}"></td> |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + </tr> |
| 121 | + </tbody> |
| 122 | + </table> |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + </main> |
| 127 | + <!-- /.container --> |
| 128 | + |
| 129 | + <!-- Bootstrap core JavaScript |
| 130 | + ================================================== --> |
| 131 | + <!-- Placed at the end of the document so the pages load faster --> |
| 132 | + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" |
| 133 | + integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" |
| 134 | + crossorigin="anonymous"></script> |
| 135 | + |
| 136 | + <script |
| 137 | + src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" |
| 138 | + integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" |
| 139 | + crossorigin="anonymous"></script> |
| 140 | + <script |
| 141 | + src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" |
| 142 | + integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" |
| 143 | + crossorigin="anonymous"></script> |
| 144 | + |
| 145 | + <script th:src="@{/js/filter.js}"> |
| 146 | + |
| 147 | + </script> |
| 148 | + <script th:src="@{/js/main.js}"> |
| 149 | + |
| 150 | + </script> |
| 151 | + <script type="text/javascript" |
| 152 | + src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script> |
| 153 | + |
| 154 | + <script> |
| 155 | + function customReset() { |
| 156 | + document.getElementById("vehicle").reset(); |
| 157 | + } |
| 158 | + </script> |
| 159 | +</body> |
| 160 | +</html> |
0 commit comments