|
|
@@ -17,15 +17,29 @@ $date_range_custom_style = ($date_range == "custom") ? "" : "display: none";
|
|
|
|
|
|
?>
|
|
|
<div class="container">
|
|
|
- <div class="row">
|
|
|
- <div class="col-auto">
|
|
|
+ <div class="row d-print-none">
|
|
|
+ <div class="col">
|
|
|
<h2><?=htmlspecialchars($customer->name)?> Performance</h2>
|
|
|
</div>
|
|
|
- <div class="col">
|
|
|
+ <div class="col-auto">
|
|
|
+ <?php
|
|
|
+ if($charts) {
|
|
|
+ ?>
|
|
|
+ <div class="dropdown">
|
|
|
+ <button type="button" class="btn btn-secondary dropdown-toggle" id="actions-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
+ Actions
|
|
|
+ </button>
|
|
|
+ <div class="dropdown-menu" aria-labelledby="actions-button">
|
|
|
+ <a class="dropdown-item" href="#" id="export-pptx-action">Export PPTX</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <form class="mb-4" method="post">
|
|
|
+ <form class="mb-4 d-print-none" method="post">
|
|
|
|
|
|
<input type="hidden" name="customer_id" value="<?=htmlspecialchars($customer->id)?>" />
|
|
|
|
|
|
@@ -161,7 +175,7 @@ $date_range_custom_style = ($date_range == "custom") ? "" : "display: none";
|
|
|
<?php
|
|
|
if($locations_missing_region) {
|
|
|
?>
|
|
|
- <div class="alert alert-warning">
|
|
|
+ <div class="alert alert-warning d-print-none">
|
|
|
There are some locations that are missing "region" information:
|
|
|
<ul class="mb-0">
|
|
|
<?php
|
|
|
@@ -190,7 +204,7 @@ $date_range_custom_style = ($date_range == "custom") ? "" : "display: none";
|
|
|
<?php
|
|
|
if($locations_missing_area_manager) {
|
|
|
?>
|
|
|
- <div class="alert alert-warning">
|
|
|
+ <div class="alert alert-warning d-print-none">
|
|
|
There are some locations that are missing "area manager" information:
|
|
|
<ul class="mb-0">
|
|
|
<?php
|
|
|
@@ -243,7 +257,7 @@ $date_range_custom_style = ($date_range == "custom") ? "" : "display: none";
|
|
|
</div>
|
|
|
|
|
|
<div class="row mb-4">
|
|
|
- <div class="col-md-4" style="position: relative;">
|
|
|
+ <div class="col-md-4 d-print-none" style="position: relative;">
|
|
|
<h3>Chart List</h3>
|
|
|
<div class="list-group" style="position: sticky; top: 7rem;">
|
|
|
<?php
|
|
|
@@ -289,102 +303,126 @@ $date_range_custom_style = ($date_range == "custom") ? "" : "display: none";
|
|
|
</div>
|
|
|
|
|
|
<?php
|
|
|
+ foreach(["pptx", "odp"] as $format) {
|
|
|
+ ?>
|
|
|
+ <form id="form-<?=$format?>" method="post" action="/account/performance/export-<?=$format?>" data-rendered="0">
|
|
|
+ <input type="hidden" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>" />
|
|
|
+ <input type="hidden" name="customer_id" value="<?=intval($customer->id)?>" />
|
|
|
+ <input type="hidden" name="date_range" value="<?=htmlspecialchars($date_range)?>" />
|
|
|
+ <input type="hidden" name="from_quarter" value="<?=htmlspecialchars($from_quarter)?>" />
|
|
|
+ <input type="hidden" name="to_quarter" value="<?=htmlspecialchars($to_quarter)?>" />
|
|
|
+ <input type="hidden" name="date_resolution" value="<?=htmlspecialchars($date_resolution)?>" />
|
|
|
+ <?php
|
|
|
+ foreach($project_ids as $project_id) {
|
|
|
+ ?>
|
|
|
+ <input type="hidden" name="project_ids[]" value="<?=intval($project_id)?>" />
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <input type="submit" value="Submit" class="d-none" />
|
|
|
+ </form>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
|
|
|
if(PRODUCTION == false) {
|
|
|
?>
|
|
|
- <h2>Debug Information</h2>
|
|
|
+ <div class="d-print-none">
|
|
|
+ <h2>Debug Information</h2>
|
|
|
|
|
|
- <h3>Region Data</h3>
|
|
|
+ <h3>Region Data</h3>
|
|
|
|
|
|
- <?php
|
|
|
+ <?php
|
|
|
|
|
|
- foreach($region_data as $region => $rows) {
|
|
|
+ foreach($region_data as $region => $rows) {
|
|
|
|
|
|
- ?>
|
|
|
- <h4>Region: <?=htmlspecialchars($region)?></h4>
|
|
|
-
|
|
|
- <table class="table">
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>Key</th>
|
|
|
- <th>Tests</th>
|
|
|
- <th>Passes</th>
|
|
|
- <th>Fails</th>
|
|
|
- <th>Rate</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <?php
|
|
|
- foreach($rows as $key => $data) {
|
|
|
- $rate = ($data->testCount == 0) ? "0.00" : number_format(($data->passCount * 100) / $data->testCount, 2);
|
|
|
- ?>
|
|
|
- <tr>
|
|
|
- <td><?=htmlspecialchars($key)?></td>
|
|
|
- <td><?=number_format($data->testCount)?></td>
|
|
|
- <td><?=number_format($data->passCount)?></td>
|
|
|
- <td><?=number_format($data->failCount)?></td>
|
|
|
- <td><?=$rate?>%</td>
|
|
|
- </tr>
|
|
|
- <?php
|
|
|
- }
|
|
|
?>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <h4>Region: <?=htmlspecialchars($region)?></h4>
|
|
|
+
|
|
|
+ <table class="table">
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Key</th>
|
|
|
+ <th>Tests</th>
|
|
|
+ <th>Passes</th>
|
|
|
+ <th>Fails</th>
|
|
|
+ <th>Rate</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <?php
|
|
|
+ foreach($rows as $key => $data) {
|
|
|
+ $rate = ($data->testCount == 0) ? "0.00" : number_format(($data->passCount * 100) / $data->testCount, 2);
|
|
|
+ ?>
|
|
|
+ <tr>
|
|
|
+ <td><?=htmlspecialchars($key)?></td>
|
|
|
+ <td><?=number_format($data->testCount)?></td>
|
|
|
+ <td><?=number_format($data->passCount)?></td>
|
|
|
+ <td><?=number_format($data->failCount)?></td>
|
|
|
+ <td><?=$rate?>%</td>
|
|
|
+ </tr>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <?php
|
|
|
+ <?php
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- ?>
|
|
|
- <h3>Area Manager Data</h3>
|
|
|
- <?php
|
|
|
+ ?>
|
|
|
+ <h3>Area Manager Data</h3>
|
|
|
+ <?php
|
|
|
|
|
|
- foreach($area_manager_data as $area_manager => $rows) {
|
|
|
+ foreach($area_manager_data as $area_manager => $rows) {
|
|
|
|
|
|
- ?>
|
|
|
- <h4>Area Manager: <?=htmlspecialchars($area_manager)?></h4>
|
|
|
-
|
|
|
- <table class="table">
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <col style="width: 20%" />
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>Key</th>
|
|
|
- <th>Tests</th>
|
|
|
- <th>Passes</th>
|
|
|
- <th>Fails</th>
|
|
|
- <th>Rate</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <?php
|
|
|
- foreach($rows as $key => $data) {
|
|
|
- $rate = ($data->testCount == 0) ? "0.00" : number_format(($data->passCount * 100) / $data->testCount, 2);
|
|
|
- ?>
|
|
|
- <tr>
|
|
|
- <td><?=htmlspecialchars($key)?></td>
|
|
|
- <td><?=number_format($data->testCount)?></td>
|
|
|
- <td><?=number_format($data->passCount)?></td>
|
|
|
- <td><?=number_format($data->failCount)?></td>
|
|
|
- <td><?=$rate?>%</td>
|
|
|
- </tr>
|
|
|
- <?php
|
|
|
- }
|
|
|
?>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <h4>Area Manager: <?=htmlspecialchars($area_manager)?></h4>
|
|
|
+
|
|
|
+ <table class="table">
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <col style="width: 20%" />
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Key</th>
|
|
|
+ <th>Tests</th>
|
|
|
+ <th>Passes</th>
|
|
|
+ <th>Fails</th>
|
|
|
+ <th>Rate</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <?php
|
|
|
+ foreach($rows as $key => $data) {
|
|
|
+ $rate = ($data->testCount == 0) ? "0.00" : number_format(($data->passCount * 100) / $data->testCount, 2);
|
|
|
+ ?>
|
|
|
+ <tr>
|
|
|
+ <td><?=htmlspecialchars($key)?></td>
|
|
|
+ <td><?=number_format($data->testCount)?></td>
|
|
|
+ <td><?=number_format($data->passCount)?></td>
|
|
|
+ <td><?=number_format($data->failCount)?></td>
|
|
|
+ <td><?=$rate?>%</td>
|
|
|
+ </tr>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <?php
|
|
|
+ <?php
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
}
|
|
|
|
|
|
}
|