503 lines
16 KiB
HTML
503 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Recent Rents - Dubai DLD Analytics</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.header {
|
|
background: white;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
margin-bottom: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.header h1 {
|
|
color: #333;
|
|
font-size: 2.5rem;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.header p {
|
|
color: #666;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.filters-section {
|
|
background: white;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.filters-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
gap: 20px;
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.filter-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.filter-group label {
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 8px;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.filter-group select,
|
|
.filter-group input {
|
|
padding: 12px;
|
|
border: 2px solid #e0e0e0;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
transition: all 0.3s ease;
|
|
background: white;
|
|
}
|
|
|
|
.filter-group select:focus,
|
|
.filter-group input:focus {
|
|
outline: none;
|
|
border-color: #56ab2f;
|
|
box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.1);
|
|
}
|
|
|
|
.slider-container {
|
|
padding: 10px 0;
|
|
}
|
|
|
|
.slider-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.range-container { position: relative; width: 100%; height: 36px; }
|
|
.range-track {
|
|
position: absolute; top: 50%; transform: translateY(-50%);
|
|
height: 8px; width: 100%; border-radius: 5px; background: #e0e0e0;
|
|
}
|
|
.range-fill { position: absolute; top: 50%; transform: translateY(-50%); height: 8px; border-radius: 5px; background: linear-gradient(135deg,#56ab2f,#a8e063); }
|
|
.slider { position: absolute; left: 0; right: 0; width: 100%; pointer-events: none; background: none; height: 36px; }
|
|
.slider input[type=range] { pointer-events: none; -webkit-appearance: none; appearance: none; width: 100%; background: transparent; height: 36px; position: absolute; top: 50%; transform: translateY(-50%); }
|
|
.slider input[type=range]:nth-child(1) { z-index: 3; }
|
|
.slider input[type=range]:nth-child(2) { z-index: 4; }
|
|
.slider input[type=range]::-webkit-slider-thumb { pointer-events: all; -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #56ab2f; cursor: pointer; box-shadow: 0 0 0 3px rgba(86,171,47,.2); }
|
|
.slider input[type=range]::-moz-range-thumb { pointer-events: all; width: 20px; height: 20px; border-radius: 50%; background: #56ab2f; cursor: pointer; border: none; box-shadow: 0 0 0 3px rgba(86,171,47,.2); }
|
|
|
|
.slider::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
background: #56ab2f;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.slider::-webkit-slider-thumb:hover {
|
|
background: #a8e063;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.slider::-moz-range-thumb {
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
background: #56ab2f;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.slider::-moz-range-thumb:hover {
|
|
background: #a8e063;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.slider-value {
|
|
min-width: 120px;
|
|
text-align: center;
|
|
padding: 8px 12px;
|
|
background: #f5f5f5;
|
|
border-radius: 6px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
/* Make size filter span full row for longer slider */
|
|
.filter-group.size-group { grid-column: 1 / -1; }
|
|
|
|
.button-group {
|
|
display: flex;
|
|
gap: 15px;
|
|
margin-top: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.btn {
|
|
padding: 14px 30px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
|
|
color: white;
|
|
flex: 1;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #6c757d;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #5a6268;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 40px;
|
|
color: #666;
|
|
font-size: 1.2rem;
|
|
display: none;
|
|
}
|
|
|
|
.error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
margin: 20px 0;
|
|
display: none;
|
|
}
|
|
|
|
.results-section {
|
|
background: white;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.results-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 25px;
|
|
flex-wrap: wrap;
|
|
gap: 15px;
|
|
}
|
|
|
|
.results-count {
|
|
font-size: 1.3rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.table-container {
|
|
overflow-x: auto;
|
|
border-radius: 8px;
|
|
border: 1px solid #e0e0e0;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
min-width: 1200px;
|
|
}
|
|
|
|
thead {
|
|
background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
|
|
color: white;
|
|
}
|
|
|
|
th {
|
|
padding: 15px;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
td {
|
|
padding: 15px;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
}
|
|
|
|
tbody tr:hover {
|
|
background: #f8f9fa;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 5px 12px;
|
|
border-radius: 20px;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.badge-primary {
|
|
background: #56ab2f;
|
|
color: white;
|
|
}
|
|
|
|
.badge-success {
|
|
background: #28a745;
|
|
color: white;
|
|
}
|
|
|
|
.badge-warning {
|
|
background: #ffc107;
|
|
color: #333;
|
|
}
|
|
|
|
.no-results {
|
|
text-align: center;
|
|
padding: 60px 20px;
|
|
color: #999;
|
|
}
|
|
|
|
.no-results svg {
|
|
width: 80px;
|
|
height: 80px;
|
|
margin-bottom: 20px;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.filters-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.slider-wrapper {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.results-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.button-group {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 345px) {
|
|
body {
|
|
padding: 10px;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.filters-section,
|
|
.results-section {
|
|
padding: 15px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>🏠 Recent Property Rents</h1>
|
|
<p>Filter and explore the latest rental contracts in Dubai</p>
|
|
</div>
|
|
|
|
<div class="filters-section">
|
|
<h2 style="margin-bottom: 20px; color: #333;">Filters</h2>
|
|
<form id="filtersForm">
|
|
<div class="filters-grid">
|
|
<div class="filter-group size-group">
|
|
<label for="area_name">Area</label>
|
|
<select id="area_name" name="area_name">
|
|
<option value="">All Areas</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label for="property_type">Property Type</label>
|
|
<select id="property_type" name="property_type">
|
|
<option value="all">All Types</option>
|
|
<option value="unit">Unit</option>
|
|
<option value="villa">Villa</option>
|
|
<option value="virtual unit">Virtual Unit</option>
|
|
<option value="land">Land</option>
|
|
<option value="building">Building</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label for="rooms">Rooms</label>
|
|
<select id="rooms" name="rooms">
|
|
<option value="all">All</option>
|
|
<option value="1">1.0</option>
|
|
<option value="2">2.0</option>
|
|
<option value="3">3.0</option>
|
|
<option value="4">4.0</option>
|
|
<option value="5">5.0</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label for="project">Project</label>
|
|
<select id="project" name="project">
|
|
<option value="all">All Projects</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label for="page_size">Page Size</label>
|
|
<select id="page_size" name="page_size">
|
|
<option value="10">10</option>
|
|
<option value="20">20</option>
|
|
<option value="30" selected>30</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select>
|
|
<input type="hidden" id="page" name="page" value="1">
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label>Size (sq. ft)</label>
|
|
<div class="slider-container">
|
|
<div class="slider-wrapper" style="width:100%">
|
|
<div class="range-container">
|
|
<div class="range-track"></div>
|
|
<div class="range-fill" id="sizeFill" style="left:0%; width:100%"></div>
|
|
<div class="slider">
|
|
<input type="range" id="size_min_range" min="1.0" max="148698.0" step="100" value="1.0">
|
|
<input type="range" id="size_max_range" min="1.0" max="148698.0" step="100" value="148698.0">
|
|
</div>
|
|
</div>
|
|
<div class="slider-value" id="sizeValue">All Sizes</div>
|
|
</div>
|
|
<!-- Hidden fields posted with the form/query -->
|
|
<input type="hidden" id="size_min" name="size_min" value="">
|
|
<input type="hidden" id="size_max" name="size_max" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="button-group">
|
|
<button type="submit" class="btn btn-primary">🔍 Search Rents</button>
|
|
<button type="button" class="btn btn-secondary" id="resetBtn">🔄 Reset Filters</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="loading" id="loading">
|
|
🔍 Fetching rents...
|
|
</div>
|
|
|
|
<div class="error" id="error"></div>
|
|
|
|
<div class="results-section" id="resultsSection" style="display: none;">
|
|
<div class="results-header">
|
|
<div class="results-count" id="resultsCount"></div>
|
|
<div class="pagination-controls" style="display:flex;gap:10px;align-items:center;">
|
|
<button type="button" class="btn btn-secondary" id="prevPage">Prev</button>
|
|
<div id="pageInfo" style="font-weight:600;color:#333;"></div>
|
|
<button type="button" class="btn btn-secondary" id="nextPage">Next</button>
|
|
</div>
|
|
</div>
|
|
<div class="table-container" id="tableContainer">
|
|
<table id="rentsTable">
|
|
<thead>
|
|
<tr>
|
|
<th>rent_id</th>
|
|
<th>registration_date</th>
|
|
<th>start_date</th>
|
|
<th>end_date</th>
|
|
<th>version_en</th>
|
|
<th>area_en</th>
|
|
<th>contract_amount</th>
|
|
<th>annual_amount</th>
|
|
<th>is_free_hold_en</th>
|
|
<th>actual_area</th>
|
|
<th>prop_type_en</th>
|
|
<th>prop_sub_type_en</th>
|
|
<th>rooms</th>
|
|
<th>usage_en</th>
|
|
<th>nearest_metro_en</th>
|
|
<th>nearest_mall_en</th>
|
|
<th>nearest_landmark_en</th>
|
|
<th>parking</th>
|
|
<th>total_properties</th>
|
|
<th>master_project_en</th>
|
|
<th>project_en</th>
|
|
<th>created_at</th>
|
|
<th>updated_at</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="rentsBody">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/js/rents.js"></script>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|