Minor release fixes.
This commit is contained in:
@@ -1,5 +1,15 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, Card, Form, Input, Menu, Popover, Select, Space } from "antd";
|
import {
|
||||||
|
Button,
|
||||||
|
Card,
|
||||||
|
Form,
|
||||||
|
Input,
|
||||||
|
Menu,
|
||||||
|
notification,
|
||||||
|
Popover,
|
||||||
|
Select,
|
||||||
|
Space,
|
||||||
|
} from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -40,6 +50,10 @@ export function JobsDetailHeaderAddEvent({ bodyshop, jobid, ...props }) {
|
|||||||
},
|
},
|
||||||
refetchQueries: ["QUERY_ALL_ACTIVE_APPOINTMENTS"],
|
refetchQueries: ["QUERY_ALL_ACTIVE_APPOINTMENTS"],
|
||||||
});
|
});
|
||||||
|
notification.open({
|
||||||
|
type: "success",
|
||||||
|
message: t("appointments.successes.created"),
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -40,7 +40,10 @@ export function ScheduleCalendarHeaderComponent({
|
|||||||
if (!events) return [];
|
if (!events) return [];
|
||||||
return _.groupBy(
|
return _.groupBy(
|
||||||
events.filter(
|
events.filter(
|
||||||
(e) => !e.vacation && moment(date).isSame(moment(e.start), "day")
|
(e) =>
|
||||||
|
!e.vacation &&
|
||||||
|
e.isintake &&
|
||||||
|
moment(date).isSame(moment(e.start), "day")
|
||||||
),
|
),
|
||||||
"job.alt_transport"
|
"job.alt_transport"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -180,15 +180,25 @@ async function getImage(imageUrl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function logEmail(req, email) {
|
async function logEmail(req, email) {
|
||||||
await client.request(queries.INSERT_EMAIL_AUDIT, {
|
try {
|
||||||
email: {
|
await client.request(queries.INSERT_EMAIL_AUDIT, {
|
||||||
to: email.to,
|
email: {
|
||||||
cc: email.cc,
|
to: email.to,
|
||||||
subject: email.subject,
|
cc: email.cc,
|
||||||
bodyshopid: req.body.bodyshopid,
|
subject: email.subject,
|
||||||
useremail: req.user.email,
|
bodyshopid: req.body.bodyshopid,
|
||||||
contents: req.body.html,
|
useremail: req.user.email,
|
||||||
jobid: req.body.jobid,
|
contents: req.body.html,
|
||||||
},
|
jobid: req.body.jobid,
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
logger.log("email-log-error", "error", req.user.email, null, {
|
||||||
|
from: `${req.body.from.name} <${req.body.from.address}>`,
|
||||||
|
to: req.body.to,
|
||||||
|
cc: req.body.cc,
|
||||||
|
subject: req.body.subject,
|
||||||
|
// info,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user