diff --git a/frontend/src/components/people-list/table/index.js b/frontend/src/components/people-list/table/index.js
index 9dbde524..39196a55 100644
--- a/frontend/src/components/people-list/table/index.js
+++ b/frontend/src/components/people-list/table/index.js
@@ -15,7 +15,7 @@ const PeopleTable = (props) => {
handleMemberUpdate,
people = [],
orgUI = {},
- orgIndex,
+ parentIndex,
removeMember
} = props;
@@ -42,7 +42,7 @@ const PeopleTable = (props) => {
handleMemberUpdate={handleMemberUpdate}
handleStatusTooltip={handleStatusTooltip}
membersStatusOptions={orgUI.members_status}
- orgIndex={orgIndex}
+ parentIndex={parentIndex}
person={person}
personIndex={index}
toggledID={orgUI.member_status_tooltip}
@@ -54,7 +54,7 @@ const PeopleTable = (props) => {
handleMemberUpdate={handleMemberUpdate}
handleRoleTooltip={handleRoleTooltip}
membersRolesOptions={orgUI.members_roles}
- orgIndex={orgIndex}
+ parentIndex={parentIndex}
person={person}
personIndex={index}
toggledID={orgUI.member_role_tooltip}
@@ -63,7 +63,7 @@ const PeopleTable = (props) => {
const remove = (person) => (
@@ -90,8 +90,8 @@ PeopleTable.propTypes = {
handleMemberUpdate: React.PropTypes.func,
handleRoleTooltip: React.PropTypes.func,
handleStatusTooltip: React.PropTypes.func,
- orgIndex: React.PropTypes.number,
orgUI: React.PropTypes.object,
+ parentIndex: React.PropTypes.number,
people: React.PropTypes.array,
removeMember: React.PropTypes.func,
};
diff --git a/frontend/src/components/people-list/table/person-delete.js b/frontend/src/components/people-list/table/person-delete.js
index 87f592fc..c648591c 100644
--- a/frontend/src/components/people-list/table/person-delete.js
+++ b/frontend/src/components/people-list/table/person-delete.js
@@ -18,13 +18,13 @@ const PersonDelete = (props) => {
const {
personIndex,
- orgIndex,
+ parentIndex,
removeMember
} = props;
const _onClick = () => removeMember({
personIndex,
- orgIndex
+ parentIndex
});
return (
@@ -35,7 +35,7 @@ const PersonDelete = (props) => {
};
PersonDelete.propTypes = {
- orgIndex: React.PropTypes.number,
+ parentIndex: React.PropTypes.number,
personIndex: React.PropTypes.number,
removeMember: React.PropTypes.func,
};
diff --git a/frontend/src/components/people-list/table/person-role.js b/frontend/src/components/people-list/table/person-role.js
index 85531679..58e97431 100644
--- a/frontend/src/components/people-list/table/person-role.js
+++ b/frontend/src/components/people-list/table/person-role.js
@@ -57,7 +57,7 @@ const PersonRole = (props) => {
personIndex,
handleRoleTooltip,
handleMemberUpdate,
- orgIndex
+ parentIndex
} = props;
const toggled = toggledID === person.uuid;
@@ -82,7 +82,7 @@ const PersonRole = (props) => {
? {
personIndex,
handleStatusTooltip,
handleMemberUpdate,
- orgIndex
+ parentIndex
} = props;
const toggled = toggledID === person.uuid;
@@ -82,7 +82,7 @@ const PersonStatus = (props) => {
? {
const _options = options.map( (option, i) => {
@@ -33,7 +33,7 @@ module.exports = ({
[`${personAttr}`]: option
},
personIndex,
- orgIndex,
+ parentIndex,
};
const _onClick = () => handleSelect(payload);
@@ -64,7 +64,7 @@ module.exports = ({
module.exports.propTypes = {
handleSelect: React.PropTypes.func,
options: React.PropTypes.array,
- orgIndex: React.PropTypes.number,
+ parentIndex: React.PropTypes.number,
person: React.PropTypes.object,
personAttr: React.PropTypes.string,
personIndex: React.PropTypes.number,
diff --git a/frontend/src/containers/org/people.js b/frontend/src/containers/org/people.js
index 55726513..991275f0 100644
--- a/frontend/src/containers/org/people.js
+++ b/frontend/src/containers/org/people.js
@@ -38,7 +38,7 @@ const mapStateToProps = (state, {
}) => ({
people: peopleByOrgIdSelector(params.org)(state),
orgUI: orgUISelector(state),
- orgIndex: orgIndexSelector(params.org)(state),
+ parentIndex: orgIndexSelector(params.org)(state),
platformMembers: membersSelector(state)
});
diff --git a/frontend/src/state/reducers/orgs.js b/frontend/src/state/reducers/orgs.js
index 25f6a7aa..e5d034d7 100644
--- a/frontend/src/state/reducers/orgs.js
+++ b/frontend/src/state/reducers/orgs.js
@@ -50,11 +50,10 @@ module.exports = handleActions({
},
[handleMemberUpdate.toString()]: (state, action) => {
const {
- orgIndex,
+ parentIndex,
person,
personIndex,
} = action.payload;
-
return {
...state,
ui: {
@@ -63,39 +62,39 @@ module.exports = handleActions({
member_role_tooltip: false
},
data: [
- ...state.data.slice(0, orgIndex),
+ ...state.data.slice(0, parentIndex),
{
- ...state.data[orgIndex],
+ ...state.data[parentIndex],
members: [
- ...state.data[orgIndex].members.slice(0, personIndex),
+ ...state.data[parentIndex].members.slice(0, personIndex),
{
...person,
},
- ...state.data[orgIndex].members.slice(personIndex + 1)
+ ...state.data[parentIndex].members.slice(personIndex + 1)
]
},
- ...state.data.slice(orgIndex + 1),
+ ...state.data.slice(parentIndex + 1),
]
};
},
[removeMember.toString()]: (state, action) => {
const {
- orgIndex,
+ parentIndex,
personIndex,
} = action.payload;
return {
...state,
data: [
- ...state.data.slice(0, orgIndex),
+ ...state.data.slice(0, parentIndex),
{
- ...state.data[orgIndex],
+ ...state.data[parentIndex],
members: [
- ...state.data[orgIndex].members.slice(0, personIndex),
- ...state.data[orgIndex].members.slice(personIndex + 1)
+ ...state.data[parentIndex].members.slice(0, personIndex),
+ ...state.data[parentIndex].members.slice(personIndex + 1)
]
},
- ...state.data.slice(orgIndex + 1),
+ ...state.data.slice(parentIndex + 1),
]
};
},