Skip to content

Commit

Permalink
fix: training activities merge quirk
Browse files Browse the repository at this point in the history
Fixes issue where some activities never showed after the merge. Fixed by changing to concat function instead that doesn't overwrite if keys are thes ame
  • Loading branch information
blt950 committed Oct 26, 2024
1 parent a5d353e commit c4747ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Http/Controllers/ReportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ public function activities($filterArea = false)
}

if (isset($trainingReports) && isset($examinationReports)) {
$entries = $trainingReports->merge($examinationReports);
$entries = $entries->merge($activities);
$entries = $trainingReports->concat($examinationReports);
$entries = $entries->concat($activities);
} else if(isset($trainingReports)) {
$entries = $trainingReports->concat($activities);
} else if(isset($examinationReports)) {
$entries = $examinationReports->concat($activities);
} else {
$entries = $activities;
}
Expand Down

0 comments on commit c4747ce

Please sign in to comment.