From 5497b611ef094ab0007bdd1f0775571d08df26f6 Mon Sep 17 00:00:00 2001
From: miroman-afk <74014189+miroman-afk@users.noreply.github.com>
Date: Tue, 1 Feb 2022 01:55:15 +0300
Subject: [PATCH] v.2.12
-Add new setting "Delete shift"
-Move "Shift" frontend to V1 module
---
commands/GETSettings.php | 36 ++++
commands/POSTDeleteData.php | 86 ++++++++
composer.json | 2 +-
...014430_delete_settings_frontend_folder.php | 42 ++++
database/seeders/AddDeleteShiftSetting.php | 25 +++
module.ini | 4 +-
web/controllers/market.js | 51 +++++
web/controllers/modules.js | 62 ++++++
web/controllers/settings.js | 49 +++++
web/controllers/shifts.js | 24 +++
web/controllers/terminals.js | 183 ++++++++++++++++++
web/controllers/user_logs.js | 19 ++
web/controllers/users.js | 104 ++++++++++
web/menu_min.js | 32 +++
web/routes_min.js | 32 +++
web/views/modules/index.html | 34 ++++
web/views/modules/items/activate.html | 17 ++
web/views/modules/marketplace.html | 29 +++
web/views/settings/index.html | 57 ++++++
web/views/shifts/index.html | 1 +
web/views/terminals/edit.html | 50 +++++
web/views/terminals/equipment.html | 118 +++++++++++
web/views/terminals/index.html | 74 +++++++
web/views/terminals/logs.html | 27 +++
web/views/terminals/reports/delete.html | 35 ++++
web/views/users/create.html | 27 +++
web/views/users/edit.html | 51 +++++
web/views/users/index.html | 58 ++++++
web/views/users/logs.html | 33 ++++
29 files changed, 1359 insertions(+), 3 deletions(-)
create mode 100644 commands/GETSettings.php
create mode 100644 commands/POSTDeleteData.php
create mode 100644 database/migrations/2022_02_01_014430_delete_settings_frontend_folder.php
create mode 100644 database/seeders/AddDeleteShiftSetting.php
create mode 100644 web/controllers/market.js
create mode 100644 web/controllers/modules.js
create mode 100644 web/controllers/settings.js
create mode 100644 web/controllers/terminals.js
create mode 100644 web/controllers/user_logs.js
create mode 100644 web/controllers/users.js
create mode 100644 web/views/modules/index.html
create mode 100644 web/views/modules/items/activate.html
create mode 100644 web/views/modules/marketplace.html
create mode 100644 web/views/settings/index.html
create mode 100644 web/views/terminals/edit.html
create mode 100644 web/views/terminals/equipment.html
create mode 100644 web/views/terminals/index.html
create mode 100644 web/views/terminals/logs.html
create mode 100644 web/views/terminals/reports/delete.html
create mode 100644 web/views/users/create.html
create mode 100644 web/views/users/edit.html
create mode 100644 web/views/users/index.html
create mode 100644 web/views/users/logs.html
diff --git a/commands/GETSettings.php b/commands/GETSettings.php
new file mode 100644
index 0000000..e1fada4
--- /dev/null
+++ b/commands/GETSettings.php
@@ -0,0 +1,36 @@
+first();
+ if ($setting) {
+ return [
+ 'status' => 'success',
+ 'name' => $setting['name'],
+ 'code' => $setting['code'],
+ 'value' => $setting['value'],
+ ];
+ } else {
+ return [
+ 'status' => 'error',
+ 'more' => 'Setting not found',
+ ];
+ }
+ } else {
+ $settings = Settings::all();
+ return [
+ 'status' => 'success',
+ 'settings' => $settings,
+ ];
+ }
+ }
+}
\ No newline at end of file
diff --git a/commands/POSTDeleteData.php b/commands/POSTDeleteData.php
new file mode 100644
index 0000000..6066cd0
--- /dev/null
+++ b/commands/POSTDeleteData.php
@@ -0,0 +1,86 @@
+first();
+ $exchange_orders = ExchangeOrders::where('shift_id', '=', $input['shift_id'])->get();
+ $exchange_items = ExchangeItems::where('shift_id', '=', $input['shift_id'])->get();
+ $exchange_actions = ExchangeActions::where('shift_id', '=', $input['shift_id'])->get();
+ $exchange_deleted = ExchangeDeleted::where('shift_id', '=', $input['shift_id'])->get();
+ if ($exchange_shift) {
+ $exchange_shift = ExchangeShifts::find($input['shift_id']);
+ $exchange_shift->delete();
+ }
+ if ($exchange_orders) {
+ foreach ($exchange_orders as $key => $exchange_order) {
+ $order = ExchangeOrders::find($exchange_order['id']);
+ $order->delete();
+ }
+ }
+ if ($exchange_items) {
+ foreach ($exchange_items as $key => $exchange_item) {
+ $item = ExchangeItems::find($exchange_item['id']);
+ $item->delete();
+ }
+ }
+ if ($exchange_actions) {
+ foreach ($exchange_actions as $key => $exchange_action) {
+ $action = ExchangeActions::find($exchange_action['id']);
+ $action->delete();
+ }
+ }
+ if ($exchange_deleted) {
+ foreach ($exchange_deleted as $key => $exchange_delete) {
+ $delete = ExchangeDeleted::find($exchange_delete['id']);
+ $delete->delete();
+ }
+ }
+ function dirDel($dir) {
+ $d = opendir($dir);
+ while (($entry = readdir($d)) !== false) {
+ if ($entry != "." && $entry != "..") {
+ if (is_dir($dir . "/" . $entry)) {
+ dirDel($dir . "/" . $entry);
+ } else {
+ unlink($dir . "/" . $entry);
+ }
+ }
+ }
+ closedir($d);
+ rmdir($dir);
+ }
+ $cache_dir = __DIR__ . "\\..\\..\\..\\Cache\\";
+ dirDel($cache_dir);
+ return [
+ 'status' => 'success',
+ 'message' => 'Данные удалены',
+ ];
+
+ } else {
+ return [
+ 'status' => 'error',
+ 'message' => 'Check input data',
+ ];
+ }
+ } else {
+ return [
+ 'status' => 'error',
+ 'message' => 'Check input data',
+ ];
+ }
+ }
+}
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 0b0501f..66e956e 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "hrc-admin/hello-world",
- "version": "2.11",
+ "version": "2.12",
"require": {
"horeca/admin-php-module-core": "dev-master"
},
diff --git a/database/migrations/2022_02_01_014430_delete_settings_frontend_folder.php b/database/migrations/2022_02_01_014430_delete_settings_frontend_folder.php
new file mode 100644
index 0000000..a5670eb
--- /dev/null
+++ b/database/migrations/2022_02_01_014430_delete_settings_frontend_folder.php
@@ -0,0 +1,42 @@
+where('code', 11)->first();
+ if (!$check_setting) {
+ $setting = new Settings;
+ $setting->name = 'Удаление смен';
+ $setting->value = '0';
+ $setting->code = 11;
+ $setting->is_common = 1;
+ $setting->save();
+ }
+ }
+}
diff --git a/module.ini b/module.ini
index 48175fa..9cb601b 100644
--- a/module.ini
+++ b/module.ini
@@ -1,5 +1,5 @@
[info]
name=V1
-version=2.11
+version=2.12
[build]
-version=2.11
+version=2.12
diff --git a/web/controllers/market.js b/web/controllers/market.js
new file mode 100644
index 0000000..ececf1b
--- /dev/null
+++ b/web/controllers/market.js
@@ -0,0 +1,51 @@
+(function () {
+ 'use strict';
+ angular
+ .module('app')
+ .controller('MarketCtrl', MarketCtrl);
+
+ MarketCtrl.$inject = ['$scope', 'smartRequest', '$location', 'Notification'];
+ function MarketCtrl($scope, smartRequest, $location, Notification) {
+
+ $scope.key = '';
+
+ $scope.getListModules = function () {
+ smartRequest.get('settings/pay/modules', function (data) {
+ $scope.modules = data.modules;
+ });
+ };
+
+ $scope.showModuleActivate = function (id) {
+ $scope.selectedModule = $scope.getModulerById(id);
+ $('#activate-module').modal();
+ };
+
+ $scope.activateModule = function () {
+ $('#btn-activated').prop('disabled', false);
+ smartRequest.post('settings/activate/module', {
+ key: $scope.key,
+ module: $scope.selectedModule.name,
+ }, function(data) {
+ if (data.message == 'Активация прошла успешно') {
+ Notification.success(data.message);
+ $location.path('/');
+ } else {
+ Notification.error(data.message);
+ }
+ });
+ };
+
+ $scope.getModulerById = function(id) {
+ var res;
+ $scope.modules.forEach(function (item) {
+ if (item.id == id) {
+ res = item;
+ return;
+ }
+ });
+ return res;
+ };
+
+ $scope.getListModules();
+ }
+})();
\ No newline at end of file
diff --git a/web/controllers/modules.js b/web/controllers/modules.js
new file mode 100644
index 0000000..09bcb64
--- /dev/null
+++ b/web/controllers/modules.js
@@ -0,0 +1,62 @@
+(function () {
+ 'use strict';
+ angular
+ .module('app')
+ .controller('ModulesCtrl', ModulesCtrl);
+
+ ModulesCtrl.$inject = ['$scope', 'smartRequest', '$location', 'Notification'];
+ function ModulesCtrl($scope, smartRequest, $location, Notification) {
+ $scope.modules = [];
+ $scope.isAllSelected = false;
+
+ $scope.getListModules = function () {
+ smartRequest.get('settings/modules', function (data) {
+ $scope.modules = data.modules.modules;
+
+ $scope.modules.forEach(function (el) {
+ el.selected = false;
+ });
+ });
+ };
+
+ $scope.toggleAll = function () {
+ var toggleStatus = !$scope.isAllSelected;
+ angular.forEach($scope.modules, function (itm) { itm.selected = toggleStatus; });
+ $scope.isAllSelected = toggleStatus;
+ };
+
+ $scope.optionToggled = function () {
+ $scope.isAllSelected = $scope.modules.every(function (itm) { return itm.selected; });
+ };
+
+ $scope.updateModules = function () {
+ $scope.buttonDownload(true);
+ smartRequest.post('settings/update/modules', {
+ 'modules': JSON.stringify($scope.toObject($scope.getSelectedModules()))
+ }, function(data) {
+ Notification.success('Модули обновлены');
+ $scope.getListModules();
+ $scope.buttonDownload(false);
+ });
+ };
+
+ $scope.getSelectedModules = function () {
+ return $scope.modules.filter(function (el) {
+ return el.selected;
+ });
+ };
+
+ $scope.toObject = function (arr) {
+ var rv = {};
+ for (var i = 0; i < arr.length; i++)
+ rv[i] = arr[i];
+ return rv;
+ };
+
+ $scope.buttonDownload = function(toggle) {
+ $('#btn-download').prop('disabled', toggle);
+ };
+
+ $scope.getListModules();
+ }
+})();
\ No newline at end of file
diff --git a/web/controllers/settings.js b/web/controllers/settings.js
new file mode 100644
index 0000000..627061e
--- /dev/null
+++ b/web/controllers/settings.js
@@ -0,0 +1,49 @@
+(function () {
+ 'use strict';
+ angular
+ .module('app')
+ .controller('SettingsCtrl', SettingsCtrl);
+
+ SettingsCtrl.$inject = ['$scope', 'smartRequest', 'Notification'];
+ function SettingsCtrl($scope, smartRequest, Notification) {
+ $scope.settings = [];
+ $scope.terminalKey = '';
+ $scope.menuCode = '';
+
+ $scope.listSettings = function () {
+ $scope.settings = [];
+
+ smartRequest.get('settings/all?global=0', function (data) {
+ $scope.settings = $scope.settings.concat(data.settings);
+ });
+
+ smartRequest.get('v1/settings', function (data) {
+ $scope.settings = $scope.settings.concat(data.settings);
+ });
+
+ };
+
+ $scope.onSettingChange = function (setting) {
+ if (setting.value.length > 0) {
+ smartRequest.post('settings/update', {
+ code: setting.code,
+ value: setting.value
+ });
+ Notification.success('Настройки обновлены');
+ }
+ };
+
+ $scope.getRealisation = function() {
+ smartRequest.get('sync/realisation?terminal=' + $scope.terminalKey + '&menu=' + $scope.menuCode, function(data) {
+ });
+ };
+
+ $scope.switchDishes = function() {
+ smartRequest.get('sync/replace/dishes', function(data) {
+ console.log(data);
+ });
+ };
+
+ $scope.listSettings();
+ }
+})();
\ No newline at end of file
diff --git a/web/controllers/shifts.js b/web/controllers/shifts.js
index a3d903f..07c8c39 100644
--- a/web/controllers/shifts.js
+++ b/web/controllers/shifts.js
@@ -48,6 +48,30 @@
$scope.countOfPages = data.pages;
$scope.pages = $scope.makePages();
});
+ smartRequest.get('v1/settings?code=11', function (data) {
+ $scope.delete_shift_value = data.value;
+ });
+ };
+
+ $scope.deleteShift = function (shift) {
+ $('#preload-modal').modal();
+ Notification.primary('Дождитесь удаления! Страница обновится автоматически.');
+ smartRequest.post('v1/deletedata', {
+ value: 'delete_shift',
+ shift_id: shift.id
+ }, function (data) {
+ $scope.status = data.status;
+ $scope.message = data.message;
+ if (data.status == 'success') {
+ Notification.success(data.message);
+ setTimeout(function() {
+ location.reload();
+ }, 1000);
+ }
+ if ($scope.status == 'error') {
+ Notification.error(data.message);
+ }
+ });
};
$scope.reportDelete = function (shift) {
diff --git a/web/controllers/terminals.js b/web/controllers/terminals.js
new file mode 100644
index 0000000..cdf2766
--- /dev/null
+++ b/web/controllers/terminals.js
@@ -0,0 +1,183 @@
+(function () {
+ 'use strict';
+ angular
+ .module('app')
+ .controller('TerminalsCtrl', TerminalsCtrl);
+
+ TerminalsCtrl.$inject = ['$scope', 'smartRequest', 'Notification'];
+ function TerminalsCtrl($scope, smartRequest, Notification) {
+ $scope.terminals = [];
+ $scope.tasks = [];
+ $scope.printers = [];
+
+ $scope.settings = {
+ sizes: [56, 80],
+ speeds: [4800, 9600, 19200, 38400, 57600, 115200],
+ types: ['COM', 'LAN', 'Windows'],
+ com_ports: ['COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'COM10']
+ };
+
+ $scope.terminal_id = 0;
+ $scope.active_tasks = [];
+
+ $scope.terminalLogs = [];
+
+ $scope.update = function () {
+ smartRequest.get('settings/terminals', function (data) {
+ $scope.terminals = data.terminals;
+ });
+ };
+
+ $scope.update();
+
+ $scope.onLicence = function (key, active) {
+ if (active === false) {
+ smartRequest.post('licence/reject', {
+ 'key': key
+ },
+ function () {
+ $scope.update();
+ },
+ function () {
+ $scope.update();
+ });
+ }
+ else {
+ smartRequest.post('licence/apply', {
+ 'key': key
+ },
+ function () {
+ $scope.update();
+ },
+ function () {
+ $scope.update();
+ });
+ }
+
+ };
+
+ $scope.isTaskActive = function (task) {
+ for (var i = 0; i < $scope.active_tasks.length; i++) {
+ if (task.code == $scope.active_tasks[i].code) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ $scope.editTerminal = function (id) {
+ $scope.terminal_id = id;
+
+ smartRequest.get('settings/update/list', function (data) {
+ for (var i = 0; i < data.update_list.length; i++) {
+ data.update_list[i].active = false;
+ data.update_list[i].period = parseInt(data.update_list[i].default);
+ }
+
+ $scope.all_tasks = data.update_list;
+ });
+
+ smartRequest.get('settings/update/active?terminal=' + id, function (data) {
+ for (var i = 0; i < data.update_list.length; i++) {
+ data.update_list[i].active = true;
+ data.update_list[i].period = parseInt(data.update_list[i].period);
+ }
+
+ $scope.active_tasks = data.update_list;
+ $('#edit-terminal').modal();
+ });
+ };
+
+ $scope.getEquipment = function (id) {
+ smartRequest.get('v1/equipment?terminal=' + id, function (data) {
+ $scope.printers = data.printers;
+ $scope.groups = data.printer_groups;
+ $scope.terminal_id = id;
+ });
+ $('#equipment').modal();
+ };
+
+ $scope.updateEquipment = function (printer) {
+ smartRequest.post('v1/printers', {
+ terminal: $scope.terminal_id,
+ id: printer.id,
+ name: printer.name,
+ ip_address: printer.ip,
+ com_port: printer.com_port,
+ type: printer.type,
+ speed: printer.speed,
+ group: printer.printer_group,
+ template: printer.template,
+ size: printer.size,
+ driver: printer.driver,
+ more: printer.more
+
+ }, function(data) {
+ Notification.success('Данные принтера сохранены');
+ });
+ };
+
+ $scope.updateFiscal = function (fiscal) {
+ smartRequest.post('v1/fiscals', {
+ terminal: $scope.terminal_id,
+ pass: fiscal.password,
+ ip: fiscal.ip
+ }, function(data) {
+ Notification.success('Данные ФР изменены');
+ });
+ };
+
+ $scope.addTask = function () {
+ smartRequest.get('settings/equipment/task?terminal=' + $scope.terminal_id, function (data) {
+ Notification.success('Задача запушена');
+ });
+ };
+
+ $scope.objectHasProperty = function (object, name) {
+ return object.hasOwnProperty(name);
+ };
+
+ $scope.changeTask = function (task) {
+ if (task.active) {
+ smartRequest.post('settings/update/enable', {
+ terminal: $scope.terminal_id,
+ task: task.code,
+ period: task.period
+ });
+ }
+ else {
+ smartRequest.post('settings/update/disable', {
+ terminal: $scope.terminal_id,
+ task: task.code
+ });
+ }
+ };
+
+ $scope.changePeriod = function (task) {
+ if (task.active) {
+ smartRequest.post('settings/update/enable', {
+ terminal: $scope.terminal_id,
+ task: task.code,
+ period: task.period
+ });
+ }
+ };
+
+ $scope.runTask = function (task) {
+ smartRequest.post('settings/update/force', {
+ terminal: $scope.terminal_id,
+ task: task.code
+ }, function (data) {
+ Notification.success('Задача запушена');
+ });
+ };
+
+ $scope.showLogs = function (terminal_key) {
+ smartRequest.get('settings/terminal/logs?terminal=' + terminal_key, function (data) {
+ $scope.terminalLogs = data.logs;
+ $('#logs').modal();
+ });
+ };
+ }
+})();
\ No newline at end of file
diff --git a/web/controllers/user_logs.js b/web/controllers/user_logs.js
new file mode 100644
index 0000000..dab0f6f
--- /dev/null
+++ b/web/controllers/user_logs.js
@@ -0,0 +1,19 @@
+(function() {
+ 'use strict';
+ angular
+ .module('app')
+ .controller('UserLogCtrl', UserLogCtrl);
+
+ UserLogCtrl.$inject = ['$scope', 'smartRequest', '$rootScope'];
+ function UserLogCtrl($scope, smartRequest, $rootScope) {
+ $scope.logs = [];
+
+ $scope.getLogs = function() {
+ smartRequest.get('log/user/list', function(data) {
+ $scope.logs = data.logs;
+ });
+ };
+
+ $scope.getLogs();
+ }
+})();
\ No newline at end of file
diff --git a/web/controllers/users.js b/web/controllers/users.js
new file mode 100644
index 0000000..6e26cdf
--- /dev/null
+++ b/web/controllers/users.js
@@ -0,0 +1,104 @@
+(function() {
+ 'use strict';
+ angular
+ .module('app')
+ .controller('UsersCtrl', UsersCtrl);
+
+ UsersCtrl.$inject = ['$scope', 'smartRequest', '$rootScope'];
+ function UsersCtrl($scope, smartRequest, $rootScope) {
+ $scope.users = [];
+ $scope.currentUser = {};
+ $scope.newUser = {};
+
+ $scope.update = function() {
+ smartRequest.get('settings/users/list', function(data) {
+ $scope.users = data.users;
+ });
+ };
+
+ $scope.edit = function(user) {
+ $scope.currentUser = user;
+ $scope.allRights = [];
+
+ smartRequest.get('right/all', function(data) {
+ $scope.allRights = data.rights;
+
+ smartRequest.get('right/user?id=' + $scope.currentUser.id, function(data) {
+ for (var i = 0; i < $scope.allRights.length; i++) {
+ $scope.allRights[i].is_active = false;
+
+ for (var j = 0; j < data.rights.length; j++) {
+ if($scope.allRights[i].code === data.rights[j].code) {
+ $scope.allRights[i].is_active = true;
+
+ break;
+ }
+ }
+ }
+
+ $scope.currentUser.rights = $scope.allRights;
+ });
+ });
+
+
+
+ $('#edit-user').modal();
+ };
+
+ $scope.save = function() {
+ $('#edit-user').modal('toggle');
+
+ smartRequest.post('settings/users/edit', {
+ id: $scope.currentUser.id,
+ name: $scope.currentUser.name,
+ login: $scope.currentUser.login,
+ password: $scope.currentUser.password
+ }, function(data) {
+ $scope.update();
+ });
+ };
+
+ $scope.delete = function() {
+ $('#edit-user').modal('toggle');
+ $('#edit-user-confirm-delete').modal('toggle');
+
+ smartRequest.post('settings/users/delete', {
+ id: $scope.currentUser.id
+ }, function(data) {
+ $scope.currentUser = {};
+ $scope.update();
+ });
+ };
+
+ $scope.add = function() {
+ $scope.newUser = {};
+
+ $('#new-user').modal();
+ };
+
+ $scope.create = function() {
+ $('#new-user').modal('toggle');
+
+ smartRequest.post('settings/users/add', {
+ name: $scope.newUser.name,
+ login: $scope.newUser.login,
+ password: $scope.newUser.password
+ }, function(data) {
+ $scope.update();
+ });
+ };
+
+ $scope.onRight = function(code) {
+ smartRequest.post('right/toggle', {
+ id: $scope.currentUser.id,
+ code: code
+ }, function(data) {
+ smartRequest.get('right/list', function(data) {
+ $rootScope.globals.currentUser.rights = data.rights;
+ });
+ });
+ };
+
+ $scope.update();
+ }
+})();
\ No newline at end of file
diff --git a/web/menu_min.js b/web/menu_min.js
index 2931d12..a4594c2 100644
--- a/web/menu_min.js
+++ b/web/menu_min.js
@@ -37,5 +37,37 @@ item: [
url: 'app.reports'
}
]
+ },
+ {
+ name: 'Терминалы',
+ acl: 'terminals',
+ url: 'app.terminals',
+ icon: 'desktop_windows',
+ order: 100
+ },
+ {
+ name: 'Пользователи',
+ acl: 'users',
+ icon: 'account_box',
+ order: 101,
+ items: [
+ {
+ name: 'Управление',
+ acl: 'users',
+ url: 'app.users'
+ },
+ {
+ name: 'Логи',
+ acl: 'users',
+ url: 'app.user_logs'
+ }
+ ]
+ },
+ {
+ name: 'Настройки',
+ acl: 'settings',
+ url: 'app.settings',
+ icon: 'settings',
+ order: 102
}
];
\ No newline at end of file
diff --git a/web/routes_min.js b/web/routes_min.js
index 8e55618..596dc92 100644
--- a/web/routes_min.js
+++ b/web/routes_min.js
@@ -45,4 +45,36 @@
data: {title: 'Отчеты'},
controller: 'ReportsCtrl',
resolve: ['scripts/controllers/reports.js', 'moment', 'datetimepicker', 'select2']
+},
+{
+ code: 'app.users',
+ url: '/users',
+ templateUrl: '../views/users/index.html',
+ data: {title: 'Пользователи'},
+ controller: 'UsersCtrl',
+ resolve: ['scripts/controllers/users.js']
+},
+{
+ code: 'app.settings',
+ url: '/settings',
+ templateUrl: '../views/settings/index.html',
+ data: {title: 'Настройки'},
+ controller: 'SettingsCtrl',
+ resolve: ['scripts/controllers/settings.js']
+},
+{
+ code: 'app.terminals',
+ url: '/terminals',
+ templateUrl: '../views/terminals/index.html',
+ data: { title : 'Терминалы' },
+ controller: 'TerminalsCtrl',
+ resolve: ['scripts/controllers/terminals.js']
+},
+{
+ code: 'app.user_logs',
+ url: '/logs',
+ templateUrl: '../views/users/logs.html',
+ data: { title : 'Логи пользователей' },
+ controller: 'UserLogCtrl',
+ resolve: ['scripts/controllers/user_logs.js']
}
\ No newline at end of file
diff --git a/web/views/modules/index.html b/web/views/modules/index.html
new file mode 100644
index 0000000..6590f48
--- /dev/null
+++ b/web/views/modules/index.html
@@ -0,0 +1,34 @@
+
+
+
+
Доступные обновления модулей
+
Нет доступных обновлений
+
+
+
+
+
\ No newline at end of file
diff --git a/web/views/modules/items/activate.html b/web/views/modules/items/activate.html
new file mode 100644
index 0000000..6af1452
--- /dev/null
+++ b/web/views/modules/items/activate.html
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/web/views/modules/marketplace.html b/web/views/modules/marketplace.html
new file mode 100644
index 0000000..fc8747e
--- /dev/null
+++ b/web/views/modules/marketplace.html
@@ -0,0 +1,29 @@
+
+
Дополнительные модули
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/views/settings/index.html b/web/views/settings/index.html
new file mode 100644
index 0000000..a2c7e70
--- /dev/null
+++ b/web/views/settings/index.html
@@ -0,0 +1,57 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/web/views/shifts/index.html b/web/views/shifts/index.html
index 290f1fd..341ef30 100644
--- a/web/views/shifts/index.html
+++ b/web/views/shifts/index.html
@@ -59,6 +59,7 @@
По отделам
По внешним заказам
Восстановить смену
+ Удалить смену
diff --git a/web/views/terminals/edit.html b/web/views/terminals/edit.html
new file mode 100644
index 0000000..fbfe39e
--- /dev/null
+++ b/web/views/terminals/edit.html
@@ -0,0 +1,50 @@
+
\ No newline at end of file
diff --git a/web/views/terminals/equipment.html b/web/views/terminals/equipment.html
new file mode 100644
index 0000000..319b49f
--- /dev/null
+++ b/web/views/terminals/equipment.html
@@ -0,0 +1,118 @@
+
\ No newline at end of file
diff --git a/web/views/terminals/index.html b/web/views/terminals/index.html
new file mode 100644
index 0000000..a742c18
--- /dev/null
+++ b/web/views/terminals/index.html
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/views/terminals/logs.html b/web/views/terminals/logs.html
new file mode 100644
index 0000000..4708cfe
--- /dev/null
+++ b/web/views/terminals/logs.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+ | Log |
+ Time |
+
+
+
+
+
+ | {{log.value}} |
+ {{log.time}} |
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/views/terminals/reports/delete.html b/web/views/terminals/reports/delete.html
new file mode 100644
index 0000000..27c91da
--- /dev/null
+++ b/web/views/terminals/reports/delete.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ | Заказ #{{ report.order_code }} |
+
+
+
+
+
+ {{ item.dish_name }} ({{ item.count }} на сумму {{ item.sum }} BYN)
+
+
+ Удалил: {{ item.who }}
+ Подтвердил: {{ item.approved }}
+ Причина: {{ item.reason }}
+
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/views/users/create.html b/web/views/users/create.html
new file mode 100644
index 0000000..0e5510b
--- /dev/null
+++ b/web/views/users/create.html
@@ -0,0 +1,27 @@
+
\ No newline at end of file
diff --git a/web/views/users/edit.html b/web/views/users/edit.html
new file mode 100644
index 0000000..9f37643
--- /dev/null
+++ b/web/views/users/edit.html
@@ -0,0 +1,51 @@
+
\ No newline at end of file
diff --git a/web/views/users/index.html b/web/views/users/index.html
new file mode 100644
index 0000000..228a12d
--- /dev/null
+++ b/web/views/users/index.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+ | ID |
+ Логин |
+ Имя |
+
+
+
+
+ | {{ user.id }} |
+ {{ user.login }} |
+ {{ user.name }} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Вы действительно хотите удалить пользователя?
+
+
+
+
+
\ No newline at end of file
diff --git a/web/views/users/logs.html b/web/views/users/logs.html
new file mode 100644
index 0000000..21f3178
--- /dev/null
+++ b/web/views/users/logs.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ | Log ID |
+ User |
+ Module |
+ Action type |
+ Action |
+ Old value |
+ New value |
+ Время |
+
+
+
+
+
+ | {{log.id}} |
+ {{log.user}} |
+ {{log.module}} |
+ {{log.action_type}} |
+ {{log.action}} |
+ {{log.old_value}} |
+ {{log.new_value}} |
+ {{log.time}} |
+
+
+
+
+
+
\ No newline at end of file