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:
@@ -228,8 +228,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
{() => {
|
{() => {
|
||||||
const nextservicekm = form.getFieldValue("nextservicekm");
|
const nextservicekm = form.getFieldValue("nextservicekm");
|
||||||
const mileageOver =
|
const mileageOver =
|
||||||
nextservicekm <= form.getFieldValue("mileage");
|
nextservicekm && nextservicekm <= form.getFieldValue("mileage");
|
||||||
|
|
||||||
if (mileageOver)
|
if (mileageOver)
|
||||||
return (
|
return (
|
||||||
<Space direction="vertical" style={{ color: "tomato" }}>
|
<Space direction="vertical" style={{ color: "tomato" }}>
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."courtesycars" alter column "nextservicekm" set not null;
|
||||||
|
alter table "public"."courtesycars" alter column "nextservicekm" set default '0';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "public"."courtesycars" ALTER COLUMN "nextservicekm" drop default;
|
||||||
|
alter table "public"."courtesycars" alter column "nextservicekm" drop not null;
|
||||||
Reference in New Issue
Block a user