IO-2484 Next Service KMs

Allow null and only display warning if not null and current milage is greater than service KMs
This commit is contained in:
Allan Carr
2023-11-29 17:32:09 -08:00
parent 6570d38719
commit dfd8845864
3 changed files with 5 additions and 2 deletions

View File

@@ -228,8 +228,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
{() => {
const nextservicekm = form.getFieldValue("nextservicekm");
const mileageOver =
nextservicekm <= form.getFieldValue("mileage");
nextservicekm && nextservicekm <= form.getFieldValue("mileage");
if (mileageOver)
return (
<Space direction="vertical" style={{ color: "tomato" }}>