@opengis/admin 0.2.118 → 0.2.120
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{add-page-DxFHzUHv.js → add-page-D9BweG1f.js} +1 -1
- package/dist/{admin-interface-D-2SX2oY.js → admin-interface-Bq8kf59d.js} +1 -1
- package/dist/{admin-view-GJZnI5RQ.js → admin-view-pmWjnncn.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +6 -6
- package/dist/{card-view-DsH9i1nr.js → card-view-DNKItKZ_.js} +1 -1
- package/dist/{edit-page-C0W47Sry.js → edit-page-DmanLFQC.js} +1 -1
- package/dist/{import-file-DvysASZJ.js → import-file-B3hz_TTe.js} +2704 -2683
- package/dist/{profile-page-BUNumNci.js → profile-page-CnXrMOV_.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/server/routes/widget/controllers/widget.get.js +31 -16
@@ -30,22 +30,37 @@ export default async function widgetGet({
|
|
30
30
|
where entity_id=$1 order by cdate desc`
|
31
31
|
: 'select communication_id, entity_id, body, subject, cdate, uid from crm.communications where entity_id=$1 order by cdate desc',
|
32
32
|
|
33
|
-
history: `
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
select
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
33
|
+
history: `select * from (
|
34
|
+
SELECT change_id, entity_id, entity_type, change_type, change_date, a.change_user_id, a.uid, a.cdate, b.json_agg as changes,
|
35
|
+
${username} as username, u.login, u.avatar
|
36
|
+
FROM log.table_changes a
|
37
|
+
left join admin.users u on a.change_user_id = u.uid
|
38
|
+
left join lateral(
|
39
|
+
select json_agg(row_to_json(q)) from (
|
40
|
+
select change_data_id, entity_key, value_new, value_old from log.table_changes_data
|
41
|
+
where change_id=a.change_id
|
42
|
+
)q
|
43
|
+
)b on 1=1
|
44
|
+
where b.json_agg is not null and (entity_id=$1 or entity_id in (
|
45
|
+
select communication_id as comments from crm.communications where entity_id=$1
|
46
|
+
union all select checklist_id from crm.checklists where entity_id=$1)
|
47
|
+
)
|
48
|
+
|
49
|
+
union all
|
50
|
+
select change_id, entity_id, entity_type, change_type, change_date, a.change_user_id, a.uid, a.cdate, b.json_agg as changes,
|
51
|
+
${username} as username, u.login, u.avatar
|
52
|
+
FROM log.table_changes a
|
53
|
+
left join admin.users u on a.change_user_id = u.uid
|
54
|
+
left join lateral(
|
55
|
+
select json_agg(o) from (
|
56
|
+
select json_object_agg(entity_key, coalesce(value_new, value_old)) as o from log.table_changes_data
|
57
|
+
where change_id=a.change_id and entity_key not in ('uid', 'file_status', 'editor_id', 'cdate', 'editor_date', 'entity_id')
|
58
|
+
)q
|
59
|
+
)b on 1=1
|
60
|
+
where a.change_type in ('INSERT', 'DELETE') and a.entity_id in (select file_id from crm.files where entity_id=$1)
|
61
|
+
limit 100
|
62
|
+
|
63
|
+
)q order by cdate desc limit 100`,
|
49
64
|
|
50
65
|
checklist: pg.pk['admin.users']
|
51
66
|
? `SELECT checklist_id, entity_id, subject, is_done, done_date, c.uid, c.cdate, ${username} as username, u.login, u.avatar
|