Change PIREP states to follow AIDX guidelines

This commit is contained in:
Nabeel Shahzad
2018-04-01 20:18:12 -05:00
parent ee077ffa16
commit 0f521c3af9
5 changed files with 36 additions and 17 deletions

View File

@@ -173,7 +173,7 @@ class PirepController extends Controller
$attrs['user_id'] = $user->id;
$attrs['source'] = PirepSource::ACARS;
$attrs['state'] = PirepState::IN_PROGRESS;
$attrs['status'] = PirepStatus::PREFILE;
$attrs['status'] = PirepStatus::INITIATED;
$pirep = new Pirep($attrs);
@@ -290,7 +290,7 @@ class PirepController extends Controller
}
$attrs['state'] = PirepState::PENDING;
$attrs['status'] = PirepStatus::ARRIVED;
$attrs['status'] = PirepStatus::LANDED;
try {
$pirep = $this->pirepRepo->update($attrs, $id);
@@ -395,7 +395,7 @@ class PirepController extends Controller
}
# Change the PIREP status
$pirep->status = PirepStatus::ENROUTE;
$pirep->status = PirepStatus::AIRBORNE;
$pirep->save();
return $this->message($count.' positions added', $count);