-export const userActionSet: ContextMenuActionSet = [[{
- name: "Attributes",
- icon: AttributesIcon,
- execute: (dispatch, { uuid }) => {
- dispatch<any>(openUserAttributes(uuid));
- }
-}, {
- name: "Project",
- icon: ProjectIcon,
- execute: (dispatch, { uuid }) => {
- dispatch<any>(openUserProjects(uuid));
- }
-}, {
- name: "API Details",
- icon: AdvancedIcon,
- execute: (dispatch, { uuid }) => {
- dispatch<any>(openAdvancedTabDialog(uuid));
- }
-}, {
- name: "Account Settings",
- icon: UserPanelIcon,
- execute: (dispatch, { uuid }) => {
- dispatch<any>(navigateToUserProfile(uuid));
- },
- filters: [needsUserProfileLink]
-}],[{
- name: "Activate User",
- icon: ActiveIcon,
- execute: (dispatch, { uuid }) => {
- dispatch<any>(openActivateDialog(uuid));
- },
- filters: [
- isAdmin,
- canActivateUser,
- ],
-}, {
- name: "Setup User",
- icon: AdminMenuIcon,
- execute: (dispatch, { uuid }) => {
- dispatch<any>(openSetupDialog(uuid));
- },
- filters: [
- isAdmin,
- canSetupUser,
- ],
-}, {
- name: "Deactivate User",
- icon: DeactivateUserIcon,
- execute: (dispatch, { uuid }) => {
- dispatch<any>(openDeactivateDialog(uuid));
- },
- filters: [
- isAdmin,
- canDeactivateUser,
+export const userActionSet: ContextMenuActionSet = [
+ [
+ {
+ name: 'Attributes',
+ icon: AttributesIcon,
+ execute: (dispatch, resources) => {
+ dispatch<any>(openUserAttributes(resources[0].uuid));
+ },
+ },
+ {
+ name: 'Project',
+ icon: ProjectIcon,
+ execute: (dispatch, resources) => {
+ dispatch<any>(openUserProjects(resources[0].uuid));
+ },
+ },
+ {
+ name: 'API Details',
+ icon: AdvancedIcon,
+ execute: (dispatch, resources) => {
+ dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
+ },
+ },
+ {
+ name: 'Account Settings',
+ icon: UserPanelIcon,
+ execute: (dispatch, resources) => {
+ dispatch<any>(navigateToUserProfile(resources[0].uuid));
+ },
+ filters: [needsUserProfileLink],
+ },