mirror of
https://github.com/yldio/copilot.git
synced 2024-12-01 07:30:07 +02:00
using more explicit action and dispatch names for org and project
This commit is contained in:
parent
518023f446
commit
59b678a101
@ -17,11 +17,11 @@ const {
|
|||||||
} = selectors;
|
} = selectors;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
handleInviteToggle,
|
orgHandleInviteToggle,
|
||||||
handlePeopleRoleTooltip,
|
orgHandlePeopleRoleTooltip,
|
||||||
handlePeopleStatusTooltip,
|
orgHandlePeopleStatusTooltip,
|
||||||
handleMemberUpdate,
|
orgHandleMemberUpdate,
|
||||||
removeMember,
|
orgRemoveMember,
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
const People = (props) => {
|
const People = (props) => {
|
||||||
@ -43,13 +43,13 @@ const mapStateToProps = (state, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
handleToggle: () => dispatch(handleInviteToggle()),
|
handleToggle: () => dispatch(orgHandleInviteToggle()),
|
||||||
handleStatusTooltip: (id) => dispatch(handlePeopleStatusTooltip(id)),
|
handleStatusTooltip: (id) => dispatch(orgHandlePeopleStatusTooltip(id)),
|
||||||
handleRoleTooltip: (id) => dispatch(handlePeopleRoleTooltip(id)),
|
handleRoleTooltip: (id) => dispatch(orgHandlePeopleRoleTooltip(id)),
|
||||||
handleMemberUpdate: (updatedMember) =>
|
handleMemberUpdate: (updatedMember) =>
|
||||||
dispatch(handleMemberUpdate(updatedMember)),
|
dispatch(orgHandleMemberUpdate(updatedMember)),
|
||||||
removeMember: (removeData) =>
|
removeMember: (removeData) =>
|
||||||
dispatch(removeMember(removeData)),
|
dispatch(orgRemoveMember(removeData)),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@ const {
|
|||||||
} = selectors;
|
} = selectors;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
projecthandleInviteToggle,
|
projectHandleInviteToggle,
|
||||||
projecthandlePeopleRoleTooltip,
|
projectHandlePeopleRoleTooltip,
|
||||||
projecthandlePeopleStatusTooltip,
|
projectHandlePeopleStatusTooltip,
|
||||||
projecthandleMemberUpdate,
|
projectHandleMemberUpdate,
|
||||||
projectremoveMember,
|
projectRemoveMember,
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
const People = (props) => {
|
const People = (props) => {
|
||||||
@ -43,13 +43,13 @@ const mapStateToProps = (state, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
handleToggle: () => dispatch(projecthandleInviteToggle()),
|
handleToggle: () => dispatch(projectHandleInviteToggle()),
|
||||||
handleStatusTooltip: (id) => dispatch(projecthandlePeopleStatusTooltip(id)),
|
handleStatusTooltip: (id) => dispatch(projectHandlePeopleStatusTooltip(id)),
|
||||||
handleRoleTooltip: (id) => dispatch(projecthandlePeopleRoleTooltip(id)),
|
handleRoleTooltip: (id) => dispatch(projectHandlePeopleRoleTooltip(id)),
|
||||||
handleMemberUpdate: (updatedMember) =>
|
handleMemberUpdate: (updatedMember) =>
|
||||||
dispatch(projecthandleMemberUpdate(updatedMember)),
|
dispatch(projectHandleMemberUpdate(updatedMember)),
|
||||||
removeMember: (removeData) =>
|
removeMember: (removeData) =>
|
||||||
dispatch(projectremoveMember(removeData)),
|
dispatch(projectRemoveMember(removeData)),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -8,29 +8,29 @@ const {
|
|||||||
const APP = constantCase(process.env['APP_NAME']);
|
const APP = constantCase(process.env['APP_NAME']);
|
||||||
|
|
||||||
const projectMemberActions = {
|
const projectMemberActions = {
|
||||||
projecthandleInviteToggle:
|
projectHandleInviteToggle:
|
||||||
createAction(`${APP}/PROJECT_HANDLE_INVITE_MEMBER_TOGGLE`),
|
createAction(`${APP}/PROJECT_HANDLE_INVITE_MEMBER_TOGGLE`),
|
||||||
projecthandlePeopleStatusTooltip:
|
projectHandlePeopleStatusTooltip:
|
||||||
createAction(`${APP}/PROJECT_HANDLE_PERSON_STATUS_TOOLTIP`),
|
createAction(`${APP}/PROJECT_HANDLE_PERSON_STATUS_TOOLTIP`),
|
||||||
projecthandlePeopleRoleTooltip:
|
projectHandlePeopleRoleTooltip:
|
||||||
createAction(`${APP}/PROJECT_HANDLE_PERSON_ROLE_TOOLTIP`),
|
createAction(`${APP}/PROJECT_HANDLE_PERSON_ROLE_TOOLTIP`),
|
||||||
projecthandleMemberUpdate:
|
projectHandleMemberUpdate:
|
||||||
createAction(`${APP}/PROJECT_HANDLE_MEMBER_UPDATE`),
|
createAction(`${APP}/PROJECT_HANDLE_MEMBER_UPDATE`),
|
||||||
projectremoveMember:
|
projectRemoveMember:
|
||||||
createAction(`${APP}/PROJECT_REMOVE_MEMBER_FROM_ROLE`),
|
createAction(`${APP}/PROJECT_REMOVE_MEMBER_FROM_ROLE`),
|
||||||
};
|
};
|
||||||
|
|
||||||
const orgMemberActions = {
|
const orgMemberActions = {
|
||||||
handleInviteToggle:
|
orgHandleInviteToggle:
|
||||||
createAction(`${APP}/HANDLE_INVITE_MEMBER_TOGGLE`),
|
createAction(`${APP}/ORG_HANDLE_INVITE_MEMBER_TOGGLE`),
|
||||||
handlePeopleStatusTooltip:
|
orgHandlePeopleStatusTooltip:
|
||||||
createAction(`${APP}/HANDLE_PERSON_STATUS_TOOLTIP`),
|
createAction(`${APP}/ORG_HANDLE_PERSON_STATUS_TOOLTIP`),
|
||||||
handlePeopleRoleTooltip:
|
orgHandlePeopleRoleTooltip:
|
||||||
createAction(`${APP}/HANDLE_PERSON_ROLE_TOOLTIP`),
|
createAction(`${APP}/ORG_HANDLE_PERSON_ROLE_TOOLTIP`),
|
||||||
handleMemberUpdate:
|
orgHandleMemberUpdate:
|
||||||
createAction(`${APP}/HANDLE_MEMBER_UPDATE`),
|
createAction(`${APP}/ORG_HANDLE_MEMBER_UPDATE`),
|
||||||
removeMember:
|
orgRemoveMember:
|
||||||
createAction(`${APP}/REMOVE_MEMBER_FROM_ROLE`),
|
createAction(`${APP}/ORG_REMOVE_MEMBER_FROM_ROLE`),
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -7,15 +7,15 @@ const {
|
|||||||
} = ReduxActions;
|
} = ReduxActions;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
handleInviteToggle,
|
orgHandleInviteToggle,
|
||||||
handlePeopleRoleTooltip,
|
orgHandlePeopleRoleTooltip,
|
||||||
handlePeopleStatusTooltip,
|
orgHandlePeopleStatusTooltip,
|
||||||
handleMemberUpdate,
|
orgHandleMemberUpdate,
|
||||||
removeMember,
|
orgRemoveMember,
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
module.exports = handleActions({
|
module.exports = handleActions({
|
||||||
[handleInviteToggle.toString()]: (state, action) => {
|
[orgHandleInviteToggle.toString()]: (state, action) => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
ui: {
|
ui: {
|
||||||
@ -24,7 +24,7 @@ module.exports = handleActions({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[handlePeopleStatusTooltip.toString()]: (state, action) => {
|
[orgHandlePeopleStatusTooltip.toString()]: (state, action) => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
ui: {
|
ui: {
|
||||||
@ -36,7 +36,7 @@ module.exports = handleActions({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[handlePeopleRoleTooltip.toString()]: (state, action) => {
|
[orgHandlePeopleRoleTooltip.toString()]: (state, action) => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
ui: {
|
ui: {
|
||||||
@ -48,7 +48,7 @@ module.exports = handleActions({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[handleMemberUpdate.toString()]: (state, action) => {
|
[orgHandleMemberUpdate.toString()]: (state, action) => {
|
||||||
const {
|
const {
|
||||||
parentIndex,
|
parentIndex,
|
||||||
person,
|
person,
|
||||||
@ -77,7 +77,7 @@ module.exports = handleActions({
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[removeMember.toString()]: (state, action) => {
|
[orgRemoveMember.toString()]: (state, action) => {
|
||||||
const {
|
const {
|
||||||
parentIndex,
|
parentIndex,
|
||||||
personIndex,
|
personIndex,
|
||||||
|
@ -7,15 +7,15 @@ const {
|
|||||||
} = ReduxActions;
|
} = ReduxActions;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
projecthandleInviteToggle,
|
projectHandleInviteToggle,
|
||||||
projecthandlePeopleRoleTooltip,
|
projectHandlePeopleRoleTooltip,
|
||||||
projecthandlePeopleStatusTooltip,
|
projectHandlePeopleStatusTooltip,
|
||||||
projecthandleMemberUpdate,
|
projectHandleMemberUpdate,
|
||||||
projectremoveMember,
|
projectRemoveMember,
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
module.exports = handleActions({
|
module.exports = handleActions({
|
||||||
[projecthandleInviteToggle.toString()]: (state, action) => {
|
[projectHandleInviteToggle.toString()]: (state, action) => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
ui: {
|
ui: {
|
||||||
@ -24,7 +24,7 @@ module.exports = handleActions({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[projecthandlePeopleStatusTooltip.toString()]: (state, action) => {
|
[projectHandlePeopleStatusTooltip.toString()]: (state, action) => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
ui: {
|
ui: {
|
||||||
@ -36,7 +36,7 @@ module.exports = handleActions({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[projecthandlePeopleRoleTooltip.toString()]: (state, action) => {
|
[projectHandlePeopleRoleTooltip.toString()]: (state, action) => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
ui: {
|
ui: {
|
||||||
@ -48,7 +48,7 @@ module.exports = handleActions({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[projecthandleMemberUpdate.toString()]: (state, action) => {
|
[projectHandleMemberUpdate.toString()]: (state, action) => {
|
||||||
const {
|
const {
|
||||||
parentIndex,
|
parentIndex,
|
||||||
person,
|
person,
|
||||||
@ -77,7 +77,7 @@ module.exports = handleActions({
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[projectremoveMember.toString()]: (state, action) => {
|
[projectRemoveMember.toString()]: (state, action) => {
|
||||||
const {
|
const {
|
||||||
parentIndex,
|
parentIndex,
|
||||||
personIndex,
|
personIndex,
|
||||||
|
Loading…
Reference in New Issue
Block a user