Preserve arrival date in correction dialog
When a scan is corrected from clock-in to clock-out, retain the scan date and clear only the arrival time so users can enter the actual arrival without re-entering the date.
This commit is contained in:
parent
9ff13b3ce6
commit
cfcfbc6056
1 changed files with 3 additions and 2 deletions
|
|
@ -66,7 +66,8 @@ function CorrectionForm({ shift, onClose }: {
|
|||
function swapToClockOut() {
|
||||
setOutDate(scanDate);
|
||||
setOutTime(scanTime);
|
||||
setInDate("");
|
||||
// Keep the scan's day so only the arrival time needs typing.
|
||||
setInDate(scanDate);
|
||||
setInTime("");
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +188,7 @@ function CorrectionForm({ shift, onClose }: {
|
|||
className="font-medium text-amber-700 underline dark:text-amber-400">
|
||||
This scan was actually the clock-out
|
||||
</button>{" "}
|
||||
— clears the arrival so you can type the real one.
|
||||
— clears the arrival time so you can type the real one (the date stays).
|
||||
</p>
|
||||
</fieldset>
|
||||
<fieldset className="grid grid-cols-2 gap-3">
|
||||
|
|
|
|||
Loading…
Reference in a new issue