From 425c210cfc632260468e7ec21db2334e470afe34 Mon Sep 17 00:00:00 2001
From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com>
Date: Thu, 11 Feb 2021 20:24:17 +0100
Subject: [PATCH] Add delete button to room detail page (#97)
* Add delete button to room detail page
* Add confirmation dialog for room deletion
---
src/components/rooms.js | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/components/rooms.js b/src/components/rooms.js
index 041f0a6..efef5cb 100644
--- a/src/components/rooms.js
+++ b/src/components/rooms.js
@@ -4,6 +4,7 @@ import {
BooleanField,
BulkDeleteWithConfirmButton,
Datagrid,
+ DeleteButton,
Filter,
List,
Pagination,
@@ -15,6 +16,7 @@ import {
Tab,
TabbedShowLayout,
TextField,
+ TopToolbar,
useTranslate,
} from "react-admin";
import get from "lodash/get";
@@ -70,10 +72,26 @@ const RoomTitle = ({ record }) => {
);
};
+const RoomShowActions = ({ basePath, data, resource }) => {
+ const translate = useTranslate();
+ return (
+
+
+
+ );
+};
+
export const RoomShow = props => {
const translate = useTranslate();
return (
- }>
+ } title={}>
}>