From d5e750c1f0cb109e74d4b35d3f535d31c2f4d87b Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Wed, 29 Jan 2025 15:12:20 -0800 Subject: [PATCH 1/3] IO-3114 Quick Intake Data Signed-off-by: Allan Carr --- .../jobs-detail-header-actions.component.jsx | 15 +++-- ...etail-header-actions.toggle-production.jsx | 57 +++++++++++++------ client/src/graphql/jobs.queries.js | 13 +++++ 3 files changed, 63 insertions(+), 22 deletions(-) diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx index 89e0efa43..43d516748 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx @@ -4,11 +4,12 @@ import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { Button, Card, Dropdown, Form, Input, Modal, notification, Popconfirm, Popover, Select, Space } from "antd"; import axios from "axios"; import parsePhoneNumber from "libphonenumber-js"; -import React, { useContext, useMemo, useState } from "react"; +import { useContext, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { Link, useNavigate } from "react-router-dom"; import { createStructuredSelector } from "reselect"; +import SocketContext from "../../contexts/SocketIO/socketContext.jsx"; import { auth, logImEXEvent } from "../../firebase/firebase.utils"; import { CANCEL_APPOINTMENTS_BY_JOB_ID, INSERT_MANUAL_APPT } from "../../graphql/appointments.queries"; import { GET_CURRENT_QUESTIONSET_ID, INSERT_CSI } from "../../graphql/csi.queries"; @@ -30,7 +31,6 @@ import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component"; import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util"; import DuplicateJob from "./jobs-detail-header-actions.duplicate.util"; import JobsDetailHeaderActionsToggleProduction from "./jobs-detail-header-actions.toggle-production"; -import SocketContext from "../../contexts/SocketIO/socketContext.jsx"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -120,6 +120,7 @@ export function JobsDetailHeaderActions({ const history = useNavigate(); const [form] = Form.useForm(); const [loading, setLoading] = useState(false); + const [dropdownOpen, setDropdownOpen] = useState(false); const [isCancelScheduleModalVisible, setIsCancelScheduleModalVisible] = useState(false); const [insertAppointment] = useMutation(INSERT_MANUAL_APPT); const [deleteJob] = useMutation(DELETE_JOB); @@ -716,7 +717,13 @@ export function JobsDetailHeaderActions({ key: "toggleproduction", id: "job-actions-toggleproduction", disabled: !job.converted || jobRO, - label: + label: ( + setDropdownOpen(false)} + /> + ) }, { @@ -1146,7 +1153,7 @@ export function JobsDetailHeaderActions({ - +