diff options
author | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2023-09-30 21:12:36 +0700 |
---|---|---|
committer | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2023-09-30 21:12:36 +0700 |
commit | 300273088ca4eb9adfe79c44fc01fa50778beb03 (patch) | |
tree | b5fd5469425ea3e96a490abcdf00334c23f113f7 | |
parent | f4fa43d4686651b62f67e24d3698ea2324082f8e (diff) |
readability
-rw-r--r-- | src/Result.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
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; |