local-flights #5
@@ -2793,6 +2793,13 @@
|
|||||||
async function updateLocalFlightStatusFromTable(flightId, status) {
|
async function updateLocalFlightStatusFromTable(flightId, status) {
|
||||||
if (!accessToken) return;
|
if (!accessToken) return;
|
||||||
|
|
||||||
|
// Show confirmation for cancel actions
|
||||||
|
if (status === 'CANCELLED') {
|
||||||
|
if (!confirm('Are you sure you want to cancel this flight? This action cannot be easily undone.')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`/api/v1/local-flights/${flightId}/status`, {
|
const response = await fetch(`/api/v1/local-flights/${flightId}/status`, {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
@@ -2841,6 +2848,13 @@
|
|||||||
async function updateLocalFlightStatus(status) {
|
async function updateLocalFlightStatus(status) {
|
||||||
if (!currentLocalFlightId || !accessToken) return;
|
if (!currentLocalFlightId || !accessToken) return;
|
||||||
|
|
||||||
|
// Show confirmation for cancel actions
|
||||||
|
if (status === 'CANCELLED') {
|
||||||
|
if (!confirm('Are you sure you want to cancel this flight? This action cannot be easily undone.')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`/api/v1/local-flights/${currentLocalFlightId}/status`, {
|
const response = await fetch(`/api/v1/local-flights/${currentLocalFlightId}/status`, {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
|
|||||||
Reference in New Issue
Block a user