|
|
@@ -51,7 +51,7 @@ $all_projects = Project::query([
|
|
|
if(Core::$user->isCustomer()) {
|
|
|
// Filter to only projects that have past the deadline
|
|
|
$all_projects = array_filter($all_projects, function(Project $project) {
|
|
|
- return $project->isPastDeadline();
|
|
|
+ return $project->isFinished();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -60,6 +60,8 @@ foreach($all_projects as $p) {
|
|
|
$project_table_data[] = $p->getDataTableRow();
|
|
|
}
|
|
|
|
|
|
+$all_project_ids = array_column($all_projects, "id");
|
|
|
+
|
|
|
$data = [];
|
|
|
$region_data = [];
|
|
|
$area_manager_data = [];
|
|
|
@@ -83,7 +85,7 @@ if($submit) {
|
|
|
"id" => (new Constraint("NOT_IN"))->setValues(...$exclude_project_ids)
|
|
|
]);
|
|
|
|
|
|
- $project_ids = array_column($projects, "id");
|
|
|
+ $project_ids = array_intersect($all_project_ids, array_column($projects, "id"));
|
|
|
|
|
|
// Enforce unique template ID in selection
|
|
|
$template_ids = array_unique(array_column($projects, "template_id"));
|