CLEANUP Schedule modal now using redux. Deleted manual schedule modal. To be incorporated into generic.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { notification } from "antd";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useMutation, useQuery } from "@apollo/react-hooks";
|
||||
import { notification } from "antd";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import SpinComponent from "../../components/loading-spinner/loading-spinner.component";
|
||||
@@ -8,11 +8,9 @@ import { CONVERT_JOB_TO_RO, GET_JOB_BY_PK, UPDATE_JOB, UPDATE_JOB_STATUS } from
|
||||
import JobsDetailPage from "./jobs-detail.page.component";
|
||||
|
||||
function JobsDetailPageContainer({ match }) {
|
||||
const { jobId, tab } = match.params;
|
||||
const { jobId } = match.params;
|
||||
const { t } = useTranslation();
|
||||
|
||||
const scheduleModalState = useState(false);
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(GET_JOB_BY_PK, {
|
||||
variables: { id: jobId },
|
||||
fetchPolicy: "network-only"
|
||||
@@ -55,9 +53,7 @@ function JobsDetailPageContainer({ match }) {
|
||||
mutationConvertJob={mutationConvertJob}
|
||||
mutationUpdateJob={mutationUpdateJob}
|
||||
refetch={refetch}
|
||||
scheduleModalState={scheduleModalState}
|
||||
updateJobStatus={updateJobStatus}
|
||||
tab={tab}
|
||||
/>
|
||||
) : (
|
||||
<AlertComponent message={t("jobs.errors.noaccess")} type="error" />
|
||||
|
||||
Reference in New Issue
Block a user