|
@@ -18,6 +18,7 @@ Core::$page = $page;
|
|
|
if($user->level >= User::LEVEL_ADMIN) {
|
|
if($user->level >= User::LEVEL_ADMIN) {
|
|
|
|
|
|
|
|
$status = http::value("status", "int");
|
|
$status = http::value("status", "int");
|
|
|
|
|
+ $customer_id = http::value("customer_id", "int");
|
|
|
$project_id = http::value("project_id", "int");
|
|
$project_id = http::value("project_id", "int");
|
|
|
$location_id = http::value("location_id", "int");
|
|
$location_id = http::value("location_id", "int");
|
|
|
$test_id = http::value("test_id", "int");
|
|
$test_id = http::value("test_id", "int");
|
|
@@ -27,6 +28,10 @@ if($user->level >= User::LEVEL_ADMIN) {
|
|
|
$nvp = [];
|
|
$nvp = [];
|
|
|
if($status) $nvp["status"] = $status;
|
|
if($status) $nvp["status"] = $status;
|
|
|
if($project_id) $nvp["project_id"] = $project_id;
|
|
if($project_id) $nvp["project_id"] = $project_id;
|
|
|
|
|
+ else if($customer_id) {
|
|
|
|
|
+ $projects = Project::query(["customer_id" => $customer_id]);
|
|
|
|
|
+ $nvp["project_id"] = array_column($projects, "id");
|
|
|
|
|
+ }
|
|
|
if($location_id) $nvp["location_id"] = $location_id;
|
|
if($location_id) $nvp["location_id"] = $location_id;
|
|
|
else if($location_internal_id) {
|
|
else if($location_internal_id) {
|
|
|
$locations = Location::query(["internal_id" => $location_internal_id]);
|
|
$locations = Location::query(["internal_id" => $location_internal_id]);
|
|
@@ -68,6 +73,7 @@ if($user->level >= User::LEVEL_ADMIN) {
|
|
|
|
|
|
|
|
$testers = User::load(array_column($tests, "tester_id"));
|
|
$testers = User::load(array_column($tests, "tester_id"));
|
|
|
$projects = Project::load(array_column($tests, "project_id"));
|
|
$projects = Project::load(array_column($tests, "project_id"));
|
|
|
|
|
+ $customers = Customer::query([], ["sort" => "name"]);
|
|
|
|
|
|
|
|
usort($projects, function($a, $b) {
|
|
usort($projects, function($a, $b) {
|
|
|
return $a->name <=> $b->name;
|
|
return $a->name <=> $b->name;
|
|
@@ -86,7 +92,7 @@ if($user->level >= User::LEVEL_ADMIN) {
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
View::includeOnce("header", compact("page_title"));
|
|
View::includeOnce("header", compact("page_title"));
|
|
|
- View::include("test_list", compact("tests", "test_count", "sort", "sorts", "pagination_string", "projects", "project_id", "location_id", "location_internal_id", "pass", "test_id", "filter_count", "status"));
|
|
|
|
|
|
|
+ View::include("test_list", compact("tests", "test_count", "sort", "sorts", "pagination_string", "projects", "customers", "customer_id", "project_id", "location_id", "location_internal_id", "pass", "test_id", "filter_count", "status"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// HQ / Venue (view completed tests)
|
|
// HQ / Venue (view completed tests)
|