diff --git a/Modules/Helpdesk/Livewire/TicketShow.php b/Modules/Helpdesk/Livewire/TicketShow.php index abed51e6..22be0f1e 100644 --- a/Modules/Helpdesk/Livewire/TicketShow.php +++ b/Modules/Helpdesk/Livewire/TicketShow.php @@ -14,6 +14,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Str; use Illuminate\Validation\Rule; +use Livewire\Attributes\On; use Livewire\Attributes\Validate; use Livewire\Component; use Livewire\Features\SupportFileUploads\TemporaryUploadedFile; @@ -119,6 +120,16 @@ 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. + */ + #[On('helpdesk-ticket-time-log-updated')] + public function refreshAfterTimeLogUpdate(): void + { + $this->ticket = $this->freshTicket($this->ticket); + } + public function applyCannedResponse(CannedResponseRenderer $renderer): void { $this->authorize('comment', $this->ticket); diff --git a/Modules/Helpdesk/Livewire/TicketTimer.php b/Modules/Helpdesk/Livewire/TicketTimer.php index 28157b5c..158584b8 100644 --- a/Modules/Helpdesk/Livewire/TicketTimer.php +++ b/Modules/Helpdesk/Livewire/TicketTimer.php @@ -83,6 +83,7 @@ class TicketTimer extends Component $this->message = 'Timer started.'; $this->dispatch('timer-started'); + $this->dispatch('helpdesk-ticket-time-log-updated'); } /** @@ -129,6 +130,7 @@ class TicketTimer extends Component $this->message = 'Timer ended and time was added to the ticket.'; $this->dispatch('timer-ended'); + $this->dispatch('helpdesk-ticket-time-log-updated'); } /** diff --git a/Modules/Helpdesk/README.md b/Modules/Helpdesk/README.md index 7b53a062..824712d0 100644 --- a/Modules/Helpdesk/README.md +++ b/Modules/Helpdesk/README.md @@ -319,3 +319,14 @@ The create-ticket **Clear** action must only clear transient user-entered conten It must preserve configured routing defaults such as company, board, priority, category, project, team and due-date defaults. When a user selects a closed ticket status, the professional closure modal must open on the first interaction. A closure comment remains mandatory, and the user can choose whether the closure comment is public or internal. + +## Spellcheck and Rich Editor + +The Helpdesk rich editor keeps its HTML controls for formatting, lists, links, quotes and pasted content. Browser-native spellcheck is enabled on the editable area, but the module deliberately does not ship a fake inline spellchecker because replacing the editor with a textarea removes the toolbar and breaks the workflow. + +If a full inline spelling engine is required later, add it as a deliberate editor plugin integration with regression tests for formatting, Livewire body sync, ticket create, reply, clear, close modal, and attachment handling. Do not replace the rich editor with a plain textarea. + +## Timer Log Refresh + +The ticket timer dispatches `helpdesk-ticket-time-log-updated` after start and stop. The ticket detail Livewire component listens for that event and refreshes ticket aggregates so the time summary and log modal update without a page reload. + diff --git a/Modules/Helpdesk/Resources/views/components/html-editor.blade.php b/Modules/Helpdesk/Resources/views/components/html-editor.blade.php index 69cfc6fb..1491907c 100644 --- a/Modules/Helpdesk/Resources/views/components/html-editor.blade.php +++ b/Modules/Helpdesk/Resources/views/components/html-editor.blade.php @@ -66,13 +66,18 @@ class="rounded-lg px-2 py-1 text-sm hover:bg-zinc-200 dark:hover:bg-zinc-800">Clear -
+ ++ Browser spellcheck is enabled for this rich editor. Use your browser or operating-system spelling menu for suggestions. +
+ @if ($model) @error($model)