@opengis/surveyor 0.0.15 → 0.0.17

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 (62) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +16 -0
  3. package/dist/chunks/{AppIcon-Di5F4Bu_.js → AppIcon-CO70tpMX.js} +1 -1
  4. package/dist/chunks/{AppealDetailField-DNpsGpPY.js → AppealDetailField-ByK9ZqR4.js} +4 -4
  5. package/dist/chunks/{AppealStatusBadge-z77wwkFD.js → AppealStatusBadge-BlAaNUSK.js} +2 -2
  6. package/dist/chunks/AppealStatusBadge-DzMn4RVy.js +295 -0
  7. package/dist/chunks/ApplicationGeometryExportModal-Cu6QmJjm.js +1245 -0
  8. package/dist/chunks/{BaseModal-DP_ilBdg.js → BaseModal-BJxKuONh.js} +2 -2
  9. package/dist/chunks/{FormFilePicker-D5fAUE0Z.js → FormFilePicker-DxPQlxgy.js} +2 -2
  10. package/dist/chunks/{MapLayerMenu-CI5cbLEC.js → MapLayerMenu-B0TEoCJm.js} +4 -4
  11. package/dist/chunks/{RegistryForm-Ct8xiLV0.js → RegistryForm-Dpis_ncj.js} +3 -3
  12. package/dist/chunks/{RegistryFormModal-DTi3g3CX.js → RegistryFormModal-CH4DbTvC.js} +4 -4
  13. package/dist/chunks/{RegistryToolbar-v7DdReH2.js → RegistryToolbar-DisEejvi.js} +8 -8
  14. package/dist/chunks/SurveyorTeleport-Cd6D92mo.js +30 -0
  15. package/dist/chunks/{TablePagination-Iri38U68.js → TablePagination-thQkE5iA.js} +7 -7
  16. package/dist/chunks/{UserAccessBadge-B5Q1LvNv.js → UserAccessBadge-DyZDv7Oo.js} +1 -1
  17. package/dist/chunks/{UserTypeBadge-CuAMctTK.js → UserTypeBadge-LvnMuKGo.js} +1 -1
  18. package/dist/chunks/{VerifiedBadge-D6L7mCdp.js → VerifiedBadge-bk0n-rlC.js} +2 -2
  19. package/dist/chunks/{applications-D6pHAQaK.js → applications-B6GAxopO.js} +16 -19
  20. package/dist/chunks/card-BCMJyzgE.js +1327 -0
  21. package/dist/chunks/card-BiKSZfYj.js +639 -0
  22. package/dist/chunks/{card-DcYkb_aF.js → card-Cs8_8A8i.js} +13 -13
  23. package/dist/chunks/{card-Ba8_kfj9.js → card-DVuqR0rL.js} +10 -10
  24. package/dist/chunks/{card-CJhdeB6f.js → card-n83dNORm.js} +25 -25
  25. package/dist/chunks/{card-TP5UFJb2.js → card-u5I--_Gb.js} +16 -16
  26. package/dist/chunks/{certificates-Ew5AekPn.js → certificates-CDunSANR.js} +31 -21
  27. package/dist/chunks/{create-CSIDl4gP.js → create-DQPxIZMW.js} +18 -18
  28. package/dist/chunks/{forgot-DnixBqdc.js → forgot-DfsFu-yY.js} +8 -8
  29. package/dist/chunks/{login-BWCQdEkv.js → login-Dl0nTWs9.js} +8 -8
  30. package/dist/chunks/{map-mZ8Rn4aR.js → map-BoHEgBCw.js} +922 -926
  31. package/dist/chunks/{map-layers-BdWEHPLx.js → map-layers-CRE8lZzH.js} +11 -11
  32. package/dist/chunks/{organizations-D0o0e_ps.js → organizations-D6aazMAe.js} +18 -18
  33. package/dist/chunks/{profile-F7mr0poI.js → profile-CkwMFh82.js} +3 -3
  34. package/dist/chunks/{registration-BRF4985_.js → registration-BSz1iLbO.js} +8 -8
  35. package/dist/chunks/requests-B9Ejt4av.js +303 -0
  36. package/dist/chunks/{requests-BCJN-CNx.js → requests-D1ix8U5f.js} +6 -6
  37. package/dist/chunks/{reset-OZCgLi6f.js → reset-D5G0x5Zi.js} +8 -8
  38. package/dist/chunks/{useEntityPath-8s0Y1tjA.js → useEntityPath-C5Owtidc.js} +1 -1
  39. package/dist/chunks/{users-Dr543AYk.js → users-DMe6JYI0.js} +15 -15
  40. package/dist/index.css +1 -2
  41. package/dist/index.js +47 -47
  42. package/migrations/20261016120000_map_layers.sql +156 -156
  43. package/migrations/20261016150000_password_reset.sql +15 -15
  44. package/migrations/20261016180000_settlement_lookup.sql +16 -16
  45. package/package.json +1 -4
  46. package/server/dictionaries/index.ts +17 -17
  47. package/server/dictionaries/surveyor/map_layer_components.ts +11 -11
  48. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -10
  49. package/server/dictionaries/surveyor/map_layer_types.ts +11 -11
  50. package/server/modules/surveyor/services/mapLayers.ts +61 -61
  51. package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -79
  52. package/server/resources/helpers/settlement_lookup.ts +7 -7
  53. package/server/resources/surveyor-admin/applications.ts +11 -10
  54. package/server/resources/surveyor-admin/certificates.ts +25 -25
  55. package/server/resources/surveyor-admin/organization_surveyors.ts +31 -31
  56. package/server/suggests/index.ts +18 -1
  57. package/dist/chunks/AppealStatusBadge-COxcUM2Q.js +0 -185
  58. package/dist/chunks/ApplicationHistorySection-DHq-iJla.js +0 -788
  59. package/dist/chunks/SurveyorTeleport-D6-KXe_5.js +0 -23
  60. package/dist/chunks/card-CF5Lo4ui.js +0 -609
  61. package/dist/chunks/card-CVujkVkR.js +0 -1193
  62. package/dist/chunks/requests-F0Kp8OPp.js +0 -234
