Skip to content

Commit

Permalink
feat: Heathrow s1 page (#3592)
Browse files Browse the repository at this point in the history
Add page detailing requirements and progress towards those requirements for a heathrow s1 endorsement
  • Loading branch information
maxbrokman authored May 1, 2024
1 parent 5aa4c95 commit d354a0f
Show file tree
Hide file tree
Showing 7 changed files with 484 additions and 16 deletions.
48 changes: 48 additions & 0 deletions app/Http/Controllers/Atc/EndorsementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class EndorsementController extends BaseController
{
const GATWICK_HOURS_REQUIREMENT = 50;

const HEATHROW_S1_HOURS_REQUIREMENT = 50;

public function getGatwickGroundIndex()
{
if (! $this->account->fully_defined || ! $this->account->qualification_atc->isS1) {
Expand Down Expand Up @@ -43,6 +45,52 @@ public function getGatwickGroundIndex()
->with('conditionsMet', $hoursMet && $onRoster);
}

public function getHeathrowGroundS1Index()
{
if (! $this->account->fully_defined || ! $this->account->qualification_atc->isS1) {
return Redirect::route('mship.manage.dashboard')
->withError('Only S1 rated controllers are eligible for a Heathrow Ground (S1) endorsement.');
}

// active on roster
$onRoster = Roster::where('account_id', $this->account->id)->exists();

$egkkEndorsement = $this->account->endorsements()->where(function (Builder $builder) {
$builder->whereHasMorph('endorsable', [PositionGroup::class], function (Builder $builder) {
$builder->where('name', 'EGKK_GND');
});
})->first();

$hasEgkkEndorsement = (bool) $egkkEndorsement;

$minutesOnline = 0.0;

// 50 hours on EGKK_GND or EGKK_DEL
// AFTER getting an EGKK endorsement
if ($hasEgkkEndorsement) {
$minutesOnline = $this->account->networkDataAtc()
->isUK()
->where('callsign', 'LIKE', 'EGKK_%')
->where(function (Builder $builder) {
$builder->where('facility_type', Atc::TYPE_GND)
->orWhere('facility_type', Atc::TYPE_DEL);
})
->where('connected_at', '>=', $egkkEndorsement->created_at)
->sum('minutes_online');
}

$totalHours = $minutesOnline / 60;
$hoursMet = $totalHours >= self::HEATHROW_S1_HOURS_REQUIREMENT;

return $this->viewMake('controllers.endorsements.heathrow_ground_s1')
->with('totalHours', $totalHours)
->with('progress', ($totalHours / self::HEATHROW_S1_HOURS_REQUIREMENT) * 100)
->with('hoursMet', $hoursMet)
->with('onRoster', $onRoster)
->with('hasEgkkEndorsement', $hasEgkkEndorsement)
->with('conditionsMet', $hoursMet && $onRoster);
}

public function getAreaIndex()
{
return Redirect::route('mship.manage.dashboard')
Expand Down
1 change: 1 addition & 0 deletions resources/views/components/nav.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<li class="divider"></li>
<li class="dropdown-header">Endorsements</li>
<li>{!! link_to_route("controllers.endorsements.gatwick_ground", "Gatwick Ground") !!}</li>
<li>{!! link_to_route("controllers.endorsements.heathrow_ground_s1", "Heathrow Ground (S1)") !!}</li>
<li>{!! link_to_route("site.atc.heathrow", "Heathrow") !!}</li>
</ul>
</li>
Expand Down
36 changes: 26 additions & 10 deletions resources/views/controllers/endorsements/gatwick_ground.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,36 @@
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-ukblue">
<div class="panel-heading"><i class="fa fa-info"></i> &thinsp; Gatwick Endorsement</div>
<div class="panel-heading"><i class="fa fa-info"></i> &thinsp; Gatwick Endorsement (S1)</div>
<div class="panel-body">
<p>
Gatwick is one of the busiest airports on the VATSIM network. Before controlling it, we want to
ensure you have the knowledge you need to provide a good service to pilots and get the most from
your controlling session.
Gatwick is one of the busiest airports on the VATSIM Network.
</p>
<p>
Before controlling at Gatwick, we want to ensure you have the knowledge you need
to provide a good service to pilots and get the most from your controlling session.
</p>
<h4>Step One</h4>
<p>
In order to control Gatwick Ground as an S1, you will need to first meet
the requirements outlined on this page.
S1 rated controllers must hold a Gatwick Endorsement in order to control EGKK_GND and EGKK_DEL.
</p>
<h4>Step One</h4>
<p>
You must be a home member of the UK, be active on the controller roster, be rated as an S1
and have controlled for 50 hours on UK GMC or GMP positions.
In order to begin training for your endorsement you must meet the following requirements:
</p>
<ul>
<li>
You must be a home member of the UK
</li>
<li>
You must hold an S1 rating
</li>
<li>
You must be active on the controller roster
</li>
<li>
You must have controlled for 50 hours at other UK aerodromes after acquiring your S1 rating.
</li>
</ul>
<h4>Step Two</h4>
<p>
You will be given access to the 'Gatwick ADC | S1 Endorsement' course. This Moodle course covers
Expand All @@ -43,7 +57,9 @@
</p>
<p>
This is not a test and you will not pass or fail, rather it is an opportunity for you to practically
apply the skills and knowledge which you have learned through completing the Moodle course.<br>
apply the skills and knowledge which you have learned through completing the Moodle course.
</p>
<p>
You will do this until the mentor deems you ready for the Gatwick ground endorsement. Once granted
the endorsement, you will be able to control EGKK_GND and EGKK_DEL on the live network without
supervision.
Expand Down
153 changes: 153 additions & 0 deletions resources/views/controllers/endorsements/heathrow_ground_s1.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
@extends('layout')

@section('content')

<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-ukblue">
<div class="panel-heading"><i class="fa fa-info"></i> &thinsp; Heathrow Ground Endorsement (S1)</div>
<div class="panel-body">
<p>
Heathrow is one of the busiest airports on the VATSIM Network.
</p>
<p>
Before controlling at Heathrow, we want to ensure you have the knowledge you need
to provide a good service to pilots and get the most from your controlling session.
</p>
<p>
S1 rated controllers must hold a Heathrow Endorsement in order to control EGLL_GND and ELL_DEL positions.
</p>
<h4>Step One</h4>
<p>
In order to control Heathrow Ground as an S1, you will need to meet
the following requirements:
</p>
<ul>
<li>
You must be a home member of the UK
</li>
<li>
You must hold an S1 rating
</li>
<li>
You must be active on the controller roster
</li>
<li>
You must hold a Gatwick Endorsement
</li>
<li>
You must have controlled for 50 hours at Gatwick after acquiring your endorsement
</li>
</ul>
<h4>Step Two</h4>
<p>
You will be added to the waiting list for Heathrow training, and be
given access to the 'Heathrow (S1) GMC' course. This Moodle course covers
Heathrow specific procedures, radiotelephony, and local flight planning restrictions.
</p>
<p>
Once you are close to the top of the waiting list you will be given access to to the
Moodle exam.
</p>
<p>
If you do not pass the quiz on your first attempt, there is a study period of 72 hours for you to
review the Moodle course and improve your knowledge before you try again.
</p>
<p>
When you have passed the quiz at the end of the Moodle course, you will be prompted to submit
another ticket to ATC TRAINING.
</p>
<h4>Step Three</h4>
<p>
Begin training toward your Heathrow Ground endorsement.
</p>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-md-4 col-md-offset-2">
<div class="panel panel-ukblue">
<div class="panel-heading"><i class="fa fa-info"></i> &thinsp; Membership Status</div>
<div class="panel-body">
@if($_account->primary_state?->isDivision)
<p>You are a home member of the UK.</p>
@else
<p class="text-danger"><strong>You are not a home member of the UK Division. If you wish to hold
a Gatwick endorsement, apply to transfer to the UK
by {!! link_to_route("visiting.landing", "clicking here") !!}.</strong></p>
@endif

@if($onRoster)
<p>You are active on the controller roster.</p>
@else
<p class="text-danger">You are not active on the controller roster. If you wish to hold a
Gatwick endorsement you must be active on the roster.</p>
@endif

@if($hasEgkkEndorsement)
<p>You are endorsed to control Gatwick.</p>
@else
<p class="text-danger">You do not hold a Gatwick endorsement,
you must <a href="{{ route('controllers.endorsements.heathrow_ground_s1') }}">complete this before</a>
starting your Heathrow training.</p>
@endif
</div>
</div>
</div>

<div class="col-md-4">
<div class="panel panel-ukblue">
<div class="panel-heading"><i class="fa fa-info"></i> 50 Hours Controlling at Gatwick</div>
<div class="panel-body">
<div class="progress" data-toggle="tooltip" title="Hours Controlling DEL and GND">
@if($hoursMet)
<div
class="progress-bar progress-bar-success"
role="progressbar"
style="width: 100%"
aria-valuemin="0"
aria-valuemax="50">
50+ Hrs
</div>
@endif
<div
class="progress-bar {{ $hoursMet ? 'progress-bar-success' : '' }}"
role="progressbar"
style="width: {{ $progress }}%"
aria-valuemin="0"
aria-valuemax="50">
{{ (round($totalHours,2)) .' Hrs' }}
</div>
</div>
</div>
</div>
</div>
</div>


<div class="row">

<div class="col-md-8 col-md-offset-2">
<div class="panel panel-ukblue">
<div class="panel-heading"><i class="fa fa-info"></i> &thinsp; Request Moodle Course</div>
<div class="panel-body">
@if($conditionsMet)
<p>
<a href="https://helpdesk.vatsim.uk/open.php">Open a ticket with ATC Training</a>
to request access to the Moodle Course</p>
@else
<button class="btn btn-info center-block" disabled>Request Moodle Course</button>
@endif
</div>
</div>
</div>
</div>
@stop

@section('scripts')
<script>
$('[data-toggle="tooltip"]').tooltip();
</script>
@stop
50 changes: 44 additions & 6 deletions resources/views/site/atc/endorsements.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@
<h3>Background</h3>

<p>
London Gatwick (EGKK) was the 2nd busiest airport on the VATSIM network in 2022 with over 84,000
movements. Controlling at London Gatwick is restricted by the ATC Training Department to S2 rated
members, or S1s that hold a special endorsement. This restriction for S1s is in place to allow
members to gain experience in quieter environments and practice their skills before tackling
the workload at Gatwick.
Controlling at London Gatwick is restricted to S2 rated members, or S1s that hold a special endorsement.
This restriction for S1s is in place to allow members to gain experience in quieter environments
and practice their skills before tackling the workload at Gatwick.
</p>

<p>
Expand All @@ -67,6 +65,47 @@
</div>
</div>


<div class="col-md-8 col-md-offset-2">
<div class="panel panel-ukblue">
<a class="panel-heading-link" role="button" data-toggle="collapse" href="#endorsement-heathrow-s1">
<div class="panel-heading">
<i class="fa fa-plane-departure" aria-hidden="true"></i> &thinsp; London Heathrow - GND (S1)
<i class="pull-right fa fa-arrow-down" aria-hidden="true"></i>
</div>
</a>
<div id="endorsement-heathrow-s1" class="panel-collapse collapse panel-body">
<h3>Background</h3>

<p>
London Heathrow (EGLL) is a Tier 1 aerodrome and the busiest airport on the VATSIM network.

Controlling at London Heathrow is restricted, members must hold a special endorsement.

This restriction is in place to allow members to gain experience in quieter environments
and practice their skills before tackling the workload at Heathrow.

S1 rated members that hold a Gatwick Endorsement may train for a Heathrow Ground (S1) Endorsement.
</p>

<h3>Endorsement Process</h3>

<p>
View the requirements for the Heathrow Ground (S1) endorsement by <a
href="{{ route('controllers.endorsements.heathrow_ground_s1') }}">clicking here</a>.
<p>

<h3>Get Started</h3>

<p>
The process for getting started with the Heathrow Ground (S1) endorsement can be found by <a
href="{{ route('controllers.endorsements.heathrow_ground_s1') }}">clicking here</a>.
</p>

</div>
</div>
</div>

</div>

<div class="row equal">
Expand Down Expand Up @@ -200,7 +239,6 @@
<i class="pull-right fa fa-arrow-down" aria-hidden="true"></i>
</div>
</a>
</a>
<div id="endorsement-heathrow" class="panel-collapse collapse panel-body">
View the details for the Heathrow endorsements by <a class="nav-link" href="{{ route('site.atc.heathrow') }}">clicking here</a>.

Expand Down
1 change: 1 addition & 0 deletions routes/web-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
'middleware' => 'auth_full_group',
], function () {
Route::get('endorsements/gatwick')->uses('EndorsementController@getGatwickGroundIndex')->name('endorsements.gatwick_ground');
Route::get('endorsements/heathrow-s1')->uses('EndorsementController@getHeathrowGroundS1Index')->name('endorsements.heathrow_ground_s1');
Route::get('hour-check/area')->uses('EndorsementController@getAreaIndex')->name('hour_check.area');
});

Expand Down
Loading

0 comments on commit d354a0f

Please sign in to comment.