Fixed joblines query sorting. Added in additional fields. Added region to bodyshop.

This commit is contained in:
Patrick Fic
2020-01-30 17:18:36 -08:00
parent f7e050da58
commit 24fc50826c
22 changed files with 628 additions and 27 deletions

View File

@@ -26,6 +26,7 @@ const errorLink = onError(
//User access token has expired
//props.history.push("/network-error");
console.log("We need a new token!");
console.log("Old Token", window.localStorage.getItem("token"));
// Let's refresh token through async request
auth.currentUser.getIdToken(true).then(token => {
@@ -39,16 +40,18 @@ const errorLink = onError(
}
}));
return new Observable(observer => {
const subscriber = {
next: observer.next.bind(observer),
error: observer.error.bind(observer),
complete: observer.complete.bind(observer)
};
console.log("About to resend the request.");
// Retry last failed request
forward(operation).subscribe(subscriber);
});
return forward(operation);
// return new Observable(observer => {
// const subscriber = {
// next: observer.next.bind(observer),
// error: observer.error.bind(observer),
// complete: observer.complete.bind(observer)
// };
// console.log("About to resend the request.");
// // Retry last failed request
// forward(operation).subscribe(subscriber);
// });
}
});

View File

@@ -2,10 +2,22 @@ import { gql } from "apollo-boost";
export const GET_JOB_LINES_BY_PK = gql`
query GET_JOB_LINES_BY_PK($id: uuid!) {
joblines(where: { jobid: { _eq: $id } }) {
joblines(where: { jobid: { _eq: $id } }, order_by: { unq_seq: asc }) {
id
unq_seq
line_ind
line_desc
part_type
oem_partno
db_price
act_price
part_qty
mod_lbr_ty
db_hrs
mod_lb_hrs
lbr_op
lbr_amt
op_code_desc
}
}
`;

View File

@@ -211,6 +211,7 @@ export const GET_JOB_BY_PK = gql`
mod_lb_hrs
lbr_op
lbr_amt
op_code_desc
}
}
}