Fixed joblines query sorting. Added in additional fields. Added region to bodyshop.
This commit is contained in:
@@ -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);
|
||||
// });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -211,6 +211,7 @@ export const GET_JOB_BY_PK = gql`
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user