fixes
This commit is contained in:
@@ -9,6 +9,7 @@ class Deployments extends Component
|
||||
{
|
||||
public int $application_id;
|
||||
public $deployments = [];
|
||||
public int $deployments_count = 0;
|
||||
public string $current_url;
|
||||
public int $skip = 0;
|
||||
public int $default_take = 8;
|
||||
@@ -24,15 +25,14 @@ class Deployments extends Component
|
||||
}
|
||||
public function load_deployments(int|null $take = null)
|
||||
{
|
||||
ray('Take' . $take);
|
||||
if ($take) {
|
||||
ray('Take is not null');
|
||||
$this->skip = $this->skip + $take;
|
||||
}
|
||||
|
||||
$take = $this->default_take;
|
||||
$this->deployments = Application::find($this->application_id)->deployments($this->skip, $take);
|
||||
|
||||
['deployments' => $deployments, 'count' => $count] = Application::find($this->application_id)->deployments($this->skip, $take);
|
||||
$this->deployments = $deployments;
|
||||
$this->deployments_count = $count;
|
||||
if (count($this->deployments) !== 0 && count($this->deployments) < $take) {
|
||||
$this->show_next = false;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user