Compare commits

..

2 Commits

Author SHA1 Message Date
Allan Carr
8ebf7baa71 IO-2481 Parts Queue Query
prettyier
2023-11-27 10:16:10 -08:00
Allan Carr
742d2b5ff2 IO-2481 Parts Queue Query
Adjust query to only show converted Jobs
2023-11-27 10:13:43 -08:00
4 changed files with 3 additions and 6 deletions

View File

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

View File

@@ -60,7 +60,7 @@ export const QUERY_PARTS_QUEUE = gql`
}
}
jobs(
where: { _and: [{ status: { _in: $statuses } }] }
where: { _and: [{ status: { _in: $statuses }, converted: { _eq: true } }] }
offset: $offset
limit: $limit
order_by: $order

View File

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

View File

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