Merge branch 'rework-dashboard' into 'master'

updated new dashboard

See merge request fronk/thetool!871
This commit is contained in:
Luca Haid
2025-01-09 16:16:29 +00:00
3 changed files with 44 additions and 58 deletions

View File

@@ -148,45 +148,25 @@ class DashboardNewController extends mfBaseController {
PreorderModel::countActive($params);
};
$counts = [
'count_orders' => $countFunction([]),
'total_efh_orders' => $countFunction(["connection_type" => $efh_connection_types]),
'total_efh_orders_vorsorge' => $countFunction(["connection_type" => $efh_connection_types, "type" => "provision"]),
'total_efh_orders_vollanschluss' => $countFunction(["connection_type" => $efh_connection_types, "type" => "order"]),
'total_mph_orders' => $countFunction(["connection_type" => $mph_connection_types]),
'total_mph_orders_vorsorge' => $countFunction(["connection_type" => $mph_connection_types, "type" => "provision"]),
'total_mph_orders_vollanschluss' => $countFunction(["connection_type" => $mph_connection_types, "type" => "order"]),
'baufortschritt_140' => $countFunction([">status_code" => "139"]),
self::returnJson([
'order_max_home_addrdb' => $order_max_homes,
'order_actual_order' => $countFunction([]),
'order_efh' => $countFunction(["connection_type" => $efh_connection_types]),
'order_efh_vorsorge' => $countFunction(["connection_type" => $efh_connection_types, "type" => "provision"]),
'order_efh_vollanschluss' => $countFunction(["connection_type" => $efh_connection_types, "type" => "order"]),
'order_mph' => $countFunction(["connection_type" => $mph_connection_types]),
'order_mph_vorsorge' => $countFunction(["connection_type" => $mph_connection_types, "type" => "provision"]),
'order_mph_vollanschluss' => $countFunction(["connection_type" => $mph_connection_types, "type" => "order"]),
'baufortschritt_140' => $countFunction([">status_code" => "139", "<status_code" => "899"]),
'installationspaket_erhalten' => $countFunction(["connection_type" => $efh_connection_types], 145),
'lehrrohr_im_haus' => $countFunction(["connection_type" => $efh_connection_types], 200),
'inhouse_kabel_verlegt_efh' => $countFunction(["connection_type" => $efh_connection_types], 242),
'inhouse_kabel_verlegt_mph' => $countFunction(["connection_type" => $mph_connection_types], 242),
'installationsfortschritt_245' => $countFunction([">status_code" => "244"]),
'ont_installiert_300' => $countFunction([">status_code" => "299"]),
'installationsfortschritt_245' => $countFunction([">status_code" => "244", "<status_code" => "899"]),
'ont_installiert_300' => $countFunction([">status_code" => "299", "<status_code" => "899"]),
'vollanschluss_dokumentiert_350' => $countFunction(["status_code" => ["350","500"], "type" => "order"]),
'vorsorge_dokumentiert_351' => $countFunction(["status_code" => ["351","500"], "type" => "provision"]),
'provider_bestellt_500' => $countFunction(["status_code" => "500"])
];
self::returnJson([
'order_max_home_addrdb' => $order_max_homes,
'order_actual_order' => $counts['count_orders'],
'order_efh' => $counts['total_efh_orders'],
'order_efh_vorsorge' => $counts['total_efh_orders_vorsorge'],
'order_efh_vollanschluss' => $counts['total_efh_orders_vollanschluss'],
'order_mph' => $counts['total_mph_orders'],
'order_mph_vorsorge' => $counts['total_mph_orders_vorsorge'],
'order_mph_vollanschluss' => $counts['total_mph_orders_vollanschluss'],
'baufortschritt_140' => $counts['baufortschritt_140'],
'installationspaket_erhalten' => $counts['installationspaket_erhalten'],
'lehrrohr_im_haus' => $counts['lehrrohr_im_haus'],
'inhouse_kabel_verlegt_efh' => $counts['inhouse_kabel_verlegt_efh'],
'inhouse_kabel_verlegt_mph' => $counts['inhouse_kabel_verlegt_mph'],
'installationsfortschritt_245' => $counts['installationsfortschritt_245'],
'ont_installiert_300' => $counts['ont_installiert_300'],
'vollanschluss_dokumentiert_350' => $counts['vollanschluss_dokumentiert_350'],
'vorsorge_dokumentiert_351' => $counts['vorsorge_dokumentiert_351'],
'provider_bestellt_500' => $counts['provider_bestellt_500']
'provider_bestellt_500' => $countFunction(["status_code" => "500"]),
]);
}