Skip to content

Commit

Permalink
CM-138: create a task executioner groups route (#74)
Browse files Browse the repository at this point in the history
* CM-138: create a task executioner groups route

* CM-138: restoring accidentally deleted file
  • Loading branch information
olewandowski1 authored Jun 27, 2023
1 parent cb3dabc commit 3e97669
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ jobs:
- run: yarn build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
9 changes: 9 additions & 0 deletions src/components/AdminMainMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
LocalPharmacy,
LocalPharmacyOutlined,
Person,
People,
PinDrop,
Tune,
} from "@material-ui/icons";
Expand All @@ -24,6 +25,7 @@ import {
// RIGHT_CLAIMADMINISTRATOR,
RIGHT_USERS,
RIGHT_LOCATIONS,
RIGHT_TASK_EXECUTIONER_GROUPS,
} from "../constants";

const ADMIN_MAIN_MENU_CONTRIBUTION_KEY = "admin.MainMenu";
Expand Down Expand Up @@ -85,6 +87,13 @@ class AdminMainMenu extends Component {
route: "/admin/users",
});
}
if (rights.includes(RIGHT_TASK_EXECUTIONER_GROUPS)) {
entries.push({
text: formatMessage(this.props.intl, "admin", "menu.taskExecutionerGroups"),
icon: <People />,
route: "/tasks/groups",
});
}
if (rights.includes(RIGHT_LOCATIONS)) {
entries.push({
text: formatMessage(this.props.intl, "admin", "menu.locations"),
Expand Down
2 changes: 2 additions & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const RIGHT_ENROLMENTOFFICER = 121501;
export const RIGHT_CLAIMADMINISTRATOR = 121601;
export const RIGHT_PAYERS = 121801;
export const RIGHT_LOCATIONS = 121901;
// CHANGE RIGHT TO PROPER ONE
export const RIGHT_TASK_EXECUTIONER_GROUPS = 121901;

export const RIGHT_USERS = 121701;
export const RIGHT_USER_SEARCH = 121701;
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const DEFAULT_CONFIG = {
type: "user",
picker: UserPicker,
pickerProjection: USER_PICKER_PROJECTION,
}
},
],
};

Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"admin.menu.payers": "Payers",
"admin.menu.products": "Products",
"admin.menu.users": "Users",
"admin.menu.taskExecutionerGroups": "Task Executioner Groups",
"admin.menu.usersProfiles": "Users Profiles",
"admin.showHistory": "Show historical values",
"admin.user.CreateUser.mutationLabel": "Create user",
Expand Down

0 comments on commit 3e97669

Please sign in to comment.