Files
bodyshop/client/src/graphql/available-jobs.queries.js

82 lines
1.6 KiB
JavaScript

import { gql } from "apollo-boost";
export const QUERY_AVAILABLE_NEW_JOBS = gql`
query QUERY_AVAILABLE_NEW_JOBS {
available_jobs(
where: { issupplement: { _eq: false } }
order_by: { updated_at: desc }
) {
cieca_id
clm_amt
clm_no
created_at
id
issupplement
ownr_name
source_system
supplement_number
updated_at
uploaded_by
vehicle_info
}
}
`;
export const QUERY_AVAILABLE_SUPPLEMENT_JOBS = gql`
query QUERY_AVAILABLE_SUPPLEMENT_JOBS {
available_jobs(
where: { issupplement: { _eq: true } }
order_by: { updated_at: desc }
) {
cieca_id
clm_amt
clm_no
created_at
id
issupplement
ownr_name
source_system
supplement_number
updated_at
uploaded_by
vehicle_info
job {
ro_number
}
}
}
`;
export const DELETE_AVAILABLE_JOB = gql`
mutation DELETE_AVAILABLE_JOB($id: uuid) {
delete_available_jobs(where: { id: { _eq: $id } }) {
affected_rows
}
}
`;
export const DELETE_ALL_AVAILABLE_NEW_JOBS = gql`
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
delete_available_jobs(where: { issupplement: { _eq: false } }) {
affected_rows
}
}
`;
export const DELETE_ALL_AVAILABLE_SUPPLEMENT_JOBS = gql`
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
delete_available_jobs(where: { issupplement: { _eq: true } }) {
affected_rows
}
}
`;
export const QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK = gql`
query QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK($id: uuid!) {
available_jobs_by_pk(id: $id) {
id
est_data
}
}
`;