Merge branch 'dev-bagus' of https://github.com/defuj/eis into dev-defuj
This commit is contained in:
commit
576c99be7f
@ -173,7 +173,7 @@
|
|||||||
caption="Rata-Rata"
|
caption="Rata-Rata"
|
||||||
:allow-resizing="false"
|
:allow-resizing="false"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatNumber"
|
cell-template="formatDPT"
|
||||||
/>
|
/>
|
||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
@ -225,7 +225,7 @@
|
|||||||
caption="Rata-Rata"
|
caption="Rata-Rata"
|
||||||
:allow-resizing="false"
|
:allow-resizing="false"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatNumber"
|
cell-template="formatRPT"
|
||||||
/>
|
/>
|
||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
@ -277,7 +277,7 @@
|
|||||||
caption="Rata-Rata"
|
caption="Rata-Rata"
|
||||||
:allow-resizing="false"
|
:allow-resizing="false"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatNumber"
|
cell-template="formatRCT"
|
||||||
/>
|
/>
|
||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
@ -321,30 +321,6 @@
|
|||||||
/>
|
/>
|
||||||
</DxColumn>
|
</DxColumn>
|
||||||
|
|
||||||
<template #formatText="{ data }">
|
|
||||||
<p class="text-left cursor-pointer">
|
|
||||||
{{ data.text }}
|
|
||||||
</p>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #formatNumber="{ data }">
|
|
||||||
<p class="text-right cursor-pointer">
|
|
||||||
{{
|
|
||||||
isNumber(data.text)
|
|
||||||
? data.column.caption == '%'
|
|
||||||
? formatPercentage(data.text)
|
|
||||||
: formatNumber(data.text)
|
|
||||||
: data.text
|
|
||||||
}}
|
|
||||||
</p>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #formatTime="{ data }">
|
|
||||||
<p>
|
|
||||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
|
||||||
</p>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<DxSummary :calculate-custom-summary="calculateCustomSummary">
|
<DxSummary :calculate-custom-summary="calculateCustomSummary">
|
||||||
<DxGroupItem
|
<DxGroupItem
|
||||||
:show-in-group-footer="false"
|
:show-in-group-footer="false"
|
||||||
@ -516,6 +492,75 @@
|
|||||||
:customize-text="(e: any) => formatNumber(e.value)"
|
:customize-text="(e: any) => formatNumber(e.value)"
|
||||||
/>
|
/>
|
||||||
</DxSummary>
|
</DxSummary>
|
||||||
|
|
||||||
|
<template #formatText="{ data }">
|
||||||
|
<p class="text-left cursor-pointer">
|
||||||
|
{{ data.text }}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #formatNumber="{ data }">
|
||||||
|
<p class="text-right cursor-pointer">
|
||||||
|
{{
|
||||||
|
isNumber(data.text)
|
||||||
|
? data.column.caption == '%'
|
||||||
|
? formatPercentage(data.text)
|
||||||
|
: formatNumber(data.text)
|
||||||
|
: data.text
|
||||||
|
}}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #formatTime="{ data }">
|
||||||
|
<p class="cursor-pointer">
|
||||||
|
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #formatDPT="{ data }">
|
||||||
|
<p
|
||||||
|
class="text-right cursor-pointer"
|
||||||
|
:class="[data.text < 5 ? 'text-green-500' : 'text-red-500']"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
isNumber(data.text)
|
||||||
|
? data.column.caption == '%'
|
||||||
|
? formatPercentage(data.text)
|
||||||
|
: formatNumber(data.text)
|
||||||
|
: data.text
|
||||||
|
}}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #formatRPT="{ data }">
|
||||||
|
<p
|
||||||
|
class="text-right cursor-pointer"
|
||||||
|
:class="[data.text < 45 ? 'text-green-500' : 'text-red-500']"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
isNumber(data.text)
|
||||||
|
? data.column.caption == '%'
|
||||||
|
? formatPercentage(data.text)
|
||||||
|
: formatNumber(data.text)
|
||||||
|
: data.text
|
||||||
|
}}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #formatRCT="{ data }">
|
||||||
|
<p
|
||||||
|
class="text-right cursor-pointer"
|
||||||
|
:class="[data.text < 180 ? 'text-green-500' : 'text-red-500']"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
isNumber(data.text)
|
||||||
|
? data.column.caption == '%'
|
||||||
|
? formatPercentage(data.text)
|
||||||
|
: formatNumber(data.text)
|
||||||
|
: data.text
|
||||||
|
}}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
</DxDataGrid>
|
</DxDataGrid>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -572,7 +617,7 @@
|
|||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
:width="50"
|
:width="50"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
:calculateCellValue="(item: any) => dataSub.findIndex((i) => i == item) + 1"
|
:calculateCellValue="(item: any) => dataSub.findIndex((i: any) => i == item) + 1"
|
||||||
data-type="number"
|
data-type="number"
|
||||||
caption="No"
|
caption="No"
|
||||||
cell-template="formatNumber"
|
cell-template="formatNumber"
|
||||||
|
@ -170,8 +170,8 @@ const formatData = (rawData: any) => {
|
|||||||
summary.total_selesai != summary.total
|
summary.total_selesai != summary.total
|
||||||
? formatPercentage((summary.total_selesai / summary.total) * 100)
|
? formatPercentage((summary.total_selesai / summary.total) * 100)
|
||||||
: '100%',
|
: '100%',
|
||||||
summary.total_inproses,
|
formatNumber(summary.total_inproses),
|
||||||
'0%',
|
formatPercentage((summary.total_inproses / summary.total) * 100),
|
||||||
formatNumber(avgDurasiDispatch),
|
formatNumber(avgDurasiDispatch),
|
||||||
formatWaktu(summary.max_durasi_dispatch),
|
formatWaktu(summary.max_durasi_dispatch),
|
||||||
formatWaktu(summary.min_durasi_dispatch),
|
formatWaktu(summary.min_durasi_dispatch),
|
||||||
@ -220,8 +220,8 @@ const formatData = (rawData: any) => {
|
|||||||
formatNumber(total.total),
|
formatNumber(total.total),
|
||||||
formatNumber(total.total_selesai),
|
formatNumber(total.total_selesai),
|
||||||
formatPercentage((total.total_selesai / total.total) * 100),
|
formatPercentage((total.total_selesai / total.total) * 100),
|
||||||
total.total_inproses,
|
formatNumber(total.total_inproses),
|
||||||
'0%',
|
formatPercentage((total.total_inproses / total.total) * 100),
|
||||||
formatNumber(
|
formatNumber(
|
||||||
total.avg_durasi_dispatch.length
|
total.avg_durasi_dispatch.length
|
||||||
? total.avg_durasi_dispatch.reduce((a: any, b: any) => a + b) /
|
? total.avg_durasi_dispatch.reduce((a: any, b: any) => a + b) /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user