add negation to isFinite
This commit is contained in:
parent
98eec9f138
commit
018032afda
@ -1318,7 +1318,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -1331,7 +1331,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -1385,7 +1385,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_response = 0
|
||||
total_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_durasi_response / count_durasi_response)
|
||||
options.totalValue = !isFinite(total_durasi_response / count_durasi_response)
|
||||
? 0
|
||||
: total_durasi_response == 0
|
||||
? 0
|
||||
@ -1414,7 +1414,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_durasi_recovery / count_durasi_recovery)
|
||||
options.totalValue = !isFinite(total_durasi_recovery / count_durasi_recovery)
|
||||
? 0
|
||||
: total_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -784,7 +784,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -797,7 +797,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -826,7 +826,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -855,7 +855,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -1050,7 +1050,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -1063,7 +1063,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -1092,7 +1092,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -1121,7 +1121,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -1038,7 +1038,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -1051,7 +1051,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -1080,7 +1080,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -1109,7 +1109,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -1054,7 +1054,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -1067,7 +1067,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -1096,7 +1096,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -1125,7 +1125,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -1128,7 +1128,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -1141,7 +1141,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -1170,7 +1170,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -1199,7 +1199,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -923,7 +923,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -936,7 +936,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -965,7 +965,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -994,7 +994,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -1097,7 +1097,8 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = total == 0 ? 0 : (total_selesai / total) * 100
|
||||
options.totalValue =
|
||||
!isFinite(total_selesai / total) || total_selesai == 0 ? 0 : (total_selesai / total) * 100
|
||||
}
|
||||
}
|
||||
|
||||
@ -1106,7 +1107,10 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = total == 0 ? 0 : (total_inproses / total) * 100
|
||||
options.totalValue =
|
||||
!isFinite(total_inproses / total) || total_inproses == 0
|
||||
? 0
|
||||
: (total_inproses / total) * 100
|
||||
}
|
||||
}
|
||||
|
||||
@ -1131,7 +1135,10 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = count_durasi_response / total_durasi_response
|
||||
options.totalValue =
|
||||
!isFinite(count_durasi_response / total_durasi_response) || count_durasi_response == 0
|
||||
? 0
|
||||
: count_durasi_response / total_durasi_response
|
||||
}
|
||||
}
|
||||
|
||||
@ -1156,7 +1163,10 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = count_durasi_recovery / total_durasi_recovery
|
||||
options.totalValue =
|
||||
!isFinite(count_durasi_recovery / total_durasi_recovery) || count_durasi_recovery == 0
|
||||
? 0
|
||||
: count_durasi_recovery / total_durasi_recovery
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1063,7 +1063,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -1076,7 +1076,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -1105,7 +1105,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -1134,7 +1134,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -907,7 +907,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -920,7 +920,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -949,7 +949,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -978,7 +978,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -912,7 +912,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -925,7 +925,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -954,7 +954,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -983,7 +983,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -1055,7 +1055,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_selesai = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_selesai / total)
|
||||
options.totalValue = !isFinite(total_selesai / total)
|
||||
? 0
|
||||
: total_selesai == 0
|
||||
? 0
|
||||
@ -1068,7 +1068,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total = 0
|
||||
total_inproses = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(total_inproses / total)
|
||||
options.totalValue = !isFinite(total_inproses / total)
|
||||
? 0
|
||||
: total_inproses == 0
|
||||
? 0
|
||||
@ -1097,7 +1097,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
total_durasi_response = 0
|
||||
count_durasi_response = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_response / total_durasi_response)
|
||||
options.totalValue = !isFinite(count_durasi_response / total_durasi_response)
|
||||
? 0
|
||||
: count_durasi_response == 0
|
||||
? 0
|
||||
@ -1126,7 +1126,7 @@ const calculateCustomSummary = (options: any) => {
|
||||
count_durasi_recovery = 0
|
||||
total_durasi_recovery = 0
|
||||
} else if (options.summaryProcess === 'finalize') {
|
||||
options.totalValue = isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
options.totalValue = !isFinite(count_durasi_recovery / total_durasi_recovery)
|
||||
? 0
|
||||
: count_durasi_recovery == 0
|
||||
? 0
|
||||
|
@ -1,17 +1,4 @@
|
||||
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
||||
import {
|
||||
Document,
|
||||
AlignmentType,
|
||||
Packer,
|
||||
Paragraph,
|
||||
Table,
|
||||
TableCell,
|
||||
TableRow,
|
||||
VerticalAlign,
|
||||
TextRun,
|
||||
WidthType,
|
||||
PageOrientation
|
||||
} from 'docx'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { jsPDF } from 'jspdf'
|
||||
import autoTable from 'jspdf-autotable'
|
||||
@ -71,30 +58,30 @@ const formatData = (rawData: any) => {
|
||||
formatNumber(total_anomali_marking),
|
||||
formatNumber(total_anomali_non_marking),
|
||||
formatPercentage(
|
||||
!persen_anomali_pln_mobile_marking || !isFinite(persen_anomali_pln_mobile_marking)
|
||||
!persen_anomali_pln_mobile_marking || !!isFinite(persen_anomali_pln_mobile_marking)
|
||||
? 0
|
||||
: persen_anomali_pln_mobile_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_pln_mobile_non_marking || !isFinite(persen_anomali_pln_mobile_non_marking)
|
||||
!persen_anomali_pln_mobile_non_marking || !!isFinite(persen_anomali_pln_mobile_non_marking)
|
||||
? 0
|
||||
: persen_anomali_pln_mobile_non_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_cc123_marking || !isFinite(persen_anomali_cc123_marking)
|
||||
!persen_anomali_cc123_marking || !!isFinite(persen_anomali_cc123_marking)
|
||||
? 0
|
||||
: persen_anomali_cc123_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_cc123_non_marking || !isFinite(persen_anomali_cc123_non_marking)
|
||||
!persen_anomali_cc123_non_marking || !!isFinite(persen_anomali_cc123_non_marking)
|
||||
? 0
|
||||
: persen_anomali_cc123_non_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_marking || !isFinite(persen_anomali_marking) ? 0 : persen_anomali_marking
|
||||
!persen_anomali_marking || !!isFinite(persen_anomali_marking) ? 0 : persen_anomali_marking
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_non_marking || !isFinite(persen_anomali_non_marking)
|
||||
!persen_anomali_non_marking || !!isFinite(persen_anomali_non_marking)
|
||||
? 0
|
||||
: persen_anomali_non_marking * 100
|
||||
)
|
||||
|
@ -1,17 +1,4 @@
|
||||
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
||||
import {
|
||||
Document,
|
||||
AlignmentType,
|
||||
Packer,
|
||||
Paragraph,
|
||||
Table,
|
||||
TableCell,
|
||||
TableRow,
|
||||
VerticalAlign,
|
||||
TextRun,
|
||||
WidthType,
|
||||
PageOrientation
|
||||
} from 'docx'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { jsPDF } from 'jspdf'
|
||||
import autoTable from 'jspdf-autotable'
|
||||
@ -44,7 +31,7 @@ const formatData = (rawData: any) => {
|
||||
formatNumber(total.total_anomali_marking),
|
||||
formatPercentage(persen_anomali_marking),
|
||||
formatPercentage(
|
||||
!persen_anomali_marking || !isFinite(persen_anomali_marking) ? 0 : persen_anomali_marking
|
||||
!persen_anomali_marking || !!isFinite(persen_anomali_marking) ? 0 : persen_anomali_marking
|
||||
)
|
||||
])
|
||||
|
||||
|
@ -71,32 +71,32 @@ const formatData = (rawData: any) => {
|
||||
formatNumber(total_anomali_marking),
|
||||
formatNumber(total_anomali_non_marking),
|
||||
formatPercentage(
|
||||
!persen_anomali_pln_mobile_marking || !isFinite(persen_anomali_pln_mobile_marking)
|
||||
!persen_anomali_pln_mobile_marking || !!isFinite(persen_anomali_pln_mobile_marking)
|
||||
? 0
|
||||
: persen_anomali_pln_mobile_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_pln_mobile_non_marking || !isFinite(persen_anomali_pln_mobile_non_marking)
|
||||
!persen_anomali_pln_mobile_non_marking || !!isFinite(persen_anomali_pln_mobile_non_marking)
|
||||
? 0
|
||||
: persen_anomali_pln_mobile_non_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_cc123_marking || !isFinite(persen_anomali_cc123_marking)
|
||||
!persen_anomali_cc123_marking || !!isFinite(persen_anomali_cc123_marking)
|
||||
? 0
|
||||
: persen_anomali_cc123_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_cc123_non_marking || !isFinite(persen_anomali_cc123_non_marking)
|
||||
!persen_anomali_cc123_non_marking || !!isFinite(persen_anomali_cc123_non_marking)
|
||||
? 0
|
||||
: persen_anomali_cc123_non_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_marking || !isFinite(persen_anomali_marking)
|
||||
!persen_anomali_marking || !!isFinite(persen_anomali_marking)
|
||||
? 0
|
||||
: persen_anomali_marking * 100
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_anomali_non_marking || !isFinite(persen_anomali_non_marking)
|
||||
!persen_anomali_non_marking || !!isFinite(persen_anomali_non_marking)
|
||||
? 0
|
||||
: persen_anomali_non_marking * 100
|
||||
)
|
||||
|
@ -1,17 +1,4 @@
|
||||
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
||||
import {
|
||||
Document,
|
||||
AlignmentType,
|
||||
Packer,
|
||||
Paragraph,
|
||||
Table,
|
||||
TableCell,
|
||||
TableRow,
|
||||
VerticalAlign,
|
||||
TextRun,
|
||||
WidthType,
|
||||
PageOrientation
|
||||
} from 'docx'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { jsPDF } from 'jspdf'
|
||||
import autoTable from 'jspdf-autotable'
|
||||
@ -42,7 +29,7 @@ const formatData = (rawData: any) => {
|
||||
'Semua Unit',
|
||||
formatNumber(total.wo_pln_mobile),
|
||||
formatNumber(total.total_anomali),
|
||||
formatPercentage(!persen_anomali || !isFinite(persen_anomali) ? 0 : persen_anomali)
|
||||
formatPercentage(!persen_anomali || !!isFinite(persen_anomali) ? 0 : persen_anomali)
|
||||
])
|
||||
|
||||
return formattedData
|
||||
|
@ -142,7 +142,7 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(summary.keluhan_berulang),
|
||||
formatNumber(summary.keluhan_total),
|
||||
formatPercentage(
|
||||
!komplain_pelanggan || !isFinite(komplain_pelanggan) ? 0 : komplain_pelanggan
|
||||
!komplain_pelanggan || !!isFinite(komplain_pelanggan) ? 0 : komplain_pelanggan
|
||||
)
|
||||
])
|
||||
|
||||
@ -165,7 +165,7 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(total.keluhan_berulang),
|
||||
formatNumber(total.keluhan_total),
|
||||
formatPercentage(
|
||||
!total_komplain_pelanggan || !isFinite(total_komplain_pelanggan)
|
||||
!total_komplain_pelanggan || !!isFinite(total_komplain_pelanggan)
|
||||
? 0
|
||||
: total_komplain_pelanggan
|
||||
)
|
||||
@ -201,7 +201,7 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(total.keluhan_berulang),
|
||||
formatNumber(total.keluhan_total),
|
||||
formatPercentage(
|
||||
!total_komplain_pelanggan || !isFinite(total_komplain_pelanggan)
|
||||
!total_komplain_pelanggan || !!isFinite(total_komplain_pelanggan)
|
||||
? 0
|
||||
: total_komplain_pelanggan
|
||||
)
|
||||
|
@ -213,16 +213,16 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(delta_gangguan),
|
||||
formatNumber(delta_informasi),
|
||||
formatPercentage(
|
||||
!persen_delta_keluhan || !isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
!persen_delta_keluhan || !!isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_gangguan || !isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
!persen_delta_gangguan || !!isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_informasi || !isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
!persen_delta_informasi || !!isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_total || !isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
!persen_delta_total || !!isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
)
|
||||
])
|
||||
|
||||
@ -275,16 +275,16 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(delta_gangguan),
|
||||
formatNumber(delta_informasi),
|
||||
formatPercentage(
|
||||
!persen_delta_keluhan || !isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
!persen_delta_keluhan || !!isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_gangguan || !isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
!persen_delta_gangguan || !!isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_informasi || !isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
!persen_delta_informasi || !!isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_total || !isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
!persen_delta_total || !!isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
)
|
||||
])
|
||||
|
||||
@ -348,16 +348,16 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(delta_gangguan),
|
||||
formatNumber(delta_informasi),
|
||||
formatPercentage(
|
||||
!persen_delta_keluhan || !isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
!persen_delta_keluhan || !!isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_gangguan || !isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
!persen_delta_gangguan || !!isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_informasi || !isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
!persen_delta_informasi || !!isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_total || !isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
!persen_delta_total || !!isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
)
|
||||
]
|
||||
|
||||
|
@ -142,7 +142,7 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(summary.keluhan_berulang),
|
||||
formatNumber(summary.keluhan_total),
|
||||
formatPercentage(
|
||||
!komplain_pelanggan || !isFinite(komplain_pelanggan) ? 0 : komplain_pelanggan
|
||||
!komplain_pelanggan || !!isFinite(komplain_pelanggan) ? 0 : komplain_pelanggan
|
||||
)
|
||||
])
|
||||
|
||||
@ -165,7 +165,7 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(total.keluhan_berulang),
|
||||
formatNumber(total.keluhan_total),
|
||||
formatPercentage(
|
||||
!total_komplain_pelanggan || !isFinite(total_komplain_pelanggan)
|
||||
!total_komplain_pelanggan || !!isFinite(total_komplain_pelanggan)
|
||||
? 0
|
||||
: total_komplain_pelanggan
|
||||
)
|
||||
@ -201,7 +201,7 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(total.keluhan_berulang),
|
||||
formatNumber(total.keluhan_total),
|
||||
formatPercentage(
|
||||
!total_komplain_pelanggan || !isFinite(total_komplain_pelanggan)
|
||||
!total_komplain_pelanggan || !!isFinite(total_komplain_pelanggan)
|
||||
? 0
|
||||
: total_komplain_pelanggan
|
||||
)
|
||||
|
@ -212,16 +212,16 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(delta_gangguan),
|
||||
formatNumber(delta_informasi),
|
||||
formatPercentage(
|
||||
!persen_delta_keluhan || !isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
!persen_delta_keluhan || !!isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_gangguan || !isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
!persen_delta_gangguan || !!isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_informasi || !isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
!persen_delta_informasi || !!isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_total || !isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
!persen_delta_total || !!isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
)
|
||||
])
|
||||
|
||||
@ -274,16 +274,16 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(delta_gangguan),
|
||||
formatNumber(delta_informasi),
|
||||
formatPercentage(
|
||||
!persen_delta_keluhan || !isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
!persen_delta_keluhan || !!isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_gangguan || !isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
!persen_delta_gangguan || !!isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_informasi || !isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
!persen_delta_informasi || !!isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_total || !isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
!persen_delta_total || !!isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
)
|
||||
])
|
||||
|
||||
@ -347,16 +347,16 @@ const formatData = (rawData: any, reportMeta: any) => {
|
||||
formatNumber(delta_gangguan),
|
||||
formatNumber(delta_informasi),
|
||||
formatPercentage(
|
||||
!persen_delta_keluhan || !isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
!persen_delta_keluhan || !!isFinite(persen_delta_keluhan) ? 0 : persen_delta_keluhan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_gangguan || !isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
!persen_delta_gangguan || !!isFinite(persen_delta_gangguan) ? 0 : persen_delta_gangguan
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_informasi || !isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
!persen_delta_informasi || !!isFinite(persen_delta_informasi) ? 0 : persen_delta_informasi
|
||||
),
|
||||
formatPercentage(
|
||||
!persen_delta_total || !isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
!persen_delta_total || !!isFinite(persen_delta_total) ? 0 : persen_delta_total
|
||||
)
|
||||
]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user