-Add new setting "Delete shift"
-Move "Shift" frontend to V1 module
This commit is contained in:
miroman-afk
2022-02-01 01:55:15 +03:00
parent 57949aa89a
commit 5497b611ef
29 changed files with 1359 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Создание пользователя</h5>
</div>
<div class="modal-body text-center p-lg">
<form role="form" class="ng-pristine ng-valid container">
<div class="form-group row">
<div class="col-sm-12"><input class="form-control" id="new-login" placeholder="Логин" type="text" ng-model="newUser.login"></div>
</div>
<div class="form-group row">
<div class="col-sm-12"><input class="form-control" id="new-name" placeholder="Имя" type="text" ng-model="newUser.name"></div>
</div>
<div class="form-group row">
<div class="col-sm-12"><input class="form-control" id="new-password" placeholder="Пароль" type="password" ng-model="newUser.password"></div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn dark-white p-x-md" data-dismiss="modal">Отмена</button>
<button type="button" class="btn success p-x-md" ng-click="create()">Создать</button>
</div>
</div>
</div>

51
web/views/users/edit.html Normal file
View File

@@ -0,0 +1,51 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Редактирование пользователя</h5>
</div>
<div class="modal-body p-lg">
<form role="form" class="ng-pristine ng-valid container">
<div class="form-group row">
<div class="col-sm-12"><input class="form-control" id="current-login" placeholder="Логин" type="text" ng-model="currentUser.login"></div>
</div>
<div class="form-group row">
<div class="col-sm-12"><input class="form-control" id="current-name" placeholder="Имя" type="text" ng-model="currentUser.name"></div>
</div>
<div class="form-group row">
<div class="col-sm-12"><input class="form-control" id="current-password" placeholder="Пароль" type="password" ng-model="currentUser.password"></div>
</div>
</form>
<hr />
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<th>Право</th>
<th>Статус</th>
</thead>
<tbody>
<tr ng-repeat="right in currentUser.rights">
<td>{{ right.name }}</td>
<td style="width: 90px">
<label class="ui-switch ui-switch-md m-t-xs">
<input type="checkbox" ng-model="right.is_active" ng-change="onRight(right.code)">
<i></i>
</label>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn danger p-x-md pull-left" data-toggle="modal" data-target="#edit-user-confirm-delete"><i class="material-icons">&#xE872;</i></button>
<button type="button" class="btn dark-white p-x-md" data-dismiss="modal">Отмена</button>
<button type="button" class="btn success p-x-md" ng-click="save()">Сохранить</button>
</div>
</div>
</div>

View File

@@ -0,0 +1,58 @@
<div id="container-floating">
<div class="nd3 nds" data-toggle="tooltip" data-placement="left" title="Создать" ng-click="add()" style="background-color: #3c80f6" onmouseenter="$(this).tooltip('show')">
<i class="material-icons">&#xE145;</i>
</div>
<div class="nd1 nds" data-toggle="tooltip" data-placement="left" title="Обновить" ng-click="update()" style="background-color: #d3a411" onmouseenter="$(this).tooltip('show')">
<i class="material-icons">&#xE5D5;</i>
</div>
<div id="floating-button" data-toggle="tooltip" data-placement="left" title="Действия" onmouseenter="$(this).tooltip('show')">
<p class="plus"><i class="material-icons">&#xE5D2;</i></p>
<p class="edit"><i class="material-icons">&#xE5CD;</i></p>
</div>
</div>
<div class="padding">
<div class="box">
<div class="table-responsive">
<table class="table table-bordered m-a-0 table-hover">
<thead>
<tr>
<th>ID</th>
<th>Логин</th>
<th>Имя</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="user in users" ng-click="edit(user)">
<td>{{ user.id }}</td>
<td>{{ user.login }}</td>
<td>{{ user.name }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal fade" id="edit-user" data-backdrop="true">
<div ui-include="'../views/users/edit.html'"></div>
</div>
<div class="modal fade" id="new-user" data-backdrop="true">
<div ui-include="'../views/users/create.html'"></div>
</div>
<div id="edit-user-confirm-delete" class="modal confirm-box" data-backdrop="true" style="z-index: 1052">
<div class="bottom white b-b" style="height: 90px">
<div class="confirm-box-body p-lg">
<p>Вы действительно хотите удалить пользователя?</p>
</div>
<div class="confirm-box-footer">
<button type="button" class="btn dark-white p-x-md" data-dismiss="modal">Нет</button>
<button type="button" class="btn danger p-x-md" ng-click="delete()">Да</button>
</div>
</div>
</div>

33
web/views/users/logs.html Normal file
View File

@@ -0,0 +1,33 @@
<div class="padding">
<div class="box">
<div class="table-responsive">
<table class="table table-bordered m-a-0">
<thead>
<tr>
<th>Log ID</th>
<th>User</th>
<th>Module</th>
<th>Action type</th>
<th>Action</th>
<th>Old value</th>
<th>New value</th>
<th>Время</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in logs">
<td>{{log.id}}</td>
<td>{{log.user}}</td>
<td>{{log.module}}</td>
<td>{{log.action_type}}</td>
<td>{{log.action}}</td>
<td>{{log.old_value}}</td>
<td>{{log.new_value}}</td>
<td>{{log.time}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>