diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 11970d43..2d196151 100755 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -109,8 +109,7 @@ class LoginController extends Controller $user->last_ip = $request->ip(); $user->save(); - // TODO: How to handle ON_LEAVE? - if ($user->state !== UserState::ACTIVE) { + if ($user->state !== UserState::ACTIVE && $user->state !== UserState::ON_LEAVE) { Log::info('Trying to login '.$user->ident.', state ' .UserState::label($user->state)); diff --git a/app/Services/PirepService.php b/app/Services/PirepService.php index e59685dd..461c034d 100644 --- a/app/Services/PirepService.php +++ b/app/Services/PirepService.php @@ -263,6 +263,18 @@ class PirepService extends Service return $pirep; } + /** + * Alias to submit() + * + * @param \App\Models\Pirep $pirep + * + * @throws \Exception + */ + public function file(Pirep $pirep) + { + return $this->submit($pirep); + } + /** * Submit the PIREP. Figure out its default state * diff --git a/resources/views/layouts/default/dashboard/index.blade.php b/resources/views/layouts/default/dashboard/index.blade.php index 8ab2b3ac..09012f37 100644 --- a/resources/views/layouts/default/dashboard/index.blade.php +++ b/resources/views/layouts/default/dashboard/index.blade.php @@ -5,6 +5,16 @@