@@ -2701,6 +2729,7 @@
const timestampModal = document.getElementById('timestampModal');
const userManagementModal = document.getElementById('userManagementModal');
const userModal = document.getElementById('userModal');
+ const tableHelpModal = document.getElementById('tableHelpModal');
if (event.target === pprModal) {
closePPRModal();
@@ -2714,6 +2743,9 @@
if (event.target === userModal) {
closeUserModal();
}
+ if (event.target === tableHelpModal) {
+ closeTableHelp();
+ }
}
function clearArrivalAirportLookup() {
@@ -3057,6 +3089,43 @@
}
}
+ // Table help modal functions
+ const tableHelpTexts = {
+ arrivals: {
+ title: "Today's Pending Arrivals",
+ text: "Displays aircraft that are expected to arrive at Swansea today. These are flights that have filed PPRs or have been booked in as arriving. Aircraft in this list are actively planning to land today."
+ },
+ departures: {
+ title: "Today's Pending Departures",
+ text: "Displays aircraft that are ready to depart from Swansea today. This includes flights with approved PPRs awaiting departure, local flights that have been booked out, and departures to other airfields. These aircraft will depart today."
+ },
+ departed: {
+ title: "Departed Today",
+ text: "Displays the flights which have departed today to other airfields, either by way of a PPR or by booking out."
+ },
+ parked: {
+ title: "Parked Visitors",
+ text: "Displays visiting aircraft that are currently parked at Swansea airport and are NOT expected to depart today. The ETD column shows the day the aircraft intends to depart."
+ }
+ };
+
+ function showTableHelp(tableType) {
+ const helpData = tableHelpTexts[tableType];
+ if (!helpData) return;
+
+ const modal = document.getElementById('tableHelpModal');
+ const content = document.getElementById('tableHelpContent');
+ const header = modal.querySelector('.modal-header h2');
+
+ header.textContent = helpData.title;
+ content.innerHTML = `
${helpData.text}
`;
+ modal.style.display = 'block';
+ }
+
+ function closeTableHelp() {
+ document.getElementById('tableHelpModal').style.display = 'none';
+ }
+
// Local flight edit form submission
document.getElementById('local-flight-edit-form').addEventListener('submit', async function(e) {
e.preventDefault();