help ticket comment email template
This commit is contained in:
parent
42befbefd5
commit
6523b09d94
|
|
@ -48,6 +48,7 @@ class HelpTicketCrudController extends CrudController
|
|||
['name'=>'email','type'=>'email','label'=>'Email'],
|
||||
['name'=>'subject','type'=>'text','label'=>'Subject'],
|
||||
['name'=>'status','type'=>'text','label'=>'Status'],
|
||||
['name'=>'updated_at','type'=>'datetime','Update']
|
||||
]);
|
||||
// add asterisk for fields that are required in HelpTicletRequest
|
||||
// $this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@
|
|||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\BackpackUser;
|
||||
use App\Models\HelpTicketComment;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class TicketCommented extends Notification implements ShouldQueue
|
||||
{
|
||||
|
|
@ -46,10 +48,22 @@ class TicketCommented extends Notification implements ShouldQueue
|
|||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
return (new MailMessage)
|
||||
->line('The introduction to the notification.')
|
||||
->action('Notification Action', url('/'))
|
||||
->line('Thank you for using our application!');
|
||||
try{
|
||||
if($notifiable instanceof BackpackUser){
|
||||
return (new MailMessage)
|
||||
->line('New comment on ticket №'.$this->comment->ticket->code)
|
||||
->line($this->comment->text)
|
||||
->line($this->comment->created_at)
|
||||
->action('Reply here', route('ticket.replay',['id'=>$this->comment->help_ticket_id]));
|
||||
|
||||
}
|
||||
else
|
||||
return (new MailMessage)
|
||||
->view('Emails.Help.CommentNotification',['comment' => $this->comment]);
|
||||
}
|
||||
catch (\Exception $ex){
|
||||
Log::error($ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Notifications;
|
||||
|
||||
use App\Models\HelpTicket;
|
||||
use App\Models\HelpTicketComment;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
|
@ -52,26 +53,22 @@ class TicketReceived extends Notification implements ShouldQueue
|
|||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
Log::info($notifiable);
|
||||
try{
|
||||
if($notifiable instanceof HelpTicket){
|
||||
if($notifiable instanceof HelpTicketComment){
|
||||
return (new MailMessage)
|
||||
->view('Emails.Help.CustomerNotification',['ticket' => $this->ticket]);
|
||||
->view('Emails.Help.TicketNotification',['ticket' => $this->ticket]);
|
||||
}
|
||||
else
|
||||
return (new MailMessage)
|
||||
->line('You have new ticket')
|
||||
->line('You have new ticket №'.$this->ticket->code)
|
||||
->line('Subject :'.$this->ticket->subject)
|
||||
->line($this->ticket->text)
|
||||
->line($this->ticket->created_at)
|
||||
->action('Reply here', route('ticket.replay',['id'=>$this->ticket->id]))
|
||||
->line('Thank you for using our application!');
|
||||
|
||||
|
||||
->action('Reply here', route('ticket.replay',['id'=>$this->ticket->id]));
|
||||
}
|
||||
catch (\Exception $ex){
|
||||
Log::error($ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
@extends('Emails.Layouts.Master')
|
||||
@section('message_content')
|
||||
<p><strong>Здравствуйте!</strong></p>
|
||||
<p>
|
||||
Получен ответ на Вашу заявку №: {{ $comment->ticket->code }}.
|
||||
</p>
|
||||
<p>Чтобы просмотреть текст, перейдите по <a href="{{route('help.show',['code' => $comment->ticket->code])}}">ссылке</a></p>
|
||||
|
||||
<p>
|
||||
С уважением, служба поддержки клиентов.
|
||||
</p>
|
||||
|
||||
<div style="margin-top: 10px; background-color: #ccc;">
|
||||
<p><strong>Salam!</strong></p>
|
||||
<p>
|
||||
Siziň №: {{ $ticket->code }} belgili hatyňyza jogap ýazyldy.
|
||||
</p>
|
||||
<p>Jogaby görmek üçin <a href="{{route('help.show',['code' => $comment->ticket->code])}}">şu ýere</a> basyň!</p>
|
||||
<p>
|
||||
Hormatlamak bilen, teh. goldaw.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('footer')
|
||||
|
||||
|
||||
@stop
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
@extends('Emails.Layouts.Master')
|
||||
@section('message_content')
|
||||
<p><strong>Здравствуйте!</strong></p>
|
||||
<p>
|
||||
My poluchili wash zapros <a href="{{route('help.show',['code' => $ticket->code])}}"> No:{{ $ticket->code }}.</a> Ozhidayte uvedomlenie ob otwete.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
S uwazheniem, sluzhba podderzhki klientow
|
||||
</p>
|
||||
|
||||
<div style="margin-top: 10px; background-color: #ccc;">
|
||||
<p><strong>Salam!</strong></p>
|
||||
<p>
|
||||
My poluchili wash zapros <a href="{{route('help.show',['code' => $ticket->code])}}"> No:{{ $ticket->code }}.</a> Ozhidayte uvedomlenie ob otwete.
|
||||
</p>
|
||||
<p>
|
||||
Hormatlamak bilen, tehpodderzhka
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('footer')
|
||||
|
||||
|
||||
@stop
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
@extends('Emails.Layouts.Master')
|
||||
@section('message_content')
|
||||
<p><strong>Здравствуйте!</strong></p>
|
||||
<p>
|
||||
Мы получили ваш запрос <a href="{{route('help.show',['code' => $ticket->code])}}"> c:{{ $ticket->code }}.</a> Ожидайте уведомление об ответе.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
С уважением, служба поддержки клиентов.
|
||||
</p>
|
||||
|
||||
<div style="margin-top: 10px; background-color: #ccc;">
|
||||
<p><strong>Salam!</strong></p>
|
||||
<p>
|
||||
<a href="{{route('help.show',['code' => $ticket->code])}}"> №:{{ $ticket->code }}.</a> belgili hatyňyz bize gowuşdy. Jogabay barada bildiriş hatyna garaşyň.
|
||||
</p>
|
||||
<p>
|
||||
Hormatlamak bilen, teh. goldaw.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('footer')
|
||||
|
||||
|
||||
@stop
|
||||
Loading…
Reference in New Issue