|
@@ -41,6 +41,8 @@ $exclude_project_ids = array_column($exclude_projects, "id");
|
|
|
$projects = Project::query([
|
|
$projects = Project::query([
|
|
|
"customer_id" => Constraint::notIn($exclude_customer_ids),
|
|
"customer_id" => Constraint::notIn($exclude_customer_ids),
|
|
|
"dts_start" => Constraint::between($dts_start, $dts_end),
|
|
"dts_start" => Constraint::between($dts_start, $dts_end),
|
|
|
|
|
+ ], [
|
|
|
|
|
+ "sort" => "name"
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
?>
|
|
?>
|
|
@@ -53,15 +55,23 @@ $exclude_project_ids = array_column($exclude_projects, "id");
|
|
|
<div class="list-group">
|
|
<div class="list-group">
|
|
|
<?php
|
|
<?php
|
|
|
foreach($projects as $project) {
|
|
foreach($projects as $project) {
|
|
|
- $percentage = $project->getCompletedPercentage();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $completed_count = $project->getCompletedTestCount();
|
|
|
|
|
+
|
|
|
|
|
+ $percentage = round(($completed_count / $project->test_count) * 100);
|
|
|
|
|
+ if($percentage > 100) $percentage = 100;
|
|
|
|
|
+
|
|
|
?>
|
|
?>
|
|
|
<a class="list-group-item list-group-item-action text-nowrap" style="font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis;" href="/account/projects/<?=$project->id?>">
|
|
<a class="list-group-item list-group-item-action text-nowrap" style="font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis;" href="/account/projects/<?=$project->id?>">
|
|
|
<?=htmlspecialchars($project->name)?>
|
|
<?=htmlspecialchars($project->name)?>
|
|
|
<div class="progress">
|
|
<div class="progress">
|
|
|
<div class="progress-bar" role="progressbar" aria-valuenow="<?=$percentage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$percentage?>%">
|
|
<div class="progress-bar" role="progressbar" aria-valuenow="<?=$percentage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$percentage?>%">
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <strong><?=htmlspecialchars(__("Completed:"))?></strong>
|
|
|
|
|
+ <?=$percentage?>%
|
|
|
|
|
+ (<?=$completed_count?> of <?=$project->test_count?>)
|
|
|
|
|
+
|
|
|
</a>
|
|
</a>
|
|
|
<?php
|
|
<?php
|
|
|
}
|
|
}
|