1
0
Эх сурвалжийг харах

Add columns to aggregate count table

Alan Lam 2 жил өмнө
parent
commit
09eaf25145
1 өөрчлөгдсөн 24 нэмэгдсэн , 12 устгасан
  1. 24 12
      views/reports.php

+ 24 - 12
views/reports.php

@@ -393,36 +393,48 @@ let projectData = <?=json_encode($project_table_data)?>;
 			?>
 			<tr>
 				<th><?=htmlspecialchars($title)?></th>
-				<td>
-					<?=$pass?> /
-					<?=$fail?> (<?=$pass_percentage?>%)
-				</td>
+				<td class="text-right"><?=$pass?></td>
+				<td class="text-right"><?=$pass_percentage?></td>
+				<td class="text-right"><?=$fail?></td>
+				<td class="text-right"><?=$total?></td>
 			</tr>
 			<?php
 		};
 		?>
 
-		<table class="table table-bordered">
+		<table class="table table-sm table-bordered">
 			<colgroup>
-				<col style="width: 50%"/>
-				<col style="width: 50%"/>
+				<col style="width: 20%"/>
+				<col style="width: 20%"/>
+				<col style="width: 20%"/>
+				<col style="width: 20%"/>
 			</colgroup>
+			<thead>
+			<tr>
+				<th></th>
+				<th><?=htmlspecialchars(__("Pass"))?></th>
+				<th><?=htmlspecialchars(__("Pass Rate (%)"))?></th>
+				<th><?=htmlspecialchars(__("Fail"))?></th>
+				<th><?=htmlspecialchars(__("Total"))?></th>
+			</tr>
+			</thead>
 			<tbody>
 			<tr>
-				<th><?=htmlspecialchars(__("Venue Test Count"))?></th>
-				<th><?=htmlspecialchars($total_data->testCount)?></th>
+				<th><?=htmlspecialchars(__("Venue Tests"))?></th>
+				<td colspan="3"></td>
+				<td class="text-right"><?=htmlspecialchars($total_data->testCount)?></td>
 			</tr>
 			<?php
 			if(isset($total_data->passCount)) {
-				$render_pass_fail_row("Gaming Pass / Fails", $total_data->passCount, $total_data->failCount);
+				$render_pass_fail_row("Gaming Tests", $total_data->passCount, $total_data->failCount);
 			}
 
 			if(isset($total_data->barCounts)) {
-				$render_pass_fail_row("Alcohol Pass / Fails", $total_data->barCounts["pass"],  $total_data->barCounts["fail"]);
+				$render_pass_fail_row("Alcohol Tests", $total_data->barCounts["pass"],  $total_data->barCounts["fail"]);
 			}
 
 			if(isset($total_data->combinedCounts)) {
-				$render_pass_fail_row("Combined Pass / Fails", $total_data->combinedCounts["pass"],  $total_data->combinedCounts["fail"]);
+				$render_pass_fail_row("Combined Tests", $total_data->combinedCounts["pass"],  $total_data->combinedCounts["fail"]);
 			}
 			?>
 			</tbody>