From 32c541095aea157fd9601a2c4f3fc14b31dd100f Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Thu, 9 Jan 2025 17:15:40 +0100 Subject: [PATCH] updated new dashboard --- .../DashboardNew/DashboardNewController.php | 46 ++++++------------- public/js/pages/DashboardNew/DashboardNew.css | 30 +++++++----- public/js/pages/DashboardNew/DashboardNew.js | 26 +++++------ 3 files changed, 44 insertions(+), 58 deletions(-) diff --git a/application/DashboardNew/DashboardNewController.php b/application/DashboardNew/DashboardNewController.php index f9c382807..3dc14199b 100644 --- a/application/DashboardNew/DashboardNewController.php +++ b/application/DashboardNew/DashboardNewController.php @@ -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", " "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", " "899"]), + 'ont_installiert_300' => $countFunction([">status_code" => "299", " "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"]), ]); } diff --git a/public/js/pages/DashboardNew/DashboardNew.css b/public/js/pages/DashboardNew/DashboardNew.css index f9cf0c655..e2a04bd19 100644 --- a/public/js/pages/DashboardNew/DashboardNew.css +++ b/public/js/pages/DashboardNew/DashboardNew.css @@ -4,12 +4,6 @@ margin: 0 auto; } -.dashboard-content { - display: flex; - flex-direction: column; - gap: 1rem; -} - .filter-section, .campaign-section { width: 100%; @@ -28,14 +22,29 @@ } + @media (min-width: 768px) { - .dashboard-content { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 1rem; + .dashboard-cards { + grid-template-columns: repeat(3, 1fr); } } +@media (min-width: 1000px) { + .dashboard-cards { + grid-template-columns: repeat(4, 1fr); + } +} + +@media (min-width: 1332px) { + .dashboard-cards { + grid-template-columns: repeat(5, 1fr); + } +} + +#app > div.card > div > div > div:nth-child(4) { + grid-template-columns: repeat(3, 1fr); +} + @media (max-width: 767px) { .filter-section, .campaign-section { @@ -46,7 +55,6 @@ grid-template-columns: repeat(2, 1fr); } - .dashboard-data-selector { grid-template-columns: repeat(1, 1fr); } diff --git a/public/js/pages/DashboardNew/DashboardNew.js b/public/js/pages/DashboardNew/DashboardNew.js index 80c0a4ff9..5cc03b33c 100644 --- a/public/js/pages/DashboardNew/DashboardNew.js +++ b/public/js/pages/DashboardNew/DashboardNew.js @@ -134,35 +134,35 @@ Vue.component('dashboard-new', { icon="fas fa-road" :text="dashboardData.baufortschritt_140 + ' / ' + dashboardData.order_actual_order" :subHeaders="[]" - color="#6c757d" + color="#28a745" />
@@ -173,37 +173,35 @@ Vue.component('dashboard-new', { icon="fas fa-tools" :text="dashboardData.installationsfortschritt_245 + ' / ' + dashboardData.order_actual_order" :subHeaders="[]" - color="#6c757d" + color="#28a745" />