@@ -1,15 +1,15 @@
1
- -- Одноразовий токен відновлення пароля геодезиста ("Забули пароль?").
2
- -- Зберігається лише SHA-256 хеш токена, як і для токена реєстрації.
3
- ALTER TABLE surveyor.surveyors
4
- ADD COLUMN IF NOT EXISTS password_reset_token_hash text,
5
- ADD COLUMN IF NOT EXISTS password_reset_token_expires_at timestamp with time zone;
6
-
7
- COMMENT ON COLUMN surveyor.surveyors.password_reset_token_hash
8
- IS 'SHA-256 хеш одноразового токена відновлення пароля';
9
-
10
- COMMENT ON COLUMN surveyor.surveyors.password_reset_token_expires_at
11
- IS 'Час закінчення дії токена відновлення пароля';
12
-
13
- CREATE UNIQUE INDEX IF NOT EXISTS surveyors_password_reset_token_hash_idx
14
- ON surveyor.surveyors (password_reset_token_hash)
15
- WHERE password_reset_token_hash IS NOT NULL;
1
+ -- Одноразовий токен відновлення пароля геодезиста ("Забули пароль?").
2
+ -- Зберігається лише SHA-256 хеш токена, як і для токена реєстрації.
3
+ ALTER TABLE surveyor.surveyors
4
+ ADD COLUMN IF NOT EXISTS password_reset_token_hash text,
5
+ ADD COLUMN IF NOT EXISTS password_reset_token_expires_at timestamp with time zone;
6
+
7
+ COMMENT ON COLUMN surveyor.surveyors.password_reset_token_hash
8
+ IS 'SHA-256 хеш одноразового токена відновлення пароля';
9
+
10
+ COMMENT ON COLUMN surveyor.surveyors.password_reset_token_expires_at
11
+ IS 'Час закінчення дії токена відновлення пароля';
12
+
13
+ CREATE UNIQUE INDEX IF NOT EXISTS surveyors_password_reset_token_hash_idx
14
+ ON surveyor.surveyors (password_reset_token_hash)
15
+ WHERE password_reset_token_hash IS NOT NULL;
@@ -1,16 +1,16 @@
1
- -- Settlement lookup labels with the settlement type: "м. Львів", "с. Лисиничі".
2
- CREATE OR REPLACE VIEW surveyor.settlement_lookup AS
3
- SELECT
4
- settlement.katottg,
5
- settlement.level,
6
- concat_ws(' ',
7
- CASE settlement.type
8
- WHEN 201 THEN 'м.'
9
- WHEN 501 THEN 'м.'
10
- WHEN 503 THEN 'смт'
11
- WHEN 504 THEN 'с.'
12
- WHEN 505 THEN 'с-ще'
13
- END,
14
- trim(settlement.name)
15
- ) AS settlement_text
16
- FROM data_address.atu AS settlement;
1
+ -- Settlement lookup labels with the settlement type: "м. Львів", "с. Лисиничі".
2
+ CREATE OR REPLACE VIEW surveyor.settlement_lookup AS
3
+ SELECT
4
+ settlement.katottg,
5
+ settlement.level,
6
+ concat_ws(' ',
7
+ CASE settlement.type
8
+ WHEN 201 THEN 'м.'
9
+ WHEN 501 THEN 'м.'
10
+ WHEN 503 THEN 'смт'
11
+ WHEN 504 THEN 'с.'
12
+ WHEN 505 THEN 'с-ще'
13
+ END,
14
+ trim(settlement.name)
15
+ ) AS settlement_text
16
+ FROM data_address.atu AS settlement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/surveyor",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "description": "Surveyor admin and geodesist cabinet UI for embedded host applications",
@@ -67,13 +67,10 @@
67
67
  "@opengis/core": "^0.0.37",
