Added shift clock framework + login on tech console BOD-97 BOD-188

This commit is contained in:
Patrick Fic
2020-07-16 10:17:23 -07:00
parent bf74d9a042
commit 6a8b59c7e6
67 changed files with 1791 additions and 217 deletions

View File

@@ -5,7 +5,10 @@ import { DELETE_TIME_TICKET } from "../../graphql/timetickets.queries";
import { useTranslation } from "react-i18next";
import { useMutation } from "@apollo/react-hooks";
export default function TechJobClockoutDelete({ timeTicketId }) {
export default function TechJobClockoutDelete({
timeTicketId,
completedCallback,
}) {
const [deleteTimeTicket] = useMutation(DELETE_TIME_TICKET);
const { t } = useTranslation();
const handleDelete = async () => {
@@ -25,6 +28,7 @@ export default function TechJobClockoutDelete({ timeTicketId }) {
message: t("timetickets.successes.deleted"),
});
}
if (completedCallback) completedCallback();
};
return (
@@ -32,8 +36,7 @@ export default function TechJobClockoutDelete({ timeTicketId }) {
title={t("timetickets.labels.deleteconfirm")}
okButtonProps={{ type: "danger" }}
okText={t("general.actions.delete")}
onConfirm={handleDelete}
>
onConfirm={handleDelete}>
<DeleteFilled style={{ margin: "1rem", color: "red" }} />
</Popconfirm>
);