From 70cd7149aa6ece77e9a36a764c2b808519f50f24 Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Thu, 18 Jun 2026 15:33:41 +0100 Subject: [PATCH] intial ticket fix partial delete fix --- .../Feature/HelpdeskLivewireAssetsTest.php | 27 + .../views/layouts/app/sidebar.blade.php | 1 + .../views/livewire/settings-manager.blade.php | 8 +- .../Feature/HelpdeskLivewireAssetsTest.php | 27 + Modules/Helpdesk/changelog.yaml | 7 +- .../views/layouts/app/sidebar.blade.php | 1068 +++++++++++++++++ .../views/livewire/settings-manager.blade.php | 634 ++++++++++ 7 files changed, 1765 insertions(+), 7 deletions(-) create mode 100644 Modules/Helpdesk/Feature/HelpdeskLivewireAssetsTest.php create mode 100644 Modules/Helpdesk/Tests/Feature/HelpdeskLivewireAssetsTest.php create mode 100644 Modules/Helpdesk/views/layouts/app/sidebar.blade.php create mode 100644 Modules/Helpdesk/views/livewire/settings-manager.blade.php diff --git a/Modules/Helpdesk/Feature/HelpdeskLivewireAssetsTest.php b/Modules/Helpdesk/Feature/HelpdeskLivewireAssetsTest.php new file mode 100644 index 00000000..25272720 --- /dev/null +++ b/Modules/Helpdesk/Feature/HelpdeskLivewireAssetsTest.php @@ -0,0 +1,27 @@ + +@livewireScripts @fluxScripts + + + + +
+ + + + +
+ ("layouts.partials.topbar") + +
+ {{ $slot }} +
+
+
+ +
+ + + +@livewireScripts +@fluxScripts + + + + diff --git a/Modules/Helpdesk/views/livewire/settings-manager.blade.php b/Modules/Helpdesk/views/livewire/settings-manager.blade.php new file mode 100644 index 00000000..1f74bc64 --- /dev/null +++ b/Modules/Helpdesk/views/livewire/settings-manager.blade.php @@ -0,0 +1,634 @@ + + + +@php + /** + * Keep the settings view safe during rolling module upgrades or Livewire navigate + * hydration where the compiled Blade view may be newer than the loaded component. + */ + $companies = collect($companies ?? []); + $statuses = collect($statuses ?? []); + $priorities = collect($priorities ?? []); + $categories = collect($categories ?? []); + $teams = collect($teams ?? []); + $projects = collect($projects ?? []); + $boards = collect($boards ?? []); + $repositories = collect($repositories ?? []); + $workflowTemplates = collect($workflowTemplates ?? []); + $cannedResponses = collect($cannedResponses ?? []); + $slaPolicies = collect($slaPolicies ?? []); + $automationRules = collect($automationRules ?? []); + $checklistTemplates = collect($checklistTemplates ?? []); + $tags = collect($tags ?? []); + $products = collect($products ?? []); +@endphp + +
+
+
+
+
+

Helpdesk administration

+

Support configuration

+

Manage lookup data, workflow messages, canned responses, SLA policies, automation rules, checklists, tags and product/service linkage.

