47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
import ThumbUpAltIcon from "@mui/icons-material/ThumbUpAlt";
|
|
import ThumbDownIcon from "@mui/icons-material/ThumbDown";
|
|
import { Box, IconButton } from "@mui/material";
|
|
import { useContext } from "react";
|
|
import { DataTableContext } from "@/lib/app/contexts/DataTableContext";
|
|
import ConfirmForm from "./Form/ConfirmForm";
|
|
import RejectForm from "./Form/RejectForm";
|
|
|
|
// import DeleteForm from "./Form/DeleteForm";
|
|
|
|
const TableRowActions = ({ row }) => {
|
|
// const {
|
|
// openDeleteDialog,
|
|
// handleOpenDeleteDialog,
|
|
// handleCloseDeleteDialog,
|
|
// handleDeleteDialog,
|
|
// rowId,
|
|
// deleteData,
|
|
// } = useContext(DataTableContext);
|
|
return (
|
|
<Box sx={{ display: "flex", flexWrap: "nowrap", gap: "8px" }}>
|
|
<IconButton color="primary" onClick={() => handleOpenDeleteDialog(row)}>
|
|
<ThumbUpAltIcon />
|
|
</IconButton>
|
|
{/* <ConfirmForm
|
|
rowId={rowId}
|
|
open={openDeleteDialog}
|
|
handleClose={handleCloseDeleteDialog}
|
|
handleDelete={handleDeleteDialog}
|
|
deleteData={deleteData}
|
|
/> */}
|
|
<IconButton color="primary" onClick={() => handleOpenDeleteDialog(row)}>
|
|
<ThumbDownIcon />
|
|
</IconButton>
|
|
{/* <RejectForm
|
|
rowId={rowId}
|
|
open={openDeleteDialog}
|
|
handleClose={handleCloseDeleteDialog}
|
|
handleDelete={handleDeleteDialog}
|
|
deleteData={deleteData}
|
|
/> */}
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default TableRowActions;
|