updated new dashboard

This commit is contained in:
Luca Haid
2025-01-09 17:15:40 +01:00
parent e659d54265
commit 32c541095a
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"]),
]);
}

View File

@@ -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);
}

View File

@@ -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"
/>
<tt-dashboard-display-card
header="Installationspaket erhalten"
icon="fas fa-box-open"
:text="dashboardData.installationspaket_erhalten + ' / ' + dashboardData.order_efh"
:subHeaders="[]"
color="#007bff"
color="#17a2b8"
/>
<tt-dashboard-display-card
header="Leerrohr im Haus"
icon="fas fa-house-user"
:text="dashboardData.lehrrohr_im_haus + ' / ' + dashboardData.order_efh"
:subHeaders="[]"
color="#ffc107"
color="#dbab1a"
/>
<tt-dashboard-display-card
header="Inhauskabel verlegt EFH"
icon="fas fa-plug"
:text="dashboardData.inhouse_kabel_verlegt_efh + ' / ' + dashboardData.order_efh"
:subHeaders="[]"
color="#28a745"
color="#007bff"
/>
<tt-dashboard-display-card
header="Inhauskabel verlegt MPH"
icon="fas fa-building-user"
:text="dashboardData.inhouse_kabel_verlegt_mph + ' / ' + dashboardData.order_mph"
:subHeaders="[]"
color="#17a2b8"
color="#0bb36c"
/>
</div>
<hr>
@@ -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"
/>
<tt-dashboard-display-card
header="300 - ONT installiert"
icon="fas fa-wifi"
:text="dashboardData.ont_installiert_300 + ' / ' + dashboardData.order_actual_order"
:subHeaders="[]"
color="#007bff"
color="#17a2b8"
/>
<tt-dashboard-display-card
header="350 - Vollanschluss dokumentiert (Vollanschluss)"
icon="fas fa-file-alt"
:text="dashboardData.vollanschluss_dokumentiert_350 + ' / ' + (parseInt(dashboardData.order_efh_vollanschluss) + parseInt(dashboardData.order_mph_vollanschluss))"
:subHeaders="[
'' // Add any additional info if needed.
] "
color="#ffc107"
:subHeaders="[]"
color="#dbab1a"
/>
<tt-dashboard-display-card
header="351 - Vorsorgeanschluss dokumentiert (Vorsorgeanschluss)"
icon="fas fa-file-alt"
:text="dashboardData.vorsorge_dokumentiert_351 + ' / ' + (parseInt(dashboardData.order_efh_vorsorge) + parseInt(dashboardData.order_mph_vorsorge))"
:subHeaders="[]"
color="#ffc107"
:subHeaders="['']"
color="#007bff"
/>
<tt-dashboard-display-card
header="500 - Provider bestellt"
icon="fas fa-shopping-cart"
:text="dashboardData.provider_bestellt_500 + ' / ' + dashboardData.order_actual_order"
:subHeaders="[]"
color="#28a745"
color="#0bb36c"
/>
</div>
</div>