@opengis/admin 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/add-page-w8kqN9iC.js +94 -0
  2. package/dist/{admin-interface-vPkHXzQK.js → admin-interface-BfdlUhra.js} +142 -136
  3. package/dist/{admin-view-BYF4ITZY.js → admin-view-RWOu4JiB.js} +1 -1
  4. package/dist/admin.js +1 -1
  5. package/dist/admin.umd.cjs +618 -25
  6. package/dist/card-page-B3wwBScq.js +115 -0
  7. package/dist/{card-view-CjZRvfqy.js → card-view-CZ14NHxS.js} +1 -1
  8. package/dist/edit-page-QkVrvzva.js +104 -0
  9. package/dist/import-file-BJrxCNbe.js +29254 -0
  10. package/dist/style.css +1 -1
  11. package/package.json +5 -2
  12. package/plugin.js +1 -1
  13. package/server/routes/data/controllers/cardData.js +1 -1
  14. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +82 -0
  15. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +142 -0
  16. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -0
  17. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +67 -0
  18. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -0
  19. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -0
  20. package/server/routes/data/controllers/tableData.js +12 -31
  21. package/server/routes/data/controllers/tableFilter.js +1 -1
  22. package/server/routes/data/controllers/utils/assignTokens.js +31 -0
  23. package/server/routes/data/index.mjs +1 -1
  24. package/server/routes/templates/controllers/getTemplate.js +2 -4
  25. package/dist/add-page-C-msiPrU.js +0 -64
  26. package/dist/card-page-HOwuHNjV.js +0 -49
  27. package/dist/edit-page-7yrRusn4.js +0 -58
  28. package/dist/form-TrZSpRSC.js +0 -38
  29. package/dist/import-file-DPHo57R5.js +0 -3726
  30. package/server/routes/data/controllers/metaFormat/getSelectVal.js +0 -19
  31. package/server/routes/data/controllers/metaFormat/index.js +0 -29
  32. package/server/routes/templates/funcs/addTempateFolder.js +0 -47
  33. package/server/routes/templates/funcs/getTemplate.js +0 -70
  34. package/server/routes/templates/funcs/getTemplatePath.js +0 -39
  35. package/server/routes/templates/funcs/loadTemplate.js +0 -1
  36. package/server/routes/templates/funcs/loadTemplateDir.js +0 -1
  37. package/server/routes/templates/funcs/loadTemplatePath.js +0 -1
  38. package/server/templates/interface/management.user_group.html +0 -1
  39. package/server/templates/interface/management.user_group.json +0 -10
  40. package/server/templates/interface/management.users.html +0 -1
  41. package/server/templates/interface/management.users.json +0 -10
  42. package/server/templates/map/dgm_level_line.xml +0 -52
  43. package/server/templates/pt/admin-menu-pt.html +0 -108
  44. package/server/templates/pt/management.user_group.table.pt.html +0 -127
  45. package/server/templates/pt/management.users.table.pt.html +0 -130
  46. package/server/templates/pt/table-standard-pt.html +0 -202
