@opengis/surveyor 0.0.15 → 0.0.16

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 (60) hide show
  1. package/dist/chunks/{AppIcon-Di5F4Bu_.js → AppIcon-CO70tpMX.js} +1 -1
  2. package/dist/chunks/{AppealDetailField-DNpsGpPY.js → AppealDetailField-DNRGpnyD.js} +2 -2
  3. package/dist/chunks/AppealStatusBadge-7KruOSVI.js +295 -0
  4. package/dist/chunks/{AppealStatusBadge-z77wwkFD.js → AppealStatusBadge-BlAaNUSK.js} +2 -2
  5. package/dist/chunks/ApplicationGeometryExportModal-DJbnKPm6.js +1245 -0
  6. package/dist/chunks/{BaseModal-DP_ilBdg.js → BaseModal-BJxKuONh.js} +2 -2
  7. package/dist/chunks/{FormFilePicker-D5fAUE0Z.js → FormFilePicker-DxPQlxgy.js} +2 -2
  8. package/dist/chunks/{MapLayerMenu-CI5cbLEC.js → MapLayerMenu-AUeTqgEp.js} +1 -1
  9. package/dist/chunks/{RegistryForm-Ct8xiLV0.js → RegistryForm-BlK1lExt.js} +1 -1
  10. package/dist/chunks/{RegistryFormModal-DTi3g3CX.js → RegistryFormModal-BmBsUOF3.js} +3 -3
  11. package/dist/chunks/{RegistryToolbar-v7DdReH2.js → RegistryToolbar-DXOEcD84.js} +5 -5
  12. package/dist/chunks/SurveyorTeleport-Cd6D92mo.js +30 -0
  13. package/dist/chunks/{TablePagination-Iri38U68.js → TablePagination-CUtnDQQ_.js} +2 -2
  14. package/dist/chunks/{UserAccessBadge-B5Q1LvNv.js → UserAccessBadge-DyZDv7Oo.js} +1 -1
  15. package/dist/chunks/{UserTypeBadge-CuAMctTK.js → UserTypeBadge-LvnMuKGo.js} +1 -1
  16. package/dist/chunks/{VerifiedBadge-D6L7mCdp.js → VerifiedBadge-bk0n-rlC.js} +2 -2
  17. package/dist/chunks/{applications-D6pHAQaK.js → applications-B6GAxopO.js} +16 -19
  18. package/dist/chunks/card-B113dNzv.js +1327 -0
  19. package/dist/chunks/card-COmcUdms.js +639 -0
  20. package/dist/chunks/{card-Ba8_kfj9.js → card-DEJs9IIP.js} +4 -4
  21. package/dist/chunks/{card-CJhdeB6f.js → card-Deae73xd.js} +10 -10
  22. package/dist/chunks/{card-TP5UFJb2.js → card-VnUCFC7v.js} +5 -5
  23. package/dist/chunks/{card-DcYkb_aF.js → card-_YyJbLNI.js} +6 -6
  24. package/dist/chunks/{certificates-Ew5AekPn.js → certificates-DHf1zGQs.js} +23 -13
  25. package/dist/chunks/{create-CSIDl4gP.js → create-BVPqfJOb.js} +18 -18
  26. package/dist/chunks/{forgot-DnixBqdc.js → forgot-DoG6vXhq.js} +2 -2
  27. package/dist/chunks/{login-BWCQdEkv.js → login-BWGylcSU.js} +2 -2
  28. package/dist/chunks/{map-mZ8Rn4aR.js → map-BZi4eVl3.js} +894 -898
  29. package/dist/chunks/{map-layers-BdWEHPLx.js → map-layers-CKZK50de.js} +6 -6
  30. package/dist/chunks/{organizations-D0o0e_ps.js → organizations-DYGfYfHS.js} +7 -7
  31. package/dist/chunks/{profile-F7mr0poI.js → profile-CkwMFh82.js} +3 -3
  32. package/dist/chunks/{registration-BRF4985_.js → registration-3GLgq-ae.js} +2 -2
  33. package/dist/chunks/{requests-BCJN-CNx.js → requests-D1ix8U5f.js} +6 -6
  34. package/dist/chunks/requests-v1jHarHb.js +303 -0
  35. package/dist/chunks/{reset-OZCgLi6f.js → reset-CP9LsLkC.js} +2 -2
  36. package/dist/chunks/{useEntityPath-8s0Y1tjA.js → useEntityPath-C5Owtidc.js} +1 -1
  37. package/dist/chunks/{users-Dr543AYk.js → users-frk3gmmd.js} +7 -7
  38. package/dist/index.css +1 -1
  39. package/dist/index.js +47 -47
  40. package/migrations/20261016120000_map_layers.sql +156 -156
  41. package/migrations/20261016150000_password_reset.sql +15 -15
  42. package/migrations/20261016180000_settlement_lookup.sql +16 -16
  43. package/package.json +83 -83
  44. package/server/dictionaries/index.ts +17 -17
  45. package/server/dictionaries/surveyor/map_layer_components.ts +11 -11
  46. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -10
  47. package/server/dictionaries/surveyor/map_layer_types.ts +11 -11
  48. package/server/modules/surveyor/services/mapLayers.ts +61 -61
  49. package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -79
  50. package/server/resources/helpers/settlement_lookup.ts +7 -7
  51. package/server/resources/surveyor-admin/applications.ts +11 -10
  52. package/server/resources/surveyor-admin/certificates.ts +25 -25
  53. package/server/resources/surveyor-admin/organization_surveyors.ts +31 -31
  54. package/server/suggests/index.ts +18 -1
  55. package/dist/chunks/AppealStatusBadge-COxcUM2Q.js +0 -185
  56. package/dist/chunks/ApplicationHistorySection-DHq-iJla.js +0 -788
  57. package/dist/chunks/SurveyorTeleport-D6-KXe_5.js +0 -23
  58. package/dist/chunks/card-CF5Lo4ui.js +0 -609
  59. package/dist/chunks/card-CVujkVkR.js +0 -1193
  60. package/dist/chunks/requests-F0Kp8OPp.js +0 -234
