diff --git a/products/ASC.People/Client/src/components/dialogs/ChangeUserStatusDialog/index.js b/products/ASC.People/Client/src/components/dialogs/ChangeUserStatusDialog/index.js index 3c4c11c500..d2c177fde6 100644 --- a/products/ASC.People/Client/src/components/dialogs/ChangeUserStatusDialog/index.js +++ b/products/ASC.People/Client/src/components/dialogs/ChangeUserStatusDialog/index.js @@ -205,7 +205,7 @@ const mapStateToProps = (state, ownProps) => { userStatus === EmployeeStatus.Active ? getUsersToActivateIds(state) : getUsersToDisableIds(state), - selectedUsers: selection, + //selectedUsers: selection, }; }; @@ -218,5 +218,6 @@ export default connect(mapStateToProps, { })( inject(({ peopleStore }) => ({ updateUserStatus: peopleStore.usersStore.updateUserStatus, + selectedUsers: peopleStore.selectionStore.selection, }))(observer(withRouter(ChangeUserStatusDialog))) ); diff --git a/products/ASC.People/Client/src/components/dialogs/ChangeUserTypeDialog/index.js b/products/ASC.People/Client/src/components/dialogs/ChangeUserTypeDialog/index.js index fafde2e710..6bb8ba3720 100644 --- a/products/ASC.People/Client/src/components/dialogs/ChangeUserTypeDialog/index.js +++ b/products/ASC.People/Client/src/components/dialogs/ChangeUserTypeDialog/index.js @@ -199,7 +199,7 @@ const mapStateToProps = (state, ownProps) => { userType === EmployeeType.User ? getUsersToMakeEmployeesIds(state) : getUsersToMakeGuestsIds(state), - selectedUsers: selection, + //selectedUsers: selection, }; }; @@ -210,5 +210,6 @@ export default connect(mapStateToProps, { inject(({ peopleStore }) => ({ filter: peopleStore.filterStore.filter, updateUserType: peopleStore.usersStore.updateUserType, + selectedUsers: peopleStore.selectionStore.selection, }))(observer(withRouter(ChangeUserTypeDialog))) ); diff --git a/products/ASC.People/Client/src/components/dialogs/DeleteUsersDialog/index.js b/products/ASC.People/Client/src/components/dialogs/DeleteUsersDialog/index.js index 1845ff100b..08a9b9366c 100644 --- a/products/ASC.People/Client/src/components/dialogs/DeleteUsersDialog/index.js +++ b/products/ASC.People/Client/src/components/dialogs/DeleteUsersDialog/index.js @@ -210,5 +210,6 @@ export default connect(mapStateToProps, { inject(({ peopleStore }) => ({ filter: peopleStore.filterStore.filter, removeUser: peopleStore.usersStore.removeUser, + selectedUsers: peopleStore.selectionStore.selection, }))(observer(withRouter(DeleteUsersDialog))) ); diff --git a/products/ASC.People/Client/src/components/dialogs/InviteDialog/index.js b/products/ASC.People/Client/src/components/dialogs/InviteDialog/index.js index 05e243d3a1..25d462bcab 100644 --- a/products/ASC.People/Client/src/components/dialogs/InviteDialog/index.js +++ b/products/ASC.People/Client/src/components/dialogs/InviteDialog/index.js @@ -214,17 +214,17 @@ class InviteDialogComponent extends React.Component { const mapStateToProps = (state) => { return { //settings: state.auth.settings.hasShortenService, - userInvitationLink: state.portal.inviteLinks.userLink, - guestInvitationLink: state.portal.inviteLinks.guestLink, + // userInvitationLink: state.portal.inviteLinks.userLink, + // guestInvitationLink: state.portal.inviteLinks.guestLink, //guestsCaption: state.auth.settings.customNames.guestsCaption, }; }; -const mapDispatchToProps = (dispatch) => { - return { - getPortalInviteLinks: () => dispatch(getPortalInviteLinks()), - }; -}; +// const mapDispatchToProps = (dispatch) => { +// return { +// getPortalInviteLinks: () => dispatch(getPortalInviteLinks()), +// }; +// }; const InviteDialogTranslated = withTranslation()(InviteDialogComponent); @@ -249,12 +249,15 @@ InviteDialog.propTypes = { // }); export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps + //mapDispatchToProps )( - inject(({ store }) => ({ + inject(({ store, peopleStore }) => ({ settings: store.settingsStore, guestsCaption: store.settingsStore.customNames.guestsCaption, + getPortalInviteLinks: peopleStore.inviteLinksStore.getPortalInviteLinks, + userInvitationLink: peopleStore.inviteLinksStore.inviteLinks.userLink, + guestInvitationLink: peopleStore.inviteLinksStore.inviteLinks.guestLink, }))(observer(InviteDialog)) ); diff --git a/products/ASC.People/Client/src/components/dialogs/SendInviteDialog/index.js b/products/ASC.People/Client/src/components/dialogs/SendInviteDialog/index.js index 7f71f11285..d6b319fcc0 100644 --- a/products/ASC.People/Client/src/components/dialogs/SendInviteDialog/index.js +++ b/products/ASC.People/Client/src/components/dialogs/SendInviteDialog/index.js @@ -18,6 +18,7 @@ import { createI18N } from "../../../helpers/i18n"; import { connect } from "react-redux"; import { getUsersToInviteIds } from "../../../store/people/selectors"; import { setSelected } from "../../../store/people/actions"; +import { inject, observer } from "mobx-react"; const i18n = createI18N({ page: "SendInviteDialog", @@ -181,10 +182,14 @@ const mapStateToProps = (state) => { return { userIds: usersToInviteIds, - selectedUsers: selection, + //selectedUsers: selection, }; }; export default connect(mapStateToProps, { /*setSelected */ -})(withRouter(SendInviteDialog)); +})( + inject(({ peopleStore }) => ({ + selectedUsers: peopleStore.selectionStore.selection, + }))(observer(withRouter(SendInviteDialog))) +);