Refactor number formatting in Vue components

This commit is contained in:
Dede Fuji Abdul
2024-03-21 11:27:35 +07:00
parent d39e8c9d7f
commit 9fdf086eeb
44 changed files with 545 additions and 628 deletions

View File

@@ -143,42 +143,42 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="mom_bulan_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_mom"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem
column="yoy_tahun_kemarin"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="yoy_tahun_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_yoy"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
</DxSummary>

View File

@@ -143,28 +143,28 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="mom_bulan_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_mom"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem
column="yoy_tahun_kemarin"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
@@ -172,14 +172,14 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_yoy"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
</DxSummary>
</DxDataGrid>

View File

@@ -111,21 +111,21 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="jumlah_informasi"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="total"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
</DxSummary>
</DxDataGrid>

View File

@@ -98,14 +98,14 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem

View File

@@ -236,7 +236,7 @@
summary-type="sum"
show-in-column="total_durasi_response_time_bulan_ini"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -244,7 +244,7 @@
summary-type="sum"
show-in-column="jumlah_gangguan_rpt_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -252,7 +252,7 @@
summary-type="sum"
show-in-column="rpt_gangguan_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -260,7 +260,7 @@
summary-type="sum"
show-in-column="total_rct_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -268,7 +268,7 @@
summary-type="sum"
show-in-column="jumlah_gangguan_rct_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -276,7 +276,7 @@
summary-type="sum"
show-in-column="rct_gangguan_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -284,7 +284,7 @@
summary-type="sum"
show-in-column="total_durasi_response_time_tahun_ini"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -292,7 +292,7 @@
summary-type="sum"
show-in-column="jumlah_gangguan_rpt_sampai_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -300,7 +300,7 @@
summary-type="sum"
show-in-column="rpt_gangguan_sampai_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -308,7 +308,7 @@
summary-type="sum"
show-in-column="total_durasi_recovery_time_tahun_ini"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -316,7 +316,7 @@
summary-type="sum"
show-in-column="jumlah_gangguan_rct_sampai_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -324,7 +324,7 @@
summary-type="sum"
show-in-column="rch_gangguan_sampai_bulan"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
</DxSummary>

View File

@@ -161,7 +161,7 @@
summary-type="sum"
display-format="{0}"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:align-by-column="true"
@@ -169,7 +169,7 @@
summary-type="sum"
display-format="{0}"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:align-by-column="true"
@@ -177,7 +177,7 @@
summary-type="avg"
display-format="{0}"
css-class="!text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxGroupItem
:align-by-column="true"
@@ -185,7 +185,7 @@
summary-type="sum"
display-format="{0}"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:align-by-column="true"
@@ -193,7 +193,7 @@
summary-type="sum"
display-format="{0}"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:align-by-column="true"
@@ -201,7 +201,7 @@
summary-type="avg"
display-format="{0}"
css-class="!text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem
@@ -215,42 +215,42 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="mom_bulan_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_mom"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem
column="yoy_tahun_kemarin"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="yoy_tahun_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_yoy"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
</DxSummary>

View File

@@ -153,28 +153,28 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="mom_bulan_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_mom"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem
column="yoy_tahun_kemarin"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
@@ -182,14 +182,14 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_yoy"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxGroupItem
@@ -208,7 +208,7 @@
show-in-column="mom_bulan_ini"
column="mom_bulan_ini"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -217,7 +217,7 @@
show-in-column="persen_mom"
column="persen_mom"
css-class="!text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -226,7 +226,7 @@
show-in-column="yoy_tahun_kemarin"
column="yoy_tahun_kemarin"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -235,7 +235,7 @@
show-in-column="yoy_tahun_ini"
column="yoy_tahun_ini"
css-class="!text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxGroupItem
:show-in-group-footer="false"
@@ -244,7 +244,7 @@
show-in-column="persen_yoy"
column="persen_yoy"
css-class="!text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
</DxSummary>
</DxDataGrid>

View File

@@ -143,42 +143,42 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="mom_bulan_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_mom"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem
column="yoy_tahun_kemarin"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="yoy_tahun_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_yoy"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
</DxSummary>

View File

@@ -143,42 +143,42 @@
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="mom_bulan_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_mom"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
<DxTotalItem
column="yoy_tahun_kemarin"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="yoy_tahun_ini"
summary-type="sum"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatNumber(e.value)"
/>
<DxTotalItem
column="persen_yoy"
summary-type="avg"
display-format="{0}"
css-class="text-white !text-right"
:customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))"
:customize-text="(e: any) => formatPercentage(e.value)"
/>
</DxSummary>