forked from miguel456/rbrecruiter
Apply fixes from StyleCI
This commit is contained in:
@@ -1,7 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright © 2020 Miguel Nogueira
|
||||
*
|
||||
* This file is part of Raspberry Staff Manager.
|
||||
*
|
||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Application;
|
||||
use App\Facades\Options;
|
||||
use App\Traits\Cancellable;
|
||||
use Illuminate\Bus\Queueable;
|
||||
@@ -9,7 +29,6 @@ use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use App\Application;
|
||||
|
||||
class ApplicationApproved extends Notification implements ShouldQueue
|
||||
{
|
||||
@@ -45,10 +64,9 @@ class ApplicationApproved extends Notification implements ShouldQueue
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
|
||||
return (new MailMessage)
|
||||
->from(config('notification.sender.address'), config('notification.sender.name'))
|
||||
->subject(config('app.name') . ' - ' . $this->application->response->vacancy->vacancyName . ' application approved')
|
||||
->subject(config('app.name').' - '.$this->application->response->vacancy->vacancyName.' application approved')
|
||||
->line('<br />')
|
||||
->line('Congratulations! Our Staff team has reviewed your application today, and your application has been approved.')
|
||||
->line('You have just received the Reviewer role, which allows you to view and vote on other applications.')
|
||||
@@ -62,19 +80,18 @@ class ApplicationApproved extends Notification implements ShouldQueue
|
||||
|
||||
public function toSlack($notifiable)
|
||||
{
|
||||
|
||||
$url = route('showSingleProfile', ['user' => $notifiable->id]);
|
||||
$roles = implode(', ', $notifiable->roles->pluck('name')->all());
|
||||
|
||||
return (new SlackMessage)
|
||||
->success()
|
||||
->content('A user has been approved on the team. Welcome aboard!')
|
||||
->attachment(function($attachment) use ($notifiable, $url, $roles){
|
||||
->attachment(function ($attachment) use ($notifiable, $url, $roles) {
|
||||
$attachment->title('New staff member')
|
||||
->fields([
|
||||
'Name' => $notifiable->name,
|
||||
'Email' => $notifiable->email,
|
||||
'Roles' => $roles
|
||||
'Roles' => $roles,
|
||||
])
|
||||
->action('View profile', $url);
|
||||
});
|
||||
|
Reference in New Issue
Block a user