Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ favicon.ico
favicon.gif
/public/favicon.gif
.php-cs-fixer.cache
/.vs
/.env
2 changes: 1 addition & 1 deletion app/Console/Commands/UpdateSoloCerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function handle() {

foreach ($certs as $cert) {
if ($cert->expiration <= $today && $cert->status == 0) {
Mail::to('ta@ztlartcc.org')->send(new SoloCertExpiration($cert));
Mail::to(config('artcc.email_ta'))->send(new SoloCertExpiration($cert));
$cert->status = 1;

$user = User::find($cert->cid);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ControllerDash.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ public function reportBug(Request $request) {
$error = $request->error;
$desc = $request->desc;

Mail::to('wm@ztlartcc.org')->send(new BugReport($reporter, $url, $error, $desc));
Mail::to(config('artcc.email_wm'))->send(new BugReport($reporter, $url, $error, $desc));

return redirect()->back()->with(SessionVariables::SUCCESS->value, 'Your bug has been reported successfully.');
}
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/FrontController.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function storeVisit(Request $request) {
if (User::find($request->cid) !== null) {
$user = User::find($request->cid);
if ($user->status == 1) {
return redirect()->back()->with(SessionVariables::ERROR->value, 'Unable to apply as a visitor - you are already listed as a controller on our roster. If you believe this is in error, contact the ZTL DATM at datm@ztlartcc.org');
return redirect()->back()->with(SessionVariables::ERROR->value, 'Unable to apply as a visitor - you are already listed as a controller on our roster. If you believe this is in error, contact the ZTL DATM at ' . config('artcc.email_datm'));
}
}

Expand Down Expand Up @@ -282,7 +282,7 @@ public function storeVisit(Request $request) {
);
}

Mail::to($visit->email)->cc('datm@ztlartcc.org')->send(new VisitorMail('new', $visit));
Mail::to($visit->email)->cc(config('artcc.email_datm'))->send(new VisitorMail('new', $visit));

return redirect('/')->with(SessionVariables::SUCCESS->value, 'Thank you for your interest in the ZTL ARTCC! Your visit request has been submitted.');
} else {
Expand Down Expand Up @@ -413,7 +413,7 @@ public function staffRequest(Request $request) {
$time = $request->time;
$exp = $request->additional_information;

Mail::to('ec@ztlartcc.org')->send(new ReqStaffing($name, $email, $org, $date, $time, $exp));
Mail::to(config('artcc.email_ec'))->send(new ReqStaffing($name, $email, $org, $date, $time, $exp));

return redirect('/')->with(SessionVariables::SUCCESS->value, 'The staffing request has been delivered to the appropiate parties successfully. You should expect to hear back soon.');
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/MerchStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class MerchStore extends Controller {
public function viewStore() {
$merch_items = Merch::get();
$merch_email = Config::get('ztl.merch_store_email');
$merch_email = Config::get('artcc.merch_store_email');
return view('dashboard.controllers.merch_store', compact('merch_items', 'merch_email'));
}

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/PilotPassportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function enroll(Request $request) {
$valid_enrollment = false;
}
if (!$valid_enrollment) {
return redirect(route('pilotPassportIndex'))->with(['tab' => 'enrollments'])->with(SessionVariables::ERROR->value, 'Enrollment data invalid. Please contact wm@ztlartcc.org for assistance.');
return redirect(route('pilotPassportIndex'))->with(['tab' => 'enrollments'])->with(SessionVariables::ERROR->value, 'Enrollment data invalid. Please contact ' . config('artcc.email_wm') . ' for assistance.');
}
$enrollment = PilotPassportEnrollment::where('cid', $pilot->id)->where('challenge_id', $request->challenge_id)->get();
if ($enrollment->isEmpty()) {
Expand Down Expand Up @@ -116,7 +116,7 @@ public static function fetchRecentPilotAccomplishments() {

public function generateCertificate($id) {
$award = PilotPassportAward::find($id);
$error_html = '<p>An error has occured - please contact <a href="emailto:wm@ztlartcc.org">wm@ztlartcc.org</a></p>';
$error_html = '<p>An error has occured - please contact <a href="mailto:' . config('artcc.email_wm') . '">' . config('artcc.email_wm') . '</a></p>';
if (!$award) {
return pdf()->html($error_html)->download();
}
Expand Down
10 changes: 5 additions & 5 deletions app/Http/Controllers/TrainingDash.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ public function addStudentComments(Request $request, $id) {
$ticket->student_comments = $request->student_comments;
$ticket->save();

$mailer = Mail::to('ta@ztlartcc.org');
$mailer = Mail::to(config('artcc.email_ta'));
$trainer = User::find($ticket->trainer_id);
if ($trainer) {
if ($trainer->user_status[$trainer->status] == 'Active' && $trainer->isAbleTo('train')) {
$mailer = Mail::to($trainer->email)->cc('training@ztlartcc.org');
$mailer = Mail::to($trainer->email)->cc(config('artcc.email_training'));
}
}
$mailer->send(new StudentComment($trainer->full_name, $ticket->id));
Expand Down Expand Up @@ -524,7 +524,7 @@ public function assignRecommendation(Request $request, $id) {
$ins = User::find($ots->ins_id);
$controller = User::find($ots->controller_id);

Mail::to($ins->email)->cc('training@ztlartcc.org')->send(new OtsAssignment($ots, $controller, $ins));
Mail::to($ins->email)->cc(config('artcc.email_training'))->send(new OtsAssignment($ots, $controller, $ins));

Audit::newAudit(' assigned an OTS for ' . User::find($ots->controller_id)->full_name . ' to ' . User::find($ots->ins_id)->full_name . '.');

Expand Down Expand Up @@ -696,7 +696,7 @@ public static function generateTrainingStats($year, $month, $dataType) {
$trainerStats['S3'] = $trainerSesh->whereIn('position', $position_types_by_rating['S3'])->count();
$trainerStats['C1'] = $trainerSesh->whereIn('position', $position_types_by_rating['C1'])->count();
$trainerStats['Other'] = $trainerSesh->whereIn('position', $position_types_by_rating['OTHER'])->count();
if ($trainerStats['total'] < Config::get('ztl.trainer_min_sessions')) {
if ($trainerStats['total'] < Config::get('artcc.trainer_min_sessions')) {
$trainingStaffBelowMins++;
}
$trainerSessions[] = $trainerStats;
Expand Down Expand Up @@ -903,7 +903,7 @@ private function saveNewTicket(Request $request, $id) {
$controller = User::find($ticket->controller_id);
$trainer = User::find($ticket->trainer_id);

Mail::to($controller->email)->cc('training@ztlartcc.org')->send(new TrainingTicketMail($ticket, $controller, $trainer));
Mail::to($controller->email)->cc(config('artcc.email_training'))->send(new TrainingTicketMail($ticket, $controller, $trainer));

if ($request->ots == 1) {
$ots = new Ots;
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/TaStatsMonthly.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function render() {
$this->dispatch('changeSelectedMonth', inclusive_dates: $this->inclusive_dates, graph_data: $this->graph_data);
$this->skipRender();
}
$this->trainer_min_sessions = Config::get('ztl.trainer_min_sessions');
$this->trainer_min_sessions = Config::get('trainer.trainer_min_sessions');
$this->lookback_months();
return view('livewire.ta-stats-monthly');
}
Expand Down
2 changes: 1 addition & 1 deletion app/Mail/PilotPassportMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function envelope(): Envelope {
return new Envelope(
from: new ZTLAddress('events', 'vZTL ARTCC Events Department'),
replyTo: [
new Address('wm@ztlartcc.org', 'vZTL ARTCC WM')
new Address(config('artcc.email_wm'), 'vZTL ARTCC WM')
],
subject: $this::$SUBJECTS[$this->type]
);
Expand Down
2 changes: 1 addition & 1 deletion app/Mail/VisitorMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(public $type, public $visitor) {
* Get the message envelope.
*/
public function envelope(): Envelope {
$datm = new Address('datm@ztlartcc.org', 'vZTL ARTCC DATM');
$datm = new Address(config('artcc.email_datm'), 'vZTL ARTCC DATM');
return new Envelope(
from: new ZTLAddress('visitors', 'vZTL ARTCC Visiting Department'),
replyTo: [ $datm ],
Expand Down
52 changes: 52 additions & 0 deletions config/artcc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

/*
config/artcc.php
Set these configuration values in your .env file to update ARTCC-specific
variables such as email addresses and training standards.
*/
return [

// Facility 3-letter ID
'id' => env('ARTCC_ID', 'ZTL'),
// Facility short name
'short_name' => env('ARTCC_SHORT_NAME', 'vZTL'),
'long_name' => env('ARTCC_LONG_NAME', 'Atlanta ARTCC'),

// Set staff email addresses (used in staff view and email templates)
'email_atm' => env('ARTCC_EMAIL_ATM', 'atm@ztlartcc.org'),
'email_datm' => env('ARTCC_EMAIL_DATM', 'datm@ztlartcc.org'),
'email_ta' => env('ARTCC_EMAIL_TA', 'ta@ztlartcc.org'),
'email_ec' => env('ARTCC_EMAIL_EC', 'ec@ztlartcc.org'),
'email_fe' => env('ARTCC_EMAIL_FE', 'fe@ztlartcc.org'),
'email_wm' => env('ARTCC_EMAIL_WM', 'wm@ztlartcc.org'),
'email_test' =>env('ARTCC_EMAIL_TEST', 'test@ztlartcc.org'),

// Training tickets are CC'd to this address
'email_training' => env('ARTCC_EMAIL_TRAINING', 'training@ztlartcc.org'),

// Placeholder email address for forms
'email_placeholder' => env('ARTCC_EMAIL_PLACEHOLDER', 'example@ztlartcc.org'),

// Merch store email
'email_merch_store' => env('ARTCC_MERCH_STORE_EMAIL', 'datm@ztlartcc.org'),

// Number of sessions training staff are required to provide per month
'trainer_min_sessions' => env('ZTL_TRAINER_MONTHLY_SESSIONS', 3),

// Solo cert facilities (3-letter ID)
'solo_twr' => env('ARTCC_SOLO_TWR', 'BHM'),
'solo_app' => env('ARTCC_SOLO_APP', 'BHM'),
'solo_ctr' => env('ARTCC_SOLO_CTR', 'ZTL'),

// Teamspeak (adds teamspeak info views and links)
'teamspeak' => env('ARTCC_TS', true),
'teamspeak_server' => env('ARTCC_TS_SERVER', 'ts.ztlartcc.org'),
'teamspeak_port' => env('ARTCC_TS_PORT', '9987'),

// IDS Link (adds a link for IDS to the sidebar nav menu)
'ids' => env('ARTCC_IDS', true),
'ids_name' => env('ARTCC_IDS_NAME', 'vIDS'),
'ids_link' => env('ARTCC_IDS_LINK', 'https://ids.ztlartcc.org'),

];
6 changes: 0 additions & 6 deletions config/ztl.php

This file was deleted.

2 changes: 1 addition & 1 deletion resources/views/dashboard/admin/email/send.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="col-sm-4">
<label for="reply_to">Reply to Email</label>
{{ html()->text('reply_to', null)->placeholder('ex. youremail@ztlartcc.org (Required)')->class(['form-control']) }}
{{ html()->text('reply_to', null)->placeholder('ex. ' . config('artcc.email_placeholder') . ' (Required)')->class(['form-control']) }}
</div>
</div>
<div class="row-mb-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
</div>
<div class="col-sm-6">
<label for="email">Your Email</label>
{{ html()->email('email', 'ta@ztlartcc.org')->class(['form-control']) }}
{{ html()->email('email', config('artcc.email_ta'))->class(['form-control']) }}
</div>
</div>
<br>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/dashboard/controllers/profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class="fas fa-info-circle"></i></a></b>
</div>
<br>
<div class="container">
<p>Please note that opting out of broadcast emails will only prevent you from receiving broadcast emails issued from staff. Personalized emails (both automated and issued by staff) will not be affected. If you have any questions, please contact the ATM at <a href="mailto:atm@ztlartcc.org">atm@ztlartcc.org</a>.</p>
<p>Please note that opting out of broadcast emails will only prevent you from receiving broadcast emails issued from staff. Personalized emails (both automated and issued by staff) will not be affected. If you have any questions, please contact the ATM at <a href="mailto:config('artcc.email_atm')">config('artcc.email_atm')</a>.</p>
</div>
<div class="modal-footer">
<a href="{{ url()->current() }}" class="btn btn-secondary">Close</a>
Expand All @@ -300,7 +300,7 @@ class="fas fa-info-circle"></i></a></b>
</div>
<br>
<div class="container">
<p>Opting into emails will only affect the recieving of mass emails. If you elect to opt into emails, you agree to recieve mass emails sent to groups of members of the vZTL ARTCC. This selection will not affect the reception of personalized emails (both automated and issued by staff) for example, training ticket emails. If you have any questions, please contact the ATM at <a href="mailto:atm@ztlartcc.org">atm@ztlartcc.org</a>.</p>
<p>Opting into emails will only affect the recieving of mass emails. If you elect to opt into emails, you agree to recieve mass emails sent to groups of members of the vZTL ARTCC. This selection will not affect the reception of personalized emails (both automated and issued by staff) for example, training ticket emails. If you have any questions, please contact the ATM at <a href="mailto:{{config('artcc.email_atm')}}">{{config('artcc.email_atm')}}</a>.</p>
<p>You may opt out at any time by using the slider shown on the profile page.</p>
<br>
<i>Please check the following check boxes if you would like to continue.</i>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/event_reminder.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@endif

<br>
<p>If you have any questions or concerns, please contact the events coordinator at <a href="mailto:ec@ztlartcc.org">ec@ztlartcc.org</a>.</p>
<p>If you have any questions or concerns, please contact the events coordinator at <a href="mailto:{{config('artcc.email_ec')}}">{{config('artcc.email_ec')}}</a>.</p>
<br>

<p>Sincerely,</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/inactive/controller.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p>Dear {{ $controller->full_name }},</p>
<br>
<p>You have not met the activity requirements within the last thirty days. As a certified controller, you are required to control, on the network, for at least 60 minutes every 30 days. You will have a 30 day grace period to meet this requirement, but after that you may be removed from the roster.</p>
<p>If you have any questions or are on an LOA, please contact the DATM at <a href="mailto:datm@ztlartcc.org">datm@ztlartcc.org</a>.</p>
<p>If you have any questions or are on an LOA, please contact the DATM at <a href="mailto:{{config('artcc.email_datm')}}">{{config('artcc.email_datm')}}</a>.</p>
<br>
<p>Sincerely,</p>
<p>vZTL ARTCC Staff</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/inactive/obs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p>Dear {{ $controller->full_name }},</p>
<br>
<p>You have not met the activity requirements within the last thirty days. As an observer, you are required to take part in at least 60 minutes of training each 30 days. You will have a 30 day grace period to meet this requirement, but after that you may be removed from the roster.</p>
<p>If you have any questions or are on an LOA, please contact the DATM at <a href="mailto:datm@ztlartcc.org">datm@ztlartcc.org</a>.</p>
<p>If you have any questions or are on an LOA, please contact the DATM at <a href="mailto:{{config('artcc.email_datm')}}">{{config('artcc.email_datm')}}</a>.</p>
<br>
<p>Sincerely,</p>
<p>vZTL ARTCC Staff</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/inactive/student.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p>Dear {{ $controller->full_name }},</p>
<br>
<p>You have not met the activity requirements within the last thirty days. As a student, you are required to take part in at least 60 minutes of training each 30 days. You will have a 30 day grace period to meet this requirement, but after that you may be removed from the roster.</p>
<p>If you have any questions or are on an LOA, please contact the DATM at <a href="mailto:datm@ztlartcc.org">datm@ztlartcc.org</a>.</p>
<p>If you have any questions or are on an LOA, please contact the DATM at <a href="mailto:{{config('artcc.email_datm')}}">{{config('artcc.email_datm')}}</a>.</p>
<br>
<p>Sincerely,</p>
<p>vZTL ARTCC Staff</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/new_feedback.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@endif
<br>

<p>If you have any thoughts/comments, please email the DATM at <a href="mailto:datm@ztlartcc.org">datm@ztlartcc.org</a>.</p>
<p>If you have any thoughts/comments, please email the DATM at <a href="mailto:{{config('artcc.email_datm')}}">{{config('artcc.email_datm')}}</a>.</p>
<br>

<p>Sincerely,</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/new_trainer_feedback.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@endif
<br>

<p>If you have any thoughts/comments, please email the TA at <a href="mailto:ta@ztlartcc.org">ta@ztlartcc.org</a>.</p>
<p>If you have any thoughts/comments, please email the TA at <a href="mailto:{{config('artcc.email_ta')}}">{{config('artcc.email_ta')}}</a>.</p>
<br>

<p>Sincerely,</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/ots_assignment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@section('content')
<p>Dear {{ $ins->fullname }},</p>
<p>You have been assigned an OTS. The details are listed below. Please reply to this email, or email the controller separately in order to schedule the OTS exam. If you have any questions, please contact the TA at <a href="mailto:ta@ztlartcc.org">ta@ztlartcc.org</a>.</p>
<p>You have been assigned an OTS. The details are listed below. Please reply to this email, or email the controller separately in order to schedule the OTS exam. If you have any questions, please contact the TA at <a href="mailto:{{config('artcc.email_ta')}}">{{config('artcc.email_ta')}}</a>.</p>
<br>
<p><b>Controller Name:</b> {{ $ots->controller_name }}</p>
<p><b>Position:</b> {{ $ots->position_name }}</p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/pilot_passport/enroll.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
email confirmation with each qualifying visit (emails may be delayed up to 5 minutes).</p>

<p>If you did not enroll in this program or otherwise believe this email to be in error, please contact us at:
<a href="mailto:wm@ztlartcc.org" alt="Email">wm@ztlartcc.org</a>.</p>
<a href="mailto:{{config('artcc.email_wm')}}" alt="Email">{{config('artcc.email_wm')}}</a>.</p>

<p>Thank you!<br> - vZTL Staff</p>
@endsection
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

<p>If you did not enroll in this program or otherwise believe this email to be in error, please contact us at:
<a href="mailto:wm@ztlartcc.org" alt="Email">wm@ztlartcc.org</a>.</p>
<a href="mailto:{{config('artcc.email_wm')}}" alt="Email">{{config('artcc.email_wm')}}</a>.</p>

<p>Thank you!<br> - vZTL Staff</p>
@endsection
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@endif
<p>If you did not enroll in this program or otherwise believe this email to be in error, please contact us at:
<a href="mailto:wm@ztlartcc.org" alt="Email">wm@ztlartcc.org</a>.</p>
<a href="mailto:{{config('artcc.email_wm')}}" alt="Email">{{config('artcc.email_wm')}}</a>.</p>

<p>Thank you!<br> - vZTL Staff</p>
@endsection
2 changes: 1 addition & 1 deletion resources/views/emails/realops/cancel_bid.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
@section('content')
<p>Dear {{ $pilot->full_name }},</p>

<p>This is an automated email to confirm that you have cancelled your assignment for Realops flight {{ $flight->flight_number }}. If you believe this is a mistake, you can rebid for the flight on the <a href="https://www.ztlartcc.org/realops">Realops Dashboard</a> if bidding is still open, or you can send an email to <a href="mailto:ec@ztlartcc.org">ec@ztlartcc.org</a>.</p>
<p>This is an automated email to confirm that you have cancelled your assignment for Realops flight {{ $flight->flight_number }}. If you believe this is a mistake, you can rebid for the flight on the <a href="https://www.ztlartcc.org/realops">Realops Dashboard</a> if bidding is still open, or you can send an email to <a href="mailto:{{config('artcc.email_ec')}}">{{config('artcc.email_ec')}}</a>.</p>
@endsection
Loading
Loading