diff --git a/web/admin.html b/web/admin.html
index 653ae7f..c7695df 100644
--- a/web/admin.html
+++ b/web/admin.html
@@ -437,7 +437,7 @@
.form-actions {
display: flex;
gap: 1rem;
- justify-content: flex-end;
+ justify-content: space-between;
padding-top: 1rem;
border-top: 1px solid #eee;
}
@@ -848,18 +848,12 @@
-
-
-
-
@@ -392,7 +390,6 @@
- | ID |
Status |
Aircraft |
Type |
@@ -568,6 +565,13 @@
return;
}
+ // Sort by ETA (ascending)
+ pprs.sort((a, b) => {
+ if (!a.eta) return 1;
+ if (!b.eta) return -1;
+ return new Date(a.eta) - new Date(b.eta);
+ });
+
tbody.innerHTML = '';
document.getElementById('reports-table-content').style.display = 'block';
@@ -586,7 +590,6 @@
const statusText = ppr.status.charAt(0).toUpperCase() + ppr.status.slice(1).toLowerCase();
row.innerHTML = `
- ${ppr.id} |
${statusText} |
${ppr.ac_reg} |
${ppr.ac_type} |
@@ -622,7 +625,15 @@
utcDateStr += 'Z';
}
const date = new Date(utcDateStr);
- return date.toISOString().slice(0, 16).replace('T', ' ');
+
+ // Format as dd/mm/yy hh:mm
+ const day = String(date.getDate()).padStart(2, '0');
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const year = String(date.getFullYear()).slice(-2);
+ const hours = String(date.getHours()).padStart(2, '0');
+ const minutes = String(date.getMinutes()).padStart(2, '0');
+
+ return `${day}/${month}/${year} ${hours}:${minutes}`;
}
// Clear filters
@@ -672,18 +683,6 @@
downloadCSV(headers, csvData, 'ppr_reports.csv');
}
- function exportToXLS() {
- if (currentPPRs.length === 0) {
- showNotification('No data to export', true);
- return;
- }
-
- // For XLS export, we'll create a CSV that Excel can open
- // In a production environment, you'd want to use a proper XLS library
- exportToCSV();
- showNotification('XLS export uses CSV format (compatible with Excel)');
- }
-
function downloadCSV(headers, data, filename) {
const csvContent = [
headers.join(','),