recive new data and remove conflicts
This commit is contained in:
@@ -21,16 +21,16 @@ const ConfirmForm = ({
|
||||
};
|
||||
return (
|
||||
<Dialog open={open} onClose={handleClose}>
|
||||
<DialogTitle>{t("delete-dialog.confirm")}</DialogTitle>
|
||||
<DialogTitle>{t("ConfirmDialog.confirm")}</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>{t("delete-dialog.context")}</DialogContentText>
|
||||
<DialogContentText>{t("ConfirmDialog.context")}</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={handleDeleteExpert} color="primary">
|
||||
{t("delete-dialog.button-delete")}
|
||||
{t("ConfirmDialog.button-confirm")}
|
||||
</Button>
|
||||
<Button onClick={handleClose} color="secondary" autoFocus>
|
||||
{t("delete-dialog.button-cancel")}
|
||||
{t("ConfirmDialog.button-cancel")}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
@@ -10,21 +10,22 @@ import { useTranslations } from "next-intl";
|
||||
|
||||
const RejectForm = ({ open, handleClose, handleDelete, rowId, deleteData }) => {
|
||||
const t = useTranslations();
|
||||
const handleDeleteExpert = () => {
|
||||
const handleRejectRequest = () => {
|
||||
handleDelete();
|
||||
};
|
||||
console.log(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>
|
||||
|
||||
@@ -9,36 +9,40 @@ import RejectForm from "./Form/RejectForm";
|
||||
// import DeleteForm from "./Form/DeleteForm";
|
||||
|
||||
const TableRowActions = ({ row }) => {
|
||||
// const {
|
||||
// openDeleteDialog,
|
||||
// handleOpenDeleteDialog,
|
||||
// handleCloseDeleteDialog,
|
||||
// handleDeleteDialog,
|
||||
// rowId,
|
||||
// deleteData,
|
||||
// } = useContext(DataTableContext);
|
||||
const {
|
||||
openConfirmDialog,
|
||||
openRejectDialog,
|
||||
handleOpenConfirmDialog,
|
||||
handleOpenRejectDialog,
|
||||
handleCloseConfirmDialog,
|
||||
handleCloseRejectDialog,
|
||||
handleConfirmDialog,
|
||||
handleRejectDialog,
|
||||
rowId,
|
||||
deleteData,
|
||||
} = useContext(DataTableContext);
|
||||
return (
|
||||
<Box sx={{ display: "flex", flexWrap: "nowrap", gap: "8px" }}>
|
||||
<IconButton color="primary" onClick={() => handleOpenDeleteDialog(row)}>
|
||||
<IconButton color="primary" onClick={() => handleOpenConfirmDialog(row)}>
|
||||
<ThumbUpAltIcon />
|
||||
</IconButton>
|
||||
{/* <ConfirmForm
|
||||
<ConfirmForm
|
||||
rowId={rowId}
|
||||
open={openDeleteDialog}
|
||||
handleClose={handleCloseDeleteDialog}
|
||||
handleDelete={handleDeleteDialog}
|
||||
open={openConfirmDialog}
|
||||
handleClose={handleCloseConfirmDialog}
|
||||
handleDelete={handleConfirmDialog}
|
||||
deleteData={deleteData}
|
||||
/> */}
|
||||
<IconButton color="primary" onClick={() => handleOpenDeleteDialog(row)}>
|
||||
/>
|
||||
<IconButton color="primary" onClick={() => handleOpenRejectDialog(row)}>
|
||||
<ThumbDownIcon />
|
||||
</IconButton>
|
||||
{/* <RejectForm
|
||||
<RejectForm
|
||||
rowId={rowId}
|
||||
open={openDeleteDialog}
|
||||
handleClose={handleCloseDeleteDialog}
|
||||
handleDelete={handleDeleteDialog}
|
||||
open={openRejectDialog}
|
||||
handleClose={handleCloseRejectDialog}
|
||||
handleDelete={handleRejectDialog}
|
||||
deleteData={deleteData}
|
||||
/> */}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user