@@ -0,0 +1,639 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { a as t, t as n } from "./surveyor-CDkI2Dcp.js";
3
+ import { i as r, r as i } from "./profile-aXlo4qqA.js";
4
+ import { t as a } from "./AppIcon-CO70tpMX.js";
5
+ import { r as o } from "./geometry-DyhIVRcw.js";
6
+ import { c as s, l as c, o as ee, s as te, t as ne, u as re } from "./ApplicationGeometryExportModal-DJbnKPm6.js";
7
+ import { t as ie } from "./FormFilePicker-DxPQlxgy.js";
8
+ import { n as l, t as ae } from "./AppealStatusBadge-BlAaNUSK.js";
9
+ import { i as oe, t as u } from "./applications-B6GAxopO.js";
10
+ import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, normalizeClass as b, openBlock as x, ref as S, renderList as C, toDisplayString as w, vModelText as T, watch as se, withCtx as E, withDirectives as D } from "vue";
11
+ import { RouterLink as ce, useRoute as le } from "vue-router";
12
+ //#region cabinet/src/api/application-workflow.ts
13
+ var O = "public_applications";
14
+ async function ue(e, r) {
15
+ let i = new FormData();
16
+ i.append("file", r, r.name);
17
+ let a = await fetch(n(`/api/resource/${O}/${encodeURIComponent(e)}/upload`), {
18
+ method: "POST",
19
+ credentials: "include",
20
+ body: i
21
+ });
22
+ if (!a.ok) throw Error(t(await a.text(), a.status));
23
+ let o = await a.json(), s = o.file_path ?? o.filePath ?? o.path;
24
+ if (!s) throw Error("Сервер не повернув шлях до файлу");
25
+ return {
26
+ file_path: s,
27
+ token: o.token
28
+ };
29
+ }
30
+ async function de(e, r, i) {
31
+ let a = await fetch(n(`/api/surveyor/applications/${encodeURIComponent(e)}/upload-updated-data`), {
32
+ method: "POST",
33
+ credentials: "include",
34
+ headers: { "Content-Type": "application/json" },
35
+ body: JSON.stringify({
36
+ file_path: r,
37
+ ...i?.trim() ? { note: i.trim() } : {}
38
+ })
39
+ });
40
+ if (!a.ok) throw Error(t(await a.text(), a.status));
41
+ return a.json();
42
+ }
43
+ async function fe(e, r) {
44
+ let i = await fetch(n(`/api/surveyor/applications/${encodeURIComponent(e)}/cancel`), {
45
+ method: "POST",
46
+ credentials: "include",
47
+ headers: { "Content-Type": "application/json" },
48
+ body: JSON.stringify({ reason: r.trim() })
49
+ });
50
+ if (!i.ok) throw Error(t(await i.text(), i.status));
51
+ return i.json();
52
+ }
53
+ //#endregion
54
+ //#region cabinet/src/lib/application-card-files.ts
55
+ function k(e, t) {
56
+ let n = [...e ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? ""))), r = {}, i = t.file_output?.trim(), a = t.file_geodetic_survey?.trim(), o = t.file_corrected_geodetic_survey?.trim();
57
+ for (let e of n) {
58
+ let t = e.reason?.trim();
59
+ if (!t) continue;
60
+ let n = e.file?.trim(), s = e.status_from ?? null, c = e.status_to ?? null;
61
+ n && i && n === i && (r.output = t), n && a && n === a && (r.survey = t), n && o && n === o && (r.corrected = t), c === "dataIssued" && s === "awaitingData" && (r.output = t), c === "underReview" && s === "dataIssued" && (r.survey = t), c === "dataIssued" && s === "underReview" && (r.corrected = t), c === "verified" && s === "underReview" && t && (r.corrected = t);
62
+ }
63
+ return r;
64
+ }
65
+ function pe(e, t) {
66
+ let n = e.status ?? "", r = [], i = k(e.status_history, e);
67
+ return t && r.push({
68
+ id: "geometry",
69
+ typeLabel: "Межі заявки",
70
+ action: "exportGeometry"
71
+ }), n === "reserve" ? r : (e.file_output && r.push({
72
+ id: "output",
73
+ typeLabel: "Вихідні дані",
74
+ href: u(e.file_output),
75
+ note: i.output
76
+ }), e.file_geodetic_survey ? r.push({
77
+ id: "survey",
78
+ typeLabel: "Оновлені файли знімання",
79
+ href: u(e.file_geodetic_survey),
80
+ note: i.survey
81
+ }) : n === "dataIssued" && r.push({
82
+ id: "survey",
83
+ typeLabel: "Оновлені файли знімання",
84
+ action: "upload"
85
+ }), e.file_corrected_geodetic_survey && r.push({
86
+ id: "corrected",
87
+ typeLabel: "Відкорегований файл топографо-геодезичного знімання",
88
+ href: u(e.file_corrected_geodetic_survey),
89
+ note: e.note_4_file_corrected_geodetic_survey?.trim() || i.corrected || void 0
90
+ }), r);
91
+ }
92
+ function me(e) {
93
+ return e.status === "dataIssued" ? e.note_4_file_corrected_geodetic_survey?.trim() || k(e.status_history, e).corrected : void 0;
94
+ }
95
+ //#endregion
96
+ //#region cabinet/src/pages/requests/card.vue?vue&type=script&setup=true&lang.ts
97
+ var he = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg bg-[#EFF4FE] px-2.5 py-1.5 text-xs font-medium text-[#2663EB] transition-colors hover:bg-[#deeafd]", ge = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg border border-[#2663EB]/35 bg-white px-2.5 py-1.5 text-xs font-medium text-[#2663EB] shadow-sm transition-colors hover:border-[#2663EB]/55 hover:bg-[#F8FAFF] cursor-pointer disabled:cursor-not-allowed disabled:opacity-50", A = /*@__PURE__*/ y({
98
+ __name: "card",
99
+ setup(e, { expose: u }) {
100
+ u();
101
+ let d = le(), p = S(!1), m = S(null), h = S(!0), g = S(""), _ = S(""), v = S(!1), y = S(!1), b = S(""), x = S(null), C = S(""), w = S(!1), T = S(""), E = S(""), D = S(!1), O = S(!1), k = S(""), A = f(() => m.value?.status === "awaitingData"), j = f(() => m.value?.status === "dataIssued"), M = f(() => o(m.value?.geom)), N = f(() => {
102
+ let e = m.value;
103
+ return e?.number?.trim() || e?.app_id || "—";
104
+ }), P = f(() => {
105
+ let e = m.value;
106
+ return e && (e.status_data?.text?.trim() || l[e.status ?? ""]?.label || e.status) || "—";
107
+ }), F = f(() => (m.value ? l[m.value.status ?? ""] : void 0) ?? {
108
+ label: P.value,
109
+ classes: "bg-gray-100 text-gray-600 border-gray-200",
110
+ dot: "bg-gray-400"
111
+ }), I = f(() => {
112
+ let e = m.value;
113
+ return e ? pe(e, o(e.geom)) : [];
114
+ }), L = f(() => {
115
+ let e = r(i) || "Заявник";
116
+ return {
117
+ name: e,
118
+ role: "Заявник",
119
+ initials: s(e)
120
+ };
121
+ });
122
+ function R(e) {
123
+ return e.created_by ? e.created_by === i.uid ? L.value : {
124
+ name: "Адміністрація",
125
+ role: "Перевірка",
126
+ initials: "АД"
127
+ } : c;
128
+ }
129
+ let z = f(() => {
130
+ let e = m.value;
131
+ return e ? me(e) : void 0;
132
+ }), B = f(() => {
133
+ let e = m.value;
134
+ return e ? [
135
+ {
136
+ label: "Створення заявки",
137
+ value: J(e.created_at)
138
+ },
139
+ {
140
+ label: "Видача даних",
141
+ value: J(e.source_data_issued_at)
142
+ },
143
+ {
144
+ label: "Прийом даних",
145
+ value: J(e.survey_uploaded_at)
146
+ },
147
+ {
148
+ label: "Здане знімання",
149
+ value: J(e.verified_at)
150
+ },
151
+ {
152
+ label: "Внесення в ЄЦТО",
153
+ value: J(e.integrated_at)
154
+ }
155
+ ] : [];
156
+ }), V = f(() => {
157
+ let e = m.value;
158
+ if (!e) return [];
159
+ let t = e.address_id_data?.text?.trim() || e.location?.trim() || "—", n = e.work_type_data?.text?.trim() || e.work_type || "—";
160
+ return [[
161
+ {
162
+ label: "№",
163
+ value: N.value
164
+ },
165
+ {
166
+ label: "Адреса",
167
+ value: t
168
+ },
169
+ {
170
+ label: "Статус",
171
+ value: P.value
172
+ },
173
+ {
174
+ label: "Вид робіт",
175
+ value: n
176
+ }
177
+ ], [
178
+ {
179
+ label: "Опис запиту",
180
+ value: q(e.description)
181
+ },
182
+ {
183
+ label: "Підстава виконання робіт",
184
+ value: q(e.execution_basis)
185
+ },
186
+ {
187
+ label: "Примітки",
188
+ value: q(e.notes)
189
+ },
190
+ ...e.status === "cancelled" ? [{
191
+ label: "Причина скасування заявки",
192
+ value: q(e.cancel_reason)
193
+ }] : [],
194
+ ...e.signature?.trim() ? [{
195
+ label: "Підпис",
196
+ value: e.signature.trim()
197
+ }] : []
198
+ ]];
199
+ }), H = 0, U = 0;
200
+ se(() => String(d.params.number ?? ""), (e) => {
201
+ K(e);
202
+ }, { immediate: !0 });
203
+ function W() {
204
+ return String(d.params.number ?? "").trim();
205
+ }
206
+ async function G() {
207
+ await K(W());
208
+ }
209
+ async function K(e) {
210
+ let t = ++H;
211
+ if (h.value = !0, g.value = "", m.value = null, !e.trim()) {
212
+ h.value = !1;
213
+ return;
214
+ }
215
+ try {
216
+ let n = await oe(e.trim());
217
+ if (t !== H) return;
218
+ m.value = n;
219
+ } catch (e) {
220
+ if (t !== H) return;
221
+ m.value = null, g.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
222
+ } finally {
223
+ t === H && (h.value = !1);
224
+ }
225
+ }
226
+ function q(e) {
227
+ return e?.trim() || "—";
228
+ }
229
+ function J(e) {
230
+ if (!e) return "—";
231
+ let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
232
+ return t ? `${t[3]}.${t[2]}.${t[1]}` : "—";
233
+ }
234
+ function Y(e) {
235
+ let t = Number(e);
236
+ return Number.isFinite(t) ? String(Number(t.toFixed(4))) : "—";
237
+ }
238
+ function X() {
239
+ x.value = null, C.value = "", b.value = "", T.value = "", E.value = "", w.value = !1;
240
+ }
241
+ function Z() {
242
+ X(), _.value = "", y.value = !0;
243
+ }
244
+ function Q() {
245
+ y.value = !1, X();
246
+ }
247
+ async function _e(e) {
248
+ x.value = e, C.value = "", T.value = "";
249
+ let t = m.value?.app_id;
250
+ if (!e || !t) return;
251
+ let n = ++U;
252
+ w.value = !0;
253
+ try {
254
+ let r = await ue(t, e);
255
+ if (n !== U) return;
256
+ C.value = r.file_path;
257
+ } catch (e) {
258
+ if (n !== U) return;
259
+ T.value = e instanceof Error ? e.message : "Не вдалося завантажити файл";
260
+ } finally {
261
+ n === U && (w.value = !1);
262
+ }
263
+ }
264
+ async function ve() {
265
+ let e = m.value?.app_id;
266
+ if (e) {
267
+ if (!C.value) {
268
+ E.value = T.value || "Спочатку завантажте файл знімання";
269
+ return;
270
+ }
271
+ v.value = !0, E.value = "";
272
+ try {
273
+ await de(e, C.value, b.value), Q(), await G();
274
+ } catch (e) {
275
+ E.value = e instanceof Error ? e.message : "Не вдалося подати матеріали";
276
+ } finally {
277
+ v.value = !1;
278
+ }
279
+ }
280
+ }
281
+ async function ye() {
282
+ let e = m.value?.app_id;
283
+ if (!e || !k.value.trim()) {
284
+ _.value = "Вкажіть причину скасування";
285
+ return;
286
+ }
287
+ v.value = !0, _.value = "";
288
+ try {
289
+ await fe(e, k.value), O.value = !1, k.value = "", await G();
290
+ } catch (e) {
291
+ _.value = e instanceof Error ? e.message : "Не вдалося скасувати заявку";
292
+ } finally {
293
+ v.value = !1;
294
+ }
295
+ }
296
+ let $ = {
297
+ route: d,
298
+ mapExpanded: p,
299
+ application: m,
300
+ loading: h,
301
+ loadError: g,
302
+ actionError: _,
303
+ actionBusy: v,
304
+ submitOpen: y,
305
+ submitNote: b,
306
+ submitFile: x,
307
+ submitUploadedPath: C,
308
+ submitUploadBusy: w,
309
+ submitUploadError: T,
310
+ submitActionError: E,
311
+ geometryExportOpen: D,
312
+ cancelOpen: O,
313
+ cancelReason: k,
314
+ fileDownloadBtnClass: he,
315
+ fileUploadBtnClass: ge,
316
+ canCancel: A,
317
+ canAddUpdatedSurvey: j,
318
+ showMap: M,
319
+ displayNumber: N,
320
+ statusLabel: P,
321
+ status: F,
322
+ cardFiles: I,
323
+ commentCurrentAuthor: L,
324
+ resolveNoteAuthor: R,
325
+ reworkMessage: z,
326
+ dateRows: B,
327
+ infoColumns: V,
328
+ get requestId() {
329
+ return H;
330
+ },
331
+ set requestId(e) {
332
+ H = e;
333
+ },
334
+ get submitUploadSeq() {
335
+ return U;
336
+ },
337
+ set submitUploadSeq(e) {
338
+ U = e;
339
+ },
340
+ routeApplicationKey: W,
341
+ reloadApplicationFromRoute: G,
342
+ loadApplication: K,
343
+ textOrDash: q,
344
+ formatDate: J,
345
+ formatArea: Y,
346
+ resetSubmitModal: X,
347
+ openSubmitModal: Z,
348
+ closeSubmitModal: Q,
349
+ onSubmitFileChange: _e,
350
+ confirmSubmitSurvey: ve,
351
+ confirmCancel: ye,
352
+ get RouterLink() {
353
+ return ce;
354
+ },
355
+ AppIcon: a,
356
+ FormFilePicker: ie,
357
+ AppealStatusBadge: ae,
358
+ AppealDetailMap: re,
359
+ ApplicationCommentsSection: te,
360
+ ApplicationHistorySection: ee,
361
+ ApplicationGeometryExportModal: ne,
362
+ get apiUrl() {
363
+ return n;
364
+ },
365
+ get parseApiError() {
366
+ return t;
367
+ }
368
+ };
369
+ return Object.defineProperty($, "__isScriptSetup", {
370
+ enumerable: !1,
371
+ value: !0
372
+ }), $;
373
+ }
374
+ }), j = {
375
+ key: 0,
376
+ class: "mx-auto max-w-[1400px] px-6 py-24 text-center"
377
+ }, M = {
378
+ key: 1,
379
+ class: "mx-auto max-w-[1400px] px-6 py-16 text-center"
380
+ }, N = { class: "text-sm text-gray-500" }, P = {
381
+ key: 2,
382
+ class: "min-h-[calc(100vh-3.5rem)] bg-gray-50"
383
+ }, F = { class: "border-b border-gray-200 bg-white py-4" }, I = { class: "mx-auto max-w-[1400px] px-6" }, L = { class: "mb-3 flex items-center gap-1.5 text-xs text-gray-400" }, R = { class: "font-medium text-gray-700" }, z = { class: "flex flex-wrap items-start justify-between gap-4" }, B = { class: "text-lg font-semibold text-gray-900" }, V = { class: "mt-0.5 text-sm text-gray-500" }, H = { class: "flex flex-wrap items-center gap-3" }, U = ["disabled"], W = ["disabled"], G = { class: "mx-auto max-w-[1400px] px-6 py-5" }, K = { class: "grid grid-cols-1 gap-5 xl:grid-cols-[minmax(0,1fr)_420px]" }, q = { class: "space-y-4" }, J = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, Y = { class: "flex items-center justify-between border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, X = { class: "flex items-center gap-2" }, Z = ["aria-label"], Q = {
384
+ key: 1,
385
+ class: "px-5 py-10 text-center text-sm text-gray-400"
386
+ }, _e = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, ve = { class: "grid grid-cols-1 gap-x-8 p-5 sm:grid-cols-2" }, ye = { class: "mb-0.5 text-xs text-gray-400" }, $ = { class: "text-sm font-medium text-gray-900" }, be = { class: "space-y-4" }, xe = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, Se = { class: "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, Ce = { class: "divide-y divide-gray-100" }, we = { class: "text-xs text-gray-500" }, Te = { class: "rounded-md bg-gray-100 px-2 py-0.5 text-xs font-semibold text-gray-900" }, Ee = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, De = { class: "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, Oe = {
387
+ key: 0,
388
+ class: "border-b border-gray-100 px-5 py-3 text-xs text-gray-500"
389
+ }, ke = {
390
+ key: 1,
391
+ class: "border-b border-amber-100 bg-amber-50 px-5 py-3 text-xs text-amber-800"
392
+ }, Ae = { class: "divide-y divide-gray-100" }, je = {
393
+ key: 0,
394
+ class: "px-5 py-6 text-center text-sm italic text-gray-400"
395
+ }, Me = { class: "flex items-center justify-between gap-3" }, Ne = { class: "min-w-0" }, Pe = { class: "text-xs font-medium leading-snug text-gray-700" }, Fe = {
396
+ key: 0,
397
+ class: "mt-0.5 text-xs text-gray-400"
398
+ }, Ie = ["href"], Le = ["disabled"], Re = { class: "rounded-2xl border border-gray-200 bg-white p-5" }, ze = { class: "grid grid-cols-2 gap-3" }, Be = { class: "rounded-xl bg-gray-50 p-3 text-center" }, Ve = { class: "text-lg font-bold text-gray-900" }, He = { class: "text-xs font-semibold leading-tight" }, Ue = {
399
+ key: 1,
400
+ class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm"
401
+ }, We = { class: "w-full max-w-md rounded-2xl bg-white p-6 shadow-2xl" }, Ge = { class: "mt-4 space-y-3" }, Ke = {
402
+ key: 0,
403
+ class: "text-xs text-red-600"
404
+ }, qe = {
405
+ key: 1,
406
+ class: "text-xs text-emerald-600"
407
+ }, Je = {
408
+ key: 2,
409
+ class: "text-xs text-red-600"
410
+ }, Ye = { class: "mt-5 flex justify-end gap-2" }, Xe = ["disabled"], Ze = {
411
+ key: 2,
412
+ class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm"
413
+ }, Qe = { class: "w-full max-w-md rounded-2xl bg-white p-6 shadow-2xl" }, $e = {
414
+ key: 0,
415
+ class: "mt-2 text-xs text-red-600"
416
+ }, et = { class: "mt-5 flex justify-end gap-2" }, tt = ["disabled"], nt = {
417
+ key: 3,
418
+ class: "mx-auto max-w-[1400px] px-6 py-16 text-center"
419
+ };
420
+ function rt(e, t, n, r, i, a) {
421
+ return r.loading ? (x(), h("div", j, [...t[10] ||= [g("p", { class: "text-sm text-gray-500" }, "Завантаження…", -1)]])) : r.loadError ? (x(), h("div", M, [g("p", N, w(r.loadError), 1), v(r.RouterLink, {
422
+ to: "/requests",
423
+ class: "mt-3 inline-block text-sm font-medium text-[#2663EB] hover:underline"
424
+ }, {
425
+ default: E(() => [...t[11] ||= [_(" Повернутися до звернень ", -1)]]),
426
+ _: 1
427
+ })])) : r.application ? (x(), h("div", P, [
428
+ g("div", F, [g("div", I, [g("nav", L, [
429
+ v(r.RouterLink, {
430
+ to: "/requests",
431
+ class: "flex items-center gap-1 transition-colors hover:text-gray-700"
432
+ }, {
433
+ default: E(() => [v(r.AppIcon, {
434
+ name: "home",
435
+ class: "h-3 w-3"
436
+ }), t[12] ||= g("span", null, "Звернення", -1)]),
437
+ _: 1
438
+ }),
439
+ v(r.AppIcon, {
440
+ name: "chevron-right",
441
+ class: "h-3 w-3"
442
+ }),
443
+ g("span", R, "#" + w(r.displayNumber), 1)
444
+ ]), g("div", z, [g("div", null, [g("h1", B, " Звернення #" + w(r.displayNumber), 1), g("p", V, w(r.application.org_id_data?.text || "—"), 1)]), g("div", H, [
445
+ v(r.AppealStatusBadge, { status: r.application.status ?? "" }, null, 8, ["status"]),
446
+ r.canCancel ? (x(), h("button", {
447
+ key: 0,
448
+ type: "button",
449
+ class: "flex items-center gap-1.5 rounded-lg border border-red-200 px-3 py-1.5 text-xs font-medium text-red-600 transition-all hover:bg-red-50 active:scale-95 disabled:opacity-50",
450
+ disabled: r.actionBusy,
451
+ onClick: t[0] ||= (e) => {
452
+ r.cancelOpen = !0, r.actionError = "";
453
+ }
454
+ }, [v(r.AppIcon, {
455
+ name: "circle-x",
456
+ class: "h-3.5 w-3.5"
457
+ }), t[13] ||= _(" Скасувати ", -1)], 8, U)) : m("", !0),
458
+ r.canAddUpdatedSurvey ? (x(), h("button", {
459
+ key: 1,
460
+ type: "button",
461
+ class: "flex items-center gap-1.5 rounded-lg border border-[#2663EB] px-3 py-1.5 text-xs font-medium text-[#2663EB] transition-all hover:bg-[#EFF4FE] cursor-pointer active:scale-95 disabled:cursor-not-allowed disabled:opacity-50",
462
+ disabled: r.actionBusy,
463
+ onClick: t[1] ||= (e) => r.openSubmitModal()
464
+ }, [v(r.AppIcon, {
465
+ name: "upload-cloud",
466
+ class: "h-[15px] w-[15px]"
467
+ }), t[14] ||= _(" Додати оновлені файли знімання ", -1)], 8, W)) : m("", !0)
468
+ ])])])]),
469
+ g("div", G, [g("div", K, [g("div", q, [
470
+ g("section", J, [g("div", Y, [g("div", X, [v(r.AppIcon, {
471
+ name: "map-pin",
472
+ class: "h-3.5 w-3.5 text-gray-400"
473
+ }), t[15] ||= g("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Карта об'єкта ", -1)]), r.showMap ? (x(), h("button", {
474
+ key: 0,
475
+ type: "button",
476
+ class: "rounded-md p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
477
+ "aria-label": r.mapExpanded ? "Зменшити карту" : "Збільшити карту",
478
+ onClick: t[2] ||= (e) => r.mapExpanded = !r.mapExpanded
479
+ }, [v(r.AppIcon, {
480
+ name: r.mapExpanded ? "minimize-2" : "maximize-2",
481
+ class: "h-3.5 w-3.5"
482
+ }, null, 8, ["name"])], 8, Z)) : m("", !0)]), r.showMap ? (x(), p(r.AppealDetailMap, {
483
+ key: r.application.app_id,
484
+ geom: r.application.geom,
485
+ address: r.application.address_id_data?.text,
486
+ location: r.application.location,
487
+ expanded: r.mapExpanded
488
+ }, null, 8, [
489
+ "geom",
490
+ "address",
491
+ "location",
492
+ "expanded"
493
+ ])) : (x(), h("p", Q, " Геометрію не вказано "))]),
494
+ g("section", _e, [t[16] ||= g("div", { class: "border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, [g("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Основна інформація ")], -1), g("div", ve, [(x(!0), h(d, null, C(r.infoColumns, (e, t) => (x(), h("div", { key: t }, [(x(!0), h(d, null, C(e, (t, n) => (x(), h("div", {
495
+ key: t.label,
496
+ class: b(["py-2.5", n < e.length - 1 ? "border-b border-gray-100" : ""])
497
+ }, [g("p", ye, w(t.label), 1), g("p", $, w(t.value), 1)], 2))), 128))]))), 128))])]),
498
+ r.application ? (x(), p(r.ApplicationCommentsSection, {
499
+ key: 0,
500
+ "application-id": r.application.app_id,
501
+ resource: "public_applications",
502
+ variant: "cabinet",
503
+ "current-author": r.commentCurrentAuthor,
504
+ "resolve-author": r.resolveNoteAuthor
505
+ }, null, 8, ["application-id", "current-author"])) : m("", !0),
506
+ v(r.ApplicationHistorySection, {
507
+ items: r.application?.status_history || [],
508
+ variant: "cabinet"
509
+ }, null, 8, ["items"])
510
+ ]), g("div", be, [
511
+ g("section", xe, [g("div", Se, [v(r.AppIcon, {
512
+ name: "calendar-days",
513
+ class: "h-3.5 w-3.5 text-gray-400"
514
+ }), t[17] ||= g("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Дати ", -1)]), g("div", Ce, [(x(!0), h(d, null, C(r.dateRows, (e) => (x(), h("div", {
515
+ key: e.label,
516
+ class: "flex items-center justify-between gap-3 px-5 py-3"
517
+ }, [g("span", we, w(e.label), 1), g("span", Te, w(e.value), 1)]))), 128))])]),
518
+ g("section", Ee, [
519
+ g("div", De, [v(r.AppIcon, {
520
+ name: "file-text",
521
+ class: "h-3.5 w-3.5 text-gray-400"
522
+ }), t[18] ||= g("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Файли ", -1)]),
523
+ r.application.status === "reserve" ? (x(), h("p", Oe, " Заявка в резерві через перетин з активною заявкою. Доступні лише межі території. ")) : m("", !0),
524
+ r.reworkMessage ? (x(), h("p", ke, " Коментар перевірки: " + w(r.reworkMessage), 1)) : m("", !0),
525
+ g("div", Ae, [r.cardFiles.length === 0 ? (x(), h("p", je, " Файли відсутні ")) : m("", !0), (x(!0), h(d, null, C(r.cardFiles, (e) => (x(), h("div", {
526
+ key: e.id,
527
+ class: "px-5 py-3.5"
528
+ }, [g("div", Me, [g("div", Ne, [g("p", Pe, w(e.typeLabel), 1), e.note ? (x(), h("p", Fe, " Примітка: " + w(e.note), 1)) : m("", !0)]), e.href ? (x(), h("a", {
529
+ key: 0,
530
+ href: e.href,
531
+ class: b(r.fileDownloadBtnClass)
532
+ }, [v(r.AppIcon, {
533
+ name: "download",
534
+ class: "h-3 w-3"
535
+ }), t[19] ||= _(" Завантажити ", -1)], 8, Ie)) : e.action === "exportGeometry" ? (x(), h("button", {
536
+ key: 1,
537
+ type: "button",
538
+ class: b(r.fileDownloadBtnClass),
539
+ onClick: t[3] ||= (e) => r.geometryExportOpen = !0
540
+ }, [v(r.AppIcon, {
541
+ name: "download",
542
+ class: "h-3 w-3"
543
+ }), t[20] ||= _(" Завантажити ", -1)])) : e.action === "upload" ? (x(), h("button", {
544
+ key: 2,
545
+ type: "button",
546
+ class: b(r.fileUploadBtnClass),
547
+ disabled: r.actionBusy,
548
+ onClick: t[4] ||= (e) => r.openSubmitModal()
549
+ }, [v(r.AppIcon, {
550
+ name: "upload",
551
+ class: "h-3 w-3"
552
+ }), t[21] ||= _(" Додати ", -1)], 8, Le)) : m("", !0)])]))), 128))])
553
+ ]),
554
+ g("section", Re, [g("div", ze, [g("div", Be, [
555
+ t[22] ||= g("p", { class: "mb-1 text-xs text-gray-400" }, "Площа", -1),
556
+ g("p", Ve, w(r.formatArea(r.application.area)), 1),
557
+ t[23] ||= g("p", { class: "text-xs text-gray-400" }, "га", -1)
558
+ ]), g("div", { class: b(["rounded-xl border p-3 text-center", r.status.classes]) }, [
559
+ t[24] ||= g("p", { class: "mb-1 text-xs opacity-70" }, "Статус", -1),
560
+ g("span", { class: b(["mx-auto mb-1 block h-3 w-3 rounded-full", r.status.dot]) }, null, 2),
561
+ g("p", He, w(r.statusLabel), 1)
562
+ ], 2)])])
563
+ ])])]),
564
+ r.application.app_id ? (x(), p(r.ApplicationGeometryExportModal, {
565
+ key: 0,
566
+ modelValue: r.geometryExportOpen,
567
+ "onUpdate:modelValue": t[5] ||= (e) => r.geometryExportOpen = e,
568
+ "application-id": r.application.app_id,
569
+ "build-url": r.apiUrl,
570
+ "error-message": r.parseApiError,
571
+ variant: "cabinet"
572
+ }, null, 8, [
573
+ "modelValue",
574
+ "application-id",
575
+ "build-url",
576
+ "error-message"
577
+ ])) : m("", !0),
578
+ r.submitOpen ? (x(), h("div", Ue, [g("div", We, [
579
+ t[25] ||= g("h3", { class: "text-base font-semibold text-gray-900" }, " Подання матеріалів знімання ", -1),
580
+ t[26] ||= g("p", { class: "mt-1 text-xs text-gray-500" }, " Файл буде надіслано на перевірку. ", -1),
581
+ g("div", Ge, [
582
+ v(r.FormFilePicker, {
583
+ "file-name": r.submitUploadBusy ? "Завантаження…" : r.submitFile?.name,
584
+ onChange: r.onSubmitFileChange
585
+ }, null, 8, ["file-name"]),
586
+ r.submitUploadError ? (x(), h("p", Ke, w(r.submitUploadError), 1)) : r.submitUploadedPath ? (x(), h("p", qe, " Файл завантажено ")) : m("", !0),
587
+ r.submitActionError ? (x(), h("p", Je, w(r.submitActionError), 1)) : m("", !0),
588
+ D(g("textarea", {
589
+ "onUpdate:modelValue": t[6] ||= (e) => r.submitNote = e,
590
+ rows: "3",
591
+ placeholder: "Примітка (необовʼязково)",
592
+ class: "w-full rounded-lg border border-gray-200 px-3 py-2 text-sm focus:border-[#2663EB]/40 focus:outline-none focus:ring-2 focus:ring-[#EFF4FE]"
593
+ }, null, 512), [[T, r.submitNote]])
594
+ ]),
595
+ g("div", Ye, [g("button", {
596
+ type: "button",
597
+ class: "rounded-lg px-4 py-2 text-sm text-gray-600 hover:bg-gray-100",
598
+ onClick: r.closeSubmitModal
599
+ }, " Скасувати "), g("button", {
600
+ type: "button",
601
+ class: "rounded-lg bg-[#2663EB] px-4 py-2 text-sm font-medium text-white hover:bg-[#1d4ed8] disabled:opacity-50",
602
+ disabled: r.actionBusy || r.submitUploadBusy || !r.submitUploadedPath,
603
+ onClick: r.confirmSubmitSurvey
604
+ }, " Подати ", 8, Xe)])
605
+ ])])) : m("", !0),
606
+ r.cancelOpen ? (x(), h("div", Ze, [g("div", Qe, [
607
+ t[27] ||= g("h3", { class: "text-base font-semibold text-gray-900" }, "Скасування заявки", -1),
608
+ D(g("textarea", {
609
+ "onUpdate:modelValue": t[7] ||= (e) => r.cancelReason = e,
610
+ rows: "4",
611
+ placeholder: "Причина скасування",
612
+ class: "mt-4 w-full rounded-lg border border-gray-200 px-3 py-2 text-sm",
613
+ onInput: t[8] ||= (e) => r.actionError = ""
614
+ }, null, 544), [[T, r.cancelReason]]),
615
+ r.actionError ? (x(), h("p", $e, w(r.actionError), 1)) : m("", !0),
616
+ g("div", et, [g("button", {
617
+ type: "button",
618
+ class: "rounded-lg px-4 py-2 text-sm text-gray-600 hover:bg-gray-100",
619
+ onClick: t[9] ||= (e) => {
620
+ r.cancelOpen = !1, r.actionError = "";
621
+ }
622
+ }, " Закрити "), g("button", {
623
+ type: "button",
624
+ class: "rounded-lg bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 disabled:opacity-50",
625
+ disabled: r.actionBusy,
626
+ onClick: r.confirmCancel
627
+ }, " Скасувати заявку ", 8, tt)])
628
+ ])])) : m("", !0)
629
+ ])) : (x(), h("div", nt, [t[29] ||= g("p", { class: "text-sm text-gray-500" }, "Звернення не знайдено.", -1), v(r.RouterLink, {
630
+ to: "/requests",
631
+ class: "mt-3 inline-block text-sm font-medium text-[#2663EB] hover:underline"
632
+ }, {
633
+ default: E(() => [...t[28] ||= [_(" Повернутися до звернень ", -1)]]),
634
+ _: 1
635
+ })]));
636
+ }
637
+ var it = /*#__PURE__*/ e(A, [["render", rt], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/card.vue"]]);
638
+ //#endregion
639
+ export { it as default };
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { n as t, t as n } from "./useEntityPath-8s0Y1tjA.js";
2
+ import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
3
3
  import { i as r } from "./resources-Cj8BzrBX.js";
4
- import { n as i, t as a } from "./AppealDetailField-DNpsGpPY.js";
5
- import { t as o } from "./RegistryForm-Ct8xiLV0.js";
4
+ import { n as i, t as a } from "./AppealDetailField-DNRGpnyD.js";
5
+ import { t as o } from "./RegistryForm-BlK1lExt.js";
6
6
  import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./form-DZ3CbtkT.js";
7
7
  import { l as ee } from "./appealMapLayers-CQMK3rrz.js";
8
8
  import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as C, normalizeStyle as w, openBlock as T, ref as E, renderList as D, toDisplayString as O, watch as k, withCtx as A } from "vue";
@@ -326,6 +326,6 @@ function se(e, t, n, r, i, a) {
326
326
  _: 1
327
327
  }, 8, ["to"])]));
328
328
  }
329
- var ce = /*#__PURE__*/ e(F, [["render", se], ["__file", "D:/softpro/surveyor/admin/src/pages/map-layers/card.vue"]]);
329
+ var ce = /*#__PURE__*/ e(F, [["render", se], ["__file", "C:/softpro/surveyor/admin/src/pages/map-layers/card.vue"]]);
330
330
  //#endregion
331
331
  export { ce as default };