mirror of
https://github.com/Awesome-Technologies/synapse-admin.git
synced 2025-07-27 07:54:24 +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,
|
TopToolbar,
|
||||||
NumberField,
|
NumberField,
|
||||||
useListContext,
|
useListContext,
|
||||||
|
Toolbar,
|
||||||
|
SaveButton,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
@ -118,6 +120,12 @@ const UserEditActions = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const UserEditToolbar = props => (
|
||||||
|
<Toolbar {...props}>
|
||||||
|
<SaveButton />
|
||||||
|
</Toolbar>
|
||||||
|
);
|
||||||
|
|
||||||
const UserTitle = () => {
|
const UserTitle = () => {
|
||||||
const record = useRecordContext();
|
const record = useRecordContext();
|
||||||
const translate = useTranslate();
|
const translate = useTranslate();
|
||||||
@ -135,7 +143,7 @@ export const UserEdit = (props: EditProps) => {
|
|||||||
const translate = useTranslate();
|
const translate = useTranslate();
|
||||||
return (
|
return (
|
||||||
<Edit {...props} title={<UserTitle />} actions={<UserEditActions />}>
|
<Edit {...props} title={<UserTitle />} actions={<UserEditActions />}>
|
||||||
<TabbedForm>
|
<TabbedForm toolbar={<UserEditToolbar />}>
|
||||||
<FormTab label={translate("resources.users.name", { smart_count: 1 })} icon={<PersonPinIcon />}>
|
<FormTab label={translate("resources.users.name", { smart_count: 1 })} icon={<PersonPinIcon />}>
|
||||||
<AvatarField source="avatar_src" sortable={false} sx={{ height: "120px", width: "120px", float: "right" }} />
|
<AvatarField source="avatar_src" sortable={false} sx={{ height: "120px", width: "120px", float: "right" }} />
|
||||||
<TextInput source="id" disabled />
|
<TextInput source="id" disabled />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user