summaryrefslogtreecommitdiff
path: root/src/Result.jsx
diff options
context:
space:
mode:
authorRosyid Haryadi <rosyid_haryadi@protonmail.com>2023-10-01 15:46:19 +0700
committerRosyid Haryadi <rosyid_haryadi@protonmail.com>2023-10-01 15:46:19 +0700
commit5789fb4c158ec12702cc2e4b34611c791d2f527d (patch)
tree769055bd9e214d60c7477bb37cf4d74b35c85007 /src/Result.jsx
parent8cc720288166a9bfe4892549510f869d83cc4127 (diff)
fix segment pattern
Diffstat (limited to 'src/Result.jsx')
-rw-r--r--src/Result.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Result.jsx b/src/Result.jsx
index e79ba7f..e361fc7 100644
--- a/src/Result.jsx
+++ b/src/Result.jsx
@@ -83,7 +83,8 @@ function calculatePerDay(entry, baseSalary) {
]
}
- const segmentedDuration = segmentTime(overtimeDuration, [1]);
+ const segmentPattern = weekendDay(entry.date) ? [8, 1, 15] : [1];
+ const segmentedDuration = segmentTime(overtimeDuration, segmentPattern);
const usedMap = weekendDay(entry.date) ? multiplierMap.holidays : multiplierMap.workDays;
for (let i = 0; i < segmentedDuration.length; i++) {
multiplier += segmentedDuration[i] * usedMap[i];