summaryrefslogtreecommitdiff
path: root/src/Result.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Result.jsx')
-rw-r--r--src/Result.jsx6
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;