Flow improvements
This commit is contained in:
+14
-3
@@ -777,6 +777,9 @@
|
||||
|
||||
const ppr = await response.json();
|
||||
populateForm(ppr);
|
||||
const departedBtn = document.getElementById('btn-departed');
|
||||
departedBtn.textContent = '🛫 Depart';
|
||||
departedBtn.setAttribute('onclick', "showTimestampModal('DEPARTED')");
|
||||
|
||||
// Show/hide quick action buttons based on current status
|
||||
if (ppr.status === 'NEW') {
|
||||
@@ -789,8 +792,16 @@
|
||||
document.getElementById('btn-cancel').style.display = 'inline-block';
|
||||
} else if (ppr.status === 'LANDED') {
|
||||
document.getElementById('btn-landed').style.display = 'none';
|
||||
document.getElementById('btn-departed').style.display = 'inline-block';
|
||||
departedBtn.style.display = 'inline-block';
|
||||
departedBtn.textContent = '🛫 Take Off';
|
||||
departedBtn.setAttribute('onclick', "showTimestampModal('LOCAL')");
|
||||
document.getElementById('btn-cancel').style.display = 'inline-block';
|
||||
} else if (ppr.status === 'LOCAL') {
|
||||
document.getElementById('btn-landed').style.display = 'none';
|
||||
departedBtn.style.display = 'inline-block';
|
||||
departedBtn.textContent = 'QSY';
|
||||
departedBtn.setAttribute('onclick', "showTimestampModal('DEPARTED')");
|
||||
document.getElementById('btn-cancel').style.display = 'none';
|
||||
} else {
|
||||
// DEPARTED, CANCELED, DELETED - hide all quick actions and cancel button
|
||||
document.querySelector('.quick-actions').style.display = 'none';
|
||||
@@ -2657,8 +2668,8 @@
|
||||
text: "Displays visiting aircraft and airport departures that are ready to leave Swansea today. Local flights are shown in their own table."
|
||||
},
|
||||
"local-flights": {
|
||||
title: "Today's Local Flights",
|
||||
text: "Displays local and circuit flights booked out today, with shortcuts for contact, takeoff, circuit work, touch-and-go, and landing."
|
||||
title: "Local Traffic",
|
||||
text: "Displays local traffic booked out today, including local flights, circuits, and PPR departures that are airborne locally before QSY."
|
||||
},
|
||||
overflights: {
|
||||
title: "Active Overflights",
|
||||
|
||||
Reference in New Issue
Block a user