structure updates
This commit is contained in:
@@ -32,6 +32,8 @@ final class SettingsManager extends Component
|
||||
{
|
||||
public string $section = 'statuses';
|
||||
|
||||
public bool $teamModalOpen = false;
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
public array $statusForm = ['id' => null, 'name' => '', 'slug' => '', 'color' => 'gray', 'sort_order' => 0, 'is_closed' => false, 'is_default' => false];
|
||||
|
||||
@@ -321,6 +323,7 @@ final class SettingsManager extends Component
|
||||
}
|
||||
|
||||
$this->resetTeamForm();
|
||||
$this->teamModalOpen = false;
|
||||
$this->section = 'teams';
|
||||
|
||||
session()->flash('success', 'Team saved successfully.');
|
||||
@@ -333,6 +336,22 @@ final class SettingsManager extends Component
|
||||
$this->teamForm['user_ids'] = $team->users->pluck('id')->map(static fn ($id): int => (int) $id)->all();
|
||||
$this->teamForm['color'] = Color::normalise($this->teamForm['color'] ?? 'indigo');
|
||||
$this->section = 'teams';
|
||||
$this->teamModalOpen = true;
|
||||
}
|
||||
|
||||
public function openCreateTeamModal(): void
|
||||
{
|
||||
$this->resetValidation();
|
||||
$this->resetTeamForm();
|
||||
$this->section = 'teams';
|
||||
$this->teamModalOpen = true;
|
||||
}
|
||||
|
||||
public function closeTeamModal(): void
|
||||
{
|
||||
$this->resetValidation();
|
||||
$this->resetTeamForm();
|
||||
$this->teamModalOpen = false;
|
||||
}
|
||||
|
||||
public function deleteTeam(int $id): void
|
||||
|
||||
Reference in New Issue
Block a user