Reformat all project files to use the prettier config file.

This commit is contained in:
Patrick Fic
2024-03-27 15:35:07 -07:00
parent b161530381
commit e1df64d592
873 changed files with 111387 additions and 125473 deletions

View File

@@ -1,47 +1,44 @@
import React from "react";
import {notification, Popconfirm} from "antd";
import {DeleteFilled} from "@ant-design/icons";
import {DELETE_TIME_TICKET} from "../../graphql/timetickets.queries";
import {useTranslation} from "react-i18next";
import {useMutation} from "@apollo/client";
import {logImEXEvent} from "../../firebase/firebase.utils";
import { notification, Popconfirm } from "antd";
import { DeleteFilled } from "@ant-design/icons";
import { DELETE_TIME_TICKET } from "../../graphql/timetickets.queries";
import { useTranslation } from "react-i18next";
import { useMutation } from "@apollo/client";
import { logImEXEvent } from "../../firebase/firebase.utils";
export default function TechJobClockoutDelete({
timeTicketId,
completedCallback,
}) {
const [deleteTimeTicket] = useMutation(DELETE_TIME_TICKET);
const {t} = useTranslation();
const handleDelete = async () => {
logImEXEvent("tech_clock_delete");
export default function TechJobClockoutDelete({ timeTicketId, completedCallback }) {
const [deleteTimeTicket] = useMutation(DELETE_TIME_TICKET);
const { t } = useTranslation();
const handleDelete = async () => {
logImEXEvent("tech_clock_delete");
const result = await deleteTimeTicket({
variables: {id: timeTicketId},
refetchQueries: ["QUERY_ACTIVE_TIME_TICKETS"],
});
const result = await deleteTimeTicket({
variables: { id: timeTicketId },
refetchQueries: ["QUERY_ACTIVE_TIME_TICKETS"]
});
if (!!result.errors) {
notification["error"]({
message: t("timetickets.errors.deleting", {
message: JSON.stringify(result.errors),
}),
});
} else {
notification["success"]({
message: t("timetickets.successes.deleted"),
});
}
if (completedCallback) completedCallback();
};
if (!!result.errors) {
notification["error"]({
message: t("timetickets.errors.deleting", {
message: JSON.stringify(result.errors)
})
});
} else {
notification["success"]({
message: t("timetickets.successes.deleted")
});
}
if (completedCallback) completedCallback();
};
return (
<Popconfirm
title={t("timetickets.labels.deleteconfirm")}
okButtonProps={{type: "danger"}}
okText={t("general.actions.delete")}
onConfirm={handleDelete}
>
<DeleteFilled style={{margin: "1rem", color: "red"}}/>
</Popconfirm>
);
return (
<Popconfirm
title={t("timetickets.labels.deleteconfirm")}
okButtonProps={{ type: "danger" }}
okText={t("general.actions.delete")}
onConfirm={handleDelete}
>
<DeleteFilled style={{ margin: "1rem", color: "red" }} />
</Popconfirm>
);
}