diff --git a/resources/scripts/api/admin/users/updateUser.ts b/resources/scripts/api/admin/users/updateUser.ts index 806a62618..449f7be15 100644 --- a/resources/scripts/api/admin/users/updateUser.ts +++ b/resources/scripts/api/admin/users/updateUser.ts @@ -2,6 +2,7 @@ import http from '@/api/http'; import { User, rawDataToUser } from '@/api/admin/users/getUsers'; export interface Values { + externalId: string; username: string; email: string; password: string; diff --git a/resources/scripts/components/admin/users/UserAboutContainer.tsx b/resources/scripts/components/admin/users/UserAboutContainer.tsx index 0449c9d46..ac186f4da 100644 --- a/resources/scripts/components/admin/users/UserAboutContainer.tsx +++ b/resources/scripts/components/admin/users/UserAboutContainer.tsx @@ -39,6 +39,7 @@ const UserAboutContainer = () => { { rootAdmin: user.rootAdmin, }} onSubmit={submit} - role={user?.relationships.role || null} + uuid={user.uuid} + role={user.relationships.role || null} >
) => void; + uuid?: string; role: Role | null; } -export default function UserForm ({ title, initialValues, children, onSubmit, role }: Params) { +export default function UserForm ({ title, initialValues, children, onSubmit, uuid, role }: Params) { const submit = (values: Values, helpers: FormikHelpers) => { onSubmit(values, helpers); }; if (!initialValues) { initialValues = { + externalId: '', username: '', email: '', password: '', @@ -68,45 +73,56 @@ export default function UserForm ({ title, initialValues, children, onSubmit, ro
-
-
- -
- -
- -
-
- -
-
- -
- -
- -
-
+ + {uuid && +
+ + + + +
+ } + + + + + +
+ {/* TODO: Remove toggle once role permissions are implemented. */}
-
+
({ id, name, label, placeholder return (
- +
+ +
-
+