style updates

This commit is contained in:
Mark Gregory
2026-06-23 13:39:02 +01:00
parent e79cadc7f8
commit 3be4ff590f
129 changed files with 482 additions and 404 deletions
+12 -14
View File
@@ -92,7 +92,7 @@ final class TicketShow extends Component
$this->validate([
'commentBody' => ['required', 'string', 'min:2'],
'attachments.*' => 'file|max:'.config('helpdesk.max_upload_kb', 10240).'|mimes:'.implode(',', config('helpdesk.allowed_mimes', ['jpg', 'jpeg', 'png', 'pdf', 'txt', 'log', 'zip'])),
'attachments.*' => 'file|max:' . config('helpdesk.max_upload_kb', 10240) . '|mimes:' . implode(',', config('helpdesk.allowed_mimes', ['jpg', 'jpeg', 'png', 'pdf', 'txt', 'log', 'zip'])),
]);
$tickets->comment($this->ticket, Auth::user(), $this->commentBody, $this->internal, $this->attachments);
@@ -120,7 +120,6 @@ final class TicketShow extends Component
$this->dispatch('helpdesk-reply-added');
}
/**
* Refresh ticket aggregates and the time-log modal after the timer component starts or stops.
*/
@@ -143,7 +142,7 @@ final class TicketShow extends Component
->findOrFail($this->canned_response_id);
$rendered = $renderer->render($response->body, $this->ticket, Auth::user());
$this->commentBody = trim($this->commentBody."\n\n".$rendered);
$this->commentBody = trim($this->commentBody . "\n\n" . $rendered);
$this->dispatch('helpdesk-canned-response-applied', body: $this->commentBody);
}
@@ -211,7 +210,7 @@ final class TicketShow extends Component
$this->closureInternal,
[],
null,
'Closure comment'
'Closure comment',
);
$this->reset(['closureComment', 'closureInternal']);
@@ -221,7 +220,7 @@ final class TicketShow extends Component
$workflow->dispatch($this->ticket, $status->is_closed ? 'ticket.closed' : 'ticket.updated', Auth::user());
session()->flash('ticket-action-updated', 'Status updated to '.$this->ticket->status?->name.'.');
session()->flash('ticket-action-updated', 'Status updated to ' . $this->ticket->status?->name . '.');
$this->dispatch('helpdesk-status-updated', statusId: $this->status_id);
}
@@ -254,7 +253,7 @@ final class TicketShow extends Component
$workflow->dispatch($this->ticket, 'ticket.updated', Auth::user());
session()->flash('ticket-action-updated', 'Priority updated to '.$this->ticket->priority?->name.'.');
session()->flash('ticket-action-updated', 'Priority updated to ' . $this->ticket->priority?->name . '.');
$this->dispatch('helpdesk-priority-updated', priorityId: $this->priority_id);
}
@@ -291,7 +290,7 @@ final class TicketShow extends Component
session()->flash('ticket-action-updated', $this->agent_id === null
? 'Ticket is now unassigned.'
: 'Ticket assigned to '.$this->ticket->agent?->name.'.');
: 'Ticket assigned to ' . $this->ticket->agent?->name . '.');
$this->dispatch('helpdesk-agent-updated', agentId: $this->agent_id);
}
@@ -305,7 +304,7 @@ final class TicketShow extends Component
$this->validate([
'supportingFiles' => ['required', 'array', 'min:1'],
'supportingFiles.*' => ['file', 'max:'.$maxUploadKilobytes, 'mimes:'.$allowedMimes],
'supportingFiles.*' => ['file', 'max:' . $maxUploadKilobytes, 'mimes:' . $allowedMimes],
]);
$user = Auth::user();
@@ -398,7 +397,6 @@ final class TicketShow extends Component
]);
}
/**
* Get the first-response SLA headline for the SLA panel.
*/
@@ -421,14 +419,14 @@ final class TicketShow extends Component
public function firstResponseSlaDetail(): string
{
if ($this->ticket->first_response_at !== null) {
return 'Responded in '.$this->formatDurationBetween($this->ticket->created_at, $this->ticket->first_response_at);
return 'Responded in ' . $this->formatDurationBetween($this->ticket->created_at, $this->ticket->first_response_at);
}
if ($this->ticket->sla_first_response_due_at === null) {
return 'No first-response target is set.';
}
return 'Due '.$this->ticket->sla_first_response_due_at->format('d M Y H:i');
return 'Due ' . $this->ticket->sla_first_response_due_at->format('d M Y H:i');
}
/**
@@ -489,14 +487,14 @@ final class TicketShow extends Component
public function resolutionSlaDetail(): string
{
if ($this->ticket->completed_at !== null) {
return 'Resolved in '.$this->formatDurationBetween($this->ticket->created_at, $this->ticket->completed_at);
return 'Resolved in ' . $this->formatDurationBetween($this->ticket->created_at, $this->ticket->completed_at);
}
if ($this->ticket->sla_resolution_due_at === null) {
return 'No resolution target is set.';
}
return 'Due '.$this->ticket->sla_resolution_due_at->format('d M Y H:i');
return 'Due ' . $this->ticket->sla_resolution_due_at->format('d M Y H:i');
}
/**
@@ -539,7 +537,7 @@ final class TicketShow extends Component
$seconds = max(0, $start->diffInSeconds($end));
if ($seconds < 60) {
return $seconds.' seconds';
return $seconds . ' seconds';
}
return CarbonInterval::seconds($seconds)