Baseline adding a job to the schedule.

This commit is contained in:
Patrick Fic
2020-02-05 15:08:47 -08:00
parent 0714eb21a5
commit 1a14fb8da6
12 changed files with 149 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import { Form, notification } from "antd";
import React, { useEffect } from "react";
import React, { useEffect, useState } from "react";
import { useMutation, useQuery } from "react-apollo";
import { useTranslation } from "react-i18next";
import AlertComponent from "../../components/alert/alert.component";
@@ -16,6 +16,8 @@ function JobsDetailPageContainer({ match, form }) {
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"
@@ -71,6 +73,7 @@ function JobsDetailPageContainer({ match, form }) {
handleSubmit={handleSubmit}
getFieldDecorator={form.getFieldDecorator}
refetch={refetch}
scheduleModalState={scheduleModalState}
/>
</JobDetailFormContext.Provider>
) : (