Pre-prod tweaks
This commit is contained in:
@@ -583,7 +583,7 @@
|
||||
<!-- Arrivals Table -->
|
||||
<div class="ppr-table">
|
||||
<div class="table-header">
|
||||
🛬 Today's Arrivals - <span id="arrivals-count">0</span> entries (NEW & CONFIRMED)
|
||||
🛬 Today's Arrivals - <span id="arrivals-count">0</span> entries
|
||||
</div>
|
||||
|
||||
<div id="arrivals-loading" class="loading">
|
||||
@@ -618,7 +618,7 @@
|
||||
<!-- Departures Table -->
|
||||
<div class="ppr-table" style="margin-top: 2rem;">
|
||||
<div class="table-header">
|
||||
🛫 Today's Departures - <span id="departures-count">0</span> entries (LANDED)
|
||||
🛫 Today's Departures - <span id="departures-count">0</span> entries
|
||||
</div>
|
||||
|
||||
<div id="departures-loading" class="loading">
|
||||
@@ -1327,10 +1327,10 @@
|
||||
<td>${ppr.fuel || '-'}</td>
|
||||
<td>
|
||||
<button class="btn btn-warning btn-icon" onclick="event.stopPropagation(); showTimestampModal('LANDED', ${ppr.id})" title="Mark as Landed">
|
||||
🛬
|
||||
LAND
|
||||
</button>
|
||||
<button class="btn btn-danger btn-icon" onclick="event.stopPropagation(); updateStatusFromTable(${ppr.id}, 'CANCELED')" title="Cancel Arrival">
|
||||
❌
|
||||
CANCEL
|
||||
</button>
|
||||
</td>
|
||||
`;
|
||||
@@ -1376,10 +1376,10 @@
|
||||
<td>${ppr.landed_dt ? formatTimeOnly(ppr.landed_dt) : '-'}</td>
|
||||
<td>
|
||||
<button class="btn btn-primary btn-icon" onclick="event.stopPropagation(); showTimestampModal('DEPARTED', ${ppr.id})" title="Mark as Departed">
|
||||
🛫
|
||||
TAKE OFF
|
||||
</button>
|
||||
<button class="btn btn-danger btn-icon" onclick="event.stopPropagation(); updateStatusFromTable(${ppr.id}, 'CANCELED')" title="Cancel Departure">
|
||||
❌
|
||||
CANCEL
|
||||
</button>
|
||||
</td>
|
||||
`;
|
||||
|
||||
35
web/ppr.html
35
web/ppr.html
@@ -685,9 +685,44 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Set default date and time values
|
||||
function setDefaultDateTime() {
|
||||
const now = new Date();
|
||||
// Round up to the next hour
|
||||
const nextHour = new Date(now);
|
||||
nextHour.setHours(now.getHours() + 1, 0, 0, 0);
|
||||
|
||||
// ETD is 1 hour after ETA
|
||||
const etd = new Date(nextHour);
|
||||
etd.setHours(nextHour.getHours() + 1);
|
||||
|
||||
// Format date and time for separate inputs
|
||||
function formatDate(date) {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
|
||||
function formatTime(date) {
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
return `${hours}:${minutes}`;
|
||||
}
|
||||
|
||||
// Set ETA to next hour
|
||||
document.getElementById('eta-date').value = formatDate(nextHour);
|
||||
document.getElementById('eta-time').value = formatTime(nextHour);
|
||||
|
||||
// Set ETD to one hour after ETA
|
||||
document.getElementById('etd-date').value = formatDate(etd);
|
||||
document.getElementById('etd-time').value = formatTime(etd);
|
||||
}
|
||||
|
||||
// Initialize the page when DOM is loaded
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
initializeTimeDropdowns();
|
||||
setDefaultDateTime();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user