From 300273088ca4eb9adfe79c44fc01fa50778beb03 Mon Sep 17 00:00:00 2001
From: Rosyid Haryadi <rosyid_haryadi@protonmail.com>
Date: Sat, 30 Sep 2023 21:12:36 +0700
Subject: readability

---
 src/Result.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/Result.jsx')

diff --git a/src/Result.jsx b/src/Result.jsx
index 685f88d..5d885fe 100644
--- a/src/Result.jsx
+++ b/src/Result.jsx
@@ -12,7 +12,8 @@ function Result({listEntry, baseSalary}) {
     return (
         <Container>
             <Typography variant='h6'>
-                Total Overtime Pay: Rp<NumericFormat displayType="text" decimalScale={0} thousandSeparator={true} value={totalOvertimePay} />
+                Total Overtime Pay: Rp<NumericFormat displayType="text" decimalScale={0} thousandSeparator={true}
+                                                     value={totalOvertimePay}/>
             </Typography>
             {/*{listEntry.map((entry) => {*/}
             {/*    return (*/}
@@ -45,8 +46,9 @@ function calculatePerDay(entry, baseSalary) {
         }
     }
 
+    const isWeekend = entry.date.day() === 0 || entry.date.day() === 6; // 0: Minggu, 6: Sabtu
     // Jelek bgt buset
-    if (entry.date.day() === 0 || entry.date.day() === 6) { // 0: Minggu, 6: Sabtu
+    if (isWeekend) {
         // Kerja di hari libur. Temennya Yohana wkwk
         if (0 < overtimeDuration <= 8) {
             multiplier = multiplierMap.holidays.eightHours;
-- 
cgit v1.2.3-70-g09d2

