Simplify available jobs page IO-454

This commit is contained in:
Patrick Fic
2021-02-01 14:14:54 -08:00
parent 0d484677e0
commit 7e4faec0ff
14 changed files with 441 additions and 757 deletions

View File

@@ -1,5 +1,29 @@
import gql from "graphql-tag";
export const QUERY_AVAILABLE_JOBS = gql`
query QUERY_AVAILABLE_JOBS {
available_jobs(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
ins_co_nm
vehicle_info
job {
id
ro_number
}
}
}
`;
export const QUERY_AVAILABLE_NEW_JOBS = gql`
query QUERY_AVAILABLE_NEW_JOBS {
available_jobs(
@@ -58,6 +82,14 @@ export const DELETE_AVAILABLE_JOB = gql`
}
`;
export const DELETE_ALL_AVAILABLE_JOBS = gql`
mutation DELETE_ALL_AVAILABLE_JOBS {
delete_available_jobs(where: {}) {
affected_rows
}
}
`;
export const DELETE_ALL_AVAILABLE_NEW_JOBS = gql`
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
delete_available_jobs(where: { issupplement: { _eq: false } }) {