@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,739 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { t } from "./AppIcon-C-4QykTP.js";
3
+ import { a as n, i as r, o as i } from "./resources-Cl_EvaIy.js";
4
+ import { t as a } from "./VerifiedBadge-B6droMOf.js";
5
+ import { t as o } from "./UserAccessBadge-DyZDv7Oo.js";
6
+ import { n as s, t as c } from "./AppealDetailField-DNRGpnyD.js";
7
+ import { i as l, r as u, t as d } from "./surveyorAccount-BceNQypZ.js";
8
+ import { t as f } from "./BaseModal-DrTTkLmR.js";
9
+ import { t as p } from "./RegistryForm-pvIcFR-V.js";
10
+ import { n as m, t as h } from "./resendSurveyorRegistration-DopjOHaM.js";
11
+ import { t as g } from "./form-QTkkzwbC.js";
12
+ import { Fragment as _, Teleport as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as w, createTextVNode as T, createVNode as E, defineComponent as D, normalizeClass as O, normalizeStyle as k, onMounted as ee, onUnmounted as te, openBlock as A, ref as j, renderList as M, toDisplayString as N, vModelText as P, watch as F, withCtx as I, withDirectives as L, withModifiers as R } from "vue";
13
+ import { RouterLink as z, useRoute as B, useRouter as V } from "vue-router";
14
+ import { confirm as ne, notify as H } from "@opengis/core";
15
+ //#region admin/src/pages/organizations/components/OrganizationUsers.vue?vue&type=script&setup=true&lang.ts
16
+ var re = "h-10 w-full rounded-lg border border-slate-200 bg-white px-3 text-sm text-slate-700 outline-none transition-colors focus:border-brand-400 focus:ring-1 focus:ring-brand-400", U = /*@__PURE__*/ D({
17
+ __name: "OrganizationUsers",
18
+ props: {
19
+ orgId: {
20
+ type: String,
21
+ required: !0
22
+ },
23
+ orgName: {
24
+ type: String,
25
+ required: !0
26
+ },
27
+ users: {
28
+ type: Array,
29
+ required: !0
30
+ }
31
+ },
32
+ emits: ["changed"],
33
+ setup(e, { expose: a, emit: s }) {
34
+ a();
35
+ let c = e, p = s, g = j(null), _ = j({
36
+ top: "0px",
37
+ left: "0px"
38
+ }), v = j(null), b = j(null), x = j(!1), S = j(null), C = j(""), w = j(""), T = j([]), E = j(!1), D = j(null), O = j(null), k = j(""), A = j(""), M = j({
39
+ last_name: "",
40
+ first_name: "",
41
+ middle_name: "",
42
+ phone: ""
43
+ }), N = 0, P = y(() => v.value === "add" ? "Додати користувача" : v.value === "edit" ? "Редагувати користувача" : "");
44
+ function F(e) {
45
+ return [
46
+ e.last_name,
47
+ e.first_name,
48
+ e.middle_name
49
+ ].filter(Boolean).join(" ") || "—";
50
+ }
51
+ function I(e) {
52
+ let t = e.certificate_id_data?.text;
53
+ return t ? `№ ${t}` : "—";
54
+ }
55
+ function L(e) {
56
+ let t = e.text?.trim() ?? "", n = e.number_certificate?.trim();
57
+ return n && t.endsWith(n) ? t.slice(0, -n.length).trim() || "—" : t || "—";
58
+ }
59
+ function R(e) {
60
+ return e.membership_enabled !== !1;
61
+ }
62
+ function z(e, t) {
63
+ if (g.value === e) {
64
+ g.value = null;
65
+ return;
66
+ }
67
+ let n = t.currentTarget.getBoundingClientRect(), r = c.users.find((t) => t.surveyor_id === e), i = (2 + (r && h(r) ? 1 : 0) + (r && d(r) ? 1 : 0)) * 44 + 8, a = window.innerHeight - n.bottom < i + 8 ? n.top - i - 4 : n.bottom + 4, o = Math.min(Math.max(8, n.right - 256), window.innerWidth - 256 - 8);
68
+ _.value = {
69
+ top: `${a}px`,
70
+ left: `${o}px`
71
+ }, g.value = e;
72
+ }
73
+ function B(e) {
74
+ let t = e?.target;
75
+ t instanceof Element && t.closest("[data-user-menu]") || (g.value = null);
76
+ }
77
+ function V() {
78
+ v.value = null, b.value = null, C.value = "";
79
+ }
80
+ function U() {
81
+ w.value = "", T.value = [], K.value = !1, D.value = null, O.value = null, k.value = "", A.value = "", C.value = "", v.value = "add";
82
+ }
83
+ function W(e) {
84
+ g.value = null, b.value = e, M.value = {
85
+ last_name: e.last_name ?? "",
86
+ first_name: e.first_name ?? "",
87
+ middle_name: e.middle_name ?? "",
88
+ phone: e.phone ?? ""
89
+ }, C.value = "", v.value = "edit";
90
+ }
91
+ function G(e, t) {
92
+ C.value = e instanceof Error ? e.message : t;
93
+ }
94
+ let K = j(!1), q = 0;
95
+ async function J() {
96
+ let e = w.value.trim(), t = ++q;
97
+ if (D.value = null, O.value = null, K.value = e.length >= 2, e.length < 2) {
98
+ T.value = [], E.value = !1;
99
+ return;
100
+ }
101
+ E.value = !0;
102
+ try {
103
+ let r = await n(`/api/resource/certificates/list?search=${encodeURIComponent(e)}`);
104
+ if (t !== q) return;
105
+ T.value = (r.data ?? []).map((e) => ({
106
+ ...e,
107
+ certificate_id: e.id
108
+ }));
109
+ } catch (e) {
110
+ if (t !== q) return;
111
+ T.value = [], G(e, "Не вдалося знайти сертифікати");
112
+ } finally {
113
+ t === q && (E.value = !1);
114
+ }
115
+ }
116
+ function Y() {
117
+ window.clearTimeout(N), N = window.setTimeout(() => void J(), 300);
118
+ }
119
+ async function X(e) {
120
+ D.value = e, T.value = [], w.value = e.text?.trim() || e.number_certificate || "", k.value = e.surveyor_email ?? "", A.value = e.surveyor_phone ?? "", O.value = null, C.value = "";
121
+ try {
122
+ let t = await r("surveyors", {
123
+ page: 1,
124
+ limit: 1,
125
+ filters: { certificate_id: e.certificate_id }
126
+ });
127
+ O.value = t.rows[0] ?? null, O.value?.registered_at ? A.value = "" : O.value && (k.value = O.value.email || k.value, A.value = O.value.phone || A.value);
128
+ } catch (e) {
129
+ G(e, "Не вдалося перевірити сертифікат");
130
+ }
131
+ }
132
+ async function Z() {
133
+ if (!D.value || x.value) return;
134
+ if (O.value && c.users.some((e) => e.surveyor_id === O.value?.surveyor_id)) {
135
+ C.value = "Цей користувач уже є в організації";
136
+ return;
137
+ }
138
+ let e = k.value.trim().toLowerCase();
139
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
140
+ C.value = "Вкажіть коректний email";
141
+ return;
142
+ }
143
+ let t = O.value?.registered_at ? O.value : null;
144
+ if (t && e !== (t.email ?? "").trim().toLowerCase()) {
145
+ C.value = "Email не збігається з email облікового запису цього сертифіката";
146
+ return;
147
+ }
148
+ x.value = !0, C.value = "";
149
+ try {
150
+ let r = await n("/api/surveyor/surveyors", {
151
+ method: "POST",
152
+ body: JSON.stringify({
153
+ organization_id: c.orgId,
154
+ certificate_id: D.value.certificate_id,
155
+ email: e,
156
+ ...t ? {} : { phone: A.value.trim() }
157
+ })
158
+ });
159
+ H(r.registration_status === "attached" ? {
160
+ type: "success",
161
+ title: "Користувача додано",
162
+ message: "Наявний обліковий запис прикріплено до організації"
163
+ } : {
164
+ type: "success",
165
+ title: "Користувача додано",
166
+ message: "На email надіслано лист для завершення реєстрації"
167
+ }), V(), p("changed");
168
+ } catch (e) {
169
+ G(e, "Не вдалося додати користувача");
170
+ } finally {
171
+ x.value = !1;
172
+ }
173
+ }
174
+ async function Q(e) {
175
+ if (!S.value) {
176
+ g.value = null, S.value = e.surveyor_id;
177
+ try {
178
+ await m(e.surveyor_id);
179
+ } finally {
180
+ S.value = null;
181
+ }
182
+ }
183
+ }
184
+ function ie(e) {
185
+ d(e) && (g.value = null, ne({
186
+ title: "Зміна пароля",
187
+ type: "warning",
188
+ message: `Згенерувати новий пароль для «${F(e)}»? Поточний пароль перестане діяти, новий буде надіслано на email.`,
189
+ confirmButtonText: "Згенерувати",
190
+ cancelButtonText: "Скасувати",
191
+ onConfirm: () => u(e.surveyor_id)
192
+ }));
193
+ }
194
+ function ae(e) {
195
+ g.value = null;
196
+ let t = !R(e);
197
+ ne({
198
+ title: t ? "Активація" : "Деактивація",
199
+ type: t ? "warning" : "error",
200
+ message: t ? `Активувати користувача «${F(e)}»?` : `Деактивувати користувача «${F(e)}» в організації «${c.orgName}»? Доступ до заявок цієї організації буде вимкнено.`,
201
+ confirmButtonText: t ? "Активувати" : "Деактивувати",
202
+ cancelButtonText: "Скасувати",
203
+ onConfirm: async () => {
204
+ await l(e.surveyor_id, c.orgId, t) && p("changed");
205
+ }
206
+ });
207
+ }
208
+ async function oe() {
209
+ if (!b.value || x.value) return;
210
+ let e = {
211
+ last_name: M.value.last_name.trim(),
212
+ first_name: M.value.first_name.trim(),
213
+ middle_name: M.value.middle_name.trim(),
214
+ phone: M.value.phone.trim()
215
+ };
216
+ if (!e.last_name || !e.first_name) {
217
+ C.value = "Прізвище та імʼя обовʼязкові";
218
+ return;
219
+ }
220
+ x.value = !0, C.value = "";
221
+ try {
222
+ await i("surveyors", b.value.surveyor_id, e), V(), p("changed");
223
+ } catch (e) {
224
+ G(e, "Не вдалося зберегти користувача");
225
+ } finally {
226
+ x.value = !1;
227
+ }
228
+ }
229
+ ee(() => {
230
+ document.addEventListener("click", B), window.addEventListener("resize", B), window.addEventListener("scroll", B, !0);
231
+ }), te(() => {
232
+ window.clearTimeout(N), document.removeEventListener("click", B), window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
233
+ });
234
+ let $ = {
235
+ props: c,
236
+ emit: p,
237
+ fieldClass: re,
238
+ openMenuId: g,
239
+ menuStyle: _,
240
+ dialog: v,
241
+ activeUser: b,
242
+ saving: x,
243
+ resendingId: S,
244
+ formError: C,
245
+ certificateQuery: w,
246
+ certificates: T,
247
+ certificatesLoading: E,
248
+ selectedCertificate: D,
249
+ existingSurveyor: O,
250
+ addEmail: k,
251
+ addPhone: A,
252
+ editDraft: M,
253
+ get searchTimer() {
254
+ return N;
255
+ },
256
+ set searchTimer(e) {
257
+ N = e;
258
+ },
259
+ dialogTitle: P,
260
+ personName: F,
261
+ certificateLabel: I,
262
+ certificatePerson: L,
263
+ membershipEnabled: R,
264
+ toggleMenu: z,
265
+ closeMenu: B,
266
+ closeDialog: V,
267
+ openAdd: U,
268
+ openEdit: W,
269
+ fail: G,
270
+ searched: K,
271
+ get searchSeq() {
272
+ return q;
273
+ },
274
+ set searchSeq(e) {
275
+ q = e;
276
+ },
277
+ searchCertificates: J,
278
+ onCertificateInput: Y,
279
+ chooseCertificate: X,
280
+ submitAdd: Z,
281
+ resendRegistrationInvite: Q,
282
+ resetPassword: ie,
283
+ toggleAccess: ae,
284
+ submitEdit: oe,
285
+ AppIcon: t,
286
+ BaseModal: f,
287
+ UserAccessBadge: o,
288
+ get canResendSurveyorRegistration() {
289
+ return h;
290
+ },
291
+ get canResetSurveyorPassword() {
292
+ return d;
293
+ }
294
+ };
295
+ return Object.defineProperty($, "__isScriptSetup", {
296
+ enumerable: !1,
297
+ value: !0
298
+ }), $;
299
+ }
300
+ }), W = { class: "rounded-xl border border-slate-200 bg-white shadow-card" }, G = { class: "flex items-center justify-between gap-2.5 border-b border-slate-100 px-5 py-3.5" }, K = { class: "flex items-center gap-2.5" }, q = { class: "text-brand-600" }, J = { class: "overflow-x-auto" }, Y = { class: "w-full min-w-[1080px] table-fixed text-left text-[13px]" }, X = { class: "divide-y divide-slate-100" }, Z = { class: "px-5 py-3.5" }, Q = { class: "font-semibold text-slate-800" }, ie = {
301
+ key: 0,
302
+ class: "mt-1 text-xs text-slate-400"
303
+ }, ae = { class: "px-5 py-3.5 leading-snug text-slate-600" }, oe = { class: "px-5 py-3.5 leading-snug text-slate-600" }, $ = { class: "px-5 py-3.5 text-slate-600" }, se = { class: "px-5 py-3.5" }, ce = { class: "px-5 py-3.5 text-center" }, le = [
304
+ "aria-label",
305
+ "aria-expanded",
306
+ "onClick"
307
+ ], ue = ["onClick"], de = ["disabled", "onClick"], fe = ["onClick"], pe = ["onClick"], me = { key: 0 }, he = {
308
+ key: 0,
309
+ class: "space-y-4"
310
+ }, ge = { class: "block" }, _e = {
311
+ key: 0,
312
+ class: "text-xs text-slate-400"
313
+ }, ve = {
314
+ key: 1,
315
+ class: "max-h-48 overflow-y-auto rounded-lg border border-slate-200"
316
+ }, ye = ["onClick"], be = { class: "font-medium text-slate-800" }, xe = { class: "text-xs text-slate-500" }, Se = {
317
+ key: 2,
318
+ class: "text-sm text-slate-500"
319
+ }, Ce = {
320
+ key: 0,
321
+ class: "rounded-lg bg-amber-50 px-3 py-2 text-sm text-amber-800"
322
+ }, we = { class: "block" }, Te = {
323
+ key: 1,
324
+ class: "block"
325
+ }, Ee = {
326
+ key: 2,
327
+ class: "text-xs text-slate-400"
328
+ }, De = {
329
+ key: 1,
330
+ class: "grid grid-cols-1 gap-4 sm:grid-cols-2"
331
+ }, Oe = { class: "block" }, ke = { class: "block" }, Ae = { class: "block sm:col-span-2" }, je = { class: "block sm:col-span-2" }, Me = {
332
+ key: 2,
333
+ class: "mt-3 text-sm text-red-600"
334
+ }, Ne = { class: "flex justify-end gap-3" }, Pe = ["disabled"], Fe = ["disabled"];
335
+ function Ie(e, t, n, r, i, a) {
336
+ return A(), S("section", W, [
337
+ C("header", G, [C("div", K, [C("span", q, [E(r.AppIcon, {
338
+ name: "users",
339
+ class: "h-[18px] w-[18px]"
340
+ })]), t[9] ||= C("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Користувачі", -1)]), C("button", {
341
+ type: "button",
342
+ class: "inline-flex h-8 items-center gap-1.5 rounded-lg bg-brand-600 px-3 text-[13px] font-semibold text-white shadow-sm transition-colors hover:bg-brand-700",
343
+ onClick: r.openAdd
344
+ }, [E(r.AppIcon, {
345
+ name: "plus",
346
+ class: "h-3.5 w-3.5"
347
+ }), t[10] ||= T(" Додати користувача ", -1)])]),
348
+ C("div", J, [C("table", Y, [
349
+ t[14] ||= C("colgroup", null, [
350
+ C("col", { class: "w-[24%]" }),
351
+ C("col", { class: "w-[17%]" }),
352
+ C("col", { class: "w-[20%]" }),
353
+ C("col", { class: "w-[15%]" }),
354
+ C("col", { class: "w-[12%]" }),
355
+ C("col", { class: "w-[12%]" })
356
+ ], -1),
357
+ t[15] ||= C("thead", { class: "bg-slate-50 text-xs font-semibold text-slate-500" }, [C("tr", null, [
358
+ C("th", { class: "px-5 py-3" }, "ПІБ"),
359
+ C("th", { class: "px-5 py-3" }, "Дата видачі та номер сертифіката"),
360
+ C("th", { class: "px-5 py-3" }, "Email та номер телефону"),
361
+ C("th", { class: "px-5 py-3" }, "Місце роботи"),
362
+ C("th", { class: "px-5 py-3" }, "Статус"),
363
+ C("th", { class: "px-5 py-3 text-center" }, "Дії")
364
+ ])], -1),
365
+ C("tbody", X, [(A(!0), S(_, null, M(n.users, (e) => (A(), S("tr", {
366
+ key: e.surveyor_id,
367
+ class: "align-top transition-colors hover:bg-brand-50/40"
368
+ }, [
369
+ C("td", Z, [C("p", Q, N(r.personName(e)), 1), e.registered_at ? x("", !0) : (A(), S("p", ie, "Реєстрацію не завершено"))]),
370
+ C("td", ae, N(r.certificateLabel(e)), 1),
371
+ C("td", oe, [C("p", null, N(e.email || "—"), 1), C("p", null, N(e.phone || "—"), 1)]),
372
+ C("td", $, N(n.orgName), 1),
373
+ C("td", se, [E(r.UserAccessBadge, {
374
+ "account-blocked": e.enabled === !1,
375
+ "membership-disabled": !r.membershipEnabled(e)
376
+ }, null, 8, ["account-blocked", "membership-disabled"])]),
377
+ C("td", ce, [C("button", {
378
+ type: "button",
379
+ "data-user-menu": "",
380
+ 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",
381
+ "aria-label": `Дії для ${r.personName(e)}`,
382
+ "aria-expanded": r.openMenuId === e.surveyor_id,
383
+ onClick: R((t) => r.toggleMenu(e.surveyor_id, t), ["stop"])
384
+ }, [E(r.AppIcon, {
385
+ name: "more-vertical",
386
+ class: "h-4 w-4"
387
+ })], 8, le), (A(), b(v, { to: "body" }, [r.openMenuId === e.surveyor_id ? (A(), S("div", {
388
+ key: 0,
389
+ "data-user-menu": "",
390
+ class: "fixed z-50 w-64 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover",
391
+ style: k(r.menuStyle)
392
+ }, [
393
+ C("button", {
394
+ type: "button",
395
+ class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50",
396
+ onClick: (t) => r.openEdit(e)
397
+ }, [E(r.AppIcon, {
398
+ name: "pencil",
399
+ class: "h-4 w-4 text-slate-400"
400
+ }), t[11] ||= T(" Редагувати ", -1)], 8, ue),
401
+ r.canResendSurveyorRegistration(e) ? (A(), S("button", {
402
+ key: 0,
403
+ type: "button",
404
+ class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50 disabled:opacity-60",
405
+ disabled: r.resendingId === e.surveyor_id,
406
+ onClick: (t) => r.resendRegistrationInvite(e)
407
+ }, [E(r.AppIcon, {
408
+ name: "send",
409
+ class: "h-4 w-4 shrink-0 text-slate-400"
410
+ }), T(" " + N(r.resendingId === e.surveyor_id ? "Надсилання…" : "Надіслати лист повторно"), 1)], 8, de)) : x("", !0),
411
+ r.canResetSurveyorPassword(e) ? (A(), S("button", {
412
+ key: 1,
413
+ type: "button",
414
+ class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50",
415
+ onClick: (t) => r.resetPassword(e)
416
+ }, [E(r.AppIcon, {
417
+ name: "key-round",
418
+ class: "h-4 w-4 shrink-0 text-slate-400"
419
+ }), t[12] ||= T(" Згенерувати новий пароль ", -1)], 8, fe)) : x("", !0),
420
+ C("button", {
421
+ type: "button",
422
+ class: O(["flex w-full items-center gap-2 px-3 py-2.5 text-sm transition-colors", r.membershipEnabled(e) ? "text-red-600 hover:bg-red-50" : "text-slate-700 hover:bg-slate-50"]),
423
+ onClick: (t) => r.toggleAccess(e)
424
+ }, [E(r.AppIcon, {
425
+ name: r.membershipEnabled(e) ? "user-x" : "power",
426
+ class: O(["h-4 w-4 shrink-0", r.membershipEnabled(e) ? "" : "text-slate-400"])
427
+ }, null, 8, ["name", "class"]), T(" " + N(r.membershipEnabled(e) ? "Деактивувати" : "Активувати"), 1)], 10, pe)
428
+ ], 4)) : x("", !0)]))])
429
+ ]))), 128)), n.users.length === 0 ? (A(), S("tr", me, [...t[13] ||= [C("td", {
430
+ colspan: "6",
431
+ class: "px-5 py-12 text-center text-sm text-slate-400"
432
+ }, " Користувачів не знайдено. ", -1)]])) : x("", !0)])
433
+ ])]),
434
+ E(r.BaseModal, {
435
+ "model-value": r.dialog !== null,
436
+ title: r.dialogTitle,
437
+ width: "max-w-lg",
438
+ "onUpdate:modelValue": t[8] ||= (e) => {
439
+ e || r.closeDialog();
440
+ }
441
+ }, {
442
+ footer: I(() => [C("div", Ne, [C("button", {
443
+ type: "button",
444
+ class: "rounded-lg px-4 py-2.5 text-sm font-medium text-slate-600 hover:bg-slate-100",
445
+ disabled: r.saving,
446
+ onClick: r.closeDialog
447
+ }, " Скасувати ", 8, Pe), C("button", {
448
+ type: "button",
449
+ class: "rounded-lg bg-brand-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-700 disabled:opacity-60",
450
+ disabled: r.saving || r.dialog === "add" && !r.selectedCertificate,
451
+ onClick: t[7] ||= (e) => r.dialog === "add" ? r.submitAdd() : r.submitEdit()
452
+ }, N(r.saving ? "Збереження…" : r.dialog === "add" ? "Додати" : "Зберегти"), 9, Fe)])]),
453
+ default: I(() => [r.dialog === "add" ? (A(), S("div", he, [
454
+ C("label", ge, [t[16] ||= C("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Сертифікат", -1), L(C("input", {
455
+ "onUpdate:modelValue": t[0] ||= (e) => r.certificateQuery = e,
456
+ type: "text",
457
+ class: O(r.fieldClass),
458
+ placeholder: "Номер або прізвище",
459
+ onInput: r.onCertificateInput
460
+ }, null, 544), [[P, r.certificateQuery]])]),
461
+ r.certificatesLoading ? (A(), S("p", _e, "Пошук…")) : r.certificates.length ? (A(), S("ul", ve, [(A(!0), S(_, null, M(r.certificates, (e) => (A(), S("li", { key: e.certificate_id }, [C("button", {
462
+ type: "button",
463
+ class: "flex w-full flex-col px-3 py-2 text-left text-sm hover:bg-slate-50",
464
+ onClick: (t) => r.chooseCertificate(e)
465
+ }, [C("span", be, "№ " + N(e.number_certificate || "—"), 1), C("span", xe, N(r.certificatePerson(e)), 1)], 8, ye)]))), 128))])) : r.searched && !r.selectedCertificate ? (A(), S("p", Se, "Сертифікат не знайдено. Нового користувача можна додати лише за сертифікатом з реєстру.")) : x("", !0),
466
+ r.selectedCertificate ? (A(), S(_, { key: 3 }, [
467
+ r.existingSurveyor?.registered_at ? (A(), S("p", Ce, " Обліковий запис уже є: " + N(r.personName(r.existingSurveyor)) + ". Його буде прикріплено до організації, якщо email збігається з email облікового запису. ", 1)) : x("", !0),
468
+ C("label", we, [t[17] ||= C("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Email", -1), L(C("input", {
469
+ "onUpdate:modelValue": t[1] ||= (e) => r.addEmail = e,
470
+ type: "email",
471
+ class: O(r.fieldClass),
472
+ placeholder: "user@example.com"
473
+ }, null, 512), [[P, r.addEmail]])]),
474
+ r.existingSurveyor?.registered_at ? x("", !0) : (A(), S("label", Te, [t[18] ||= C("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Телефон", -1), L(C("input", {
475
+ "onUpdate:modelValue": t[2] ||= (e) => r.addPhone = e,
476
+ type: "text",
477
+ class: O(r.fieldClass),
478
+ placeholder: "+380…"
479
+ }, null, 512), [[P, r.addPhone]])])),
480
+ r.existingSurveyor?.registered_at ? x("", !0) : (A(), S("p", Ee, "На email надійде лист для завершення реєстрації."))
481
+ ], 64)) : x("", !0)
482
+ ])) : r.dialog === "edit" ? (A(), S("div", De, [
483
+ C("label", Oe, [t[19] ||= C("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Прізвище", -1), L(C("input", {
484
+ "onUpdate:modelValue": t[3] ||= (e) => r.editDraft.last_name = e,
485
+ type: "text",
486
+ class: O(r.fieldClass)
487
+ }, null, 512), [[P, r.editDraft.last_name]])]),
488
+ C("label", ke, [t[20] ||= C("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Імʼя", -1), L(C("input", {
489
+ "onUpdate:modelValue": t[4] ||= (e) => r.editDraft.first_name = e,
490
+ type: "text",
491
+ class: O(r.fieldClass)
492
+ }, null, 512), [[P, r.editDraft.first_name]])]),
493
+ C("label", Ae, [t[21] ||= C("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "По батькові", -1), L(C("input", {
494
+ "onUpdate:modelValue": t[5] ||= (e) => r.editDraft.middle_name = e,
495
+ type: "text",
496
+ class: O(r.fieldClass)
497
+ }, null, 512), [[P, r.editDraft.middle_name]])]),
498
+ C("label", je, [t[22] ||= C("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Телефон", -1), L(C("input", {
499
+ "onUpdate:modelValue": t[6] ||= (e) => r.editDraft.phone = e,
500
+ type: "text",
501
+ class: O(r.fieldClass)
502
+ }, null, 512), [[P, r.editDraft.phone]])])
503
+ ])) : x("", !0), r.formError ? (A(), S("p", Me, N(r.formError), 1)) : x("", !0)]),
504
+ _: 1
505
+ }, 8, ["model-value", "title"])
506
+ ]);
507
+ }
508
+ var Le = /*#__PURE__*/ e(U, [["render", Ie], ["__file", "C:/softpro/surveyor/admin/src/pages/organizations/components/OrganizationUsers.vue"]]), Re = /*@__PURE__*/ D({
509
+ __name: "card",
510
+ setup(e, { expose: r }) {
511
+ r();
512
+ let i = B(), o = V(), l = j(null), u = j(!1), d = j(""), f = j(null), m = y(() => i.query.edit === "1"), h = y(() => l.value?.surveyors ?? []), _ = y(() => {
513
+ let e = l.value;
514
+ return e ? {
515
+ ...e,
516
+ id: e.org_id
517
+ } : null;
518
+ });
519
+ function v(e) {
520
+ let t = e.split(".")[0] ?? "", n = t.replace(/-/g, "+").replace(/_/g, "/") + "=".repeat((4 - t.length % 4) % 4);
521
+ try {
522
+ return atob(n).split(/[/\\]/).pop() || "Скан-копія";
523
+ } catch {
524
+ return "Скан-копія";
525
+ }
526
+ }
527
+ function b(e, t = !1) {
528
+ let n = `/api/file/${encodeURIComponent(e)}`;
529
+ return t ? `${n}?download=true` : n;
530
+ }
531
+ function x() {
532
+ o.replace({ query: {
533
+ ...i.query,
534
+ edit: "1"
535
+ } });
536
+ }
537
+ function S() {
538
+ let e = { ...i.query };
539
+ delete e.edit, o.replace({ query: e });
540
+ }
541
+ async function C() {
542
+ let e = l.value?.org_id;
543
+ if (S(), e) try {
544
+ await w(e);
545
+ } catch (e) {
546
+ H({
547
+ type: "error",
548
+ title: "Помилка",
549
+ message: e instanceof Error ? e.message : "Не вдалося оновити організацію"
550
+ });
551
+ }
552
+ }
553
+ async function w(e) {
554
+ l.value = await n(`/api/resource/organizations/${encodeURIComponent(e)}?include=surveyors&limit=100`);
555
+ }
556
+ async function T(e) {
557
+ u.value = !0, d.value = "", l.value = null;
558
+ try {
559
+ await w(e);
560
+ } catch (e) {
561
+ l.value = null, d.value = e instanceof Error ? e.message : "Не вдалося завантажити організацію";
562
+ } finally {
563
+ u.value = !1;
564
+ }
565
+ }
566
+ async function E() {
567
+ let e = l.value?.org_id;
568
+ if (e) try {
569
+ await w(e);
570
+ } catch (e) {
571
+ H({
572
+ type: "error",
573
+ title: "Помилка",
574
+ message: e instanceof Error ? e.message : "Не вдалося оновити організацію"
575
+ });
576
+ }
577
+ }
578
+ F(() => String(i.params.id), (e) => {
579
+ e && T(e);
580
+ }, { immediate: !0 });
581
+ let D = {
582
+ route: i,
583
+ router: o,
584
+ organization: l,
585
+ loading: u,
586
+ error: d,
587
+ formRef: f,
588
+ editing: m,
589
+ users: h,
590
+ editRecord: _,
591
+ fileName: v,
592
+ fileUrl: b,
593
+ startEdit: x,
594
+ cancelEdit: S,
595
+ onFormSaved: C,
596
+ fetchOrganization: w,
597
+ loadOrganization: T,
598
+ refreshOrganization: E,
599
+ AppIcon: t,
600
+ get RouterLink() {
601
+ return z;
602
+ },
603
+ RegistryForm: p,
604
+ VerifiedBadge: a,
605
+ AppealDetailSection: s,
606
+ AppealDetailField: c,
607
+ OrganizationUsers: Le,
608
+ get organizationForm() {
609
+ return g;
610
+ }
611
+ };
612
+ return Object.defineProperty(D, "__isScriptSetup", {
613
+ enumerable: !1,
614
+ value: !0
615
+ }), D;
616
+ }
617
+ }), ze = {
618
+ key: 0,
619
+ class: "px-4 py-16 text-center text-sm text-slate-400"
620
+ }, Be = {
621
+ key: 1,
622
+ class: "pl-0"
623
+ }, Ve = { class: "mb-6" }, He = { class: "mb-4 flex items-center gap-1.5 text-sm" }, Ue = { class: "font-medium text-slate-700" }, We = { class: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between" }, Ge = { class: "text-xl font-bold tracking-tight text-slate-900" }, Ke = { class: "flex flex-col gap-5" }, qe = {
624
+ key: 0,
625
+ class: "rounded-xl border border-slate-200 bg-white p-5 shadow-card"
626
+ }, Je = { class: "mt-4 flex justify-end gap-3 border-t border-slate-100 pt-4" }, Ye = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, Xe = { class: "flex items-center gap-2" }, Ze = ["href"], Qe = ["href"], $e = { class: "mt-1 text-xs text-slate-400" }, et = {
627
+ key: 2,
628
+ class: "rounded-xl border border-slate-200 bg-white px-6 py-16 text-center shadow-card"
629
+ }, tt = { class: "text-sm text-slate-500" };
630
+ function nt(e, t, n, r, i, a) {
631
+ return r.loading ? (A(), S("div", ze, " Завантаження… ")) : r.organization ? (A(), S("div", Be, [C("header", Ve, [C("nav", He, [
632
+ E(r.RouterLink, {
633
+ to: "/organizations",
634
+ class: "flex items-center gap-1 text-slate-400 transition-colors hover:text-brand-600"
635
+ }, {
636
+ default: I(() => [E(r.AppIcon, {
637
+ name: "home",
638
+ class: "h-3.5 w-3.5"
639
+ }), t[1] ||= T(" Організації ", -1)]),
640
+ _: 1
641
+ }),
642
+ t[2] ||= C("span", { class: "text-slate-300" }, "/", -1),
643
+ C("span", Ue, N(r.organization.name), 1)
644
+ ]), C("div", We, [C("h1", Ge, N(r.organization.name), 1), r.editing ? x("", !0) : (A(), S("button", {
645
+ key: 0,
646
+ type: "button",
647
+ class: "inline-flex h-10 items-center gap-2 rounded-lg border border-slate-200 bg-white px-4 text-sm font-semibold text-slate-700 transition-colors hover:border-brand-300 hover:text-brand-700",
648
+ onClick: r.startEdit
649
+ }, [E(r.AppIcon, {
650
+ name: "pencil",
651
+ class: "h-4 w-4"
652
+ }), t[3] ||= T(" Редагувати ", -1)]))])]), C("div", Ke, [r.editing ? (A(), S("div", qe, [E(r.RegistryForm, {
653
+ ref: "formRef",
654
+ config: r.organizationForm,
655
+ record: r.editRecord,
656
+ "hide-actions": "",
657
+ onSaved: r.onFormSaved,
658
+ onCancel: r.cancelEdit
659
+ }, null, 8, ["config", "record"]), C("div", Je, [C("button", {
660
+ type: "button",
661
+ class: "inline-flex h-10 items-center rounded-lg bg-slate-100 px-4 text-sm font-semibold text-slate-600 transition-colors hover:bg-slate-200",
662
+ onClick: r.cancelEdit
663
+ }, " Скасувати "), C("button", {
664
+ type: "button",
665
+ class: "inline-flex h-10 items-center rounded-lg bg-brand-600 px-4 text-sm font-semibold text-white transition-colors hover:bg-brand-700",
666
+ onClick: t[0] ||= (e) => r.formRef?.submit()
667
+ }, " Зберегти зміни ")])])) : (A(), S(_, { key: 1 }, [E(r.AppealDetailSection, { title: "Інформація про організацію" }, {
668
+ icon: I(() => [E(r.AppIcon, {
669
+ name: "building-2",
670
+ class: "h-[18px] w-[18px]"
671
+ })]),
672
+ default: I(() => [C("dl", Ye, [
673
+ C("div", null, [t[4] ||= C("dt", { class: "mb-1 text-xs font-medium text-slate-500" }, "Верифіковано", -1), C("dd", null, [E(r.VerifiedBadge, { verified: !!r.organization.verified }, null, 8, ["verified"])])]),
674
+ E(r.AppealDetailField, { label: "Організація яка звернулась" }, {
675
+ default: I(() => [T(N(r.organization.name), 1)]),
676
+ _: 1
677
+ }),
678
+ E(r.AppealDetailField, { label: "Телефон організації" }, {
679
+ default: I(() => [T(N(r.organization.phone || "—"), 1)]),
680
+ _: 1
681
+ }),
682
+ E(r.AppealDetailField, { label: "Email організації" }, {
683
+ default: I(() => [T(N(r.organization.email || "—"), 1)]),
684
+ _: 1
685
+ }),
686
+ E(r.AppealDetailField, {
687
+ label: "Юридична адреса",
688
+ full: ""
689
+ }, {
690
+ default: I(() => [T(N(r.organization.legal_address || "—"), 1)]),
691
+ _: 1
692
+ })
693
+ ])]),
694
+ _: 1
695
+ }), E(r.AppealDetailSection, { title: "Файли" }, w({
696
+ icon: I(() => [E(r.AppIcon, {
697
+ name: "file-check-2",
698
+ class: "h-[18px] w-[18px]"
699
+ })]),
700
+ default: I(() => [C("div", null, [t[7] ||= C("p", { class: "text-sm font-semibold text-slate-800" }, "Скан копія", -1), C("p", $e, N(r.organization.scan_path ? r.fileName(r.organization.scan_path) : "—"), 1)])]),
701
+ _: 2
702
+ }, [r.organization.scan_path ? {
703
+ name: "actions",
704
+ fn: I(() => [C("div", Xe, [C("a", {
705
+ href: r.fileUrl(r.organization.scan_path, !0),
706
+ class: "inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 px-2.5 text-[13px] font-medium text-slate-600 transition-colors hover:border-brand-300 hover:bg-brand-50 hover:text-brand-700"
707
+ }, [E(r.AppIcon, {
708
+ name: "download",
709
+ class: "h-3.5 w-3.5"
710
+ }), t[5] ||= T(" Завантажити ", -1)], 8, Ze), C("a", {
711
+ href: r.fileUrl(r.organization.scan_path),
712
+ target: "_blank",
713
+ rel: "noopener",
714
+ class: "inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 px-2.5 text-[13px] font-medium text-slate-600 transition-colors hover:border-brand-300 hover:bg-brand-50 hover:text-brand-700"
715
+ }, [E(r.AppIcon, {
716
+ name: "eye",
717
+ class: "h-3.5 w-3.5"
718
+ }), t[6] ||= T(" Перегляд ", -1)], 8, Qe)])]),
719
+ key: "0"
720
+ } : void 0]), 1024)], 64)), E(r.OrganizationUsers, {
721
+ "org-id": r.organization.org_id,
722
+ "org-name": r.organization.name,
723
+ users: r.users,
724
+ onChanged: r.refreshOrganization
725
+ }, null, 8, [
726
+ "org-id",
727
+ "org-name",
728
+ "users"
729
+ ])])])) : (A(), S("div", et, [C("p", tt, N(r.error || "Організацію не знайдено."), 1), E(r.RouterLink, {
730
+ to: "/organizations",
731
+ class: "mt-3 inline-block text-sm font-medium text-brand-600 hover:text-brand-700"
732
+ }, {
733
+ default: I(() => [...t[8] ||= [T(" Повернутися до реєстру ", -1)]]),
734
+ _: 1
735
+ })]));
736
+ }
737
+ var rt = /*#__PURE__*/ e(Re, [["render", nt], ["__file", "C:/softpro/surveyor/admin/src/pages/organizations/card.vue"]]);
738
+ //#endregion
739
+ export { rt as default };