@@ -1,19 +0,0 @@
1
- import getTemplate from "../../../templates/funcs/getTemplate.js";
2
-
3
- export default async function getSelectVal({ pg, redis, name, values }) {
4
- const cls = await getTemplate(['select', 'cls'], name);
5
- if (!cls) return;
6
- if ((Array.isArray(cls) && !cls?.length) && !cls?.sql) return null;
7
- const key = `select:${name}`;
8
- const cache = !Array.isArray(cls) ? (await redis.hmget(key, values)).reduce((p, el, i) => ({ ...p, [values[i]]: el }), {}) : {};
9
-
10
- const data = Array.isArray(cls) ? cls : (values.filter(el => !cache[el]).length
11
- ? await pg.query(`with c(id,text) as (${cls.sql}) select * from c where id = any('{${values.filter(el => !cache[el])}}')`).then(el => el.rows)
12
- : []);
13
-
14
- const clsAr = { ...cache, ...data.reduce((p, el) => ({ ...p, [el.id.toString()]: el.color ? el : el.text }), {}) };
15
- if (!cls.arr && data.length) {
16
- redis.hmset(key, clsAr);
17
- }
18
- return clsAr;
19
- }
@@ -1,29 +0,0 @@
1
- import getTemplate from "../../../templates/funcs/getTemplate.js";
2
- import getSelectVal from './getSelectVal.js';
3
-
4
- export default async function metaFormat({ funcs, rows, table }) {
5
- const loadTable = await getTemplate('table', table);
6
- const selectCols = loadTable?.colModel?.filter((e) => e.name && e.option).map((el) => ({ ...el, data: el.option }))
7
- .concat(loadTable?.columns?.filter((e) => e.data) || []);
8
- const metaCls = Object.keys(loadTable?.meta?.cls || {}).map((el) => ({ name: el, data: loadTable?.meta?.cls[el] }));
9
- if (!selectCols?.length && !metaCls?.length) return rows;
10
-
11
- const pg = funcs.getPG();
12
- const redis = funcs.getRedis();
13
-
14
- // cls & select format
15
- await Promise.all(selectCols.concat(metaCls)?.map(async (attr) => {
16
- const values = [...new Set(rows?.map((el) => el[attr.name]).flat())].filter((el) => el);
17
- if (!values.length) return null;
18
- const cls = await getSelectVal({ pg, redis, name: attr.data, values });
19
- if (!cls) return null;
20
- rows.forEach(el => {
21
- const val = el[attr.name]?.map?.(c => cls[c] || c) || cls[el[attr.name]] || el[attr.name];
22
- if (!val) return;
23
- Object.assign(el, { [val?.color ? `${attr.name}_data` : `${attr.name}_text`]: (val.color ? val : val.text || val) });
24
- });
25
- return null;
26
- }));
27
-
28
- return rows;
29
- }
@@ -1,47 +0,0 @@
1
- import path from 'path';
2
- import { statSync, existsSync } from 'node:fs';
3
- import { readdir, readFile } from 'node:fs/promises';
4
-
5
- import loadTemplate from './loadTemplate.js';
6
-
7
- export default async function addTempateFolder(dir) {
8
- if (!existsSync(dir)) {
9
- throw new Error(`dir not found: ${dir}`);
10
- }
11
- const subdirs = (await readdir(dir, { withFileTypes: true }))?.filter((dirent) => statSync(path.join(dirent.path, dirent.name)).isDirectory());
12
- await Promise.all(subdirs.map(async (dirent) => {
13
- const content = dirent.name !== 'card' ? await readdir(path.join(dirent.path, dirent.name), { withFileTypes: true }) : [];
14
- loadTemplate[dirent.name] = loadTemplate[dirent.name] || {};
15
- const files = content?.filter((el) => !statSync(path.join(el.path, el.name)).isDirectory());
16
- await Promise.all(files?.map(async (el) => {
17
- const data = await readFile(path.join(el.path, el.name), 'utf-8');
18
-
19
- if (['select', 'interface'].includes(dirent.name) && path.extname(el.name) === '.json') {
20
- loadTemplate[dirent.name][el.name.replace(path.extname(el.name), '.setting')] = JSON.parse(data);
21
- return;
22
- }
23
-
24
- loadTemplate[dirent.name][el.name.replace(path.extname(el.name), '')] = path.extname(el.name) === '.json' ? JSON.parse(data) : data;
25
- }));
26
- console.log(dir, dirent.name, files.map((el) => el.name));
27
- }));
28
- const carddir = subdirs.find((el) => el.name === 'card');
29
- const cardSubdirs = carddir ? (await readdir(path.join(carddir.path, carddir.name), { withFileTypes: true }))?.filter((dirent) => statSync(path.join(dirent.path, dirent.name)).isDirectory()) : [];
30
-
31
- await Promise.all(cardSubdirs.map(async (dirent) => {
32
- const content = await readdir(path.join(dirent.path, dirent.name), { withFileTypes: true });
33
- const files = content?.filter((el) => !statSync(path.join(el.path, el.name)).isDirectory());
34
- loadTemplate['card'] = loadTemplate['card'] || {};
35
- await Promise.all(files?.map(async (el) => {
36
- loadTemplate['card'][dirent.name] = loadTemplate['card'][dirent.name] || {};
37
- const data = await readFile(path.join(el.path, el.name), 'utf-8');
38
- if (path.extname(el.name) === '.yml') {
39
- loadTemplate['card'][dirent.name]['config'] = data;
40
- } else {
41
- loadTemplate['card'][dirent.name][path.parse(el.name).name] = data;
42
- }
43
- }));
44
- console.log('card', dir, dirent.name, files.map((el) => el.name));
45
- }));
46
- console.log(dir, 'finish');
47
- }
@@ -1,70 +0,0 @@
1
- import { readdir, readFile } from 'fs/promises';
2
- import path from 'path';
3
- import yaml from 'js-yaml';
4
-
5
- import getTemplatePath from './getTemplatePath.js';
6
- import loadTemplate from './loadTemplate.js';
7
-
8
-
9
- async function readFileData(file) {
10
- const data = await readFile(file, 'utf-8');
11
- const ext = file.substring(file.lastIndexOf('.') + 1);
12
-
13
- if (ext === 'yml') {
14
- return yaml.load(data);
15
- }
16
- if (ext === 'json') {
17
- return JSON.parse(data);
18
- }
19
- return data;
20
- };
21
-
22
- const isProduction = process.env.NODE_ENV === 'production';
23
-
24
- async function getTemplateData(template) {
25
-
26
- // dir template: dashboard, card
27
- if (template[0][3]) {
28
- const files = await readdir(template[0][1]);
29
- const data = await Promise.all(files.map(async el => readFileData(path.join(template[0][1], el))))
30
- return files.map((el, i) => [el, data[i]])
31
- }
32
-
33
- // one file template: table, form
34
- if (template.length === 1) {
35
- const data = await readFileData(template[0][1])
36
- return data
37
- }
38
-
39
- // multi file template: select, etc
40
- if (template.length > 1) {
41
- const data = await Promise.all(template.map(async el => await readFileData(el[1])))
42
- const result = {}
43
- template.forEach((el, i) => {
44
- Object.assign(result, typeof data[i] === 'object' ? data[i] : { [el[2]]: data[i] })
45
- })
46
- return result
47
- }
48
- }
49
- export default async function getTemplate(type, name) {
50
- if (!type) return null;
51
- if (!name) return null;
52
-
53
- const key = type + ':' + name;
54
- if (name === 'cache' && !isProduction) return loadTemplate; // all cache debug
55
- if (loadTemplate[key] && isProduction) return loadTemplate[key]; // from cache
56
-
57
- // type one or multi
58
- const templateList = Array.isArray(type) ?
59
- type.map(el => getTemplatePath(el)).filter(list => list?.filter(el => el[0] === name).length)[0] || [] :
60
- getTemplatePath(type);
61
-
62
- // find template
63
- const template = templateList?.filter(el => el[0] === name)
64
- if (name === 'list' && !isProduction) return templateList; // all template debug
65
-
66
- if (!template.length) return null; // not found
67
-
68
- loadTemplate[key] = await getTemplateData(template);
69
- return loadTemplate[key];
70
- }
@@ -1,39 +0,0 @@
1
- import { readFile } from 'fs/promises';
2
- import fs, { existsSync, readdirSync } from 'fs';
3
- import path from 'path';
4
- // import config from '../../../../config.js';
5
-
6
- import loadTemplatePath from './loadTemplatePath.js';
7
- const cwd = process.cwd();
8
- const moduleList = []
9
-
10
- export default function getTemplatePath(type) {
11
- if (!type) return null;
12
-
13
- // form cache
14
- if (loadTemplatePath[type]) return loadTemplatePath[type];
15
- loadTemplatePath[type] = []
16
-
17
- const moduleDir = path.join(cwd, 'module')
18
- if (fs.existsSync(moduleDir) && !moduleList.length) {
19
- readdirSync(moduleDir).forEach(el => moduleList.push(el))
20
- }
21
- moduleList.forEach(el => {
22
- const templateDir = path.join(moduleDir, el, type)
23
- if (!existsSync(templateDir)) return;
24
-
25
- const list = readdirSync(templateDir, { withFileTypes: true })
26
-
27
-
28
- list.forEach(file => {
29
- const isDir = file.isDirectory();
30
- const name = isDir ? file.name : file.name.substring(0, file.name.lastIndexOf('.'))
31
- const ext = isDir ? null : file.name.substring(file.name.lastIndexOf('.') + 1)
32
- loadTemplatePath[type].push([name, path.join(templateDir, file.name), ext, isDir])
33
- });
34
-
35
- });
36
-
37
- return loadTemplatePath[type]
38
-
39
- }
@@ -1 +0,0 @@
1
- export default {}
@@ -1 +0,0 @@
1
- export default []
@@ -1 +0,0 @@
1
- export default {}
@@ -1 +0,0 @@
1
- {{{_table name="management.user_group.table" order="cdate desc" sqlFilter1=1 sqlTable1=1}}}
@@ -1,10 +0,0 @@
1
- {
2
- "de": "",
3
- "en": null,
4
- "es": "",
5
- "ru": "Группы пользователей",
6
- "ua": "Групи користувачів",
7
- "group": "ADMIN",
8
- "public": false,
9
- "doct_id": "1303633106393108264"
10
- }
@@ -1 +0,0 @@
1
- {{{_table name="management.users.table" order="cdate desc" sqlTable1=1 filter_sql1=1 sqlFilter1=1 }}}
@@ -1,10 +0,0 @@
1
- {
2
- "de": "",
3
- "en": null,
4
- "es": "",
5
- "ru": "Пользователи",
6
- "ua": "Користувачі",
7
- "group": "ADMIN",
8
- "public": false,
9
- "doct_id": "349919371864314880"
10
- }
@@ -1,52 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE Map[]>
3
- <Map buffer-size="128" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
4
- <Parameters>
5
- <Parameter name="format"><![CDATA[png]]></Parameter>
6
- <Parameter name="bounds">22.21886234574473,44.39063304354448,39.488618053500204,52.25437909874123</Parameter>
7
- <Parameter name="maximum-extent"><![CDATA[-20037508.34,-20037508.34,20037508.34,20037508.34]]></Parameter>
8
- <Parameter name="center">0,0,2</Parameter>
9
- <Parameter name="minzoom">1</Parameter>
10
- <Parameter name="maxzoom">25</Parameter>
11
- </Parameters>
12
- <Style filter-mode="first" name="line_niv-fill">
13
- <Rule>
14
- <MaxScaleDenominator>25000000</MaxScaleDenominator>
15
- <Filter><![CDATA[([niv_class_n] = 'II')]]></Filter>
16
- <LineSymbolizer stroke="#ffffff" stroke-width="3" />
17
- </Rule>
18
- <Rule>
19
- <MaxScaleDenominator>25000000</MaxScaleDenominator>
20
- <Filter><![CDATA[([niv_class_n] = 'I')]]></Filter>
21
- <LineSymbolizer stroke="#ffffff" stroke-width="3" />
22
- </Rule>
23
- </Style>
24
- <Style filter-mode="first" name="line_niv">
25
- <Rule>
26
- <MaxScaleDenominator>25000000</MaxScaleDenominator>
27
- <Filter><![CDATA[([niv_class_n] = 'II')]]></Filter>
28
- <LineSymbolizer stroke="#0000ff" stroke-width="4" />
29
- </Rule>
30
- <Rule>
31
- <MaxScaleDenominator>25000000</MaxScaleDenominator>
32
- <Filter><![CDATA[([niv_class_n] = 'I')]]></Filter>
33
- <LineSymbolizer stroke="#ff0000" stroke-width="4" />
34
- </Rule>
35
- </Style>
36
- <Layer maximum-scale-denominator="25000000" minimum-scale-denominator="100" name="line_niv" srs="+proj=longlat +datum=WGS84 +no_defs ">
37
- <StyleName><![CDATA[line_niv]]></StyleName>
38
- <StyleName><![CDATA[line_niv-fill]]></StyleName>
39
- <Datasource>
40
- <Parameter name="simplify_geometries">true</Parameter>
41
- <Parameter name="type"><![CDATA[postgis]]></Parameter>
42
- <Parameter name="extent"><![CDATA[22.21886234574473,44.39063304354448,39.488618053500204,52.25437909874123]]></Parameter>
43
- <Parameter name="host"><![CDATA[localhost]]></Parameter>
44
- <Parameter name="table"><![CDATA[(select * from dgm.dgm_niv) as dp]]></Parameter>
45
- <Parameter name="dbname"><![CDATA[geo_dgm_gki]]></Parameter>
46
- <Parameter name="geometry_field"><![CDATA[geom]]></Parameter>
47
- <Parameter name="port"><![CDATA[5432]]></Parameter>
48
- <Parameter name="user"><![CDATA[postgres]]></Parameter>
49
- <Parameter name="password"><![CDATA[1111]]></Parameter>
50
- </Datasource>
51
- </Layer>
52
- </Map>
@@ -1,108 +0,0 @@
1
-
2
- <div class="sidebar-collapse">
3
- <div class="sidebar-settings-block">
4
- <div class="program-name">
5
- <a _href='/'>
6
- {{#if @root.setting.admin_logo}}
7
- <div class="program-logo text-center p-xs">
8
- <img src="files/{{{@root.setting.admin_logo}}}">
9
- </div>
10
- {{/if}}
11
-
12
-
13
- <div class="program-title h4 text-white text-center p-xs m-t-n-sm m-b-none">
14
- {{{coalesce setting.admin.name setting.site_name 'Admin panel'}}}</div>
15
-
16
- </a>
17
- {{#if @root.setting.multilang.length}}
18
- <div style='text-align:center'>
19
- {{#each @root.setting.multilang}}
20
- <a href='/{{{this}}}/'
21
- class='btn btn-xs btn-info {{#ifCond this '==' @root.lang}}disabled{{/ifCond}}'
22
- style='text-transform: uppercase'>{{this}}</a>
23
- {{/each}}
24
- </div>
25
- {{/if}}
26
- </div>
27
-
28
-
29
-
30
- </div>
31
- <ul class="nav metismenu menu-main" id="side-menu">
32
- <li class="nav-header">
33
- <div class="dropdown profile-element">
34
- <div class="pull-left">
35
- <img style='cursor:pointer' _href='{{home}}' alt="image" class="img-circle img-sm"
36
- src="files/{{{coalesce user.avatar user.photo '../tpl/module/core/images/user_default.png'}}}" />
37
- </div>
38
- <a data-toggle="dropdown" class="dropdown-toggle" href="#">
39
- <span class="clear">
40
- <span class="block"> <strong class="font-bold">{{user.user_name}}
41
- {{user.sur_name}}</strong>{{#if user.user_type}}({{user.user_type}}){{/if}}</span>
42
- <span class="text-muted text-xs block">{{user.job}} <b class="caret"></b></span>
43
- </span>
44
- </a>
45
- <ul class="dropdown-menu animated fadeInRight m-t-xs">
46
- <li class="divider"></li>
47
- <!--li><a href='/api/format/core.api.refrence.t' target='_blank'>Допомога</a></li-->
48
- {{{setting.user_menu}}}
49
- <li class="divider"></li>
50
- <li><a href="/logout">{{mls 'logout'}}</a></li>
51
- </ul>
52
- </div>
53
- <div class="logo-element">
54
- <a _href='dashboard'>S+</a>
55
- </div>
56
- </li>
57
- {{#each data}}
58
- <li {{#ifCond path "not in" ",divider"}} _href="{{@root.req.session.suffix}}{{path}}"{{/ifCond}} data-menu-nav="true" title="{{lookup this @root.lang}}" {{#unless fixed}} module='{{coalesce module module}}' {{else}} fixed-menu {{/unless}}>
59
- {{#ifCond path "==" "divider"}}
60
- <span class="menu-group-title">{{lookup this @root.lang}}</span>
61
- {{^}}
62
- <a style="{{coalesce style ''}}">
63
- {{#if icon}}<i class="menu-icon {{icon}}"></i>{{/if}} <span class="nav-label">{{coalesce (lookup this @root.lang) title}}</span>
64
- {{#if menu}}<span class="fa arrow"></span>{{/if}}
65
- </a>
66
- {{#if menu}}
67
- <ul class="nav nav-second-level collapse" style="">
68
- {{#each menu}}
69
- {{#ifCond path "==" "divider"}}
70
- <li title="{{lookup this @root.lang}}"><span class="menu-group-title">{{lookup this @root.lang}}</span></li>
71
- {{^}}
72
- <li _href="{{@root.req.session.suffix}}{{path}}" data-menu-nav="true" title="{{lookup this @root.lang}}"><a class="position-r" style="{{coalesce style ''}}">{{#if icon}}<i class="nav-second-level__link-icon {{{icon}}}"></i>{{/if}}{{lookup this @root.lang}}</a></li>
73
- {{/ifCond}}
74
- {{/each}}
75
- </ul>
76
- {{/if}}
77
- {{/ifCond}}
78
- </li>
79
- {{/each}}
80
- </ul>
81
- </div>
82
- <script nonce="352acdc8af3009870977ebaf4aac50c5e124bb09">
83
- /* Set active nav item */
84
- const currentLocation = window.location.pathname;
85
- const list = $(".metismenu li[_href]");
86
-
87
- const matchedList = list
88
- .filter((index, el) => currentLocation.indexOf($(el).attr("_href")) == 1)
89
- .sort((prev, next) => $(next).attr("_href").length - $(prev).attr("_href").length);
90
-
91
- const currentItem = matchedList[0];
92
-
93
- if ($(currentItem).parent().closest("[data-menu-nav]")) {
94
- $(currentItem).parent().collapse('show');
95
- $(currentItem).parent().closest("[data-menu-nav]").addClass("active");
96
- }
97
- $(currentItem).addClass("active");
98
-
99
-
100
- {{#ifCond 'module_menu' 'in' @root.setting.core.setting}}
101
- $('.module-menu li>a').click( (el) =>{
102
- $('.menu-main>li[module]').hide();
103
- let module=el.target.getAttribute('module');
104
- $('.menu-main>li[module="'+module+'"]').show();
105
- $('.module_name_title').html(el.target.innerText);
106
- })
107
- {{/ifCond}}
108
- </script>
@@ -1,127 +0,0 @@
1
- <div class="btn-group">
2
- <a edit="admin.user_group/{{{user_group_id}}}" form="form-user_group" class="btn btn-default btn-sm"><i
3
- class="fa fa-edit"></i> {{{mls 'edit'}}}</a>
4
- <a del="admin.user_group/{{{user_group_id}}}" class="btn btn-default btn-sm"><i class="fa fa-trash text-danger"></i>
5
- {{{mls 'del'}}}</a>
6
- <a show-modal="admin.user_group_history.pt?wrap=1&user_group_id={{user_group_id}}&width=1000px" class="btn btn-default btn-sm"><i class="fa fa-info"></i> Переглянути історію змін в групі</a>
7
- </div>
8
-
9
- <div class="row">
10
- <div class="col-lg-6">
11
- <div class="panel panel">
12
- <div class="panel-heading">
13
- <h4>{{group_name}}</h4>
14
- </div>
15
- <div class="panel-body">
16
- <table class="table table-condensed">
17
- <tbody>
18
- <tr>
19
- <td><b>Назва групи</b></td>
20
- <td>{{ group_name }}
21
- </td>
22
- </tr>
23
- <tr>
24
- <td><b>Модуль</b></td>
25
- <td>{{ module }}
26
- </td>
27
- </tr>
28
- <tr>
29
- <td><b>Інфо</b></td>
30
- <td>{{ info }}
31
- </td>
32
- </tr>
33
-
34
- <tr>
35
- <td><b>Вкл./Викл.</b></td>
36
- <td>{{ enabled }}</td>
37
- </tr>
38
- <tr>
39
- <td><b>Створив</b></td>
40
- <td>{{select uid data='user_id'}}
41
- </td>
42
- </tr>
43
- <tr>
44
- <td><b>Редагував</b></td>
45
- <td>{{select editor_id data='user_id'}}
46
- </td>
47
- </tr>
48
- <tr>
49
- <td><b>Дата створення</b></td>
50
- <td>{{ formatDate cdate format="dd.mm.yy / hh:sec" }}
51
- </td>
52
- </tr>
53
- <tr>
54
- <td><b>Дата редагування</b></td>
55
- <td>{{ formatDate editor_date format="dd.mm.yy / hh:sec" }}
56
- </td>
57
- </tr>
58
- </tbody>
59
- </table>
60
- </div>
61
- </div>
62
- <div class="ibox">
63
- <div class="ibox-title">
64
- <h5>Права до інтерфейсів</h5>
65
- <div class="ibox-tools">
66
- <a add="admin.user_group_access" obj="user_group_id={{user_group_id}}" form="user_group_access.form" class="btn btn-primary btn-sm" title="Додати">Додати</a>
67
- </div>
68
- </div>
69
- <div class="ibox-content">
70
- <div class="table-responsive">
71
- {{#contentList limit=100 table="admin.user_group_access"
72
- query="user_group_id='{{opt.user_group_id}}'"
73
- user_group_id=user_group_id order='cdate desc' cache=0 sql1=1}}
74
- <table class="table table-bordered">
75
- <thead>
76
- <tr>
77
- <th style="width:50px">ID шаблона</th>
78
- <th style="width:50px">Назва шаблона</th>
79
- <th style="width:50px">Права</th>
80
- <th style="width:50px">Дії</th>
81
- </tr>
82
- </thead>
83
- <tbody>
84
- {{#each rows}}
85
- <tr>
86
-
87
- <td>{{{doct_id}}}</td>
88
- <td>{{select doct_id data="core.interface_list"}}</td>
89
- <td>{{select role data="user_access"}}</td>
90
- <td>
91
- <a class="btn btn-default btn-xs" edit="admin.user_group_access/{{ugt_id}}" reload=1
92
- title="Редагувати" form='user_group_access.form'>
93
- <i class="fa fa-pencil"></i></a>
94
- <a class="btn btn-default btn-xs" reload=1 del="admin.user_group_access/{{ugt_id}}"
95
- title="Видалити"><i class="fa fa-trash" aria-hidden="true"></i></a>
96
- </td>
97
- </tr>
98
- {{/each}}
99
- </tbody>
100
- </table>
101
- {{/contentList}}
102
- </div>
103
- </div>
104
- </div>
105
- </div>
106
-
107
- <div class="col-lg-6">
108
- <div class="ibox">
109
- <div class="ibox-title">
110
- <h5>Користувачі</h5>
111
- <div class="ibox-tools">
112
-
113
- <a reload="1" add="admin.user_group_rel"
114
- obj="user_group_id={{user_group_id}}#access_granted={{uid}}" form="admin.user_group_rel.form"
115
- class="btn btn-primary btn-sm" title="Додати">Додати</a>
116
- </div>
117
- </div>
118
- <div class="ibox-content">
119
- {{{_vue "/vue/core/components/UIKit/list/vs-table-simple.vue" parent=user_group_id
120
- table="admin.user_group_rel.table" editable=1}}}
121
- </div>
122
- </div>
123
- </div>
124
- <div class="col-lg-6">
125
-
126
- </div>
127
- </div>