@opengis/surveyor 0.0.0-stage → 0.0.2

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 (139) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +188 -3
  3. package/dist/chunks/AppIcon-CIR6y5uE.js +85 -0
  4. package/dist/chunks/AppealDetailField-CI-1qhs3.js +58 -0
  5. package/dist/chunks/AppealStatusBadge-CSXnfarR.js +132 -0
  6. package/dist/chunks/AppealStatusBadge-DYBe9hqP.js +171 -0
  7. package/dist/chunks/ApplicationHistorySection-C0wwhwA4.js +769 -0
  8. package/dist/chunks/BaseModal-C7PVYz0m.js +85 -0
  9. package/dist/chunks/FormFilePicker-C3XQw50i.js +76 -0
  10. package/dist/chunks/MapLayerMenu-DjYCxEc3.js +145 -0
  11. package/dist/chunks/RegistryForm-CEUqFmsF.js +99 -0
  12. package/dist/chunks/RegistryFormModal-DfY4z_7r.js +85 -0
  13. package/dist/chunks/RegistryToolbar-BV4mYVAc.js +452 -0
  14. package/dist/chunks/UserAccessBadge-D8JfgGfN.js +44 -0
  15. package/dist/chunks/UserTypeBadge-YIwwoCho.js +188 -0
  16. package/dist/chunks/VerifiedBadge-Bba8WnuB.js +34 -0
  17. package/dist/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
  18. package/dist/chunks/account-types-Br7gx_D_.js +35 -0
  19. package/dist/chunks/account_types-DLL1w122.js +25 -0
  20. package/dist/chunks/appealMapLayers-CQMK3rrz.js +115 -0
  21. package/dist/chunks/application_status-BhNGiY2I.js +45 -0
  22. package/dist/chunks/applications-BB9JRcgl.js +132 -0
  23. package/dist/chunks/buildSchema-CccjX9TJ.js +37 -0
  24. package/dist/chunks/card-B-ftozcq.js +739 -0
  25. package/dist/chunks/card-BctFHFZe.js +538 -0
  26. package/dist/chunks/card-CKD1N0QD.js +330 -0
  27. package/dist/chunks/card-CiNZxAd5.js +297 -0
  28. package/dist/chunks/card-DUtDfwMk.js +607 -0
  29. package/dist/chunks/card-fL26_Gvc.js +1189 -0
  30. package/dist/chunks/certificates-BSd1i0un.js +424 -0
  31. package/dist/chunks/create-DxMC_IL1.js +1033 -0
  32. package/dist/chunks/filterQuery-CvfZrkTC.js +99 -0
  33. package/dist/chunks/form-Bh6i5n1U.js +315 -0
  34. package/dist/chunks/form-DDjELqZ9.js +89 -0
  35. package/dist/chunks/geometry-DyhIVRcw.js +67 -0
  36. package/dist/chunks/map-Z57iMvFb.js +2763 -0
  37. package/dist/chunks/map-layers-DnmkOEld.js +400 -0
  38. package/dist/chunks/mapLayersApi-CWoQ2be-.js +251 -0
  39. package/dist/chunks/organizations-BO1_JETm.js +476 -0
  40. package/dist/chunks/organizations-BbYipLwk.js +14 -0
  41. package/dist/chunks/profile-ByahbF4B.js +164 -0
  42. package/dist/chunks/profile-Dwwn_4Pr.js +243 -0
  43. package/dist/chunks/requests-BCin936Z.js +232 -0
  44. package/dist/chunks/requests-CFv5wwAN.js +530 -0
  45. package/dist/chunks/resendSurveyorRegistration-BHTTVIw1.js +27 -0
  46. package/dist/chunks/resources-2e8RFqWR.js +129 -0
  47. package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
  48. package/dist/chunks/surveyorAccount-C7UiiIYg.js +78 -0
  49. package/dist/chunks/users-DtTYsgMb.js +291 -0
  50. package/dist/chunks/work_types-Hwme-FEX.js +34 -0
  51. package/dist/index.css +3 -0
  52. package/dist/index.js +336 -0
  53. package/migrations/20260924120000_surveyor_schema.sql +450 -0
  54. package/migrations/20261008170000_address_lookup.sql +20 -0
  55. package/migrations/20261016120000_map_layers.sql +156 -0
  56. package/migrations/20261016150000_password_reset.sql +15 -0
  57. package/migrations/20261016170000_address_lookup_format.sql +37 -0
  58. package/migrations/20261016180000_settlement_lookup.sql +16 -0
  59. package/migrations/20261019170000_actor_lookup.sql +15 -0
  60. package/package.json +86 -6
  61. package/plugin.d.ts +15 -0
  62. package/plugin.js +8 -0
  63. package/server/app.ts +51 -0
  64. package/server/dictionaries/index.ts +17 -0
  65. package/server/dictionaries/surveyor/account_types.ts +12 -0
  66. package/server/dictionaries/surveyor/application_status.ts +16 -0
  67. package/server/dictionaries/surveyor/map_layer_components.ts +11 -0
  68. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -0
  69. package/server/dictionaries/surveyor/map_layer_types.ts +11 -0
  70. package/server/dictionaries/surveyor/work_types.ts +15 -0
  71. package/server/dictionaries/surveyor/yes_no.ts +11 -0
  72. package/server/fastify.d.ts +12 -0
  73. package/server/index.ts +23 -0
  74. package/server/modules/surveyor/route.ts +410 -0
  75. package/server/modules/surveyor/schema.ts +439 -0
  76. package/server/modules/surveyor/services/applicationTile.ts +53 -0
  77. package/server/modules/surveyor/services/cancelApplication.ts +74 -0
  78. package/server/modules/surveyor/services/changeSurveyorPassword.ts +52 -0
  79. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -0
  80. package/server/modules/surveyor/services/completeApplication.ts +46 -0
  81. package/server/modules/surveyor/services/completeSurveyorRegistration.ts +48 -0
  82. package/server/modules/surveyor/services/createApplication.ts +169 -0
  83. package/server/modules/surveyor/services/geometryExport.ts +34 -0
  84. package/server/modules/surveyor/services/geometryImport.ts +66 -0
  85. package/server/modules/surveyor/services/getSurveyorUser.ts +56 -0
  86. package/server/modules/surveyor/services/identifyApplications.ts +82 -0
  87. package/server/modules/surveyor/services/issueSourceData.ts +55 -0
  88. package/server/modules/surveyor/services/loginSurveyor.ts +67 -0
  89. package/server/modules/surveyor/services/mapLayers.ts +61 -0
  90. package/server/modules/surveyor/services/rasterExport.ts +15 -0
  91. package/server/modules/surveyor/services/registerSurveyor.ts +161 -0
  92. package/server/modules/surveyor/services/requestPasswordReset.ts +49 -0
  93. package/server/modules/surveyor/services/resendRegistration.ts +42 -0
  94. package/server/modules/surveyor/services/resetSurveyorPassword.ts +53 -0
  95. package/server/modules/surveyor/services/searchApplications.ts +63 -0
  96. package/server/modules/surveyor/services/submitSurvey.ts +70 -0
  97. package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +52 -0
  98. package/server/modules/surveyor/services/updateSurveyorStatus.ts +53 -0
  99. package/server/modules/surveyor/services/vectorExport.ts +86 -0
  100. package/server/modules/surveyor/services/verifyApplication.ts +59 -0
  101. package/server/modules/surveyor/utils/accessibleApplication.ts +37 -0
  102. package/server/modules/surveyor/utils/application.ts +68 -0
  103. package/server/modules/surveyor/utils/export.ts +39 -0
  104. package/server/modules/surveyor/utils/firstBoundary.ts +48 -0
  105. package/server/modules/surveyor/utils/mail.ts +161 -0
  106. package/server/modules/surveyor/utils/permissions.ts +29 -0
  107. package/server/modules/surveyor/utils/registration.ts +33 -0
  108. package/server/modules/surveyor/utils/shared.ts +305 -0
  109. package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -0
  110. package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -0
  111. package/server/modules/surveyor/utils/templates/ds.surveyor_registration.pt.hbs +80 -0
  112. package/server/modules/surveyor/utils/templates/ds.surveyor_send_mail.pt.hbs +79 -0
  113. package/server/modules/surveyor/utils/vectorLayer.ts +41 -0
  114. package/server/plugins/convertVector.ts +74 -0
  115. package/server/plugins/proto/convertVector.proto +21 -0
  116. package/server/plugins/swagger.ts +54 -0
  117. package/server/plugins/vite.dev.ts +52 -0
  118. package/server/plugins/vite.prod.ts +55 -0
  119. package/server/resources/helpers/actor_lookup.ts +5 -0
  120. package/server/resources/helpers/address_lookup.ts +8 -0
  121. package/server/resources/helpers/settlement_lookup.ts +7 -0
  122. package/server/resources/helpers/user_lookup.ts +5 -0
  123. package/server/resources/index.ts +30 -0
  124. package/server/resources/surveyor-admin/application_comments.ts +24 -0
  125. package/server/resources/surveyor-admin/application_status_history.ts +46 -0
  126. package/server/resources/surveyor-admin/applications.ts +125 -0
  127. package/server/resources/surveyor-admin/certificates.ts +87 -0
  128. package/server/resources/surveyor-admin/map_layers.ts +69 -0
  129. package/server/resources/surveyor-admin/organization_surveyors.ts +32 -0
  130. package/server/resources/surveyor-admin/organizations.ts +61 -0
  131. package/server/resources/surveyor-admin/surveyors.ts +71 -0
  132. package/server/resources/surveyor-user/application_status_history.ts +52 -0
  133. package/server/resources/surveyor-user/applications.ts +131 -0
  134. package/server/resources/surveyor-user/certificates.ts +67 -0
  135. package/server/resources/surveyor-user/organizations.ts +40 -0
  136. package/server/resources/surveyor-user/surveyors.ts +69 -0
  137. package/server/suggests/index.ts +17 -0
  138. package/server/tsconfig.json +3 -0
  139. package/surveyor-types.d.ts +30 -0
