Add DRAFT state in conditional check (#1422)
Add DRAFT state in conditional check
This commit is contained in:
parent
9d368e8efa
commit
7a40a9d128
@ -485,8 +485,8 @@ class PirepService extends Service
|
||||
$default_state = $pirep->state;
|
||||
}
|
||||
|
||||
// If pirep is still at PENDING state decide the default behavior by looking at rank settings
|
||||
if ($pirep->state === PirepState::PENDING) {
|
||||
// If pirep is still at PENDING or DRAFT state decide the default behavior by looking at rank settings
|
||||
if ($pirep->state === PirepState::PENDING || $pirep->state === PirepState::DRAFT) {
|
||||
if ($pirep->source === PirepSource::ACARS && $pirep->user->rank->auto_approve_acars) {
|
||||
$default_state = PirepState::ACCEPTED;
|
||||
} elseif ($pirep->source === PirepSource::MANUAL && $pirep->user->rank->auto_approve_manual) {
|
||||
|
Loading…
Reference in New Issue
Block a user