fix: show if only build servers are added to your team

This commit is contained in:
Andras Bacsai
2025-01-07 10:43:21 +01:00
parent 2710b2a7bb
commit af482f0572
2 changed files with 32 additions and 19 deletions

View File

@@ -23,6 +23,8 @@ class Select extends Component
public Collection|null|Server $servers;
public bool $onlyBuildServerAvailable = false;
public ?Collection $standaloneDockers;
public ?Collection $swarmDockers;
@@ -325,5 +327,11 @@ class Select extends Component
{
$this->servers = Server::isUsable()->get()->sortBy('name');
$this->allServers = $this->servers;
if ($this->allServers && $this->allServers->isNotEmpty()) {
$this->onlyBuildServerAvailable = $this->allServers->every(function ($server) {
return $server->isBuildServer();
});
}
}
}