add deleteviolations
This commit is contained in:
@@ -8,7 +8,7 @@ const DeleteContent = ({ rowId, mutate, setOpenDeleteDialog }) => {
|
||||
const requestServer = useRequest({ notificationSuccess: true });
|
||||
const handleClick = () => {
|
||||
setSubmitting(true);
|
||||
requestServer(`${DELETE_VIOLATION}/${rowId}`, "post", {
|
||||
requestServer(`${DELETE_VIOLATION}/${rowId}`, "delete", {
|
||||
hasSidebarUpdate: true,
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
@@ -8,7 +8,7 @@ const RowActions = ({ row, mutate }) => {
|
||||
<>
|
||||
{!row.original.mileage && <EditViolation row={row} mutate={mutate} rowId={row.getValue("id")} />}
|
||||
{/*{canEdit && <CreateWithoutProcess row={row} mutate={mutate} />}*/}
|
||||
<DeleteViolation />
|
||||
<DeleteViolation rowId={row.getValue("id")} mutate={mutate} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user