@opengis/admin 0.3.94 → 0.3.96

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.
@@ -1,4 +1,4 @@
1
- import { _ as n, g as m } from "./import-file-6RRMQfrD.js";
1
+ import { _ as n, g as m } from "./import-file-khRz6ksR.js";
2
2
  import { u as p } from "./user-B_2kh6ic.js";
3
3
  import { resolveComponent as d, openBlock as u, createElementBlock as f, createElementVNode as o, createBlock as h, createCommentVNode as b } from "vue";
4
4
  const x = {
@@ -8,8 +8,7 @@
8
8
  {{#contentList table="log.user_auth" query="user_id='{{id}}'" order="cdate desc" sql1=1}}
9
9
  {{{tableList rows
10
10
  columns="
11
- Дата, {{formatDate auth_date format='dd.mm.yy / hh:mi'}},
12
- Час, {{formatDate auth_date format='dd.mm.yy / hh:mi'}},
11
+ Дата та час, {{formatDate auth_date format='dd.mm.yy / hh:mi'}},
13
12
  Тип авторизації, {{auth_type}},
14
13
  IP, {{auth_data}}
15
14
  "
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/admin",
3
- "version": "0.3.94",
3
+ "version": "0.3.96",
4
4
  "description": "This project Softpro Admin",
5
5
  "main": "dist/admin.js",
6
6
  "type": "module",
@@ -11,6 +11,7 @@ export default async function badge(id, options) {
11
11
 
12
12
  const item = classifier?.arr.find(el => el.id?.toString?.() === id.toString());
13
13
  if (!item) return id;
14
- return `<span style='color:${item.color || '#14b8a6'};border-color:${item.color || '#14b8a6'};' class="inline-flex items-center gap-x-1.5 py-1.5 px-3 rounded-full text-xs font-medium border border-teal-500 text-teal-500">${item.text}</span>`
14
+ return `<span style='color:${item.color || '#14b8a6'};border-color:${item.color || '#14b8a6'}; overflow:hidden;
15
+ text-overflow:ellipsis; white-space:nowrap;' class="block w-fit py-1.5 px-3 rounded-full text-xs font-medium border border-teal-500 text-teal-500 max-w-[220px] text-nowrap ">${item.text}</span>`
15
16
 
16
17
  }
@@ -4,7 +4,7 @@ import buttonEdit from './utils/buttonEdit.js';
4
4
  import buttonDel from './utils/buttonDel.js';
5
5
 
6
6
  function format(d, key, data, hash) {
7
- if (!key?.includes) return '';
7
+ if (!key?.includes) return ''
8
8
  if (d === true) return 'Так';
9
9
  if (d === false) return 'Ні';
10
10
  if (key === 'actions') {
@@ -19,6 +19,7 @@ function format(d, key, data, hash) {
19
19
  return d;
20
20
  }
21
21
  export default async function tableList(data, opt) {
22
+
22
23
  const { hash } = opt;
23
24
  // no data
24
25
  // const time = Date.now();
@@ -46,7 +47,8 @@ export default async function tableList(data, opt) {
46
47
  skip[name] = name.includes('{{') && !nameHBS;
47
48
  if (skip[name]) continue;
48
49
 
49
- result.push(`<th class="py-2 min-w-[200px] last:min-w-[60px] last:max-w-[60px] last:bg-white last:sticky last:right-0">
50
+ const isActionsColumn = hash.noactions && i === keys.length - 2;
51
+ result.push(`<th class="py-2 min-w-[200px] ${isActionsColumn ? 'last:min-w-[60px] last:max-w-[60px] last:bg-white last:sticky last:right-0' : ''}">
50
52
  ${nameHBS || name}
51
53
  </th>`)
52
54
  }
@@ -67,7 +69,8 @@ export default async function tableList(data, opt) {
67
69
 
68
70
  const tokenData = key == 'actions' ? token : null;
69
71
  const d1 = key.includes('{{') ? await handlebars.compile(key)({ ...row, token, hash }) || '-' : null
70
- result.push(`<td class="py-2 pr-5 last:sticky last:right-0 ">
72
+ const isActionsColumn = hash.noactions && i === keys.length - 2;
73
+ result.push(`<td class="py-2 pr-5 ${isActionsColumn ? 'last:sticky last:right-0' : ''}">
71
74
  ${d1 || format(tokenData || row[key], key, row, hash)}
72
75
  </td>`);
73
76
 
@@ -86,6 +86,7 @@ export default async function plugin(fastify) {
86
86
  });
87
87
 
88
88
  fastify.addHook('onListen', async () => {
89
+ return; // temporary moved to product/rent
89
90
  // insert document templates to db (print API)
90
91
  const printTemplateList = getTemplatePath('print');
91
92
  printTemplateList.filter(el => el[2] === 'json').map((el) => {
@@ -8,12 +8,13 @@ import printTemplateList from './controllers/printTemplateList.js';
8
8
 
9
9
  const policy = ['user'];
10
10
 
11
+ // temporary moved to product/rent
11
12
  export default async function route(app) {
12
- app.get(`/card-print/:table/:id`, { config: { policy } }, cardPrint);
13
- app.get('/print-template/:name/:id', { config: { policy } }, printTemplate);
14
- app.get('/print-template/:name', { config: { policy } }, printTemplatePreview);
15
- app.get('/print-template', { config: { policy } }, printTemplateList);
16
- app.post('/print-template', { config: { policy } }, printTemplateAdd);
17
- app.put('/print-template/:id', { config: { policy } }, printTemplateEdit);
18
- app.delete('/print-template/:id', { config: { policy } }, printTemplateDelete);
13
+ // app.get(`/card-print/:table/:id`, { config: { policy } }, cardPrint);
14
+ // app.get('/print-template/:name/:id', { config: { policy } }, printTemplate);
15
+ // app.get('/print-template/:name', { config: { policy } }, printTemplatePreview);
16
+ // app.get('/print-template', { config: { policy } }, printTemplateList);
17
+ // app.post('/print-template', { config: { policy } }, printTemplateAdd);
18
+ // app.put('/print-template/:id', { config: { policy } }, printTemplateEdit);
19
+ // app.delete('/print-template/:id', { config: { policy } }, printTemplateDelete);
19
20
  }