Skip to content

Commit

Permalink
TS-866 Fix 0 mileage
Browse files Browse the repository at this point in the history
  • Loading branch information
birkirkristmunds committed Sep 10, 2024
1 parent 4718dfa commit 93bd06e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ const Confirm: FC<React.PropsWithChildren<unknown>> = () => {

if (mileageValue !== undefined) {
newMileage = +mileageValue.trim().replace(/\./g, '')
} else {
newMileage = vehicle?.mileage
}

// Update vehicle table with latests information
setVehicleRequest({
variables: {
permno: vehicle?.vehicleId,
mileage: newMileage || vehicle?.mileage,
mileage: newMileage,
plateCount: plateCountValue === 0 ? 0 : plateCountValue,
plateLost: plateLost?.length ? true : false,
},
Expand Down

0 comments on commit 93bd06e

Please sign in to comment.