Big progress!

This commit is contained in:
Dave Richer
2023-12-11 19:28:27 -05:00
parent ad79344709
commit b0d1a7b65e
77 changed files with 721 additions and 521 deletions

View File

@@ -3,7 +3,7 @@ import { Form, notification } from "antd";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useSearchParams, useNavigate } from "react-router-dom";
import { useLocation, useNavigate } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
import { INSERT_NEW_CONTRACT } from "../../graphql/cccontracts.queries";
@@ -30,13 +30,15 @@ export function ContractCreatePageContainer({
}) {
const [form] = Form.useForm();
const { t } = useTranslation();
const history = useNavigate();
const searchParams = useSearchParams();
const location = useLocation();
const [loading, setLoading] = useState(false);
const selectedCarState = useState(null);
const selectedJobState = useState(
(searchParams.get('state') && searchParams.get('state').jobId) || null
(location.state && location.state.jobId) || null
);
const [insertContract] = useMutation(INSERT_NEW_CONTRACT);
const [intakeJob] = useMutation(UPDATE_JOB);