+ }
+
+ const message = this.i18n('If you remove these users, you will not be able to create others with the same username!')
+ const res = await this.confirmService.confirm(message, this.i18n('Delete'))
+ if (res === false) return
+
+ this.userService.removeUser(users).subscribe(
+ () => {
+ this.notificationsService.success(
+ this.i18n('Success'),
+ this.i18n('{{num}} users deleted.', { num: users.length })
+ )
+ this.loadData()
+ },
+
+ err => this.notificationsService.error(this.i18n('Error'), err.message)
+ )
+ }
+
+ isInSelectionMode () {
+ return this.selectedUsers.length !== 0
+ }
+
+ protected loadData () {
+ this.selectedUsers = []
+
+ this.userService.getUsers(this.pagination, this.sort, this.search)
+ .subscribe(
+ resultList => {
+ this.users = resultList.data
+ this.totalRecords = resultList.total
+ },
+
+ err => this.notificationsService.error(this.i18n('Error'), err.message)
+ )