Skip to content
Snippets Groups Projects
Unverified Commit 3b922da9 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fix language dropdown being hidden on profile for external accounts (#4762)

* Fix language dropdown being hidden on profile for external accounts

* eslint
parent 816166ad
No related branches found
No related tags found
No related merge requests found
...@@ -30,12 +30,15 @@ export default function Profile() { ...@@ -30,12 +30,15 @@ export default function Profile() {
{ t('user.account.account_info') } { t('user.account.account_info') }
</Nav.Link> </Nav.Link>
</Nav.Item> </Nav.Item>
{ !currentUser.external_account
&& (
<Nav.Item> <Nav.Item>
<Nav.Link className="cursor-pointer text-muted" eventKey="third"> <Nav.Link className="cursor-pointer text-muted" eventKey="third">
<LockClosedIcon className="hi-s text-muted me-3 pb-1" /> <LockClosedIcon className="hi-s text-muted me-3 pb-1" />
{ t('user.account.change_password') } { t('user.account.change_password') }
</Nav.Link> </Nav.Link>
</Nav.Item> </Nav.Item>
)}
<Nav.Item> <Nav.Item>
<Nav.Link className="cursor-pointer text-muted" eventKey="second"> <Nav.Link className="cursor-pointer text-muted" eventKey="second">
<TrashIcon className="hi-s text-muted me-3 pb-1" /> <TrashIcon className="hi-s text-muted me-3 pb-1" />
...@@ -53,9 +56,12 @@ export default function Profile() { ...@@ -53,9 +56,12 @@ export default function Profile() {
<Tab.Pane eventKey="second"> <Tab.Pane eventKey="second">
<DeleteAccount /> <DeleteAccount />
</Tab.Pane> </Tab.Pane>
{ !currentUser.external_account
&& (
<Tab.Pane eventKey="third"> <Tab.Pane eventKey="third">
<ChangePassword /> <ChangePassword />
</Tab.Pane> </Tab.Pane>
)}
</Tab.Content> </Tab.Content>
</Col> </Col>
</Row> </Row>
......
...@@ -36,14 +36,11 @@ export default function UpdateUserForm({ user }) { ...@@ -36,14 +36,11 @@ export default function UpdateUserForm({ user }) {
<Form methods={methods} onSubmit={updateUserAPI.mutate}> <Form methods={methods} onSubmit={updateUserAPI.mutate}>
<FormControl field={fields.name} type="text" /> <FormControl field={fields.name} type="text" />
<FormControl field={fields.email} type="email" readOnly /> <FormControl field={fields.email} type="email" readOnly />
{ !currentUser?.external_account
&& (
<FormSelect field={fields.language} variant="dropdown"> <FormSelect field={fields.language} variant="dropdown">
{ {
Object.keys(localesAPI.data || {}).map((code) => <Option key={code} value={code}>{localesAPI.data[code]}</Option>) Object.keys(localesAPI.data || {}).map((code) => <Option key={code} value={code}>{localesAPI.data[code]}</Option>)
} }
</FormSelect> </FormSelect>
)}
{(canUpdateRole && rolesAPI.data) && ( {(canUpdateRole && rolesAPI.data) && (
<FormSelect field={fields.role_id} variant="dropdown"> <FormSelect field={fields.role_id} variant="dropdown">
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment