Merge branch 'trunk'
This commit is contained in:
commit
87672410eb
2 changed files with 12 additions and 3 deletions
|
|
@ -70,7 +70,8 @@ class TicketController extends Controller
|
|||
});
|
||||
});
|
||||
}
|
||||
$tickets = $tickets->where('status', ($request->st==TicketStatus::archived()) ? '=' : '<>', TicketStatus::archived());
|
||||
$tickets = $tickets->where('status', ($request->status == TicketStatus::archived()) ?
|
||||
'=' : '<>', TicketStatus::archived());
|
||||
if ($request->search) {
|
||||
$tickets = $this->searchTicket($tickets, $request);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,16 @@ class Message extends Model
|
|||
}
|
||||
// ? Is message author is admin ?
|
||||
if ($messageUser->isAdmin()) {
|
||||
$ticket->subscriptions()->attach($messageUser);
|
||||
\session()->flash('info', trans('Vous avez été inscrit.'));
|
||||
// TODO: investigate why this make errors on prod,
|
||||
// https://supportweb.ldc.fr/ticket/583/message/create
|
||||
// SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '583-8' for key 'PRIMARY'
|
||||
// $ticket->subscriptions()->attach($messageUser);
|
||||
|
||||
// Add subscription
|
||||
if (!$messageUser->subscriptions()->find($ticket->id)) {
|
||||
$messageUser->subscriptions()->attach($ticket->id);
|
||||
\session()->flash('info', trans('Vous avez été inscrit.'));
|
||||
}
|
||||
}
|
||||
// * Send mail to other subscribed users
|
||||
event(new NotifySubscriptions(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue