|
|
@@ -36,8 +36,13 @@ $ids = http::value("ids", "int");
|
|
|
$internal_id = http::value("internal_id", "trim");
|
|
|
$name = http::value("name", "trim");
|
|
|
$legal_entity_name = http::value("legal_entity_name", "trim");
|
|
|
+
|
|
|
+$min_date = http::value("min_date");
|
|
|
+$max_date = http::value("max_date");
|
|
|
+
|
|
|
$include_archived = (int) http::value("include_archived");
|
|
|
$include_closed = (int) http::value("include_closed");
|
|
|
+$hide_tested = (int) http::value("hide_tested");
|
|
|
|
|
|
$filter_count = 0;
|
|
|
|
|
|
@@ -80,6 +85,18 @@ else {
|
|
|
$where_strings[] = "`location`.`closed`='0'";
|
|
|
}
|
|
|
|
|
|
+if($min_date) {
|
|
|
+ $filter_count++;
|
|
|
+}
|
|
|
+
|
|
|
+if($max_date) {
|
|
|
+ $filter_count++;
|
|
|
+}
|
|
|
+
|
|
|
+if($hide_tested) {
|
|
|
+ $filter_count++;
|
|
|
+}
|
|
|
+
|
|
|
$sort = http::value("sort");
|
|
|
switch($sort) {
|
|
|
case "last-added":
|
|
|
@@ -108,7 +125,6 @@ if($where_strings) {
|
|
|
$where_string = "AND " . implode(" AND ", $where_strings);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
[$date_start, $date_end] = $customer->getYearCycleDates();
|
|
|
|
|
|
$sql = "SELECT `location`.*, COUNT(`test`.`id`) AS `test_count`, SUM(IF(`test`.`retest` = 1, 1, 0)) AS `retest_count`
|
|
|
@@ -145,6 +161,6 @@ if(!empty($action)) {
|
|
|
}
|
|
|
|
|
|
View::includeOnce("header", compact("page_title"));
|
|
|
-View::include("locations", compact("customer", "include_archived", "include_closed", "filter_count", "sorts", "sort", "locations"));
|
|
|
+View::include("locations", compact("customer", "include_archived", "include_closed", "hide_tested", "filter_count", "sorts", "sort", "locations"));
|
|
|
View::include("modal_add_locations_to_project", compact("customer"));
|
|
|
View::includeOnce("footer");
|