Added refresh checking logic for tokens.
This commit is contained in:
@@ -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={[
|
||||
|
||||
Reference in New Issue
Block a user