From 2d1a0042f74a6fe85aa5e408eb1dd3066efbaf72 Mon Sep 17 00:00:00 2001 From: Rosyid Haryadi Date: Sun, 1 Oct 2023 14:34:37 +0700 Subject: upd: minTime maxTime makes it annoying to input, invalid time handled in result instead --- src/Result.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Result.jsx') diff --git a/src/Result.jsx b/src/Result.jsx index dd977c5..3ba9a4e 100644 --- a/src/Result.jsx +++ b/src/Result.jsx @@ -9,6 +9,16 @@ function Result({listEntry, baseSalary}) { setTotalOvertimePay(getOvertimePayTotal(listEntry, baseSalary)); }, [listEntry, baseSalary]); + if (totalOvertimePay < 0) { + return ( + + + Waktu selesai mendahului waktu mulai. Mohon diperbaiki input. + + + ) + } + return ( -- cgit v1.2.3-70-g09d2