Update ConstructionConsentController.php

This commit is contained in:
Luca Haid
2025-02-17 12:22:29 +00:00
parent fa5aa34059
commit fc4d38dfc3

View File

@@ -938,16 +938,16 @@ class ConstructionConsentController extends mfBaseController {
return ["message" => "ConstructionConsent saved successfully"];
}
private function generateStats($baseFilter = []): array {
$allCount = ConstructionConsent::count([...$baseFilter]);
$streetCount = ConstructionConsent::count(["object_type" => "street", ...$baseFilter]);
$buildingCount = ConstructionConsent::count(["object_type" => "building", ...$baseFilter]);
$inspection_planner = ConstructionConsent::count(["inspection_planner" => "!NULL", ...$baseFilter]);
$conduit_installed_building = ConstructionConsent::count(["conduit_installed_building" => "!NULL", ...$baseFilter]);
$conduit_installed_ftu = ConstructionConsent::count(["conduit_installed_ftu" => "!NULL", ...$baseFilter]);
$inhouse_cabling = ConstructionConsent::count(["inhouse_cabling" => "!NULL", ...$baseFilter]);
private function generateStats($baseFilter = array()) {
$allCount = ConstructionConsent::count(array_merge(array(), $baseFilter));
$streetCount = ConstructionConsent::count(array_merge(array("object_type" => "street"), $baseFilter));
$buildingCount = ConstructionConsent::count(array_merge(array("object_type" => "building"), $baseFilter));
$inspection_planner = ConstructionConsent::count(array_merge(array("inspection_planner" => "!NULL"), $baseFilter));
$conduit_installed_building = ConstructionConsent::count(array_merge(array("conduit_installed_building" => "!NULL"), $baseFilter));
$conduit_installed_ftu = ConstructionConsent::count(array_merge(array("conduit_installed_ftu" => "!NULL"), $baseFilter));
$inhouse_cabling = ConstructionConsent::count(array_merge(array("inhouse_cabling" => "!NULL"), $baseFilter));
return [
return array(
"all" => $allCount,
"street" => $streetCount,
"building" => $buildingCount,
@@ -955,6 +955,6 @@ class ConstructionConsentController extends mfBaseController {
"conduit_installed_building" => $conduit_installed_building,
"conduit_installed_ftu" => $conduit_installed_ftu,
"inhouse_cabling" => $inhouse_cabling
];
);
}
}
}