68
68
  "@opengis/filter": "^0.1.59",
69
69
  "@opengis/form": "^0.1.32",
70
- "@tailwindcss/vite": "^4.3.3",
71
70
  "@types/node": "^26.4.1",
72
71
  "@vitejs/plugin-vue": "^6.0.1",
73
72
  "@vue/tsconfig": "^0.8.1",
74
73
  "lucide-vue-next": "0.446.0",
75
- "postcss-prefix-selector": "^2.2.1",
76
- "tailwindcss": "^4.3.3",
77
74
  "typescript": "~6.0.2",
78
75
  "vite": "^8.2.2",
79
76
  "vue": "^3.5.22",
@@ -1,17 +1,17 @@
1
- import applicationStatus from "./surveyor/application_status.js";
2
- import workTypes from "./surveyor/work_types.js";
3
- import accountTypes from "./surveyor/account_types.js";
4
- import yesNo from "./surveyor/yes_no.js";
5
- import mapLayerGroups from "./surveyor/map_layer_groups.js";
6
- import mapLayerTypes from "./surveyor/map_layer_types.js";
7
- import mapLayerComponents from "./surveyor/map_layer_components.js";
8
-
9
- export default [
10
- applicationStatus,
11
- workTypes,
12
- accountTypes,
13
- yesNo,
14
- mapLayerGroups,
15
- mapLayerTypes,
16
- mapLayerComponents,
17
- ];
1
+ import applicationStatus from "./surveyor/application_status.js";
2
+ import workTypes from "./surveyor/work_types.js";
3
+ import accountTypes from "./surveyor/account_types.js";
4
+ import yesNo from "./surveyor/yes_no.js";
5
+ import mapLayerGroups from "./surveyor/map_layer_groups.js";
6
+ import mapLayerTypes from "./surveyor/map_layer_types.js";
7
+ import mapLayerComponents from "./surveyor/map_layer_components.js";
8
+
9
+ export default [
10
+ applicationStatus,
11
+ workTypes,
12
+ accountTypes,
13
+ yesNo,
14
+ mapLayerGroups,
15
+ mapLayerTypes,
16
+ mapLayerComponents,
17
+ ];
@@ -1,11 +1,11 @@
1
- import type { DictionaryDefinition } from "@opengis/fcore";
2
-
3
- export default {
4
- code: "map-layer-components",
5
- name: "Компоненти карти",
6
- items: [
7
- { code: "map", name: "Карта" },
8
- { code: "application-form", name: "Форма окреслення геометрії заявки" },
9
- { code: "application-card", name: "Картка заявки" },
10
- ],
11
- } satisfies DictionaryDefinition;
1
+ import type { DictionaryDefinition } from "@opengis/fcore";
2
+
3
+ export default {
4
+ code: "map-layer-components",
5
+ name: "Компоненти карти",
6
+ items: [
7
+ { code: "map", name: "Карта" },
8
+ { code: "application-form", name: "Форма окреслення геометрії заявки" },
9
+ { code: "application-card", name: "Картка заявки" },
10
+ ],
11
+ } satisfies DictionaryDefinition;
@@ -1,10 +1,10 @@
1
- import type { DictionaryDefinition } from "@opengis/fcore";
2
-
3
- export default {
4
- code: "map-layer-groups",
5
- name: "Групи шарів карти",
6
- items: [
7
- { code: "base", name: "Базовий шар" },
8
- { code: "overlay", name: "Додатковий шар" },
9
- ],
10
- } satisfies DictionaryDefinition;
1
+ import type { DictionaryDefinition } from "@opengis/fcore";
2
+
3
+ export default {
4
+ code: "map-layer-groups",
5
+ name: "Групи шарів карти",
6
+ items: [
7
+ { code: "base", name: "Базовий шар" },
8
+ { code: "overlay", name: "Додатковий шар" },
9
+ ],
10
+ } satisfies DictionaryDefinition;
@@ -1,11 +1,11 @@
1
- import type { DictionaryDefinition } from "@opengis/fcore";
2
-
3
- export default {
4
- code: "map-layer-types",
5
- name: "Типи шарів карти",
6
- items: [
7
- { code: "raster", name: "Растрові тайли" },
8
- { code: "vector", name: "Векторні тайли" },
9
- { code: "applications", name: "Заявки" },
10
- ],
11
- } satisfies DictionaryDefinition;
1
+ import type { DictionaryDefinition } from "@opengis/fcore";
2
+
3
+ export default {
4
+ code: "map-layer-types",
5
+ name: "Типи шарів карти",
6
+ items: [
7
+ { code: "raster", name: "Растрові тайли" },
8
+ { code: "vector", name: "Векторні тайли" },
9
+ { code: "applications", name: "Заявки" },
10
+ ],
11
+ } satisfies DictionaryDefinition;
@@ -1,61 +1,61 @@
1
- import type { AppContext, User } from "@opengis/fcore";
2
- import { actor } from "../utils/shared.js";
3
-
4
- export type MapLayerComponent = "map" | "application-form" | "application-card";
5
-
6
- export type MapLayersInput = { component?: MapLayerComponent };
7
-
8
- export type MapLayer = {
9
- code: string;
10
- name: string;
11
- layer_group: "base" | "overlay";
12
- layer_type: "raster" | "vector" | "applications";
13
- tiles: string[];
14
- scheme: "xyz" | "tms";
15
- source_layer: string | null;
16
- attribution: string | null;
17
- minzoom: number | null;
18
- maxzoom: number | null;
19
- opacity: number;
20
- style: Record<string, unknown> | null;
21
- legend: Record<string, unknown> | null;
22
- preview: string | null;
23
- components: MapLayerComponent[];
24
- is_default: boolean;
25
- has_filters: boolean;
26
- };
27
-
28
- export type MapLayersResult = {
29
- default_base: string | null;
30
- base: MapLayer[];
31
- overlays: MapLayer[];
32
- };
33
-
34
- /**
35
- * Повертає увімкнені шари панелі карти, згруповані на базові та додаткові у порядку відображення.
36
- * Додаткові шари йдуть від верхнього до нижнього: перший у списку малюється поверх.
37
- * Якщо передано `component`, повертаються лише шари, налаштовані для цього компонента.
38
- */
39
- export async function mapLayers(
40
- { input, user, ctx }: { input: MapLayersInput; user: User | undefined; ctx: AppContext }
41
- ): Promise<MapLayersResult> {
42
- actor(user);
43
-
44
- const { rows }: { rows: MapLayer[] } = await ctx.pg.query(
45
- `SELECT code, name, layer_group, layer_type, tiles, scheme, source_layer, attribution,
46
- minzoom, maxzoom, opacity::float AS opacity, style, legend, preview, components,
47
- is_default, has_filters
48
- FROM surveyor.map_layers
49
- WHERE enabled
50
- AND ($1::text IS NULL OR components @> ARRAY[$1::text])
51
- ORDER BY layer_group, sort_order, name`,
52
- [input.component ?? null]
53
- );
54
-
55
- const base = rows.filter((layer) => layer.layer_group === "base");
56
- const overlays = rows.filter((layer) => layer.layer_group === "overlay");
57
- // Підложку вимкнути не можна, тому без явного значення активна перша.
58
- const defaultBase = base.find((layer) => layer.is_default) ?? base[0];
59
-
60
- return { default_base: defaultBase?.code ?? null, base, overlays };
61
- }
1
+ import type { AppContext, User } from "@opengis/fcore";
2
+ import { actor } from "../utils/shared.js";
3
+
4
+ export type MapLayerComponent = "map" | "application-form" | "application-card";
5
+
6
+ export type MapLayersInput = { component?: MapLayerComponent };
7
+
8
+ export type MapLayer = {
9
+ code: string;
10
+ name: string;
11
+ layer_group: "base" | "overlay";
12
+ layer_type: "raster" | "vector" | "applications";
13
+ tiles: string[];
14
+ scheme: "xyz" | "tms";
15
+ source_layer: string | null;
16
+ attribution: string | null;
17
+ minzoom: number | null;
18
+ maxzoom: number | null;
19
+ opacity: number;
20
+ style: Record<string, unknown> | null;
21
+ legend: Record<string, unknown> | null;
22
+ preview: string | null;
23
+ components: MapLayerComponent[];
24
+ is_default: boolean;
25
+ has_filters: boolean;
26
+ };
27
+
28
+ export type MapLayersResult = {
29
+ default_base: string | null;
30
+ base: MapLayer[];
31
+ overlays: MapLayer[];
32
+ };
33
+
34
+ /**
35
+ * Повертає увімкнені шари панелі карти, згруповані на базові та додаткові у порядку відображення.
36
+ * Додаткові шари йдуть від верхнього до нижнього: перший у списку малюється поверх.
37
+ * Якщо передано `component`, повертаються лише шари, налаштовані для цього компонента.
38
+ */
39
+ export async function mapLayers(
40
+ { input, user, ctx }: { input: MapLayersInput; user: User | undefined; ctx: AppContext }
41
+ ): Promise<MapLayersResult> {
42
+ actor(user);
43
+
44
+ const { rows }: { rows: MapLayer[] } = await ctx.pg.query(
45
+ `SELECT code, name, layer_group, layer_type, tiles, scheme, source_layer, attribution,
46
+ minzoom, maxzoom, opacity::float AS opacity, style, legend, preview, components,
47
+ is_default, has_filters
48
+ FROM surveyor.map_layers
49
+ WHERE enabled
50
+ AND ($1::text IS NULL OR components @> ARRAY[$1::text])
51
+ ORDER BY layer_group, sort_order, name`,
52
+ [input.component ?? null]
53
+ );
54
+
55
+ const base = rows.filter((layer) => layer.layer_group === "base");
56
+ const overlays = rows.filter((layer) => layer.layer_group === "overlay");
57
+ // Підложку вимкнути не можна, тому без явного значення активна перша.
58
+ const defaultBase = base.find((layer) => layer.is_default) ?? base[0];
59
+
60
+ return { default_base: defaultBase?.code ?? null, base, overlays };
61
+ }
@@ -1,79 +1,79 @@
1
- <!DOCTYPE html>
2
- <html lang="uk">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Відновлення пароля</title>
8
- <style>
9
- body {
10
- font-family: Arial, sans-serif;
11
- color: #333;
12
- background-color: #f4f4f4;
13
- padding: 20px;
14
- }
15
-
16
- .email-container {
17
- max-width: 600px;
18
- margin: 0 auto;
19
- background-color: #ffffff;
20
- padding: 20px;
21
- border-radius: 5px;
22
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
23
- }
24
-
25
- h1 {
26
- font-size: 20px;
27
- color: #000;
28
- margin-bottom: 20px;
29
- }
30
-
31
- p {
32
- line-height: 1.6;
33
- margin: 10px 0;
34
- }
35
-
36
- .credentials {
37
- font-weight: bold;
38
- margin-top: 10px;
39
- }
40
-
41
- a {
42
- color: #007bff;
43
- text-decoration: none;
44
- }
45
-
46
- a:hover {
47
- text-decoration: underline;
48
- }
49
-
50
- .footer {
51
- font-size: 12px;
52
- color: #777;
53
- margin-top: 20px;
54
- text-align: center;
55
- }
56
- </style>
57
- </head>
58
-
59
- <body>
60
- <div class="email-container">
61
- <h1>Відновлення пароля до
62
- <a target="_blank" href="{{protocol}}://{{host}}">кабінету геодезиста</a>
63
- </h1>
64
- <p class="credentials">
65
- Логін: <strong>{{login}}</strong>
66
- </p>
67
- <p>
68
- Щоб встановити новий пароль, відкрийте це посилання або скопіюйте його в адресний рядок вашого браузера:<br>
69
- <a target="_blank" href="{{resetUrl}}">{{resetUrl}}</a>
70
- </p>
71
- <p>Посилання дійсне протягом 1 години і може бути використане лише один раз.</p>
72
- <p>Якщо ви не надсилали запит на відновлення пароля, проігноруйте цей лист — ваш поточний пароль залишиться без змін.</p>
73
- <div class="footer">
74
- Це автоматично створений лист, будь ласка, не відповідайте на нього.
75
- </div>
76
- </div>
77
- </body>
78
-
79
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="uk">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Відновлення пароля</title>
8
+ <style>
9
+ body {
10
+ font-family: Arial, sans-serif;
11
+ color: #333;
12
+ background-color: #f4f4f4;
13
+ padding: 20px;
14
+ }
15
+
16
+ .email-container {
17
+ max-width: 600px;
18
+ margin: 0 auto;
19
+ background-color: #ffffff;
20
+ padding: 20px;
21
+ border-radius: 5px;
22
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
23
+ }
24
+
25
+ h1 {
26
+ font-size: 20px;
27
+ color: #000;
28
+ margin-bottom: 20px;
29
+ }
30
+
31
+ p {
32
+ line-height: 1.6;
33
+ margin: 10px 0;
34
+ }
35
+
36
+ .credentials {
37
+ font-weight: bold;
38
+ margin-top: 10px;
39
+ }
40
+
41
+ a {
42
+ color: #007bff;
43
+ text-decoration: none;
44
+ }
45
+
46
+ a:hover {
47
+ text-decoration: underline;
48
+ }
49
+
50
+ .footer {
51
+ font-size: 12px;
52
+ color: #777;
53
+ margin-top: 20px;
54
+ text-align: center;
55
+ }
56
+ </style>
57
+ </head>
58
+
59
+ <body>
60
+ <div class="email-container">
61
+ <h1>Відновлення пароля до
62
+ <a target="_blank" href="{{protocol}}://{{host}}">кабінету геодезиста</a>
63
+ </h1>
64
+ <p class="credentials">
65
+ Логін: <strong>{{login}}</strong>
66
+ </p>
67
+ <p>
68
+ Щоб встановити новий пароль, відкрийте це посилання або скопіюйте його в адресний рядок вашого браузера:<br>
69
+ <a target="_blank" href="{{resetUrl}}">{{resetUrl}}</a>
70
+ </p>
71
+ <p>Посилання дійсне протягом 1 години і може бути використане лише один раз.</p>
72
+ <p>Якщо ви не надсилали запит на відновлення пароля, проігноруйте цей лист — ваш поточний пароль залишиться без змін.</p>
73
+ <div class="footer">
74
+ Це автоматично створений лист, будь ласка, не відповідайте на нього.
75
+ </div>
76
+ </div>
77
+ </body>
78
+
79
+ </html>
@@ -1,7 +1,7 @@
1
- // The view prefixes the settlement name with its type for lookup labels.
2
- export const settlementLookup = {
3
- table: "surveyor.settlement_lookup",
4
- value: "katottg",
5
- text: "settlement_text",
6
- filterFields: ["level"],
7
- };
1
+ // The view prefixes the settlement name with its type for lookup labels.
2
+ export const settlementLookup = {
3
+ table: "surveyor.settlement_lookup",
4
+ value: "katottg",
5
+ text: "settlement_text",
6
+ filterFields: ["level"],
7
+ };
@@ -10,7 +10,8 @@ const applicationStatusCodes = applicationStatus.items.map(({ code }) => code);
10
10
  const workTypeCodes = workTypes.items.map(({ code }) => code);
