ux ux ux ux ui ui ui ui

This commit is contained in:
Andras Bacsai
2024-03-21 14:30:35 +01:00
parent b5775ff9d2
commit 473bad24b7
47 changed files with 449 additions and 481 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Livewire;
use App\Models\ApplicationDeploymentQueue;
use App\Models\PrivateKey;
use App\Models\Project;
use App\Models\Server;
use Illuminate\Support\Collection;
@@ -13,9 +14,11 @@ class Dashboard extends Component
{
public $projects = [];
public Collection $servers;
public Collection $private_keys;
public $deployments_per_server;
public function mount()
{
$this->private_keys = PrivateKey::ownedByCurrentTeam()->get();
$this->servers = Server::ownedByCurrentTeam()->get();
$this->projects = Project::ownedByCurrentTeam()->get();
$this->get_deployments();

View File

@@ -46,10 +46,11 @@ class Edit extends Component
public function submit()
{
$this->validate();
try {
$this->validate();
$this->project->save();
$this->dispatch('saved');
$this->dispatch('success', 'Project updated.');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@@ -67,7 +67,7 @@ class Create extends Component
'team_id' => currentTeam()->id
]);
if ($this->from === 'server') {
return redirect()->route('server.create');
return redirect()->route('dashboard');
}
return redirect()->route('security.private-key.show', ['private_key_uuid' => $private_key->uuid]);
} catch (\Throwable $e) {

View File

@@ -31,6 +31,6 @@ class Index extends Component
}
public function render()
{
return view('livewire.subscription.index')->layout('layouts.subscription');
return view('livewire.subscription.index');
}
}

View File

@@ -8,7 +8,9 @@ use Livewire\Component;
class SwitchTeam extends Component
{
public string $selectedTeamId = 'default';
public function mount() {
$this->selectedTeamId = auth()->user()->currentTeam()->id;
}
public function updatedSelectedTeamId()
{
$this->switch_to($this->selectedTeamId);