add negation to isFinite

This commit is contained in:
Dede Fuji Abdul
2024-04-16 22:22:36 +07:00
parent 98eec9f138
commit 018032afda
20 changed files with 102 additions and 131 deletions

View File

@@ -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