Merged in feature/IO-2484-Next-Service-KMs (pull request #1094)

IO-2484 Next Service KMs

Approved-by: Dave Richer
This commit is contained in:
Allan Carr
2023-11-30 16:55:55 +00:00
committed by Dave Richer
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" }}>

View File

@@ -0,0 +1,2 @@
alter table "public"."courtesycars" alter column "nextservicekm" set not null;
alter table "public"."courtesycars" alter column "nextservicekm" set default '0';

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."courtesycars" ALTER COLUMN "nextservicekm" drop default;
alter table "public"."courtesycars" alter column "nextservicekm" drop not null;