@opengis/admin 0.2.83 → 0.2.85

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/admin",
3
- "version": "0.2.83",
3
+ "version": "0.2.85",
4
4
  "description": "This project Softpro Admin",
5
5
  "main": "dist/admin.js",
6
6
  "type": "module",
@@ -97,4 +97,4 @@
97
97
  "vitepress-plugin-tabs": "^0.5.0",
98
98
  "vitepress-sidebar": "^1.22.0"
99
99
  }
100
- }
100
+ }
@@ -4,8 +4,9 @@ import { fileURLToPath } from 'url';
4
4
 
5
5
  const dir = dirname(fileURLToPath(import.meta.url));
6
6
  const root = `${dir}/../..`;
7
+ import { config } from '@opengis/fastify-table/utils.js';
7
8
 
8
- const isProduction = process.env.NODE_ENV === 'production';
9
+ const isProduction = process.env.NODE_ENV === 'production' || config.production;
9
10
 
10
11
  async function plugin(fastify) {
11
12
  // vite server
@@ -83,7 +83,7 @@ export default async function cardPrint(req, reply) {
83
83
  const pt = await getTemplate('pt', template)
84
84
  || await readFile(path.join(dirname, '../../../templates/pt/card-print.pt.hbs'), 'utf8');
85
85
 
86
- const url = (req.protocol || 'https') + '://' + req.hostname + req.url;
86
+ const url = (req.protocol || 'https') + '://' + req.hostname + req.url.replace(req.routeOptions.url.split(':')[0], '/card/');
87
87
  const qrCode = `<img src="${await qr.toDataURL(url, { type: 'png', ec_level: 'M', size: 5, margin: 4 })}" alt="qrcode">`;
88
88
 
89
89
  const cardTemplates = await getTemplate('card', table);
@@ -16,7 +16,6 @@
16
16
  <h3>{{title}}</h3>
17
17
  <div>{{{html}}}</div>
18
18
  </div>
19
-
20
19
  {{/each}}
21
20
  <div style="margin-top: 50px;">
22
21
  <hr />
@@ -43,7 +42,6 @@
43
42
  margin-bottom: 15px;
44
43
  }
45
44
 
46
-
47
45
  * {
48
46
  margin: 0;
49
47
  padding: 0;
@@ -59,6 +57,19 @@
59
57
  background-color: #fff;
60
58
  }
61
59
 
60
+ table {
61
+ width: 100%;
62
+ border-collapse: collapse;
63
+ }
64
+
65
+ th,
66
+ td {
67
+ border: 1px solid #9b9a9a;
68
+ padding: 8px;
69
+ text-align: left;
70
+ }
71
+
72
+
62
73
  h1,
63
74
  h2,
64
75
  h3 {