diff --git a/frontend/src/components/people-list/index.js b/frontend/src/components/people-list/index.js
index aa1dea90..f07be5c4 100644
--- a/frontend/src/components/people-list/index.js
+++ b/frontend/src/components/people-list/index.js
@@ -14,7 +14,7 @@ const buttonStyle = {
const People = (props) => {
const {
- orgUI = {},
+ UI = {},
handleToggle,
people
} = props;
@@ -24,7 +24,7 @@ const People = (props) => {
- {orgUI.invite_toggled ? : null}
+ {UI.invite_toggled ? : null}
@@ -47,9 +47,9 @@ const People = (props) => {
};
People.propTypes = {
+ UI: React.PropTypes.object,
handleToggle: React.PropTypes.func,
- orgUI: React.PropTypes.object,
- people: React.PropTypes.array
+ people: React.PropTypes.array,
};
module.exports = People;
\ No newline at end of file
diff --git a/frontend/src/components/people-list/table/index.js b/frontend/src/components/people-list/table/index.js
index 9dbde524..aa423f71 100644
--- a/frontend/src/components/people-list/table/index.js
+++ b/frontend/src/components/people-list/table/index.js
@@ -14,9 +14,9 @@ const PeopleTable = (props) => {
handleStatusTooltip,
handleMemberUpdate,
people = [],
- orgUI = {},
- orgIndex,
- removeMember
+ parentIndex,
+ removeMember,
+ UI = {},
} = props;
const columns = [{
@@ -41,11 +41,11 @@ const PeopleTable = (props) => {
);
@@ -53,17 +53,17 @@ const PeopleTable = (props) => {
);
const remove = (person) => (
@@ -87,11 +87,11 @@ const PeopleTable = (props) => {
};
PeopleTable.propTypes = {
+ UI: React.PropTypes.object,
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..553b33e1 100644
--- a/frontend/src/containers/org/people.js
+++ b/frontend/src/containers/org/people.js
@@ -37,8 +37,8 @@ const mapStateToProps = (state, {
params = {}
}) => ({
people: peopleByOrgIdSelector(params.org)(state),
- orgUI: orgUISelector(state),
- orgIndex: orgIndexSelector(params.org)(state),
+ UI: orgUISelector(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),
]
};
},
diff --git a/ui/src/components/table-data-table/readme.md b/ui/src/components/table-data-table/readme.md
index cd285205..c7f9515c 100644
--- a/ui/src/components/table-data-table/readme.md
+++ b/ui/src/components/table-data-table/readme.md
@@ -29,7 +29,7 @@ const React = require('react');
const Avatar = require('ui/table');
const columns = [{
- title: 'Memeber',
+ title: 'Member',
dataID: 'member',
dataKey: 'member',
width: ''