HM-126. Перенос хранилищ на новую модалку и логику, добавление работы… (#65)
This commit is contained in:
@ -2,7 +2,7 @@ import Component from '../../../../core/components/component/Component';
|
||||
import UsersTable from '../users-table/UsersTable';
|
||||
import usersServiceApi from '../../api/UsersServiceAPI';
|
||||
import UserViewForm from '../user-view-form/UserViewForm';
|
||||
import {EVENTS, MODES} from '../../../../core/consts';
|
||||
import {EVENTS, MODES, TAG_NAME} from '../../../../core/consts';
|
||||
import routeService from '../../../../services/RouteService';
|
||||
import userInfoService from '../../../../services/UserInfoService';
|
||||
|
||||
@ -12,10 +12,10 @@ class UsersPage extends Component {
|
||||
|
||||
this.usersForm = this.createComponent(UserViewForm);
|
||||
|
||||
this.createElement({tagName: 'div', parentNode: this.mainNode});
|
||||
this.createElement({tagName: TAG_NAME.DIV, parentNode: this.mainNode});
|
||||
|
||||
this.createUserButton = this.createElement({
|
||||
tagName: 'button',
|
||||
tagName: TAG_NAME.BUTTON,
|
||||
parentNode: this.mainNode,
|
||||
options: {
|
||||
className: 'btn btn-primary m-3',
|
||||
@ -30,7 +30,7 @@ class UsersPage extends Component {
|
||||
this.createUserButton.disabled = !is_admin;
|
||||
});
|
||||
|
||||
this.addEventListener(this.createUserButton, 'click', () => {
|
||||
this.addEventListener(this.createUserButton, EVENTS.CLICK, () => {
|
||||
routeService.pushQuery({mode: MODES.Create}, true);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user