@opengis/surveyor 0.0.0-stage → 0.0.1

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 (138) hide show
  1. package/README.md +46 -3
  2. package/README.npm.md +51 -0
  3. package/dist/chunks/AppIcon-C-4QykTP.js +85 -0
  4. package/dist/chunks/AppealDetailField-DNRGpnyD.js +58 -0
  5. package/dist/chunks/AppealStatusBadge-CefimzY3.js +132 -0
  6. package/dist/chunks/AppealStatusBadge-Cu-UzdzA.js +171 -0
  7. package/dist/chunks/ApplicationHistorySection-PwToBfej.js +769 -0
  8. package/dist/chunks/BaseModal-DrTTkLmR.js +85 -0
  9. package/dist/chunks/FormFilePicker-CKVdZJU9.js +76 -0
  10. package/dist/chunks/MapLayerMenu-AUeTqgEp.js +145 -0
  11. package/dist/chunks/RegistryForm-pvIcFR-V.js +99 -0
  12. package/dist/chunks/RegistryFormModal-BjGu7Upv.js +85 -0
  13. package/dist/chunks/RegistryToolbar-CiUgsjpU.js +452 -0
  14. package/dist/chunks/UserAccessBadge-DyZDv7Oo.js +44 -0
  15. package/dist/chunks/UserTypeBadge-LvnMuKGo.js +188 -0
  16. package/dist/chunks/VerifiedBadge-B6droMOf.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-CsCsndMV.js +132 -0
  23. package/dist/chunks/buildSchema-nkA4Y0YG.js +37 -0
  24. package/dist/chunks/card--DHsMNBd.js +330 -0
  25. package/dist/chunks/card-9LaB42Ol.js +538 -0
  26. package/dist/chunks/card-BZn5CDw9.js +739 -0
  27. package/dist/chunks/card-CNqXSyqX.js +297 -0
  28. package/dist/chunks/card-CgGOgGyd.js +973 -0
  29. package/dist/chunks/card-DCyBFoDZ.js +607 -0
  30. package/dist/chunks/certificates-DueBDDvc.js +424 -0
  31. package/dist/chunks/create-l28e-bWl.js +1033 -0
  32. package/dist/chunks/filterQuery-B9XNx1f1.js +99 -0
  33. package/dist/chunks/form-CdGS1nVO.js +315 -0
  34. package/dist/chunks/form-QTkkzwbC.js +89 -0
  35. package/dist/chunks/geometry-DyhIVRcw.js +67 -0
  36. package/dist/chunks/map-BW3iOhQg.js +2763 -0
  37. package/dist/chunks/map-layers-qxWjos2V.js +400 -0
  38. package/dist/chunks/mapLayersApi-CWoQ2be-.js +251 -0
  39. package/dist/chunks/organizations-BtuMZ5s_.js +14 -0
  40. package/dist/chunks/organizations-CZOINYMq.js +476 -0
  41. package/dist/chunks/profile-CuxlkEev.js +243 -0
  42. package/dist/chunks/profile-DxZHxGum.js +164 -0
  43. package/dist/chunks/requests-Bt8fEdRc.js +530 -0
  44. package/dist/chunks/requests-DQJIhz00.js +232 -0
  45. package/dist/chunks/resendSurveyorRegistration-DopjOHaM.js +27 -0
  46. package/dist/chunks/resources-Cl_EvaIy.js +129 -0
  47. package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
  48. package/dist/chunks/surveyorAccount-BceNQypZ.js +78 -0
  49. package/dist/chunks/users-DlaogjC_.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 +259 -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 +75 -4
  61. package/plugin.js +10 -0
  62. package/server/app.ts +50 -0
  63. package/server/dictionaries/index.ts +17 -0
  64. package/server/dictionaries/surveyor/account_types.ts +12 -0
  65. package/server/dictionaries/surveyor/application_status.ts +16 -0
  66. package/server/dictionaries/surveyor/map_layer_components.ts +11 -0
  67. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -0
  68. package/server/dictionaries/surveyor/map_layer_types.ts +11 -0
  69. package/server/dictionaries/surveyor/work_types.ts +15 -0
  70. package/server/dictionaries/surveyor/yes_no.ts +11 -0
  71. package/server/embed.ts +49 -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/tsconfig.json +3 -0
  138. package/surveyor-types.d.ts +30 -0
