structure updates
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
@props(['paginator'])
|
||||
|
||||
@if ($paginator instanceof \Illuminate\Contracts\Pagination\Paginator)
|
||||
<div class="flex flex-col gap-3 border-t border-zinc-200 bg-zinc-50/70 px-4 py-4 dark:border-zinc-800 dark:bg-zinc-950/35 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="text-xs font-medium text-zinc-500 sm:text-sm">
|
||||
@if (method_exists($paginator, 'total'))
|
||||
Showing
|
||||
<span class="font-semibold text-zinc-800 dark:text-zinc-200">{{ $paginator->firstItem() ?? 0 }}</span>
|
||||
–
|
||||
<span class="font-semibold text-zinc-800 dark:text-zinc-200">{{ $paginator->lastItem() ?? 0 }}</span>
|
||||
of
|
||||
<span class="font-semibold text-zinc-800 dark:text-zinc-200">{{ $paginator->total() }}</span>
|
||||
@else
|
||||
Page {{ $paginator->currentPage() }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($paginator->hasPages())
|
||||
<div class="min-w-0">
|
||||
{{ $paginator->onEachSide(1)->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-lg border border-zinc-200 bg-white px-3 py-1.5 text-xs font-semibold text-zinc-500 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
Page 1
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
+414
-141
@@ -3,20 +3,20 @@
|
||||
* 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.
|
||||
*/
|
||||
$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 ?? []);
|
||||
$statuses = $statuses ?? collect();
|
||||
$priorities = $priorities ?? collect();
|
||||
$categories = $categories ?? collect();
|
||||
$teams = $teams ?? collect();
|
||||
$projects = $projects ?? collect();
|
||||
$boards = $boards ?? collect();
|
||||
$repositories = $repositories ?? collect();
|
||||
$workflowTemplates = $workflowTemplates ?? collect();
|
||||
$cannedResponses = $cannedResponses ?? collect();
|
||||
$slaPolicies = $slaPolicies ?? collect();
|
||||
$automationRules = $automationRules ?? collect();
|
||||
$checklistTemplates = $checklistTemplates ?? collect();
|
||||
$tags = $tags ?? collect();
|
||||
$products = $products ?? collect();
|
||||
@endphp
|
||||
|
||||
<div class="hd-helpdesk-surface hd-mobile-ready hd-core-settings space-y-4" dusk="helpdesk-settings-manager">
|
||||
@@ -43,20 +43,20 @@
|
||||
</div>
|
||||
<div class="grid gap-2 md:grid-cols-4 xl:grid-cols-7">
|
||||
@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()],
|
||||
'statuses' => ['label' => 'Statuses', 'count' => method_exists($statuses, 'total') ? $statuses->total() : $statuses->count()],
|
||||
'priorities' => ['label' => 'Priorities', 'count' => method_exists($priorities, 'total') ? $priorities->total() : $priorities->count()],
|
||||
'categories' => ['label' => 'Categories', 'count' => method_exists($categories, 'total') ? $categories->total() : $categories->count()],
|
||||
'teams' => ['label' => 'Teams', 'count' => method_exists($teams, 'total') ? $teams->total() : $teams->count()],
|
||||
'projects' => ['label' => 'Projects', 'count' => method_exists($projects, 'total') ? $projects->total() : $projects->count()],
|
||||
'boards' => ['label' => 'Boards', 'count' => method_exists($boards, 'total') ? $boards->total() : $boards->count()],
|
||||
'git' => ['label' => 'Git', 'count' => method_exists($repositories, 'total') ? $repositories->total() : $repositories->count()],
|
||||
'workflow' => ['label' => 'Workflow', 'count' => method_exists($workflowTemplates, 'total') ? $workflowTemplates->total() : $workflowTemplates->count()],
|
||||
'canned' => ['label' => 'Canned', 'count' => method_exists($cannedResponses, 'total') ? $cannedResponses->total() : $cannedResponses->count()],
|
||||
'sla' => ['label' => 'SLA', 'count' => method_exists($slaPolicies, 'total') ? $slaPolicies->total() : $slaPolicies->count()],
|
||||
'automation' => ['label' => 'Rules', 'count' => method_exists($automationRules, 'total') ? $automationRules->total() : $automationRules->count()],
|
||||
'checklists' => ['label' => 'Checks', 'count' => method_exists($checklistTemplates, 'total') ? $checklistTemplates->total() : $checklistTemplates->count()],
|
||||
'tags' => ['label' => 'Tags', 'count' => method_exists($tags, 'total') ? $tags->total() : $tags->count()],
|
||||
'products' => ['label' => 'Products', 'count' => method_exists($products, 'total') ? $products->total() : $products->count()],
|
||||
] as $key => $item)
|
||||
@php
|
||||
$sectionPalette = match ($key) {
|
||||
@@ -103,12 +103,34 @@
|
||||
@if ($section === 'statuses')
|
||||
<x-helpdesk.settings-section title="Statuses"
|
||||
description="Control workflow stages and mark which statuses close tickets.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveStatus" class="grid gap-3 xl:grid-cols-12">
|
||||
<div class="xl:col-span-3">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateStatusModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create status
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-statuses-editor"
|
||||
wire:model="statusModalOpen"
|
||||
class="hd-settings-modal w-full max-w-4xl"
|
||||
@close="closeStatusModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($statusForm['id'] ?? null) ? 'Edit status' : 'Create status' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this status without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveStatus" class="grid items-start gap-x-4 gap-y-5 xl:grid-cols-12">
|
||||
<div class="xl:col-span-4">
|
||||
<flux:input wire:model="statusForm.name" label="Name" />
|
||||
</div>
|
||||
<div class="xl:col-span-3">
|
||||
<div class="xl:col-span-4">
|
||||
<flux:input wire:model="statusForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
</div>
|
||||
<x-helpdesk.colour-select class="xl:col-span-12" model="statusForm.color" label="Badge colour" :options="$colourOptions" />
|
||||
@@ -124,41 +146,52 @@
|
||||
class="rounded border-zinc-300 bg-zinc-950 text-blue-600 focus:ring-blue-500">
|
||||
Default status for new tickets
|
||||
</label>
|
||||
@error('teamForm.name')
|
||||
<div class="xl:col-span-12 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
@error('teamForm.slug')
|
||||
<div class="xl:col-span-12 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
@error('teamForm.color')
|
||||
<div class="xl:col-span-12 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
@error('teamForm.user_ids.*')
|
||||
<div class="xl:col-span-12 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2 xl:col-span-12">
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save status
|
||||
</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetStatusForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeStatusModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<x-helpdesk.lookup-table :items="$statuses" edit="editStatus" delete="deleteStatus" />
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$statuses" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'priorities')
|
||||
<x-helpdesk.settings-section title="Priorities" description="Define ticket urgency levels and display order.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="savePriority" class="grid gap-3 xl:grid-cols-12">
|
||||
<div class="xl:col-span-3">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreatePriorityModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create priority
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-priorities-editor"
|
||||
wire:model="priorityModalOpen"
|
||||
class="hd-settings-modal w-full max-w-4xl"
|
||||
@close="closePriorityModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($priorityForm['id'] ?? null) ? 'Edit priority' : 'Create priority' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this priority without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="savePriority" class="grid items-start gap-x-4 gap-y-5 xl:grid-cols-12">
|
||||
<div class="xl:col-span-4">
|
||||
<flux:input wire:model="priorityForm.name" label="Name" />
|
||||
</div>
|
||||
<div class="xl:col-span-3">
|
||||
<div class="xl:col-span-4">
|
||||
<flux:input wire:model="priorityForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
</div>
|
||||
<x-helpdesk.colour-select class="xl:col-span-12" model="priorityForm.color" label="Badge colour" :options="$colourOptions" />
|
||||
@@ -174,27 +207,48 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save priority
|
||||
</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetPriorityForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closePriorityModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<x-helpdesk.lookup-table :items="$priorities" edit="editPriority" delete="deletePriority" />
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$priorities" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'categories')
|
||||
<x-helpdesk.settings-section title="Categories"
|
||||
description="Group tickets by support area.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveCategory" class="grid gap-3 xl:grid-cols-12">
|
||||
<div class="xl:col-span-3">
|
||||
</div>
|
||||
<div class="xl:col-span-3">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateCategoryModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create category
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-categories-editor"
|
||||
wire:model="categoryModalOpen"
|
||||
class="hd-settings-modal w-full max-w-4xl"
|
||||
@close="closeCategoryModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($categoryForm['id'] ?? null) ? 'Edit category' : 'Create category' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this category without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveCategory" class="grid items-start gap-x-4 gap-y-5 xl:grid-cols-12">
|
||||
<div class="xl:col-span-4">
|
||||
<flux:input wire:model="categoryForm.name" label="Name" />
|
||||
</div>
|
||||
<div class="xl:col-span-3">
|
||||
<div class="xl:col-span-4">
|
||||
<flux:input wire:model="categoryForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
</div>
|
||||
<x-helpdesk.colour-select class="xl:col-span-12" model="categoryForm.color" label="Badge colour" :options="$colourOptions" />
|
||||
@@ -210,14 +264,15 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save
|
||||
category</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetCategoryForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeCategoryModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<x-helpdesk.lookup-table :items="$categories" edit="editCategory" delete="deleteCategory" />
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$categories" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'teams')
|
||||
@@ -241,7 +296,7 @@
|
||||
<flux:modal
|
||||
name="helpdesk-team-editor"
|
||||
wire:model="teamModalOpen"
|
||||
class="w-full max-w-5xl"
|
||||
class="hd-settings-modal w-full max-w-5xl"
|
||||
@close="closeTeamModal"
|
||||
>
|
||||
<form wire:submit="saveTeam" class="space-y-5">
|
||||
@@ -307,19 +362,6 @@
|
||||
Default team for new tickets
|
||||
</label>
|
||||
|
||||
@error('teamForm.name')
|
||||
<div class="rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
@error('teamForm.slug')
|
||||
<div class="rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
@error('teamForm.color')
|
||||
<div class="rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
@error('teamForm.user_ids.*')
|
||||
<div class="rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
<div class="flex flex-wrap justify-end gap-2 border-t border-zinc-200 pt-4 dark:border-zinc-700">
|
||||
<flux:button type="button" variant="ghost" wire:click="closeTeamModal">
|
||||
Cancel
|
||||
@@ -331,14 +373,37 @@
|
||||
</div>
|
||||
</form>
|
||||
</flux:modal>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$teams" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'projects')
|
||||
<x-helpdesk.settings-section title="Projects"
|
||||
description="Create projects and optionally assign them to support teams.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveProject" class="grid gap-3 xl:grid-cols-12">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateProjectModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create project
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-projects-editor"
|
||||
wire:model="projectModalOpen"
|
||||
class="hd-settings-modal w-full max-w-5xl"
|
||||
@close="closeProjectModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($projectForm['id'] ?? null) ? 'Edit project' : 'Create project' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this project without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveProject" class="grid items-start gap-x-4 gap-y-5 xl:grid-cols-12">
|
||||
<div class="xl:col-span-2">
|
||||
</div>
|
||||
<div class="xl:col-span-2">
|
||||
@@ -368,22 +433,45 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save project
|
||||
</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetProjectForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeProjectModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<x-helpdesk.project-table :items="$projects" />
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$projects" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($section === 'boards')
|
||||
<x-helpdesk.settings-section title="Kanban Boards"
|
||||
description="Create configurable workflow boards and choose which statuses appear as draggable columns.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveBoard" class="grid gap-3 md:grid-cols-7">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateBoardModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create board
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-boards-editor"
|
||||
wire:model="boardModalOpen"
|
||||
class="hd-settings-modal w-full max-w-6xl"
|
||||
@close="closeBoardModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($boardForm['id'] ?? null) ? 'Edit board' : 'Create board' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this board without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveBoard" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-7">
|
||||
<flux:input wire:model="boardForm.name" label="Name" />
|
||||
<flux:input wire:model="boardForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="boardForm.sort_order" label="Sort" type="number" min="0" />
|
||||
@@ -420,12 +508,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save board
|
||||
</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetBoardForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeBoardModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
|
||||
<div
|
||||
class="overflow-hidden rounded-2xl border border-zinc-200 bg-white dark:border-zinc-700 dark:bg-zinc-900">
|
||||
@@ -485,14 +573,37 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$boards" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'git')
|
||||
<x-helpdesk.settings-section title="Git repositories"
|
||||
description="Configure repositories that can be linked to projects and tickets. Commits can then be stored against tickets for traceability.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveRepository" class="grid gap-3 md:grid-cols-6">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateRepositoryModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create repository
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-git-editor"
|
||||
wire:model="repositoryModalOpen"
|
||||
class="hd-settings-modal w-full max-w-5xl"
|
||||
@close="closeRepositoryModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($repositoryForm['id'] ?? null) ? 'Edit repository' : 'Create repository' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this repository without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveRepository" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-6">
|
||||
<flux:select wire:model="repositoryForm.project_id" label="Project">
|
||||
<option value="">No project</option>
|
||||
@foreach ($projects as $project)
|
||||
@@ -512,22 +623,45 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save
|
||||
repository</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetRepositoryForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeRepositoryModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<x-helpdesk.repository-table :items="$repositories" />
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$repositories" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($section === 'workflow')
|
||||
<x-helpdesk.settings-section title="Workflow messages"
|
||||
description="Define the professional email messages sent when tickets are raised, updated, replied to and closed.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveWorkflowTemplate" class="grid gap-3 md:grid-cols-6">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateWorkflowTemplateModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create workflow message
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-workflow-editor"
|
||||
wire:model="workflowModalOpen"
|
||||
class="hd-settings-modal w-full max-w-6xl"
|
||||
@close="closeWorkflowTemplateModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($workflowForm['id'] ?? null) ? 'Edit workflow message' : 'Create workflow message' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this workflow message without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveWorkflowTemplate" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-6">
|
||||
<flux:input wire:model="workflowForm.name" label="Name" />
|
||||
<flux:select wire:model="workflowForm.event" label="Event">
|
||||
<option value="ticket.created">Ticket raised</option>
|
||||
@@ -564,12 +698,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save
|
||||
workflow message</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetWorkflowTemplateForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeWorkflowTemplateModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
|
||||
<div
|
||||
class="overflow-hidden rounded-2xl border border-zinc-200 bg-white dark:border-zinc-700 dark:bg-zinc-900">
|
||||
@@ -616,15 +750,38 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$workflowTemplates" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($section === 'canned')
|
||||
<x-helpdesk.settings-section title="Canned responses"
|
||||
description="Save professional reusable replies with macro tokens for ticket, requester, agent, status and URL values.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveCannedResponse" class="grid gap-3 md:grid-cols-6">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateCannedResponseModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create canned response
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-canned-editor"
|
||||
wire:model="cannedModalOpen"
|
||||
class="hd-settings-modal w-full max-w-6xl"
|
||||
@close="closeCannedResponseModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($cannedForm['id'] ?? null) ? 'Edit canned response' : 'Create canned response' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this canned response without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveCannedResponse" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-6">
|
||||
<flux:input wire:model="cannedForm.name" label="Name" />
|
||||
<flux:input wire:model="cannedForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="cannedForm.sort_order" label="Sort" type="number" min="0" />
|
||||
@@ -654,12 +811,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save canned
|
||||
response</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetCannedResponseForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeCannedResponseModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<div class="grid gap-3 md:grid-cols-2 xl:grid-cols-3">
|
||||
@forelse ($cannedResponses as $response)
|
||||
<div class="rounded-2xl border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
@@ -692,14 +849,37 @@
|
||||
No canned responses yet.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$cannedResponses" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'sla')
|
||||
<x-helpdesk.settings-section title="SLA policies"
|
||||
description="Define first response and resolution targets used for breach indicators, reporting and ticket cards.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveSlaPolicy" class="grid gap-3 md:grid-cols-6">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateSlaPolicyModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create SLA policy
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-sla-editor"
|
||||
wire:model="slaModalOpen"
|
||||
class="hd-settings-modal w-full max-w-5xl"
|
||||
@close="closeSlaPolicyModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($slaForm['id'] ?? null) ? 'Edit SLA policy' : 'Create SLA policy' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this SLA policy without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveSlaPolicy" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-6">
|
||||
<flux:input wire:model="slaForm.name" label="Name" />
|
||||
<flux:input wire:model="slaForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:select wire:model="slaForm.priority_id" label="Priority">
|
||||
@@ -731,12 +911,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save SLA
|
||||
policy</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetSlaPolicyForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeSlaPolicyModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<div
|
||||
class="overflow-hidden rounded-2xl border border-zinc-200 bg-white dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700">
|
||||
@@ -778,14 +958,37 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$slaPolicies" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'automation')
|
||||
<x-helpdesk.settings-section title="Email automation rules"
|
||||
description="Match incoming support messages and automatically assign priority, category, team, project, agent and status.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveAutomationRule" class="grid gap-3 md:grid-cols-6">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateAutomationRuleModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create automation rule
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-automation-editor"
|
||||
wire:model="automationModalOpen"
|
||||
class="hd-settings-modal w-full max-w-6xl"
|
||||
@close="closeAutomationRuleModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($automationForm['id'] ?? null) ? 'Edit automation rule' : 'Create automation rule' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this automation rule without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveAutomationRule" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-6">
|
||||
<flux:input wire:model="automationForm.name" label="Name" />
|
||||
<flux:input wire:model="automationForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="automationForm.sort_order" label="Sort" type="number"
|
||||
@@ -830,12 +1033,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save
|
||||
automation rule</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetAutomationRuleForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeAutomationRuleModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<div class="grid gap-3 md:grid-cols-2">
|
||||
@forelse ($automationRules as $rule)
|
||||
<div class="rounded-2xl border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
@@ -858,14 +1061,37 @@
|
||||
No automation rules yet.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$automationRules" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'checklists')
|
||||
<x-helpdesk.settings-section title="Checklist templates"
|
||||
description="Apply repeatable checklist items by category or project and show completion progress on tickets and Kanban cards.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveChecklistTemplate" class="grid gap-3 md:grid-cols-6">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateChecklistTemplateModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create checklist
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-checklists-editor"
|
||||
wire:model="checklistModalOpen"
|
||||
class="hd-settings-modal w-full max-w-5xl"
|
||||
@close="closeChecklistTemplateModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($checklistTemplateForm['id'] ?? null) ? 'Edit checklist template' : 'Create checklist' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this checklist template without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveChecklistTemplate" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-6">
|
||||
<flux:input wire:model="checklistTemplateForm.name" label="Name" />
|
||||
<flux:input wire:model="checklistTemplateForm.slug" label="Slug" />
|
||||
<flux:select wire:model="checklistTemplateForm.category_id" label="Category">
|
||||
@@ -891,12 +1117,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save
|
||||
checklist</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetChecklistTemplateForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeChecklistTemplateModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<div class="grid gap-3 md:grid-cols-2 xl:grid-cols-3">
|
||||
@forelse ($checklistTemplates as $template)
|
||||
<div class="rounded-2xl border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
@@ -918,14 +1144,37 @@
|
||||
No checklist templates yet.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$checklistTemplates" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'tags')
|
||||
<x-helpdesk.settings-section title="Ticket tags"
|
||||
description="Maintain visible ticket labels for search, triage and Kanban card context.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveTag" class="grid gap-3 xl:grid-cols-12">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateTagModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create tag
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-tags-editor"
|
||||
wire:model="tagModalOpen"
|
||||
class="hd-settings-modal w-full max-w-4xl"
|
||||
@close="closeTagModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($tagForm['id'] ?? null) ? 'Edit tag' : 'Create tag' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this tag without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveTag" class="grid items-start gap-x-4 gap-y-5 xl:grid-cols-12">
|
||||
<div class="xl:col-span-4">
|
||||
<flux:input wire:model="tagForm.name" label="Name" />
|
||||
</div>
|
||||
@@ -937,12 +1186,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save tag
|
||||
</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetTagForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeTagModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
@forelse ($tags as $tag)
|
||||
<div
|
||||
@@ -963,14 +1212,37 @@
|
||||
No tags yet.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$tags" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'products')
|
||||
<x-helpdesk.settings-section title="Products and services"
|
||||
description="Link tickets to products, services, releases or builds and report support cost/time by product.">
|
||||
<x-slot:form>
|
||||
<form wire:submit.prevent="saveProduct" class="grid gap-3 md:grid-cols-6">
|
||||
<x-slot:actions>
|
||||
<flux:button
|
||||
size="sm"
|
||||
type="button"
|
||||
wire:click="openCreateProductModal"
|
||||
variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60"
|
||||
>
|
||||
<i class="fa-solid fa-plus mr-1" aria-hidden="true"></i>
|
||||
Create product
|
||||
</flux:button>
|
||||
</x-slot:actions>
|
||||
|
||||
<flux:modal
|
||||
name="helpdesk-products-editor"
|
||||
wire:model="productModalOpen"
|
||||
class="hd-settings-modal w-full max-w-5xl"
|
||||
@close="closeProductModal"
|
||||
>
|
||||
<div class="mb-5 border-b border-zinc-200 pb-4 dark:border-zinc-700">
|
||||
<flux:heading size="lg">{{ filled($productForm['id'] ?? null) ? 'Edit product/service' : 'Create product' }}</flux:heading>
|
||||
<flux:subheading class="mt-1">Create or edit this product/service without leaving the settings list.</flux:subheading>
|
||||
</div>
|
||||
<form wire:submit="saveProduct" class="grid items-start gap-x-4 gap-y-5 md:grid-cols-6">
|
||||
<flux:input wire:model="productForm.name" label="Name" />
|
||||
<flux:input wire:model="productForm.slug" label="Slug" />
|
||||
<flux:input wire:model="productForm.type" label="Type" />
|
||||
@@ -985,12 +1257,12 @@
|
||||
<flux:button size="sm" type="submit" variant="primary"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-green-600 !text-white hover:!bg-green-700 focus:!ring-green-400/60">Save
|
||||
product/service</flux:button>
|
||||
<flux:button size="sm" type="button" wire:click="resetProductForm" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Reset
|
||||
<flux:button size="sm" type="button" wire:click="closeProductModal" variant="ghost"
|
||||
class="!h-9 !rounded-lg !px-3 !text-xs !font-semibold !bg-amber-500 !text-white hover:!bg-amber-600 focus:!ring-amber-300/60">Cancel
|
||||
</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
</flux:modal>
|
||||
<div class="grid gap-3 md:grid-cols-2 xl:grid-cols-3">
|
||||
@forelse ($products as $product)
|
||||
<div class="rounded-2xl border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
@@ -1013,7 +1285,8 @@
|
||||
No products or services yet.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</x-helpdesk.settings-section>
|
||||
<x-helpdesk.settings-pagination :paginator="$products" />
|
||||
</x-helpdesk.settings-section>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user