Added new fields for EMS file upload + renamed fields for coherenace. Another attempt at fixing invalid token forwarding. Fixed date time formatting.
This commit is contained in:
@@ -27,7 +27,6 @@ export default function JobDetailCardsInsuranceComponent({ loading, data }) {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
TODO:
|
||||
{t("jobs.labels.cards.appraiser")}
|
||||
{data?.est_ea ? (
|
||||
<a href={`mailto:${data.est_ea}`}>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { onError } from "apollo-link-error";
|
||||
//import { Observable } from "apollo-link";
|
||||
import { Observable } from "apollo-link";
|
||||
import { auth } from "../firebase/firebase.utils";
|
||||
//https://stackoverflow.com/questions/57163454/refreshing-a-token-with-apollo-client-firebase-auth
|
||||
|
||||
const errorLink = onError(
|
||||
({ graphQLErrors, networkError, operation, forward }) => {
|
||||
// console.log("graphQLErrors", graphQLErrors);
|
||||
@@ -37,8 +38,17 @@ const errorLink = onError(
|
||||
authorization: token ? `Bearer ${token}` : ""
|
||||
}
|
||||
}));
|
||||
console.log("Forwarding operation", operation);
|
||||
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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function JobsAvailablePageComponent({
|
||||
deleteJob={deleteJob}
|
||||
estDataLazyLoad={estDataLazyLoad}
|
||||
/>
|
||||
Available Supplements
|
||||
Available Supplements (//TODO: LOGIC HAS NOT YET BEEN COPIED FROM OTHER COMPONENT)
|
||||
<JobsAvailableSupplementContainer
|
||||
deleteJob={deleteJob}
|
||||
estDataLazyLoad={estDataLazyLoad}
|
||||
|
||||
@@ -6,5 +6,5 @@ export function DateFormatter(props) {
|
||||
}
|
||||
|
||||
export function DateTimeFormatter(props) {
|
||||
return <Moment format="MM/DD/YYYY @ HH:MM">{props.children || ""}</Moment>;
|
||||
return <Moment format="MM/DD/YYYY @ HH:mm">{props.children || ""}</Moment>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user