@@ -0,0 +1,476 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
+ import { t as n } from "./AppIcon-C-4QykTP.js";
4
+ import { i as r, n as i } from "./resources-Cl_EvaIy.js";
5
+ import { t as a } from "./VerifiedBadge-B6droMOf.js";
6
+ import { i as o } from "./filterQuery-B9XNx1f1.js";
7
+ import { a as s, i as c, n as l, r as u, t as d } from "./RegistryToolbar-CiUgsjpU.js";
8
+ import { t as f } from "./RegistryFormModal-BjGu7Upv.js";
9
+ import { n as p, t as m } from "./form-QTkkzwbC.js";
10
+ import { Fragment as h, Teleport as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, normalizeStyle as T, onMounted as E, onUnmounted as D, openBlock as O, ref as k, renderList as A, toDisplayString as j, vModelText as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
11
+ import { RouterLink as I, useRouter as L } from "vue-router";
12
+ import { confirm as ee, notify as R } from "@opengis/core";
13
+ //#region admin/src/static/registry/organizations/table.ts
14
+ var z = {
15
+ resource: p,
16
+ pageSize: 10,
17
+ sort: "-created_at",
18
+ columns: [
19
+ {
20
+ key: "name",
21
+ label: "Назва організації"
22
+ },
23
+ {
24
+ key: "address",
25
+ label: "Юридична адреса"
26
+ },
27
+ {
28
+ key: "phone",
29
+ label: "Телефон організації"
30
+ },
31
+ {
32
+ key: "email",
33
+ label: "Email організації"
34
+ },
35
+ {
36
+ key: "registrationFile",
37
+ label: "Скан-копія реєстрації"
38
+ },
39
+ {
40
+ key: "specialists",
41
+ label: "Сертифіковані спеціалісти"
42
+ },
43
+ {
44
+ key: "verified",
45
+ label: "Верифіковано"
46
+ },
47
+ {
48
+ key: "actions",
49
+ label: "Дії"
50
+ }
51
+ ]
52
+ }, B = {
53
+ resource: p,
54
+ view: "inline",
55
+ fields: {
56
+ verified: {
57
+ component: "select",
58
+ label: "Верифікація",
59
+ placeholder: "Верифікація",
60
+ width: 160,
61
+ options: [{
62
+ id: "verified",
63
+ text: "Верифіковані"
64
+ }, {
65
+ id: "unverified",
66
+ text: "Не верифіковані"
67
+ }]
68
+ },
69
+ createdAt: {
70
+ component: "date2",
71
+ label: "Дата створення",
72
+ placeholder: "Період",
73
+ width: 280
74
+ }
75
+ }
76
+ }, V = /* @__PURE__ */ e({
77
+ filter: () => B,
78
+ form: () => m,
79
+ resource: () => p,
80
+ table: () => z
81
+ }), H = /*@__PURE__*/ w({
82
+ __name: "index",
83
+ setup(e, { expose: t }) {
84
+ t();
85
+ let m = z.columns, { query: h, filterValues: g, page: v, pageSize: y, listFilters: b, bindListLoader: x, refreshList: S } = s({
86
+ arrayFilterKeys: ["verified"],
87
+ buildFilters: o
88
+ }), C = k(!1), w = k(m.map((e) => e.key)), T = k([]), O = k(0), A = k(!1), j = k(""), M = k(!1), N = k(null), P = k({
89
+ top: "0px",
90
+ left: "0px"
91
+ }), F = L();
92
+ function B(e, t) {
93
+ if (N.value === e) {
94
+ N.value = null;
95
+ return;
96
+ }
97
+ let n = t.currentTarget.getBoundingClientRect(), r = window.innerHeight - n.bottom < 100 ? n.top - 92 - 4 : n.bottom + 4, i = Math.min(Math.max(8, n.right - 176), window.innerWidth - 176 - 8);
98
+ P.value = {
99
+ top: `${r}px`,
100
+ left: `${i}px`
101
+ }, N.value = e;
102
+ }
103
+ function H(e) {
104
+ N.value = null, F.push({
105
+ name: "organization-detail",
106
+ params: { id: e.org_id },
107
+ query: { edit: "1" }
108
+ });
109
+ }
110
+ function U(e) {
111
+ N.value = null, ee({
112
+ title: "Підтвердження",
113
+ type: "error",
114
+ message: `Видалити організацію «${e.name}»?`,
115
+ confirmButtonText: "Видалити",
116
+ cancelButtonText: "Скасувати",
117
+ onConfirm: async () => {
118
+ try {
119
+ await i(p, e.org_id), T.value.length === 1 && v.value > 1 ? --v.value : await q();
120
+ } catch (e) {
121
+ R({
122
+ type: "error",
123
+ title: "Помилка видалення",
124
+ message: e instanceof Error ? e.message : "Не вдалося видалити організацію"
125
+ });
126
+ }
127
+ }
128
+ });
129
+ }
130
+ function W(e) {
131
+ let t = e.target;
132
+ t instanceof Element && t.closest("[data-row-actions]") || (N.value = null);
133
+ }
134
+ let G = 0, K = _(() => A.value ? "Завантаження…" : j.value ? j.value : "Організацій за заданими фільтрами не знайдено.");
135
+ async function q() {
136
+ let e = ++G;
137
+ A.value = !0, j.value = "";
138
+ try {
139
+ let t = await r(p, {
140
+ page: v.value,
141
+ limit: y.value,
142
+ sort: z.sort,
143
+ search: h.value.trim() || void 0,
144
+ filters: b.value
145
+ });
146
+ if (e !== G) return;
147
+ T.value = t.rows ?? [], O.value = Number(t.total) || 0;
148
+ } catch (t) {
149
+ if (e !== G) return;
150
+ T.value = [], O.value = 0, j.value = t instanceof Error ? t.message : "Не вдалося завантажити організації";
151
+ } finally {
152
+ e === G && (A.value = !1);
153
+ }
154
+ }
155
+ x(() => {
156
+ N.value = null, q();
157
+ });
158
+ function J(e) {
159
+ g.value = e;
160
+ }
161
+ E(() => {
162
+ document.addEventListener("click", W), window.addEventListener("resize", W), window.addEventListener("scroll", W, !0);
163
+ }), D(() => {
164
+ document.removeEventListener("click", W), window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
165
+ });
166
+ function Y(e) {
167
+ w.value = w.value.includes(e) ? w.value.length > 1 ? w.value.filter((t) => t !== e) : w.value : [...w.value, e];
168
+ }
169
+ function X() {
170
+ v.value === 1 ? S(() => {
171
+ q();
172
+ }) : v.value = 1;
173
+ }
174
+ function Z(e, t = !1) {
175
+ let n = `/api/file/${encodeURIComponent(e)}`;
176
+ return t ? `${n}?download=true` : n;
177
+ }
178
+ let Q = {
179
+ columns: m,
180
+ query: h,
181
+ filterValues: g,
182
+ page: v,
183
+ pageSize: y,
184
+ listFilters: b,
185
+ bindListLoader: x,
186
+ refreshList: S,
187
+ columnsOpen: C,
188
+ visibleColumns: w,
189
+ rows: T,
190
+ total: O,
191
+ loading: A,
192
+ error: j,
193
+ showAddModal: M,
194
+ actionsOpen: N,
195
+ menuStyle: P,
196
+ router: F,
197
+ toggleActions: B,
198
+ editOrganization: H,
199
+ removeOrganization: U,
200
+ closeActions: W,
201
+ get requestId() {
202
+ return G;
203
+ },
204
+ set requestId(e) {
205
+ G = e;
206
+ },
207
+ emptyText: K,
208
+ loadRows: q,
209
+ onFilterValuesUpdate: J,
210
+ toggleColumn: Y,
211
+ onOrganizationSaved: X,
212
+ fileUrl: Z,
213
+ colWidths: {
214
+ name: "w-[220px]",
215
+ address: "w-[220px]",
216
+ phone: "w-[150px]",
217
+ email: "w-[210px]",
218
+ registrationFile: "w-[150px]",
219
+ specialists: "w-[150px]",
220
+ verified: "w-[120px]",
221
+ actions: "w-[100px]"
222
+ },
223
+ AppIcon: n,
224
+ get RouterLink() {
225
+ return I;
226
+ },
227
+ PageHeader: c,
228
+ VerifiedBadge: a,
229
+ RegistryTable: u,
230
+ TablePagination: l,
231
+ RegistryFormModal: f,
232
+ RegistryToolbar: d,
233
+ get config() {
234
+ return V;
235
+ }
236
+ };
237
+ return Object.defineProperty(Q, "__isScriptSetup", {
238
+ enumerable: !1,
239
+ value: !0
240
+ }), Q;
241
+ }
242
+ }), U = { class: "px-4" }, W = { class: "relative block" }, G = {
243
+ type: "button",
244
+ 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",
245
+ "aria-label": "Експорт",
246
+ title: "Експорт реєстру"
247
+ }, K = { class: "relative" }, q = {
248
+ key: 0,
249
+ class: "absolute right-0 top-12 z-20 w-64 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
250
+ }, J = { class: "flex items-center justify-between px-2 py-1" }, Y = ["checked", "onChange"], X = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, Z = { class: "font-semibold text-slate-600" }, Q = {
251
+ key: 1,
252
+ class: "block w-full max-w-full break-words text-slate-600"
253
+ }, te = {
254
+ key: 2,
255
+ class: "whitespace-nowrap text-slate-600"
256
+ }, ne = {
257
+ key: 3,
258
+ class: "block w-full max-w-full break-all text-slate-600"
259
+ }, re = {
260
+ key: 4,
261
+ class: "flex items-center gap-1"
262
+ }, ie = ["href"], ae = ["href"], oe = {
263
+ key: 1,
264
+ class: "text-slate-400"
265
+ }, $ = {
266
+ key: 5,
267
+ class: "text-slate-400"
268
+ }, se = {
269
+ key: 7,
270
+ class: "text-slate-400"
271
+ }, ce = {
272
+ key: 8,
273
+ class: "flex justify-center"
274
+ }, le = [
275
+ "aria-expanded",
276
+ "aria-label",
277
+ "onClick"
278
+ ], ue = ["onClick"], de = ["onClick"];
279
+ function fe(e, t, n, r, i, a) {
280
+ return O(), b("div", null, [
281
+ C(r.PageHeader, {
282
+ title: "Реєстр організацій",
283
+ subtitle: "Організації та сертифіковані спеціалісти геодезичного кабінету"
284
+ }, {
285
+ default: N(() => [x("button", {
286
+ type: "button",
287
+ class: "inline-flex h-10 items-center justify-center gap-2 rounded-lg bg-brand-600 px-4 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-brand-700",
288
+ onClick: t[0] ||= (e) => r.showAddModal = !0
289
+ }, [C(r.AppIcon, {
290
+ name: "plus",
291
+ class: "h-4 w-4"
292
+ }), t[7] ||= S(" Додати ", -1)])]),
293
+ _: 1
294
+ }),
295
+ x("section", U, [
296
+ C(r.RegistryToolbar, {
297
+ "search-min": "min-w-[220px]",
298
+ "filter-config": r.config.filter,
299
+ "filter-values": r.filterValues,
300
+ "onUpdate:filterValues": r.onFilterValuesUpdate
301
+ }, {
302
+ search: N(() => [x("label", W, [C(r.AppIcon, {
303
+ name: "search",
304
+ class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
305
+ }), P(x("input", {
306
+ "onUpdate:modelValue": t[1] ||= (e) => r.query = e,
307
+ type: "search",
308
+ placeholder: "Пошук організації…",
309
+ 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"
310
+ }, null, 512), [[M, r.query]])])]),
311
+ actions: N(() => [x("button", G, [C(r.AppIcon, {
312
+ name: "download",
313
+ class: "h-4 w-4"
314
+ })]), x("div", K, [x("button", {
315
+ type: "button",
316
+ 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",
317
+ "aria-label": "Налаштувати колонки",
318
+ title: "Налаштувати колонки",
319
+ onClick: t[2] ||= (e) => r.columnsOpen = !r.columnsOpen
320
+ }, [C(r.AppIcon, {
321
+ name: "columns-3",
322
+ class: "h-4 w-4"
323
+ })]), r.columnsOpen ? (O(), b("div", q, [x("div", J, [t[9] ||= x("p", { class: "text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Показати колонки", -1), x("button", {
324
+ type: "button",
325
+ "aria-label": "Закрити",
326
+ class: "text-slate-400 hover:text-slate-700",
327
+ onClick: t[3] ||= (e) => r.columnsOpen = !1
328
+ }, [...t[8] ||= [x("svg", {
329
+ xmlns: "http://www.w3.org/2000/svg",
330
+ class: "h-4 w-4",
331
+ fill: "none",
332
+ viewBox: "0 0 24 24",
333
+ stroke: "currentColor"
334
+ }, [x("path", {
335
+ "stroke-linecap": "round",
336
+ "stroke-linejoin": "round",
337
+ "stroke-width": "2",
338
+ d: "M6 18L18 6M6 6l12 12"
339
+ })], -1)]])]), (O(!0), b(h, null, A(r.columns, (e) => (O(), b("label", {
340
+ key: e.key,
341
+ class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
342
+ }, [x("input", {
343
+ type: "checkbox",
344
+ checked: r.visibleColumns.includes(e.key),
345
+ class: "h-4 w-4 accent-brand-600",
346
+ onChange: (t) => r.toggleColumn(e.key)
347
+ }, null, 40, Y), S(" " + j(e.label), 1)]))), 128))])) : y("", !0)])]),
348
+ _: 1
349
+ }, 8, ["filter-config", "filter-values"]),
350
+ x("div", X, [x("span", null, [t[10] ||= S("Знайдено організацій: ", -1), x("strong", Z, j(r.total), 1)])]),
351
+ C(r.RegistryTable, {
352
+ class: "mt-3",
353
+ rows: r.rows,
354
+ columns: r.columns,
355
+ "visible-keys": r.visibleColumns,
356
+ "row-key": "org_id",
357
+ "min-width": "1180px",
358
+ "column-widths": r.colWidths,
359
+ "cell-class": { specialists: "text-right tabular-nums" },
360
+ "empty-text": r.emptyText
361
+ }, {
362
+ cell: N(({ row: e, column: n }) => [n === "name" ? (O(), v(r.RouterLink, {
363
+ key: 0,
364
+ to: `/organizations/${e.org_id}`,
365
+ class: "block w-full max-w-full break-words text-left font-semibold text-brand-700 hover:text-brand-900 hover:underline"
366
+ }, {
367
+ default: N(() => [S(j(e.name), 1)]),
368
+ _: 2
369
+ }, 1032, ["to"])) : n === "address" ? (O(), b("span", Q, j(e.legal_address || "—"), 1)) : n === "phone" ? (O(), b("span", te, j(e.phone || "—"), 1)) : n === "email" ? (O(), b("span", ne, j(e.email || "—"), 1)) : n === "registrationFile" ? (O(), b("div", re, [e.scan_path ? (O(), b(h, { key: 0 }, [x("a", {
370
+ href: r.fileUrl(e.scan_path),
371
+ target: "_blank",
372
+ rel: "noopener",
373
+ class: "rounded-md p-1.5 text-slate-500 transition-colors hover:bg-brand-50 hover:text-brand-700",
374
+ "aria-label": "Переглянути документ",
375
+ title: "Переглянути документ"
376
+ }, [...t[11] ||= [x("svg", {
377
+ xmlns: "http://www.w3.org/2000/svg",
378
+ class: "h-4 w-4",
379
+ fill: "none",
380
+ viewBox: "0 0 24 24",
381
+ stroke: "currentColor"
382
+ }, [x("path", {
383
+ "stroke-linecap": "round",
384
+ "stroke-linejoin": "round",
385
+ "stroke-width": "2",
386
+ d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
387
+ }), x("path", {
388
+ "stroke-linecap": "round",
389
+ "stroke-linejoin": "round",
390
+ "stroke-width": "2",
391
+ d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
392
+ })], -1)]], 8, ie), x("a", {
393
+ href: r.fileUrl(e.scan_path, !0),
394
+ class: "rounded-md p-1.5 text-slate-500 transition-colors hover:bg-brand-50 hover:text-brand-700",
395
+ "aria-label": "Завантажити документ",
396
+ title: "Завантажити документ"
397
+ }, [...t[12] ||= [x("svg", {
398
+ xmlns: "http://www.w3.org/2000/svg",
399
+ class: "h-4 w-4",
400
+ fill: "none",
401
+ viewBox: "0 0 24 24",
402
+ stroke: "currentColor"
403
+ }, [x("path", {
404
+ "stroke-linecap": "round",
405
+ "stroke-linejoin": "round",
406
+ "stroke-width": "2",
407
+ d: "M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
408
+ })], -1)]], 8, ae)], 64)) : (O(), b("span", oe, "—"))])) : n === "specialists" ? (O(), b("span", $, "—")) : n === "verified" && typeof e.verified == "boolean" ? (O(), v(r.VerifiedBadge, {
409
+ key: 6,
410
+ verified: e.verified
411
+ }, null, 8, ["verified"])) : n === "verified" ? (O(), b("span", se, "—")) : n === "actions" ? (O(), b("div", ce, [x("button", {
412
+ type: "button",
413
+ "data-row-actions": "",
414
+ class: "inline-flex h-8 w-8 items-center justify-center rounded-lg text-slate-400 transition-colors hover:bg-brand-50 hover:text-brand-700",
415
+ "aria-expanded": r.actionsOpen === e.org_id,
416
+ "aria-label": `Дії для ${e.name}`,
417
+ onClick: F((t) => r.toggleActions(e.org_id, t), ["stop"])
418
+ }, [C(r.AppIcon, {
419
+ name: "more-vertical",
420
+ class: "h-4 w-4"
421
+ })], 8, le), (O(), v(g, { to: "body" }, [r.actionsOpen === e.org_id ? (O(), b("div", {
422
+ key: 0,
423
+ "data-row-actions": "",
424
+ class: "fixed z-50 w-44 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover",
425
+ style: T(r.menuStyle)
426
+ }, [
427
+ x("button", {
428
+ type: "button",
429
+ class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50",
430
+ onClick: (t) => r.editOrganization(e)
431
+ }, [C(r.AppIcon, {
432
+ name: "pencil",
433
+ class: "h-4 w-4 text-slate-400"
434
+ }), t[13] ||= S(" Редагувати ", -1)], 8, ue),
435
+ t[15] ||= x("div", { class: "my-1 border-t border-slate-100" }, null, -1),
436
+ x("button", {
437
+ type: "button",
438
+ class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-red-600 transition-colors hover:bg-red-50",
439
+ onClick: (t) => r.removeOrganization(e)
440
+ }, [C(r.AppIcon, {
441
+ name: "trash-2",
442
+ class: "h-4 w-4"
443
+ }), t[14] ||= S(" Видалити ", -1)], 8, de)
444
+ ], 4)) : y("", !0)]))])) : y("", !0)]),
445
+ _: 1
446
+ }, 8, [
447
+ "rows",
448
+ "columns",
449
+ "visible-keys",
450
+ "empty-text"
451
+ ]),
452
+ r.total > 0 ? (O(), v(r.TablePagination, {
453
+ key: 0,
454
+ page: r.page,
455
+ "onUpdate:page": t[4] ||= (e) => r.page = e,
456
+ "page-size": r.pageSize,
457
+ "onUpdate:pageSize": t[5] ||= (e) => r.pageSize = e,
458
+ total: r.total
459
+ }, null, 8, [
460
+ "page",
461
+ "page-size",
462
+ "total"
463
+ ])) : y("", !0)
464
+ ]),
465
+ C(r.RegistryFormModal, {
466
+ modelValue: r.showAddModal,
467
+ "onUpdate:modelValue": t[6] ||= (e) => r.showAddModal = e,
468
+ title: "Нова організація",
469
+ config: r.config.form,
470
+ onSaved: r.onOrganizationSaved
471
+ }, null, 8, ["modelValue", "config"])
472
+ ]);
473
+ }
474
+ var pe = /*#__PURE__*/ t(H, [["render", fe], ["__file", "C:/softpro/surveyor/admin/src/pages/organizations/index.vue"]]);
475
+ //#endregion
476
+ export { pe as default };