feature/IO-3103-Ant5-Notifications

This commit is contained in:
Dave Richer
2025-01-21 17:20:46 -08:00
parent 0e218abbf4
commit 85d25862eb
161 changed files with 759 additions and 354 deletions

View File

@@ -1,6 +1,6 @@
import { AlertFilled } from "@ant-design/icons";
import { useMutation } from "@apollo/client";
import { Button, Divider, Dropdown, Form, Input, notification, Popover, Select, Space } from "antd";
import { Button, Divider, Dropdown, Form, Input, Popover, Select, Space } from "antd";
import parsePhoneNumber from "libphonenumber-js";
import queryString from "query-string";
import React, { useContext, useState } from "react";
@@ -25,6 +25,7 @@ import ScheduleManualEvent from "../schedule-manual-event/schedule-manual-event.
import ScheduleAtChange from "./job-at-change.component";
import ScheduleEventColor from "./schedule-event.color.component";
import ScheduleEventNote from "./schedule-event.note.component";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -51,6 +52,7 @@ export function ScheduleEventComponent({
const [updateAppointment] = useMutation(UPDATE_APPOINTMENT);
const [title, setTitle] = useState(event.title);
const { socket } = useContext(SocketContext);
const notification = useNotification();
const blockContent = (
<Space direction="vertical" wrap>
@@ -127,7 +129,9 @@ export function ScheduleEventComponent({
<DataLabel label={t("jobs.fields.ownr_ph2")}>
<ChatOpenButton phone={event.job && event.job.ownr_ph2} jobid={event.job.id} />
</DataLabel>
<DataLabel hideIfNull label={t("jobs.fields.loss_of_use")}>{(event.job && event.job.loss_of_use) || ""}</DataLabel>
<DataLabel hideIfNull label={t("jobs.fields.loss_of_use")}>
{(event.job && event.job.loss_of_use) || ""}
</DataLabel>
<DataLabel label={t("jobs.fields.alt_transport")}>
{(event.job && event.job.alt_transport) || ""}
<ScheduleAtChange job={event && event.job} />
@@ -181,7 +185,8 @@ export function ScheduleEventComponent({
subject: Template.subject
},
"e",
event.job && event.job.id
event.job && event.job.id,
notification
);
}
},