+
+ + +
+
+
+
+ @foreach ([ + 'statuses' => ['label' => 'Statuses', 'count' => $statuses->count()], + 'priorities' => ['label' => 'Priorities', 'count' => $priorities->count()], + 'categories' => ['label' => 'Categories', 'count' => $categories->count()], + 'teams' => ['label' => 'Teams', 'count' => $teams->count()], + 'projects' => ['label' => 'Projects', 'count' => $projects->count()], + 'boards' => ['label' => 'Boards', 'count' => $boards->count()], + 'git' => ['label' => 'Git', 'count' => $repositories->count()], + 'workflow' => ['label' => 'Workflow', 'count' => $workflowTemplates->count()], + 'canned' => ['label' => 'Canned', 'count' => $cannedResponses->count()], + 'sla' => ['label' => 'SLA', 'count' => $slaPolicies->count()], + 'automation' => ['label' => 'Rules', 'count' => $automationRules->count()], + 'checklists' => ['label' => 'Checks', 'count' => $checklistTemplates->count()], + 'tags' => ['label' => 'Tags', 'count' => $tags->count()], + 'products' => ['label' => 'Products', 'count' => $products->count()], + 'defaults' => ['label' => 'Defaults', 'count' => 1], + ] as $key => $item) + @php + $sectionPalette = match ($key) { + 'statuses' => ['border' => '#38bdf8', 'bg' => 'rgba(14, 165, 233, .22)', 'active' => '#0284c7'], + 'priorities' => ['border' => '#f87171', 'bg' => 'rgba(239, 68, 68, .22)', 'active' => '#dc2626'], + 'categories' => ['border' => '#818cf8', 'bg' => 'rgba(99, 102, 241, .22)', 'active' => '#4f46e5'], + 'teams' => ['border' => '#60a5fa', 'bg' => 'rgba(37, 99, 235, .22)', 'active' => '#2563eb'], + 'projects' => ['border' => '#22d3ee', 'bg' => 'rgba(8, 145, 178, .22)', 'active' => '#0891b2'], + 'boards' => ['border' => '#fbbf24', 'bg' => 'rgba(245, 158, 11, .24)', 'active' => '#f59e0b'], + 'git' => ['border' => '#94a3b8', 'bg' => 'rgba(71, 85, 105, .28)', 'active' => '#475569'], + 'workflow' => ['border' => '#34d399', 'bg' => 'rgba(5, 150, 105, .22)', 'active' => '#059669'], + 'canned' => ['border' => '#2dd4bf', 'bg' => 'rgba(13, 148, 136, .22)', 'active' => '#0d9488'], + 'sla' => ['border' => '#fb923c', 'bg' => 'rgba(234, 88, 12, .22)', 'active' => '#ea580c'], + 'automation' => ['border' => '#c084fc', 'bg' => 'rgba(147, 51, 234, .22)', 'active' => '#9333ea'], + 'checklists' => ['border' => '#a3e635', 'bg' => 'rgba(101, 163, 13, .22)', 'active' => '#65a30d'], + 'tags' => ['border' => '#f472b6', 'bg' => 'rgba(219, 39, 119, .22)', 'active' => '#db2777'], + 'products' => ['border' => '#a78bfa', 'bg' => 'rgba(124, 58, 237, .22)', 'active' => '#7c3aed'], + 'defaults' => ['border' => '#4ade80', 'bg' => 'rgba(22, 163, 74, .22)', 'active' => '#16a34a'], + default => ['border' => '#71717a', 'bg' => 'rgba(63, 63, 70, .22)', 'active' => '#3f3f46'], + }; + + $sectionStyle = $section === $key + ? 'border-color: '.$sectionPalette['border'].'; background-color: '.$sectionPalette['active'].'; color: #ffffff; box-shadow: 0 16px 36px rgba(0,0,0,.32);' + : 'border-color: '.$sectionPalette['border'].'; background-color: '.$sectionPalette['bg'].'; color: #ffffff; box-shadow: 0 10px 24px rgba(0,0,0,.20);'; + @endphp + +
{{ $item['label'] }}
+
{{ $item['count'] }}
+
+ @endforeach +
+ + + @if ($section === 'defaults') + + +
+ + + @foreach ($companies as $company) + + @endforeach + + +
+ Save default company +
+
+
+ +
+

Lookup defaults

+

Set the default Status, Priority, Category, Team and Project from their own settings sections. Only one default per company/global scope is kept for each lookup type.

