IO-1469 Add keep schedule details to job detail reschedule.
This commit is contained in:
@@ -101,6 +101,7 @@ export function JobsDetailHeaderActions({
|
|||||||
context: {
|
context: {
|
||||||
jobId: job.id,
|
jobId: job.id,
|
||||||
job: job,
|
job: job,
|
||||||
|
alt_transport: job.alt_transport,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -63,6 +63,20 @@ export function ScheduleJobModalContainer({
|
|||||||
skip: !visible || !!!jobId,
|
skip: !visible || !!!jobId,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (
|
||||||
|
existingAppointments.data &&
|
||||||
|
existingAppointments.data.appointments.length > 0 &&
|
||||||
|
!existingAppointments.data.appointments[0].canceled
|
||||||
|
) {
|
||||||
|
form.setFieldsValue({
|
||||||
|
color: existingAppointments.data.appointments[0].color,
|
||||||
|
|
||||||
|
note: existingAppointments.data.appointments[0].note,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [existingAppointments.data, form]);
|
||||||
|
|
||||||
const handleFinish = async (values) => {
|
const handleFinish = async (values) => {
|
||||||
logImEXEvent("schedule_new_appointment");
|
logImEXEvent("schedule_new_appointment");
|
||||||
|
|
||||||
|
|||||||
@@ -196,10 +196,11 @@ export const CANCEL_APPOINTMENT_BY_ID = gql`
|
|||||||
|
|
||||||
export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
||||||
query QUERY_APPOINTMENTS_BY_JOBID($jobid: uuid!) {
|
query QUERY_APPOINTMENTS_BY_JOBID($jobid: uuid!) {
|
||||||
appointments(where: { jobid: { _eq: $jobid } }) {
|
appointments(where: { jobid: { _eq: $jobid } }, order_by: { start: desc }) {
|
||||||
start
|
start
|
||||||
id
|
id
|
||||||
end
|
end
|
||||||
|
color
|
||||||
isintake
|
isintake
|
||||||
arrived
|
arrived
|
||||||
canceled
|
canceled
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Elements } from "@stripe/react-stripe-js";
|
import { Elements } from "@stripe/react-stripe-js";
|
||||||
import { loadStripe } from "@stripe/stripe-js";
|
//import { loadStripe } from "@stripe/stripe-js";
|
||||||
import { BackTop, Layout } from "antd";
|
import { BackTop, Layout } from "antd";
|
||||||
import preval from "preval.macro";
|
import preval from "preval.macro";
|
||||||
import React, { lazy, Suspense, useEffect } from "react";
|
import React, { lazy, Suspense, useEffect } from "react";
|
||||||
@@ -20,12 +20,12 @@ import PartnerPingComponent from "../../components/partner-ping/partner-ping.com
|
|||||||
import PrintCenterModalContainer from "../../components/print-center-modal/print-center-modal.container";
|
import PrintCenterModalContainer from "../../components/print-center-modal/print-center-modal.container";
|
||||||
import ShopSubStatusComponent from "../../components/shop-sub-status/shop-sub-status.component";
|
import ShopSubStatusComponent from "../../components/shop-sub-status/shop-sub-status.component";
|
||||||
import TestComponent from "../../components/_test/test.component";
|
import TestComponent from "../../components/_test/test.component";
|
||||||
import { QUERY_STRIPE_ID } from "../../graphql/bodyshop.queries";
|
//import { QUERY_STRIPE_ID } from "../../graphql/bodyshop.queries";
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectInstanceConflict,
|
selectInstanceConflict,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
import client from "../../utils/GraphQLClient";
|
//import client from "../../utils/GraphQLClient";
|
||||||
import "./manage.page.styles.scss";
|
import "./manage.page.styles.scss";
|
||||||
|
|
||||||
const ManageRootPage = lazy(() =>
|
const ManageRootPage = lazy(() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user