2026-08-06 12:29:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Livewire\Project\Application;
|
|
|
|
|
|
|
|
|
|
use App\Models\Application;
|
|
|
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
|
|
class Status extends Component
|
|
|
|
|
{
|
|
|
|
|
public Application $application;
|
|
|
|
|
|
|
|
|
|
public function getListeners(): array
|
|
|
|
|
{
|
|
|
|
|
$teamId = auth()->user()->currentTeam()->id;
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
"echo-private:team.{$teamId},ServiceStatusChanged" => 'refreshStatus',
|
2026-08-06 13:37:30 +00:00
|
|
|
"echo-private:team.{$teamId},ServiceChecked" => 'refreshStatus',
|
2026-08-06 12:29:25 +00:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function refreshStatus(): void
|
|
|
|
|
{
|
|
|
|
|
$this->application->refresh();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function render(): View
|
|
|
|
|
{
|
|
|
|
|
return view('livewire.project.application.status');
|
|
|
|
|
}
|
|
|
|
|
}
|