|
@@ -37,7 +37,16 @@ class UserManagement extends React.Component {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
handleClick(statusType) {
|
|
handleClick(statusType) {
|
|
|
- if (this.validateToggleStatus(statusType)) this.props.adminUsersContainer.handleClick(statusType);
|
|
|
|
|
|
|
+ const { adminUsersContainer } = this.props;
|
|
|
|
|
+ if (!this.validateToggleStatus(statusType)) {
|
|
|
|
|
+ adminUsersContainer.setNotifyComment('You should check at least one checkbox.');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (adminUsersContainer.state.notifyComment.length > 0) {
|
|
|
|
|
+ adminUsersContainer.setNotifyComment('');
|
|
|
|
|
+ }
|
|
|
|
|
+ adminUsersContainer.handleClick(statusType);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
validateToggleStatus(statusType) {
|
|
validateToggleStatus(statusType) {
|
|
@@ -66,6 +75,8 @@ class UserManagement extends React.Component {
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ const notifyComment = (adminUsersContainer.state.notifyComment && <span className="text-warning">{ adminUsersContainer.state.notifyComment }</span>);
|
|
|
|
|
+
|
|
|
const clearButton = (
|
|
const clearButton = (
|
|
|
adminUsersContainer.state.searchText.length > 0
|
|
adminUsersContainer.state.searchText.length > 0
|
|
|
? <i className="icon-close search-clear"></i>
|
|
? <i className="icon-close search-clear"></i>
|
|
@@ -149,6 +160,9 @@ class UserManagement extends React.Component {
|
|
|
Reset
|
|
Reset
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div className="ml-5">{ notifyComment }</div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|