Rework dashboard

This commit is contained in:
Luca Haid
2025-01-10 12:31:05 +00:00
parent 3eabc30c58
commit 534febd8e7

View File

@@ -206,10 +206,11 @@ Vue.component('dashboard-new', {
<tt-dashboard-display-card
header="Bestellungen gesamt"
icon="fas fa-check"
:text="dashboardData.order_actual_order + ' / ' + dashboardData.order_max_home_addrdb"
:text="dashboardData.order_actual_order + ' / ' + dashboardData.order_max_home_addrdb + ' (' + Math.round((dashboardData.order_actual_order / dashboardData.order_max_home_addrdb) * 100) + '%)'"
:subHeaders="[
'Vollanschluss: ' + (parseInt(dashboardData.order_efh_vollanschluss) + parseInt(dashboardData.order_mph_vollanschluss)),
'Vorsorgeanschluss: ' + (parseInt(dashboardData.order_efh_vorsorge) + parseInt(dashboardData.order_mph_vorsorge))
// add percentage in () here
'Vollanschluss: ' + (parseInt(dashboardData.order_efh_vollanschluss) + parseInt(dashboardData.order_mph_vollanschluss)) + ' (' + Math.round(((parseInt(dashboardData.order_efh_vollanschluss) + parseInt(dashboardData.order_mph_vollanschluss)) / parseInt(dashboardData.order_actual_order) * 100)) + '%)',
'Vorsorgeanschluss: ' + (parseInt(dashboardData.order_efh_vorsorge) + parseInt(dashboardData.order_mph_vorsorge)) + ' (' + Math.round(((parseInt(dashboardData.order_efh_vorsorge) + parseInt(dashboardData.order_mph_vorsorge)) / parseInt(dashboardData.order_actual_order) * 100)) + '%)'
]"
color="#28a745"
/>
@@ -218,8 +219,8 @@ Vue.component('dashboard-new', {
icon="fas fa-home"
:text="dashboardData.order_efh"
:subHeaders="[
'Vollanschluss: ' + dashboardData.order_efh_vollanschluss,
'Vorsorgeanschluss: ' + dashboardData.order_efh_vorsorge
'Vollanschluss: ' + dashboardData.order_efh_vollanschluss + ' (' + Math.round((dashboardData.order_efh_vollanschluss / dashboardData.order_efh) * 100) + '%)',
'Vorsorgeanschluss: ' + dashboardData.order_efh_vorsorge + ' (' + Math.round((dashboardData.order_efh_vorsorge / dashboardData.order_efh) * 100) + '%)'
]"
color="#17a2b8"
/>
@@ -228,8 +229,8 @@ Vue.component('dashboard-new', {
icon="fas fa-building"
:text="dashboardData.order_mph"
:subHeaders="[
'Vollanschluss: ' + dashboardData.order_mph_vollanschluss,
'Vorsorgeanschluss: ' + dashboardData.order_mph_vorsorge
'Vollanschluss: ' + dashboardData.order_mph_vollanschluss + ' (' + Math.round((dashboardData.order_mph_vollanschluss / dashboardData.order_mph) * 100) + '%)',
'Vorsorgeanschluss: ' + dashboardData.order_mph_vorsorge + ' (' + Math.round((dashboardData.order_mph_vorsorge / dashboardData.order_mph) * 100) + '%)'
]"
color="#f5b902"
/>
@@ -240,35 +241,35 @@ Vue.component('dashboard-new', {
<tt-dashboard-display-card
header="Leerrohr an der Grundstücksgrenze abgelegt"
icon="fas fa-road"
:text="dashboardData.baufortschritt_140 + ' / ' + dashboardData.order_actual_order"
:text="dashboardData.baufortschritt_140 + ' / ' + dashboardData.order_actual_order + ' (' + Math.round((dashboardData.baufortschritt_140 / dashboardData.order_actual_order) * 100) + '%)'"
:subHeaders="[]"
color="#28a745"
/>
<tt-dashboard-display-card
header="Installationspaket erhalten"
icon="fas fa-box-open"
:text="dashboardData.installationspaket_erhalten + ' / ' + dashboardData.order_efh"
:text="dashboardData.installationspaket_erhalten + ' / ' + dashboardData.order_efh + ' (' + Math.round((dashboardData.installationspaket_erhalten / dashboardData.order_efh) * 100) + '%)'"
:subHeaders="[]"
color="#17a2b8"
/>
<tt-dashboard-display-card
header="Leerrohr im Haus"
icon="fas fa-house-user"
:text="dashboardData.lehrrohr_im_haus + ' / ' + dashboardData.order_efh"
:text="dashboardData.lehrrohr_im_haus + ' / ' + dashboardData.order_efh + ' (' + Math.round((dashboardData.lehrrohr_im_haus / dashboardData.order_efh) * 100) + '%)'"
:subHeaders="[]"
color="#f5b902"
/>
<tt-dashboard-display-card
header="Inhousekabel verlegt EFH"
icon="fas fa-plug"
:text="dashboardData.inhouse_kabel_verlegt_efh + ' / ' + dashboardData.order_efh"
:text="dashboardData.inhouse_kabel_verlegt_efh + ' / ' + dashboardData.order_efh + ' (' + Math.round((dashboardData.inhouse_kabel_verlegt_efh / dashboardData.order_efh) * 100) + '%)'"
:subHeaders="[]"
color="#007bff"
/>
<tt-dashboard-display-card
header="Inhousekabel verlegt MPH"
icon="fas fa-building-user"
:text="dashboardData.inhouse_kabel_verlegt_mph + ' / ' + dashboardData.order_mph"
:text="dashboardData.inhouse_kabel_verlegt_mph + ' / ' + dashboardData.order_mph + ' (' + Math.round((dashboardData.inhouse_kabel_verlegt_mph / dashboardData.order_mph) * 100) + '%)'"
:subHeaders="[]"
color="#0bb36c"
/>
@@ -279,35 +280,35 @@ Vue.component('dashboard-new', {
<tt-dashboard-display-card
header="Installation freigegeben"
icon="fas fa-tools"
:text="dashboardData.installationsfortschritt_245 + ' / ' + dashboardData.order_actual_order"
:text="dashboardData.installationsfortschritt_245 + ' / ' + dashboardData.order_actual_order + ' (' + Math.round((dashboardData.installationsfortschritt_245 / dashboardData.order_actual_order) * 100) + '%)'"
:subHeaders="[]"
color="#28a745"
/>
<tt-dashboard-display-card
header="ONT installiert"
icon="fas fa-wifi"
:text="dashboardData.ont_installiert_300 + ' / ' + dashboardData.order_actual_order"
:text="dashboardData.ont_installiert_300 + ' / ' + dashboardData.order_actual_order + ' (' + Math.round((dashboardData.ont_installiert_300 / dashboardData.order_actual_order) * 100) + '%)'"
:subHeaders="[]"
color="#17a2b8"
/>
<tt-dashboard-display-card
header="Vollanschluss dokumentiert"
icon="fas fa-file-alt"
:text="dashboardData.vollanschluss_dokumentiert_350 + ' / ' + (parseInt(dashboardData.order_efh_vollanschluss) + parseInt(dashboardData.order_mph_vollanschluss))"
:text="dashboardData.vollanschluss_dokumentiert_350 + ' / ' + (parseInt(dashboardData.order_efh_vollanschluss) + parseInt(dashboardData.order_mph_vollanschluss)) + ' (' + Math.round((dashboardData.vollanschluss_dokumentiert_350 / (parseInt(dashboardData.order_efh_vollanschluss) + parseInt(dashboardData.order_mph_vollanschluss))) * 100) + '%)'"
:subHeaders="[]"
color="#f5b902"
/>
<tt-dashboard-display-card
header="Vorsorgeanschluss dokumentiert"
icon="fas fa-file-alt"
:text="dashboardData.vorsorge_dokumentiert_351 + ' / ' + (parseInt(dashboardData.order_efh_vorsorge) + parseInt(dashboardData.order_mph_vorsorge))"
:text="dashboardData.vorsorge_dokumentiert_351 + ' / ' + (parseInt(dashboardData.order_efh_vorsorge) + parseInt(dashboardData.order_mph_vorsorge)) + ' (' + Math.round((dashboardData.vorsorge_dokumentiert_351 / (parseInt(dashboardData.order_efh_vorsorge) + parseInt(dashboardData.order_mph_vorsorge))) * 100) + '%)'"
:subHeaders="['']"
color="#007bff"
/>
<tt-dashboard-display-card
header="Provider bestellt"
icon="fas fa-shopping-cart"
:text="dashboardData.provider_bestellt_500 + ' / ' + dashboardData.order_actual_order"
:text="dashboardData.provider_bestellt_500 + ' / ' + dashboardData.order_actual_order + ' (' + Math.round((dashboardData.provider_bestellt_500 / dashboardData.order_actual_order) * 100) + '%)'"
:subHeaders="[]"
color="#0bb36c"
/>