machinary office implement

This commit is contained in:
2023-07-16 11:00:57 +03:30
parent c4603b9d7c
commit 390bd2fd7c
7 changed files with 67 additions and 44 deletions

View File

@@ -1,3 +1,4 @@
import { REJECT_MACHINARY_OFFICE } from "@/core/data/apiRoutes";
import {
Dialog,
DialogTitle,
@@ -8,23 +9,24 @@ import {
} from "@mui/material";
import { useTranslations } from "next-intl";
const RejectForm = ({ open, handleClose, handleDelete, rowId, deleteData }) => {
const RejectForm = ({ open, handleClose, handleDelete, rowId, rejectData }) => {
const t = useTranslations();
const handleDeleteExpert = () => {
const handleRejectRequest = () => {
handleDelete();
rejectData(REJECT_MACHINARY_OFFICE, rowId);
};
return (
<Dialog open={open} onClose={handleClose}>
<DialogTitle>{t("delete-dialog.confirm")}</DialogTitle>
<DialogTitle>{t("RejectDialog.reject")}</DialogTitle>
<DialogContent>
<DialogContentText>{t("delete-dialog.context")}</DialogContentText>
<DialogContentText>{t("RejectDialog.context")}</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={handleDeleteExpert} color="primary">
{t("delete-dialog.button-delete")}
<Button onClick={handleRejectRequest} color="primary">
{t("RejectDialog.button-reject")}
</Button>
<Button onClick={handleClose} color="secondary" autoFocus>
{t("delete-dialog.button-cancel")}
{t("RejectDialog.button-cancel")}
</Button>
</DialogActions>
</Dialog>