Mark job as open upon cancelled appointment IO-678
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { DownOutlined, UpOutlined } from "@ant-design/icons";
|
||||
import React from "react";
|
||||
import { UpOutlined, DownOutlined } from "@ant-design/icons";
|
||||
export default function FormListMoveArrows({ move, index, total }) {
|
||||
const upDisabled = index === 0;
|
||||
const downDisabled = index === total - 1;
|
||||
|
||||
console.log(index);
|
||||
const handleUp = () => {
|
||||
move(index, index - 1);
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ export function ScheduleCalendarWrapperComponent({
|
||||
}
|
||||
eventPropGetter={handleEventPropStyles}
|
||||
components={{
|
||||
event: (e) => Event({ event: e.event, refetch: refetch }),
|
||||
event: (e) => Event({ bodyshop: bodyshop, event: e.event, refetch: refetch }),
|
||||
header: HeaderComponent,
|
||||
}}
|
||||
{...otherProps}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from "react";
|
||||
import { useMutation } from "@apollo/react-hooks";
|
||||
import { notification } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { CANCEL_APPOINTMENT_BY_ID } from "../../graphql/appointments.queries";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import ScheduleEventComponent from "./schedule-event.component";
|
||||
import { notification } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
export default function ScheduleEventContainer({ event, refetch }) {
|
||||
export default function ScheduleEventContainer({ bodyshop, event, refetch }) {
|
||||
const { t } = useTranslation();
|
||||
const [cancelAppointment] = useMutation(CANCEL_APPOINTMENT_BY_ID);
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
@@ -33,9 +33,11 @@ export default function ScheduleEventContainer({ event, refetch }) {
|
||||
const jobUpdate = await updateJob({
|
||||
variables: {
|
||||
jobId: event.job.id,
|
||||
|
||||
job: {
|
||||
date_scheduled: null,
|
||||
scheduled_in: null,
|
||||
status: bodyshop.md_ro_statuses.default_imported,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user