Fix console hours, sign-in landing and counter usage races
- Hours the counter reading cannot parse (",5") no longer fail after
they are saved; they just get no hour counter suggestion.
- The console's sign-in falls back to a console machine list
(machines::console-picker at /console/machines) instead of /machines,
so it stays in the console's own session.
- Recording counter usage locks the counter first, so usage saved at
the same time from two devices is not lost.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -500,7 +500,12 @@ new #[Layout('layouts.console')] class extends Component
|
||||
*/
|
||||
private function suggestHourCounters(string $hours): void
|
||||
{
|
||||
$milli = Reading::parse($hours);
|
||||
// The hours are already saved; hours Reading does not read (",5") get no suggestion.
|
||||
try {
|
||||
$milli = Reading::parse($hours);
|
||||
} catch (DomainException) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($milli === null || $milli <= 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user