added support for legacy tickets, fixed switching of modes and also style updates
This commit is contained in:
@@ -39,17 +39,29 @@ final class SettingsManager extends Component
|
||||
public bool $teamModalOpen = false;
|
||||
|
||||
public bool $statusModalOpen = false;
|
||||
|
||||
public bool $priorityModalOpen = false;
|
||||
|
||||
public bool $categoryModalOpen = false;
|
||||
|
||||
public bool $projectModalOpen = false;
|
||||
|
||||
public bool $boardModalOpen = false;
|
||||
|
||||
public bool $repositoryModalOpen = false;
|
||||
|
||||
public bool $workflowModalOpen = false;
|
||||
|
||||
public bool $cannedModalOpen = false;
|
||||
|
||||
public bool $slaModalOpen = false;
|
||||
|
||||
public bool $automationModalOpen = false;
|
||||
|
||||
public bool $checklistModalOpen = false;
|
||||
|
||||
public bool $tagModalOpen = false;
|
||||
|
||||
public bool $productModalOpen = false;
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
@@ -1041,57 +1053,57 @@ final class SettingsManager extends Component
|
||||
return view()->file(
|
||||
resource_path('themes/backend/views/modules/helpdesk/livewire/settings-manager.blade.php'),
|
||||
[
|
||||
'statuses' => $this->orderedStatuses(),
|
||||
'priorities' => $this->orderedPriorities(),
|
||||
'categories' => $this->orderedCategories(),
|
||||
'teams' => $this->orderedTeams(),
|
||||
'teamUsers' => User::query()
|
||||
->orderBy('name')
|
||||
->get(['id', 'name', 'email', 'helpdesk_agent', 'helpdesk_admin']),
|
||||
'projects' => $this->orderedProjects(),
|
||||
'boardOwners' => User::query()->where(static function ($query): void {
|
||||
$query->where('helpdesk_agent', true)->orWhere('helpdesk_admin', true);
|
||||
})->orderBy('name')->get(['id', 'name', 'email']),
|
||||
'boards' => KanbanBoard::query()
|
||||
->with(['statuses', 'owner:id,name,email'])
|
||||
->withCount('tickets')
|
||||
->orderBy('sort_order')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'boardsPage'),
|
||||
'repositories' => GitRepository::query()
|
||||
->with(['project'])
|
||||
->withCount(['commits', 'webhookLogs'])
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'gitPage'),
|
||||
'workflowTemplates' => WorkflowTemplate::query()
|
||||
->orderBy('event')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'workflowPage'),
|
||||
'cannedResponses' => CannedResponse::query()
|
||||
->with(['category', 'team'])
|
||||
->orderBy('sort_order')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'cannedPage'),
|
||||
'slaPolicies' => SlaPolicy::query()
|
||||
->with(['priority', 'category'])
|
||||
->orderByDesc('is_default')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'slaPage'),
|
||||
'automationRules' => AutomationRule::query()
|
||||
->orderBy('sort_order')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'rulesPage'),
|
||||
'products' => Product::query()
|
||||
->withCount('tickets')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'productsPage'),
|
||||
'tags' => Tag::query()
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'tagsPage'),
|
||||
'checklistTemplates' => ChecklistTemplate::query()
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'checksPage'),
|
||||
'colourOptions' => Color::options(),
|
||||
'statuses' => $this->orderedStatuses(),
|
||||
'priorities' => $this->orderedPriorities(),
|
||||
'categories' => $this->orderedCategories(),
|
||||
'teams' => $this->orderedTeams(),
|
||||
'teamUsers' => User::query()
|
||||
->orderBy('name')
|
||||
->get(['id', 'name', 'email', 'helpdesk_agent', 'helpdesk_admin']),
|
||||
'projects' => $this->orderedProjects(),
|
||||
'boardOwners' => User::query()->where(static function ($query): void {
|
||||
$query->where('helpdesk_agent', true)->orWhere('helpdesk_admin', true);
|
||||
})->orderBy('name')->get(['id', 'name', 'email']),
|
||||
'boards' => KanbanBoard::query()
|
||||
->with(['statuses', 'owner:id,name,email'])
|
||||
->withCount('tickets')
|
||||
->orderBy('sort_order')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'boardsPage'),
|
||||
'repositories' => GitRepository::query()
|
||||
->with(['project'])
|
||||
->withCount(['commits', 'webhookLogs'])
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'gitPage'),
|
||||
'workflowTemplates' => WorkflowTemplate::query()
|
||||
->orderBy('event')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'workflowPage'),
|
||||
'cannedResponses' => CannedResponse::query()
|
||||
->with(['category', 'team'])
|
||||
->orderBy('sort_order')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'cannedPage'),
|
||||
'slaPolicies' => SlaPolicy::query()
|
||||
->with(['priority', 'category'])
|
||||
->orderByDesc('is_default')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'slaPage'),
|
||||
'automationRules' => AutomationRule::query()
|
||||
->orderBy('sort_order')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'rulesPage'),
|
||||
'products' => Product::query()
|
||||
->withCount('tickets')
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'productsPage'),
|
||||
'tags' => Tag::query()
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'tagsPage'),
|
||||
'checklistTemplates' => ChecklistTemplate::query()
|
||||
->orderBy('name')
|
||||
->paginate(10, ['*'], 'checksPage'),
|
||||
'colourOptions' => Color::options(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user