|
|
@@ -99,6 +99,8 @@ $has_pass_fail = false;
|
|
|
|
|
|
$template_config = new stdClass();
|
|
|
|
|
|
+$challenge_stages = null;
|
|
|
+
|
|
|
$submit = http::value("submit");
|
|
|
if($submit) {
|
|
|
try {
|
|
|
@@ -144,6 +146,21 @@ if($submit) {
|
|
|
|
|
|
$template_config = $template->getConfiguration();
|
|
|
|
|
|
+ $fields = $template->getFields();
|
|
|
+
|
|
|
+ $challenge_stages = [];
|
|
|
+
|
|
|
+ if(isset($fields["challenge_stage"])) {
|
|
|
+ $field = $fields["challenge_stage"];
|
|
|
+ $values = $field->values;
|
|
|
+ $displays = $field->displayStrings;
|
|
|
+ foreach($values as $index => $value) {
|
|
|
+ if($value) {
|
|
|
+ $challenge_stages[$value] = $displays[$index];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// Exclude categories
|
|
|
if(!$exclude_categories || !is_array($exclude_categories)) {
|
|
|
$exclude_categories = $template_config->reports->excludeCategories ?? [];
|
|
|
@@ -548,7 +565,7 @@ if($submit) {
|
|
|
}
|
|
|
|
|
|
View::includeOnce("header", compact("page_title"));
|
|
|
-View::include("reports", compact("customer", "project_id", "date_range", "date_start", "date_end", "date_resolution", "all_projects", "project_table_data", "exclude_project_ids", "location_ids", "retests", "charts", "data", "total_data", "locations_missing_region", "locations_missing_area_manager", "locations_missing_operations_manager", "locations_missing_brand", "region_data", "area_manager_data", "brand_data", "operations_manager_data", "key_labels", "has_pass_fail", "template_config", "exclude_categories"));
|
|
|
+View::include("reports", compact("customer", "project_id", "date_range", "date_start", "date_end", "date_resolution", "all_projects", "project_table_data", "exclude_project_ids", "location_ids", "retests", "charts", "data", "total_data", "locations_missing_region", "locations_missing_area_manager", "locations_missing_operations_manager", "locations_missing_brand", "region_data", "area_manager_data", "brand_data", "operations_manager_data", "key_labels", "has_pass_fail", "template_config", "exclude_categories", "challenge_stages"));
|
|
|
View::includeOnce("footer");
|
|
|
|
|
|
file_put_contents("periodic_data.bin", serialize($data));
|