workign comments strucuture
This commit is contained in:
@@ -75,6 +75,7 @@ final class SettingsManager extends Component
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->section = $this->validSection((string) request()->query('section', $this->section));
|
||||
$this->loadDefaultHelpdeskCompany();
|
||||
$this->statusForm += ['id' => null, 'name' => '', 'slug' => '', 'color' => 'zinc', 'sort_order' => 0, 'is_closed' => false, 'is_default' => false];
|
||||
$this->priorityForm += ['id' => null, 'name' => '', 'slug' => '', 'color' => 'zinc', 'sort_order' => 0, 'is_default' => false];
|
||||
@@ -92,6 +93,32 @@ final class SettingsManager extends Component
|
||||
$this->checklistTemplateForm += ['id' => null, 'company_id' => null, 'category_id' => null, 'project_id' => null, 'name' => '', 'slug' => '', 'items_text' => '', 'is_active' => true];
|
||||
}
|
||||
|
||||
/**
|
||||
* Keep settings section navigation constrained to known panels.
|
||||
*/
|
||||
private function validSection(string $section): string
|
||||
{
|
||||
$allowed = [
|
||||
'statuses',
|
||||
'priorities',
|
||||
'categories',
|
||||
'teams',
|
||||
'projects',
|
||||
'boards',
|
||||
'git',
|
||||
'workflow',
|
||||
'canned',
|
||||
'sla',
|
||||
'automation',
|
||||
'checklists',
|
||||
'tags',
|
||||
'products',
|
||||
'defaults',
|
||||
];
|
||||
|
||||
return in_array($section, $allowed, true) ? $section : 'statuses';
|
||||
}
|
||||
|
||||
public function saveStatus(): void
|
||||
{
|
||||
$data = $this->validate([
|
||||
|
||||
Reference in New Issue
Block a user