From ef5e3543da6b05a60b44f80002753d1c2ce9d379 Mon Sep 17 00:00:00 2001 From: SteffoSpieler Date: Wed, 7 Feb 2024 16:22:02 +0100 Subject: [PATCH] feat: Allow event reports to get deleted --- src/components/EventReports.jsx | 20 +++++++++++++++++++- src/i18n/de.js | 7 +++++++ src/i18n/en.js | 7 +++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/components/EventReports.jsx b/src/components/EventReports.jsx index ffece71..0f0810d 100644 --- a/src/components/EventReports.jsx +++ b/src/components/EventReports.jsx @@ -2,6 +2,7 @@ import React from "react"; import { Datagrid, DateField, + DeleteButton, List, NumberField, Pagination, @@ -10,6 +11,8 @@ import { Tab, TabbedShowLayout, TextField, + TopToolbar, + useRecordContext, useTranslate, } from "react-admin"; import PageviewIcon from "@mui/icons-material/Pageview"; @@ -32,7 +35,7 @@ const ReportPagination = () => ( export const ReportShow = props => { const translate = useTranslate(); return ( - + }> { ); }; +const ReportShowActions = () => { + const record = useRecordContext(); + + return ( + + + + ); +}; + export const ReportList = props => (