File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88use PanicHD \PanicHD \Helpers \LaravelVersion ;
99use PanicHD \PanicHD \Models \Category ;
1010use PanicHD \PanicHD \Models \Comment ;
11+ use PanicHD \PanicHD \Models \Member ;
1112use PanicHD \PanicHD \Models \Setting ;
1213use PanicHD \PanicHD \Models \Ticket ;
1314
@@ -24,7 +25,7 @@ public function __construct(Category $category)
2425
2526 public function newTicket (Ticket $ ticket )
2627 {
27- $ notification_owner = auth ()->user ();
28+ $ notification_owner = Member:: find ( auth ()->user ()-> id );
2829 $ template = 'panichd::emails.new_ticket ' ;
2930
3031 // Affects only agent notification.
@@ -33,6 +34,7 @@ public function newTicket(Ticket $ticket)
3334 $ data = [
3435 'ticket ' => serialize ($ ticket ),
3536 'notification_owner ' => serialize ($ notification_owner ),
37+ 'current_level ' => $ notification_owner ->currentLevel ()
3638 ];
3739
3840 // Notificate assigned agent
Original file line number Diff line number Diff line change 66@extends ($email )
77
88@section (' content' )
9- @if ($u -> currentLevel () > 1 )
9+ @if ($current_level > 1 )
1010 <p >{!! trans (' panichd::email/globals.agent_new_ticket' , [' agent' => $notification_owner -> name ]) ! !} </p >
1111 @else
1212 <p >{!! trans (' panichd::email/globals.user_new_ticket' , [' user' => $notification_owner -> name ]) ! !} </p >
You can’t perform that action at this time.
0 commit comments