@@ -0,0 +1,11 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.defineProperty, t = (t, n) => {
3
+ let r = {};
4
+ for (var i in t) e(r, i, {
5
+ get: t[i],
6
+ enumerable: !0
7
+ });
8
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ };
10
+ //#endregion
11
+ export { t };
@@ -0,0 +1,78 @@
1
+ import { a as e } from "./resources-2e8RFqWR.js";
2
+ import { confirm as t, notify as n } from "@opengis/core";
3
+ //#region admin/src/utils/surveyorAccount.ts
4
+ function r(e) {
5
+ return !!e.registered_at;
6
+ }
7
+ function i(e) {
8
+ return e.enabled !== !1;
9
+ }
10
+ async function a(t) {
11
+ try {
12
+ return await e(`/api/surveyor/surveyors/${encodeURIComponent(t)}/password`, { method: "PUT" }), n({
13
+ type: "success",
14
+ title: "Пароль змінено",
15
+ message: "Новий пароль надіслано на email користувача"
16
+ }), !0;
17
+ } catch (e) {
18
+ return n({
19
+ type: "error",
20
+ title: "Помилка",
21
+ message: e instanceof Error ? e.message : "Не вдалося змінити пароль"
22
+ }), !1;
23
+ }
24
+ }
25
+ async function o(t, r) {
26
+ try {
27
+ return await e(`/api/surveyor/surveyors/${encodeURIComponent(t)}/account-status`, {
28
+ method: "PUT",
29
+ body: JSON.stringify({ enabled: r })
30
+ }), n({
31
+ type: "success",
32
+ title: r ? "Користувача розблоковано" : "Користувача заблоковано",
33
+ message: r ? "Доступ до кабінету відновлено" : "Доступ до кабінету повністю вимкнено"
34
+ }), !0;
35
+ } catch (e) {
36
+ return n({
37
+ type: "error",
38
+ title: "Помилка",
39
+ message: e instanceof Error ? e.message : "Не вдалося змінити блокування користувача"
40
+ }), !1;
41
+ }
42
+ }
43
+ function s(e, n, r) {
44
+ let a = !i(e);
45
+ t({
46
+ title: a ? "Розблокування" : "Повне блокування",
47
+ type: a ? "warning" : "error",
48
+ message: a ? `Розблокувати користувача «${n}»? Доступ до кабінету буде відновлено.` : `Повністю заблокувати користувача «${n}»? Доступ до кабінету буде вимкнено для всіх організацій.`,
49
+ confirmButtonText: a ? "Розблокувати" : "Заблокувати",
50
+ cancelButtonText: "Скасувати",
51
+ onConfirm: async () => {
52
+ await o(e.surveyor_id, a) && r(a);
53
+ }
54
+ });
55
+ }
56
+ async function c(t, r, i) {
57
+ try {
58
+ return await e(`/api/surveyor/surveyors/${encodeURIComponent(t)}/status`, {
59
+ method: "PUT",
60
+ body: JSON.stringify({
61
+ org_id: r,
62
+ enabled: i
63
+ })
64
+ }), n({
65
+ type: "success",
66
+ title: i ? "Користувача активовано" : "Користувача деактивовано",
67
+ message: i ? "Доступ до організації відновлено" : "Доступ до організації вимкнено"
68
+ }), !0;
69
+ } catch (e) {
70
+ return n({
71
+ type: "error",
72
+ title: "Помилка",
73
+ message: e instanceof Error ? e.message : "Не вдалося змінити статус користувача"
74
+ }), !1;
75
+ }
76
+ }
77
+ //#endregion
78
+ export { i as a, c as i, s as n, a as r, r as t };
@@ -0,0 +1,291 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { t } from "./AppIcon-CIR6y5uE.js";
3
+ import { i as n } from "./resources-2e8RFqWR.js";
4
+ import { i as r, n as i, r as a, t as o } from "./UserTypeBadge-YIwwoCho.js";
5
+ import { t as s } from "./UserAccessBadge-D8JfgGfN.js";
6
+ import { a as c, n as l } from "./surveyorAccount-C7UiiIYg.js";
7
+ import { a as u, c as d } from "./filterQuery-CvfZrkTC.js";
8
+ import { a as f, i as p, n as m, r as h, t as g } from "./RegistryToolbar-BV4mYVAc.js";
9
+ import { Fragment as _, Teleport as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createTextVNode as w, createVNode as T, defineComponent as E, normalizeClass as D, normalizeStyle as O, onMounted as k, onUnmounted as A, openBlock as j, ref as M, renderList as N, toDisplayString as P, vModelText as F, withCtx as I, withDirectives as L, withModifiers as R } from "vue";
10
+ import { RouterLink as z } from "vue-router";
11
+ //#region admin/src/pages/users/index.vue?vue&type=script&setup=true&lang.ts
12
+ var B = /*@__PURE__*/ E({
13
+ __name: "index",
14
+ setup(e, { expose: _ }) {
15
+ _();
16
+ let v = a.columns, { query: b, filterValues: x, page: S, pageSize: C, bindListLoader: w } = f({
17
+ arrayFilterKeys: ["type", "organization"],
18
+ buildFilters: u
19
+ }), T = M(!1), E = M(v.map((e) => e.key)), D = M([]), O = M(0), j = M(!1), N = M("");
20
+ function P(e) {
21
+ return [
22
+ e.last_name,
23
+ e.first_name,
24
+ e.middle_name
25
+ ].filter(Boolean).join(" ") || "—";
26
+ }
27
+ function F(e) {
28
+ let t = e.certificate_id_data?.text;
29
+ return t ? `№ ${t}` : "—";
30
+ }
31
+ function I(e) {
32
+ let t = (e.org_ids_data ?? []).map((e) => e?.text).filter(Boolean);
33
+ return t.length ? t.join(", ") : "—";
34
+ }
35
+ let L = M(null), R = M({
36
+ top: "0px",
37
+ left: "0px"
38
+ });
39
+ function B(e, t) {
40
+ if (L.value === e) {
41
+ L.value = null;
42
+ return;
43
+ }
44
+ let n = t.currentTarget.getBoundingClientRect(), r = window.innerHeight - n.bottom < 60 ? n.top - 52 - 4 : n.bottom + 4, i = Math.min(Math.max(8, n.right - 224), window.innerWidth - 224 - 8);
45
+ R.value = {
46
+ top: `${r}px`,
47
+ left: `${i}px`
48
+ }, L.value = e;
49
+ }
50
+ function V(e) {
51
+ let t = e.target;
52
+ t instanceof Element && t.closest("[data-row-actions]") || (L.value = null);
53
+ }
54
+ function H(e) {
55
+ L.value = null, l(e, P(e), (t) => {
56
+ D.value = D.value.map((n) => n.surveyor_id === e.surveyor_id ? {
57
+ ...n,
58
+ enabled: t
59
+ } : n);
60
+ });
61
+ }
62
+ k(() => {
63
+ document.addEventListener("click", V), window.addEventListener("resize", V), window.addEventListener("scroll", V, !0);
64
+ }), A(() => {
65
+ document.removeEventListener("click", V), window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
66
+ });
67
+ let U = 0, W = y(() => j.value ? "Завантаження…" : N.value ? N.value : "Користувачів за заданими фільтрами не знайдено.");
68
+ async function G() {
69
+ let e = ++U;
70
+ j.value = !0, N.value = "";
71
+ try {
72
+ let t = await n(r, {
73
+ page: S.value,
74
+ limit: C.value,
75
+ sort: a.sort,
76
+ search: b.value.trim() || void 0,
77
+ filters: await d(x.value)
78
+ });
79
+ if (e !== U) return;
80
+ D.value = t.rows ?? [], O.value = Number(t.total) || 0;
81
+ } catch (t) {
82
+ if (e !== U) return;
83
+ D.value = [], O.value = 0, N.value = t instanceof Error ? t.message : "Не вдалося завантажити користувачів";
84
+ } finally {
85
+ e === U && (j.value = !1);
86
+ }
87
+ }
88
+ w(() => {
89
+ G();
90
+ });
91
+ function K(e) {
92
+ x.value = e;
93
+ }
94
+ function q(e) {
95
+ E.value = E.value.includes(e) ? E.value.length > 1 ? E.value.filter((t) => t !== e) : E.value : [...E.value, e];
96
+ }
97
+ let J = {
98
+ columns: v,
99
+ query: b,
100
+ filterValues: x,
101
+ page: S,
102
+ pageSize: C,
103
+ bindListLoader: w,
104
+ columnsOpen: T,
105
+ visibleColumns: E,
106
+ rows: D,
107
+ total: O,
108
+ loading: j,
109
+ error: N,
110
+ personName: P,
111
+ certificateNumber: F,
112
+ organizationNames: I,
113
+ actionsOpen: L,
114
+ menuStyle: R,
115
+ toggleActions: B,
116
+ closeActions: V,
117
+ toggleAccountBlock: H,
118
+ get requestId() {
119
+ return U;
120
+ },
121
+ set requestId(e) {
122
+ U = e;
123
+ },
124
+ emptyText: W,
125
+ loadRows: G,
126
+ onFilterValuesUpdate: K,
127
+ toggleColumn: q,
128
+ AppIcon: t,
129
+ get RouterLink() {
130
+ return z;
131
+ },
132
+ get surveyorEnabled() {
133
+ return c;
134
+ },
135
+ PageHeader: p,
136
+ RegistryTable: h,
137
+ TablePagination: m,
138
+ RegistryToolbar: g,
139
+ UserAccessBadge: s,
140
+ UserTypeBadge: o,
141
+ get config() {
142
+ return i;
143
+ }
144
+ };
145
+ return Object.defineProperty(J, "__isScriptSetup", {
146
+ enumerable: !1,
147
+ value: !0
148
+ }), J;
149
+ }
150
+ }), V = { class: "px-4" }, H = { class: "relative block" }, U = {
151
+ type: "button",
152
+ class: "inline-flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 transition-colors hover:border-brand-300 hover:text-brand-700",
153
+ "aria-label": "Експорт",
154
+ title: "Експорт"
155
+ }, W = { class: "relative" }, G = {
156
+ key: 0,
157
+ class: "absolute right-0 top-12 z-20 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
158
+ }, K = ["checked", "onChange"], q = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, J = { class: "font-semibold text-slate-600" }, Y = {
159
+ key: 1,
160
+ class: "text-slate-400"
161
+ }, X = {
162
+ key: 2,
163
+ class: "block w-full max-w-full break-words text-slate-600"
164
+ }, Z = {
165
+ key: 3,
166
+ class: "text-slate-600"
167
+ }, Q = {
168
+ key: 4,
169
+ class: "block w-full max-w-full break-all text-slate-600"
170
+ }, $ = {
171
+ key: 5,
172
+ class: "whitespace-nowrap text-slate-600"
173
+ }, ee = {
174
+ key: 7,
175
+ class: "flex justify-center"
176
+ }, te = [
177
+ "aria-expanded",
178
+ "aria-label",
179
+ "onClick"
180
+ ], ne = ["onClick"];
181
+ function re(e, t, n, r, i, a) {
182
+ return j(), S("div", null, [T(r.PageHeader, {
183
+ title: "Реєстр користувачів",
184
+ subtitle: "Користувачі геодезичного кабінету"
185
+ }), C("section", V, [
186
+ T(r.RegistryToolbar, {
187
+ "filter-config": r.config.filter,
188
+ "filter-values": r.filterValues,
189
+ "onUpdate:filterValues": r.onFilterValuesUpdate
190
+ }, {
191
+ search: I(() => [C("label", H, [T(r.AppIcon, {
192
+ name: "search",
193
+ class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
194
+ }), L(C("input", {
195
+ "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
196
+ type: "search",
197
+ placeholder: "Пошук (ПІБ, пошта, телефон)…",
198
+ class: "h-10 w-full rounded-lg border border-slate-200 bg-white pl-9 pr-3 text-sm text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:border-brand-400 focus:ring-1 focus:ring-brand-400"
199
+ }, null, 512), [[F, r.query]])])]),
200
+ actions: I(() => [C("button", U, [T(r.AppIcon, {
201
+ name: "download",
202
+ class: "h-4 w-4"
203
+ })]), C("div", W, [C("button", {
204
+ type: "button",
205
+ class: "inline-flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 transition-colors hover:border-brand-300 hover:text-brand-700",
206
+ "aria-label": "Налаштувати колонки",
207
+ onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
208
+ }, [T(r.AppIcon, {
209
+ name: "columns-3",
210
+ class: "h-4 w-4"
211
+ })]), r.columnsOpen ? (j(), S("div", G, [t[4] ||= C("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Налаштувати колонки", -1), (j(!0), S(_, null, N(r.columns, (e) => (j(), S("label", {
212
+ key: e.key,
213
+ class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
214
+ }, [C("input", {
215
+ type: "checkbox",
216
+ checked: r.visibleColumns.includes(e.key),
217
+ class: "h-4 w-4 accent-brand-600",
218
+ onChange: (t) => r.toggleColumn(e.key)
219
+ }, null, 40, K), w(" " + P(e.label), 1)]))), 128))])) : x("", !0)])]),
220
+ _: 1
221
+ }, 8, ["filter-config", "filter-values"]),
222
+ C("div", q, [C("span", null, [t[5] ||= w("Знайдено користувачів: ", -1), C("strong", J, P(r.total), 1)])]),
223
+ T(r.RegistryTable, {
224
+ class: "mt-3",
225
+ rows: r.rows,
226
+ columns: r.columns,
227
+ "visible-keys": r.visibleColumns,
228
+ "row-key": "surveyor_id",
229
+ "min-width": "1100px",
230
+ "empty-text": r.emptyText
231
+ }, {
232
+ cell: I(({ row: e, column: t }) => [t === "fullName" ? (j(), b(r.RouterLink, {
233
+ key: 0,
234
+ to: `/users/${e.surveyor_id}`,
235
+ class: "block w-full max-w-full break-words text-left font-semibold text-brand-700 hover:text-brand-900 hover:underline"
236
+ }, {
237
+ default: I(() => [w(P(r.personName(e)), 1)]),
238
+ _: 2
239
+ }, 1032, ["to"])) : t === "type" ? (j(), S(_, { key: 1 }, [e.certificate_type ? (j(), b(r.UserTypeBadge, {
240
+ key: 0,
241
+ type: e.certificate_type
242
+ }, null, 8, ["type"])) : (j(), S("span", Y, "—"))], 64)) : t === "organization" ? (j(), S("span", X, P(r.organizationNames(e)), 1)) : t === "certificate" ? (j(), S("span", Z, P(r.certificateNumber(e)), 1)) : t === "email" ? (j(), S("span", Q, P(e.email || "—"), 1)) : t === "phone" ? (j(), S("span", $, P(e.phone || "—"), 1)) : t === "status" ? (j(), b(r.UserAccessBadge, {
243
+ key: 6,
244
+ "account-blocked": !r.surveyorEnabled(e)
245
+ }, null, 8, ["account-blocked"])) : t === "actions" ? (j(), S("div", ee, [C("button", {
246
+ type: "button",
247
+ "data-row-actions": "",
248
+ class: "inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg text-slate-400 transition-colors hover:bg-brand-50 hover:text-brand-700",
249
+ "aria-expanded": r.actionsOpen === e.surveyor_id,
250
+ "aria-label": `Дії для ${r.personName(e)}`,
251
+ onClick: R((t) => r.toggleActions(e.surveyor_id, t), ["stop"])
252
+ }, [T(r.AppIcon, {
253
+ name: "more-vertical",
254
+ class: "h-4 w-4"
255
+ })], 8, te), (j(), b(v, { to: "body" }, [r.actionsOpen === e.surveyor_id ? (j(), S("div", {
256
+ key: 0,
257
+ "data-row-actions": "",
258
+ class: "fixed z-50 w-56 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover",
259
+ style: O(r.menuStyle)
260
+ }, [C("button", {
261
+ type: "button",
262
+ class: D(["flex w-full items-center gap-2 px-3 py-2.5 text-sm transition-colors", r.surveyorEnabled(e) ? "text-red-600 hover:bg-red-50" : "text-slate-700 hover:bg-slate-50"]),
263
+ onClick: (t) => r.toggleAccountBlock(e)
264
+ }, [T(r.AppIcon, {
265
+ name: r.surveyorEnabled(e) ? "ban" : "power",
266
+ class: D(["h-4 w-4 shrink-0", r.surveyorEnabled(e) ? "" : "text-slate-400"])
267
+ }, null, 8, ["name", "class"]), w(" " + P(r.surveyorEnabled(e) ? "Заблокувати повністю" : "Розблокувати"), 1)], 10, ne)], 4)) : x("", !0)]))])) : x("", !0)]),
268
+ _: 1
269
+ }, 8, [
270
+ "rows",
271
+ "columns",
272
+ "visible-keys",
273
+ "empty-text"
274
+ ]),
275
+ r.total > 0 ? (j(), b(r.TablePagination, {
276
+ key: 0,
277
+ page: r.page,
278
+ "onUpdate:page": t[2] ||= (e) => r.page = e,
279
+ "page-size": r.pageSize,
280
+ "onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
281
+ total: r.total
282
+ }, null, 8, [
283
+ "page",
284
+ "page-size",
285
+ "total"
286
+ ])) : x("", !0)
287
+ ])]);
288
+ }
289
+ var ie = /*#__PURE__*/ e(B, [["render", re], ["__file", "D:/Softpro/surveyor/admin/src/pages/users/index.vue"]]);
290
+ //#endregion
291
+ export { ie as default };
@@ -0,0 +1,34 @@
1
+ //#region server/dictionaries/surveyor/work_types.ts
2
+ var e = {
3
+ code: "work-types",
4
+ name: "Види робіт",
5
+ checked: !0,
6
+ items: [
7
+ {
8
+ code: "1",
9
+ name: "Топографічне знімання"
10
+ },
11
+ {
12
+ code: "2",
13
+ name: "Інший вид робіт"
14
+ },
15
+ {
16
+ code: "3",
17
+ name: "Інженерні вишукування"
18
+ },
19
+ {
20
+ code: "6",
21
+ name: "Виконавче знімання"
22
+ },
23
+ {
24
+ code: "8",
25
+ name: "Топографо-геодезичне знімання"
26
+ },
27
+ {
28
+ code: "9",
29
+ name: "План земельної ділянки"
30
+ }
31
+ ]
32
+ };
33
+ //#endregion
34
+ export { e as t };