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"
|
||||
:allow-resizing="false"
|
||||
css-class="custom-table-column"
|
||||
cell-template="formatNumber"
|
||||
cell-template="formatDPT"
|
||||
/>
|
||||
<DxColumn
|
||||
:width="150"
|
||||
@ -225,7 +225,7 @@
|
||||
caption="Rata-Rata"
|
||||
:allow-resizing="false"
|
||||
css-class="custom-table-column"
|
||||
cell-template="formatNumber"
|
||||
cell-template="formatRPT"
|
||||
/>
|
||||
<DxColumn
|
||||
:width="150"
|
||||
@ -277,7 +277,7 @@
|
||||
caption="Rata-Rata"
|
||||
:allow-resizing="false"
|
||||
css-class="custom-table-column"
|
||||
cell-template="formatNumber"
|
||||
cell-template="formatRCT"
|
||||
/>
|
||||
<DxColumn
|
||||
:width="150"
|
||||
@ -321,30 +321,6 @@
|
||||
/>
|
||||
</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">
|
||||
<DxGroupItem
|
||||
:show-in-group-footer="false"
|
||||
@ -516,6 +492,75 @@
|
||||
:customize-text="(e: any) => formatNumber(e.value)"
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
|
||||
@ -572,7 +617,7 @@
|
||||
css-class="custom-table-column"
|
||||
:width="50"
|
||||
alignment="center"
|
||||
:calculateCellValue="(item: any) => dataSub.findIndex((i) => i == item) + 1"
|
||||
:calculateCellValue="(item: any) => dataSub.findIndex((i: any) => i == item) + 1"
|
||||
data-type="number"
|
||||
caption="No"
|
||||
cell-template="formatNumber"
|
||||
|
@ -170,8 +170,8 @@ const formatData = (rawData: any) => {
|
||||
summary.total_selesai != summary.total
|
||||
? formatPercentage((summary.total_selesai / summary.total) * 100)
|
||||
: '100%',
|
||||
summary.total_inproses,
|
||||
'0%',
|
||||
formatNumber(summary.total_inproses),
|
||||
formatPercentage((summary.total_inproses / summary.total) * 100),
|
||||
formatNumber(avgDurasiDispatch),
|
||||
formatWaktu(summary.max_durasi_dispatch),
|
||||
formatWaktu(summary.min_durasi_dispatch),
|
||||
@ -220,8 +220,8 @@ const formatData = (rawData: any) => {
|
||||
formatNumber(total.total),
|
||||
formatNumber(total.total_selesai),
|
||||
formatPercentage((total.total_selesai / total.total) * 100),
|
||||
total.total_inproses,
|
||||
'0%',
|
||||
formatNumber(total.total_inproses),
|
||||
formatPercentage((total.total_inproses / total.total) * 100),
|
||||
formatNumber(
|
||||
total.avg_durasi_dispatch.length
|
||||
? total.avg_durasi_dispatch.reduce((a: any, b: any) => a + b) /
|
||||
|
Loading…
x
Reference in New Issue
Block a user