add deleteviolations

This commit is contained in:
2026-07-14 14:55:30 +03:30
parent f78a2c3cbb
commit 457bef64c4
2 changed files with 2 additions and 2 deletions

View File

@@ -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(() => {

View File

@@ -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} />
</> </>
); );
}; };