@opengis/surveyor 0.0.15 → 0.0.17

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