Don't allow cancels from certain states (#396)
* Don't allow cancels from certain states * Unused imports * Don't reset the state doubly * Move SetUserActive into listener; code cleanup * Unused imports * Add missing files into htaccess * Move Command contract to correct folder
This commit is contained in:
@@ -9,21 +9,21 @@ use App\Contracts\Enum;
|
||||
*/
|
||||
class PirepState extends Enum
|
||||
{
|
||||
public const REJECTED = -1;
|
||||
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;
|
||||
|
||||
protected static $labels = [
|
||||
self::REJECTED => 'pireps.state.rejected',
|
||||
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',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user