Skip to content

Commit

Permalink
asc
Browse files Browse the repository at this point in the history
  • Loading branch information
stokic committed Nov 13, 2024
1 parent 29fcfc5 commit 0ab59ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getInitialLeadsOnStage($pipelineId, $stageId, $limit = null): Co
->limit($limit)->get();

if($this->name != 'Bestandskunden') return $leads;

// Sort by tags that are valid dates
$sortedLeads = $leads->sort(function ($leadA, $leadB) {
$dateA = $this->getEarliestTagDate($leadA->tags);
Expand All @@ -68,7 +68,7 @@ public function getInitialLeadsOnStage($pipelineId, $stageId, $limit = null): Co
if ($dateA === null) return 1;
if ($dateB === null) return -1;

return $dateB <=> $dateA;
return $dateA <=> $dateB;
});

return $sortedLeads->values(); // Re-index the collection
Expand Down

0 comments on commit 0ab59ae

Please sign in to comment.