Skip to content

Commit 29c2e24

Browse files
author
Jan
authored
Merge pull request #25 from openimis/hotfix/condition-fix
hotfix: change the isWorker condition
2 parents 38dd3b7 + 6caaa47 commit 29c2e24

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/components/ProfileMainMenu.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,21 @@ class ProfileMainMenu extends Component {
2828
},
2929
];
3030

31-
if (!this.isWorker) {
32-
entries.push({
33-
text: formatMessage(intl, "profile", "menu.changePassword"),
34-
icon: <Fingerprint />,
35-
route: "/profile/mobile/password",
36-
});
37-
}
31+
this.isWorker
32+
? entries.push({
33+
text: formatMessage(intl, "profile", "menu.changePassword"),
34+
icon: <Fingerprint />,
35+
route: "/profile/mobile/password",
36+
})
37+
: entries.push({
38+
text: formatMessage(
39+
this.props.intl,
40+
"profile",
41+
"menu.changePassword"
42+
),
43+
icon: <Fingerprint />,
44+
route: "/profile/changePassword",
45+
});
3846

3947
entries.push(
4048
...modulesManager

0 commit comments

Comments
 (0)