Added refresh checking logic for tokens.

This commit is contained in:
Patrick Fic
2020-01-02 09:13:55 -08:00
parent fa6a1b1eea
commit 8969108cc4
5 changed files with 63 additions and 24 deletions

View File

@@ -14,6 +14,7 @@ import {
import { UPDATE_JOB } from "../../graphql/jobs.queries";
import { useMutation } from "@apollo/react-hooks";
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
import { useTranslation } from "react-i18next";
const formItemLayout = {
labelCol: {
@@ -29,6 +30,7 @@ const formItemLayout = {
function JobTombstone({ job, ...otherProps }) {
const [jobContext, setJobContext] = useState(job);
const [mutationUpdateJob] = useMutation(UPDATE_JOB);
const { t } = useTranslation();
if (!job) {
return (
@@ -66,9 +68,10 @@ function JobTombstone({ job, ...otherProps }) {
title={"RO " + jobContext.ro_number ?? "0"}
subTitle={
jobContext.owner
? jobContext.owner?.first_name ??
+" " + jobContext.owner?.first_name
: "No owner"
? (jobContext.owner?.first_name ?? "") +
" " +
(jobContext.owner?.last_name ?? "")
: t("jobs.labels.no_owner")
}
tags={<Tag color='blue'>{jobContext?.job_status?.name}</Tag>}
extra={[