30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
import { Dialog, DialogTitle, IconButton, Tooltip } from "@mui/material";
|
|
import { useState } from "react";
|
|
import ConfirmContent from "./ConfirmContent";
|
|
import DoneIcon from "@mui/icons-material/Done";
|
|
const ConfirmForm = ({ rowId, mutate }) => {
|
|
const [openConfirmDialog, setOpenConfirmDialog] = useState(false);
|
|
return (
|
|
<>
|
|
<Tooltip title="تایید اقدام">
|
|
<IconButton color="primary" onClick={() => setOpenConfirmDialog(true)}>
|
|
<DoneIcon />
|
|
</IconButton>
|
|
</Tooltip>
|
|
<Dialog
|
|
fullWidth
|
|
open={openConfirmDialog}
|
|
PaperProps={{
|
|
sx: {
|
|
boxShadow: "rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px",
|
|
},
|
|
}}
|
|
>
|
|
<DialogTitle>تایید اقدام</DialogTitle>
|
|
<ConfirmContent mutate={mutate} rowId={rowId} setOpenConfirmDialog={setOpenConfirmDialog} />
|
|
</Dialog>
|
|
</>
|
|
);
|
|
};
|
|
export default ConfirmForm;
|