Added shift clock framework + login on tech console BOD-97 BOD-188
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user