major ui updates
This commit is contained in:
@@ -16,11 +16,6 @@ final class WorkflowNotificationService
|
||||
{
|
||||
/**
|
||||
* Send all active workflow messages for the supplied ticket event.
|
||||
*
|
||||
* @param Ticket $ticket
|
||||
* @param string $event
|
||||
* @param User|null $actor
|
||||
* @return void
|
||||
*/
|
||||
public function dispatch(Ticket $ticket, string $event, ?User $actor = null): void
|
||||
{
|
||||
@@ -35,6 +30,7 @@ final class WorkflowNotificationService
|
||||
|
||||
if ($recipient === null || blank($recipient->email ?? null)) {
|
||||
$this->log($template, $ticket, $event, null, 'skipped', 'No recipient email was available.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,7 +59,6 @@ final class WorkflowNotificationService
|
||||
});
|
||||
}
|
||||
|
||||
/** @return User|null */
|
||||
private function recipient(string $role, Ticket $ticket, ?User $actor): ?User
|
||||
{
|
||||
return match ($role) {
|
||||
@@ -95,15 +90,15 @@ final class WorkflowNotificationService
|
||||
private function wrapHtml(string $body, Ticket $ticket): string
|
||||
{
|
||||
return '<div style="font-family:Inter,Arial,sans-serif;background:#f6f8fb;padding:24px">'
|
||||
. '<div style="max-width:720px;margin:0 auto;background:#ffffff;border:1px solid #d8dee8;border-radius:18px;overflow:hidden">'
|
||||
. '<div style="background:#0f172a;color:#ffffff;padding:24px 28px">'
|
||||
. '<div style="font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:#bfdbfe">Helpdesk notification</div>'
|
||||
. '<h1 style="margin:8px 0 0;font-size:22px">' . e($ticket->reference) . '</h1>'
|
||||
. '<p style="margin:8px 0 0;color:#dbeafe">' . e($ticket->subject) . '</p>'
|
||||
. '</div><div style="padding:28px;color:#1f2937;line-height:1.65">'
|
||||
. $body
|
||||
. '<p style="margin-top:28px"><a href="' . e(route('helpdesk.tickets.show', ['ticket' => $ticket->getKey()])) . '" style="display:inline-block;background:#2563eb;color:#ffffff;text-decoration:none;padding:11px 16px;border-radius:10px">Open ticket</a></p>'
|
||||
. '</div></div></div>';
|
||||
.'<div style="max-width:720px;margin:0 auto;background:#ffffff;border:1px solid #d8dee8;border-radius:18px;overflow:hidden">'
|
||||
.'<div style="background:#0f172a;color:#ffffff;padding:24px 28px">'
|
||||
.'<div style="font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:#bfdbfe">Helpdesk notification</div>'
|
||||
.'<h1 style="margin:8px 0 0;font-size:22px">'.e($ticket->reference).'</h1>'
|
||||
.'<p style="margin:8px 0 0;color:#dbeafe">'.e($ticket->subject).'</p>'
|
||||
.'</div><div style="padding:28px;color:#1f2937;line-height:1.65">'
|
||||
.$body
|
||||
.'<p style="margin-top:28px"><a href="'.e(route('helpdesk.tickets.show', ['ticket' => $ticket->getKey()])).'" style="display:inline-block;background:#2563eb;color:#ffffff;text-decoration:none;padding:11px 16px;border-radius:10px">Open ticket</a></p>'
|
||||
.'</div></div></div>';
|
||||
}
|
||||
|
||||
private function log(WorkflowTemplate $template, Ticket $ticket, string $event, ?string $recipient, string $status, ?string $error = null, ?string $subject = null): void
|
||||
|
||||
Reference in New Issue
Block a user