+
+
+ @endif + + @if ($section === 'statuses') + + +
+ + + + + + +
Save statusReset
+ +
+ +
+ @endif + + @if ($section === 'priorities') + + +
+ + + + + +
Save priorityReset
+ +
+ +
+ @endif + + @if ($section === 'categories') + + +
+ @foreach ($companies as $company)@endforeach + + + +
+ +
Save categoryReset
+ +
+ +
+ @endif + + @if ($section === 'teams') + + +
+ @foreach ($companies as $company)@endforeach + + + +
+ +
Save teamReset
+ +
+ +
+ @endif + + @if ($section === 'projects') + + +
+ @foreach ($companies as $company)@endforeach + @foreach ($teams as $team)@endforeach + + + +
+ +
Save projectReset
+ +
+ +
+ @endif + + + @if ($section === 'boards') + + +
+ + + + + + @foreach ($boardOwners as $owner) + + @endforeach + + +
+ +
+
+ +
+ @foreach ($statuses as $status) + + @endforeach +
+
+
+ Save board + Reset +
+ +
+ +
+ + + + + + + + + + + + + @forelse ($boards as $boardItem) + + + + + + + + + @empty + + @endforelse + +
BoardOwnerColumnsTicketsDefaultActions
+
{{ $boardItem->name }}
+
{{ $boardItem->slug }}
+
{{ $boardItem->owner?->name ?? 'Unassigned' }} +
+ @foreach ($boardItem->statuses as $status) + {{ $status->name }} + @endforeach +
+
{{ $boardItem->tickets_count ?? 0 }}{{ $boardItem->is_default ? 'Default' : 'No' }} + Edit + Delete +
No Kanban boards yet.
+
+
+ @endif + + @if ($section === 'git') + + +
+ + + @foreach ($companies as $company) + + @endforeach + + + + @foreach ($projects as $project) + + @endforeach + + + + + +
+ +
+
+ Save repository + Reset +
+ +
+ +
+ @endif + + + @if ($section === 'workflow') + + +
+ + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+ Save workflow message + Reset +
+ +
+ +
+ + + + + + + + + + + + @forelse ($workflowTemplates as $template) + + + + + + + + @empty + + @endforelse + +
NameEventRecipientActiveActions
{{ $template->name }}{{ $template->event }}{{ $template->to_role }}{{ $template->is_active ? 'Active' : 'Inactive' }} + Edit + Delete +
No workflow messages yet.
+
+
+ @endif + + + @if ($section === 'canned') + + +
+ + + + @foreach ($categories as $category)@endforeach + @foreach ($teams as $team)@endforeach + +
+
+
Save canned responseReset
+ +
+
+ @forelse ($cannedResponses as $response) +
+

{{ $response->name }}

{{ $response->category?->name ?? 'Any category' }} · {{ $response->team?->name ?? 'Any team' }}

{{ $response->is_active ? 'Active' : 'Inactive' }}
+

{{ strip_tags($response->body) }}

+
EditDelete
+
+ @empty +
No canned responses yet.
+ @endforelse +
+
+ @endif + + @if ($section === 'sla') + + +
+ + + @foreach ($priorities as $priority)@endforeach + @foreach ($categories as $category)@endforeach + + + + + +
Save SLA policyReset
+ +
+
@forelse ($slaPolicies as $policy)@empty@endforelse
PolicyTargetsApplies toActions
{{ $policy->name }} @if($policy->is_default)Default@endif{{ $policy->first_response_minutes }}m response · {{ $policy->resolution_minutes }}m close{{ $policy->priority?->name ?? 'Any priority' }} · {{ $policy->category?->name ?? 'Any category' }}Edit Delete
No SLA policies yet.
+
+ @endif + + @if ($section === 'automation') + + +
+ + + + + + + @foreach ($priorities as $priority)@endforeach + @foreach ($categories as $category)@endforeach + @foreach ($teams as $team)@endforeach + @foreach ($projects as $project)@endforeach + @foreach ($statuses as $status)@endforeach + +
Save automation ruleReset
+ +
+
@forelse ($automationRules as $rule)

{{ $rule->name }}

Sender: {{ $rule->match_sender ?: 'Any' }} · Subject: {{ $rule->match_subject ?: 'Any' }}

EditDelete
@empty
No automation rules yet.
@endforelse
+
+ @endif + + @if ($section === 'checklists') + +
@foreach ($categories as $category)@endforeach@foreach ($projects as $project)@endforeach
Save checklistReset
+
@forelse ($checklistTemplates as $template)

{{ $template->name }}

{{ count($template->items ?? []) }} items

EditDelete
@empty
No checklist templates yet.
@endforelse
+
+ @endif + + @if ($section === 'tags') + +
Save tagReset
+
@forelse ($tags as $tag)
{{ $tag->name }}
EditDelete
@empty
No tags yet.
@endforelse
+
+ @endif + + @if ($section === 'products') + +
Save product/serviceReset
+
@forelse ($products as $product)

{{ $product->name }}

{{ ucfirst($product->type) }} · {{ $product->version ?: 'No version' }} · {{ $product->tickets_count }} tickets

EditDelete
@empty
No products or services yet.
@endforelse
+
+ @endif + +