Compare commits

..

2 Commits

Author SHA1 Message Date
Allan Carr
bfe94e3068 IO-2517 Add same check within C/C form 2023-12-29 16:17:37 -08:00
Allan Carr
823f07409a IO-2517 All Courtesy Car Warning Indicator 2023-12-29 16:03:40 -08:00
9 changed files with 25 additions and 45 deletions

View File

@@ -214,10 +214,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
>
<CourtesyCarStatus />
</Form.Item>
<Form.Item
label={t("courtesycars.fields.readiness")}
name="readiness"
>
<Form.Item label={t("courtesycars.fields.readiness")} name="readiness">
<CourtesyCarReadiness />
</Form.Item>
<div>
@@ -234,8 +231,9 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
>
{() => {
const nextservicekm = form.getFieldValue("nextservicekm");
const mileageOver =
nextservicekm && nextservicekm <= form.getFieldValue("mileage");
const mileageOver = nextservicekm
? nextservicekm <= form.getFieldValue("mileage")
: false;
if (mileageOver)
return (
<Space direction="vertical" style={{ color: "tomato" }}>

View File

@@ -74,10 +74,11 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
render: (text, record) => {
const { nextservicedate, nextservicekm, mileage } = record;
const mileageOver = nextservicekm <= mileage;
const mileageOver = nextservicekm ? nextservicekm <= mileage : false;
const dueForService =
nextservicedate && moment(nextservicedate).isBefore(moment());
nextservicedate &&
moment(nextservicedate).endOf("day").isSameOrBefore(moment());
return (
<Space>

View File

@@ -2023,24 +2023,24 @@
- active:
_eq: true
columns:
- created_at
- employeeid
- id
- labor_rates
- percentage
- teamid
- created_at
- updated_at
- employeeid
- id
- teamid
select_permissions:
- role: user
permission:
columns:
- created_at
- employeeid
- id
- labor_rates
- percentage
- teamid
- created_at
- updated_at
- employeeid
- id
- teamid
filter:
employee_team:
bodyshop:
@@ -2055,13 +2055,13 @@
- role: user
permission:
columns:
- created_at
- employeeid
- id
- labor_rates
- percentage
- teamid
- created_at
- updated_at
- employeeid
- id
- teamid
filter:
employee_team:
bodyshop:
@@ -2123,23 +2123,21 @@
_eq: true
columns:
- active
- bodyshopid
- created_at
- id
- max_load
- name
- created_at
- updated_at
- bodyshopid
- id
select_permissions:
- role: user
permission:
columns:
- active
- bodyshopid
- created_at
- id
- max_load
- name
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:
@@ -2155,7 +2153,6 @@
columns:
- active
- bodyshopid
- max_load
- name
- updated_at
filter:

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."employee_team_members" add column "max_load" numeric
-- not null default '10000';

View File

@@ -1,2 +0,0 @@
alter table "public"."employee_team_members" add column "max_load" numeric
not null default '10000';

View File

@@ -1,3 +0,0 @@
alter table "public"."employee_team_members" alter column "max_load" set default '10000'::numeric;
alter table "public"."employee_team_members" alter column "max_load" drop not null;
alter table "public"."employee_team_members" add column "max_load" numeric;

View File

@@ -1 +0,0 @@
alter table "public"."employee_team_members" drop column "max_load" cascade;

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."employee_teams" add column "max_load" numeric
-- not null default '10000';

View File

@@ -1,2 +0,0 @@
alter table "public"."employee_teams" add column "max_load" numeric
not null default '10000';