Skip to content

Commit

Permalink
Little Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMicallefYBSU committed Aug 15, 2024
1 parent e20c39d commit d8dcfe2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
10 changes: 10 additions & 0 deletions app/Http/Controllers/DiscordTestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ public function Shanwick()
'data' => $result,
]);
}

public function SendEmbed()
{
//New Applicant in Instructor Channel
$discord = new DiscordClient();
$discord->sendMessageWithEmbed('772787726009237524', 'Oceanic Training Cancelled!',
'Your training request with Gander Oceanic has been terminated.
If you would like to begin training again, please re-apply via the Gander Website.');
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/Training/InstructingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public function certifyStudent($cid)

// Remove Student Status & Set Controller as Active
$student->user->removeRole('Student');
$student->user->addRole('Certified Controller');
$student->user->assignRole('Certified Controller');
$student->user->removeRole('Guest');

// Update Traing Lable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
<h5 class="blue-text">Actions</h5>
<ul class="list-unstyled mt-2">
@can('edit students')
<li class="mb-2">
<a data-target="#deleteStudentModal" data-toggle="modal" style="text-decoration:none;"><span class="red-text"><i class="fas fa-chevron-right"></i></span> &nbsp; <span class="black-text">Remove as student</span></a>
</li>
<div class="list-group z-depth-1">
<a data-target="#deleteStudentModal" data-toggle="modal" class="list-group-item list-group-item-action red-text"><i class="fas fa-dumpster-fire mr-3"></i>Remove User as Student</a>
</div>
@endcan
{{-- @if($student->user->rosterProfile->certification == "training")
<li class="mb-2">
<a data-target="#certifyStudentModal" data-toggle="modal" style="text-decoration:none;"><span class="green-text"><i class="fas fa-chevron-right"></i></span> &nbsp; <span class="black-text">Certify Controller</span></a>
</li>
@endif --}}
@if($student->user->rosterProfile->certification == "training")
<div class="list-group z-depth-1">
<a data-target="#certifyStudentModal" data-toggle="modal" class="list-group-item list-group-item-action green-text"><i class="fas fa-check mr-3"></i>Certify Controller</a>
</div>
@endif
</ul>
<h5 class="blue-text">Records</h5>
<ul class="list-unstyled mt-2">
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

// Discord shortcut
Route::get('/discord', [DiscordController::class, 'joinShortcut']);
// Route::get('/discord/function-test', [DiscordTestController::class, 'Shanwick']);
Route::get('/discord/function-test', [DiscordTestController::class, 'sendEmbed']);

// Public news articles
Route::get('/news/{id}', [NewsController::class, 'viewArticlePublic'])->name('news.articlepublic')->where('id', '[0-9]+');
Expand Down

0 comments on commit d8dcfe2

Please sign in to comment.