11
11
 
12
12
  // Status changes, area checks, and file workflow belong to Business API services.
13
- // Generic update is limited to replacing already issued source data (file_output).
13
+ // Generic update covers descriptive fields and replacing issued source data (file_output);
14
+ // workflow fields (status, files, signature, area/geom, dates) stay read-only.
14
15
  export default {
15
16
  version: 1,
16
17
  name: "applications",
@@ -55,30 +56,30 @@ export default {
55
56
  },
56
57
  work_type: {
57
58
  type: "string",
58
- write: false,
59
+ write: true,
59
60
  filterable: true,
60
61
  dictionary: workTypes.code,
61
62
  enum: workTypeCodes,
62
63
  },
63
- description: { type: "text", write: false, searchable: true },
64
- execution_basis: { type: "text", write: false },
64
+ description: { type: "text", write: true, searchable: true },
65
+ execution_basis: { type: "text", write: true },
65
66
  settlement_id: {
66
67
  type: "string",
67
- write: false,
68
+ write: true,
68
69
  filterable: true,
69
70
  lookup: settlementLookup,
70
71
  },
71
- is_found_address_id: { type: "boolean", write: false, filterable: true, dictionary: "yes-no" },
72
- address_id: { type: "string", write: false, filterable: true, lookup: addressLookup },
73
- location: { type: "text", write: false, searchable: true },
72
+ is_found_address_id: { type: "boolean", write: true, filterable: true, dictionary: "yes-no" },
73
+ address_id: { type: "string", write: true, filterable: true, lookup: addressLookup },
74
+ location: { type: "text", write: true, searchable: true },
74
75
  area: { type: "number", write: false, sortable: true },
75
76
  geom: { type: "geometry", write: false },
76
77
  file_output: { type: "file", write: true },
77
78
  file_geodetic_survey: { type: "file", write: false },
78
79
  file_corrected_geodetic_survey: { type: "file", write: false },
79
80
  note_4_file_corrected_geodetic_survey: { type: "text", write: false },
80
- notes: { type: "text", write: false },
81
- signature: { type: "text", write: false },
81
+ notes: { type: "text", write: true },
82
+ signature: { type: "text", write: true },
82
83
  cancel_reason: { type: "text", write: false },
83
84
  source_data_issued_at: { type: "timestamp", write: false, sortable: true },
84
85
  survey_uploaded_at: { type: "timestamp", write: false, sortable: true },
@@ -5,7 +5,7 @@ import { certificateStatusSql } from "../../modules/surveyor/utils/certificateSt
5
5
 
6
6
  const accountTypeCodes = accountTypes.items.map(({ code }) => code);
7
7
 
8
- // Certificates are imported from the external registry, so Resource API only reads them.
8
+ // Сертифікати імпортуються із зовнішнього реєстру, але адміністратор може додавати та редагувати їх вручну.
9
9
  export default {
10
10
  version: 1,
11
11
  name: "certificates",
@@ -27,7 +27,7 @@ export default {
27
27
  "account_registered_at",
28
28
  ],
29
29
  access: "user",
30
- operations: ["read"],
30
+ operations: ["read", "create", "update"],
31
31
  searchable: ["surveyor_name", "last_name", "first_name", "number_certificate"],
32
32
  fields: {
33
33
  certificate_id: {
@@ -43,51 +43,51 @@ export default {
43
43
  },
44
44
  certificate_type: {
45
45
  type: "string",
46
- write: false,
46
+ write: true,
47
47
  filterable: true,
48
48
  dictionary: accountTypes.code,
49
49
  enum: accountTypeCodes,
50
50
  },
51
51
  surveyor_name: {
52
52
  type: "string",
53
- write: false,
53
+ write: true,
54
54
  searchable: true,
55
55
  },
56
- last_name: { type: "string", write: false, searchable: true },
57
- first_name: { type: "string", write: false, searchable: true },
58
- middle_name: { type: "string", write: false },
59
- surveyor_phone: { type: "string", write: false },
60
- surveyor_email: { type: "string", write: false },
56
+ last_name: { type: "string", write: true, searchable: true },
57
+ first_name: { type: "string", write: true, searchable: true },
58
+ middle_name: { type: "string", write: true },
59
+ surveyor_phone: { type: "string", write: true },
60
+ surveyor_email: { type: "string", write: true },
61
61
  date_certificate: {
62
62
  type: "date",
63
- write: false,
63
+ write: true,
64
64
  filterable: true,
65
65
  sortable: true,
66
66
  },
67
- number_certificate: { type: "string", write: false, searchable: true },
68
- name_school: { type: "text", write: false },
69
- date_protocol: { type: "date", write: false },
70
- number_protocol: { type: "string", write: false },
71
- certificate_increase: { type: "text", write: false },
72
- certificate_stopping: { type: "text", write: false },
73
- certificate_suspension: { type: "date", write: false },
74
- certificate_renewal: { type: "text", write: false },
75
- work_place: { type: "text", write: false },
76
- economic_activity: { type: "text", write: false },
67
+ number_certificate: { type: "string", write: true, searchable: true },
68
+ name_school: { type: "text", write: true },
69
+ date_protocol: { type: "date", write: true },
70
+ number_protocol: { type: "string", write: true },
71
+ certificate_increase: { type: "text", write: true },
72
+ certificate_stopping: { type: "text", write: true },
73
+ certificate_suspension: { type: "date", write: true },
74
+ certificate_renewal: { type: "text", write: true },
75
+ work_place: { type: "text", write: true },
76
+ economic_activity: { type: "text", write: true },
77
77
  created_by: { type: "string", write: false, lookup: userLookup },
78
78
  created_at: { type: "timestamp", write: false, sortable: true },
79
79
  updated_by: { type: "string", write: false, lookup: userLookup },
80
80
  updated_at: { type: "timestamp", write: false, sortable: true },
81
81
  is_membership: {
82
82
  type: "boolean",
83
- write: false,
83
+ write: true,
84
84
  filterable: true,
85
85
  dictionary: "yes-no",
86
86
  },
87
- membership: { type: "text", write: false },
88
- last_qualification_date: { type: "date", write: false },
89
- isvalid: { type: "boolean", write: false, filterable: true },
90
- qualification_level: { type: "string", write: false },
87
+ membership: { type: "text", write: true },
88
+ last_qualification_date: { type: "date", write: true },
89
+ isvalid: { type: "boolean", write: true, filterable: true },
90
+ qualification_level: { type: "string", write: true },
91
91
  },
92
92
  // Колонки мають префікс account_, щоб не конфліктувати з полями сертифіката.
93
93
  // scope "item" не додає join до основного списку сертифікатів.