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