@opengis/gis 0.2.26 → 0.2.27
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/dist/index.js +1352 -1350
- package/dist/index.umd.cjs +29 -29
- package/package.json +1 -1
- package/server/routes/map/controllers/mapFormat.js +4 -4
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from '@opengis/fastify-table/utils.js';
|
|
4
4
|
|
|
5
5
|
export default async function mapFormat(req, reply) {
|
|
6
|
-
const { pg = pgClients.client, query = {} } = req;
|
|
6
|
+
const { pg = pgClients.client, query = {}, user } = req;
|
|
7
7
|
const { layer, id } = query;
|
|
8
8
|
const time = Date.now();
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ export default async function mapFormat(req, reply) {
|
|
|
15
15
|
source_path: tname, cardInterface, card, template,
|
|
16
16
|
} = service;
|
|
17
17
|
|
|
18
|
-
const columns = card;
|
|
18
|
+
const columns = (card || []).filter((col) => (user?.uid ? true : !col.is_admin));
|
|
19
19
|
if (!tname) return reply.status(404).send('missing source_path');
|
|
20
20
|
|
|
21
21
|
const pk = pg.pk?.[tname];
|
|
@@ -50,8 +50,8 @@ export default async function mapFormat(req, reply) {
|
|
|
50
50
|
|
|
51
51
|
const name = col.label || col.ua || col.name;
|
|
52
52
|
const value = (col.format === 'date' ? new Date(fullRow[col.name]).toLocaleDateString('uk-UA') : null) || fullRow[`${col.name}_data`]?.text
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
|| fullRow[`${col.name}_text`]
|
|
54
|
+
|| fullRow[col.name];
|
|
55
55
|
|
|
56
56
|
result.push(`<div class="grid grid-cols-1 gap-1 py-3 sm:grid-cols-3 sm:gap-4 even:bg-gray-50 text-[12px]">
|
|
57
57
|
<dt class="text-gray-900">${name}</dt>
|