mirror of
https://github.com/Awesome-Technologies/synapse-admin.git
synced 2025-07-26 23:44:15 +02:00
Fix "Remove possibility to delete users"
Change-Id: If9980541f38208194f2912bbe7197b3e1403d5ac
This commit is contained in:
parent
4dc4aa2c8d
commit
3fcb6ca4dd
@ -37,6 +37,8 @@ import {
|
||||
TopToolbar,
|
||||
NumberField,
|
||||
useListContext,
|
||||
Toolbar,
|
||||
SaveButton,
|
||||
} from "react-admin";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
@ -118,6 +120,12 @@ const UserEditActions = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const UserEditToolbar = props => (
|
||||
<Toolbar {...props}>
|
||||
<SaveButton />
|
||||
</Toolbar>
|
||||
);
|
||||
|
||||
const UserTitle = () => {
|
||||
const record = useRecordContext();
|
||||
const translate = useTranslate();
|
||||
@ -135,7 +143,7 @@ export const UserEdit = (props: EditProps) => {
|
||||
const translate = useTranslate();
|
||||
return (
|
||||
<Edit {...props} title={<UserTitle />} actions={<UserEditActions />}>
|
||||
<TabbedForm>
|
||||
<TabbedForm toolbar={<UserEditToolbar />}>
|
||||
<FormTab label={translate("resources.users.name", { smart_count: 1 })} icon={<PersonPinIcon />}>
|
||||
<AvatarField source="avatar_src" sortable={false} sx={{ height: "120px", width: "120px", float: "right" }} />
|
||||
<TextInput source="id" disabled />
|
||||
|
Loading…
x
Reference in New Issue
Block a user