Closed Thien42 closed 1 year ago
Related to #60. This will be resolved by adding a /flight/cancel to cancel an ongoing flight which will delete the data in the ongoing flights tables and also remove a PIREP in phpVMS 7
Related to #60. This will be resolved by adding a /flight/cancel to cancel an ongoing flight which will delete the data in the ongoing flights tables and also remove a PIREP in phpVMS 7
I would advise to use the phpVMS specific PIREP state and not delete the PIREP. This would solve the problem, and, keep it native to phpVMS 7 when a VA is running both vmsACARS and smartCARS 3.
class PirepState extends Enum
{
public const IN_PROGRESS = 0; // flight is ongoing
public const PENDING = 1; // waiting admin approval
public const ACCEPTED = 2;
public const CANCELLED = 3;
public const DELETED = 4;
public const DRAFT = 5;
public const REJECTED = 6;
public const PAUSED = 7;
protected static array $labels = [
self::IN_PROGRESS => 'pireps.state.in_progress',
self::PENDING => 'pireps.state.pending',
self::ACCEPTED => 'pireps.state.accepted',
self::CANCELLED => 'pireps.state.cancelled',
self::DELETED => 'pireps.state.deleted',
self::DRAFT => 'pireps.state.draft',
self::REJECTED => 'pireps.state.rejected',
self::PAUSED => 'pireps.state.paused',
];
}
Resolved in 0.3.5
Describe the bug
In phpvms7, ongoing flights seem to create an incomplete pirep object with status
pending
which doesn't get deleted on cancellation. This pirep also had a missingaircraft_id
which breaks the logbook.How do you reproduce this bug?
Expected behavior
The pirep object gets deleted on flight cancellation by the user
Screenshots
No response
API Version
0.3.3
PHP Version
8
Database & version
Mysql
Webserver version
Apache 2
Browser
Any
Handler
Any
Additional context
No response