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