@opengis/surveyor 0.0.14 → 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 (48) hide show
  1. package/dist/chunks/AppealStatusBadge-7KruOSVI.js +295 -0
  2. package/dist/chunks/ApplicationGeometryExportModal-DJbnKPm6.js +1245 -0
  3. package/dist/chunks/{BaseModal-SjP521X9.js → BaseModal-BJxKuONh.js} +1 -1
  4. package/dist/chunks/{RegistryFormModal-DhzEpxys.js → RegistryFormModal-BmBsUOF3.js} +1 -1
  5. package/dist/chunks/SurveyorTeleport-Cd6D92mo.js +30 -0
  6. package/dist/chunks/{applications-D6pHAQaK.js → applications-B6GAxopO.js} +16 -19
  7. package/dist/chunks/card-B113dNzv.js +1327 -0
  8. package/dist/chunks/card-COmcUdms.js +639 -0
  9. package/dist/chunks/{card-BBx1zR0E.js → card-Deae73xd.js} +2 -2
  10. package/dist/chunks/{certificates-DtfZTFN9.js → certificates-DHf1zGQs.js} +18 -8
  11. package/dist/chunks/{create-Cgeu7aKO.js → create-BVPqfJOb.js} +10 -10
  12. package/dist/chunks/{map-DkKsEnCM.js → map-BZi4eVl3.js} +893 -897
  13. package/dist/chunks/{map-layers-BmuIMLHa.js → map-layers-CKZK50de.js} +2 -2
  14. package/dist/chunks/{organizations-BO1dIl7v.js → organizations-DYGfYfHS.js} +2 -2
  15. package/dist/chunks/{requests-rWq8ok3C.js → requests-D1ix8U5f.js} +1 -1
  16. package/dist/chunks/requests-v1jHarHb.js +303 -0
  17. package/dist/chunks/{users-DOiQeVwn.js → users-frk3gmmd.js} +1 -1
  18. package/dist/index.css +1 -1
  19. package/dist/index.js +21 -21
  20. package/package.json +1 -1
  21. package/server/modules/surveyor/route.ts +13 -12
  22. package/server/modules/surveyor/services/applicationTile.ts +3 -3
  23. package/server/modules/surveyor/services/cancelApplication.ts +2 -1
  24. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +1 -1
  25. package/server/modules/surveyor/services/completeApplication.ts +1 -1
  26. package/server/modules/surveyor/services/identifyApplications.ts +2 -2
  27. package/server/modules/surveyor/services/issueSourceData.ts +1 -1
  28. package/server/modules/surveyor/services/registerSurveyor.ts +1 -1
  29. package/server/modules/surveyor/services/resendRegistration.ts +1 -1
  30. package/server/modules/surveyor/services/searchApplications.ts +2 -2
  31. package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +1 -1
  32. package/server/modules/surveyor/services/updateSurveyorStatus.ts +1 -1
  33. package/server/modules/surveyor/services/verifyApplication.ts +1 -1
  34. package/server/modules/surveyor/utils/shared.ts +28 -6
  35. package/server/resources/surveyor-admin/application_comments.ts +1 -1
  36. package/server/resources/surveyor-admin/application_status_history.ts +1 -1
  37. package/server/resources/surveyor-admin/applications.ts +12 -11
  38. package/server/resources/surveyor-admin/certificates.ts +26 -26
  39. package/server/resources/surveyor-admin/map_layers.ts +1 -1
  40. package/server/resources/surveyor-admin/organizations.ts +1 -1
  41. package/server/resources/surveyor-admin/surveyors.ts +1 -1
  42. package/server/suggests/index.ts +18 -1
  43. package/dist/chunks/AppealStatusBadge-Ct3EcB4_.js +0 -185
  44. package/dist/chunks/ApplicationHistorySection-D7KPV2cX.js +0 -788
  45. package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +0 -23
  46. package/dist/chunks/card-Bj4zFzbe.js +0 -1193
  47. package/dist/chunks/card-C-ohjNkC.js +0 -609
  48. package/dist/chunks/requests-BZ2jrt5J.js +0 -234
@@ -1,1193 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
3
- import { c as r, d as i, l as a, s as o, u as s } from "./resources-Cj8BzrBX.js";
4
- import { n as c, t as l } from "./AppealDetailField-DNRGpnyD.js";
5
- import { t as u } from "./BaseModal-SjP521X9.js";
6
- import { t as d } from "./AppealStatusBadge-Ct3EcB4_.js";
7
- import { r as f } from "./geometry-DyhIVRcw.js";
8
- import { a as p, i as m, n as h, r as g, t as _ } from "./ApplicationHistorySection-D7KPV2cX.js";
9
- import { Fragment as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createTextVNode as w, createVNode as T, defineComponent as E, mergeModels as D, normalizeClass as O, openBlock as k, ref as A, renderList as j, toDisplayString as M, useModel as N, vModelRadio as P, vModelSelect as F, vModelText as I, watch as L, withCtx as R, withDirectives as z } from "vue";
10
- import { RouterLink as B, useRoute as V } from "vue-router";
11
- //#region admin/src/pages/requests/components/AppealDetailBoolean.vue?vue&type=script&setup=true&lang.ts
12
- var H = /*@__PURE__*/ E({
13
- __name: "AppealDetailBoolean",
14
- props: {
15
- label: {
16
- type: String,
17
- required: !0
18
- },
19
- value: {
20
- type: Boolean,
21
- required: !0
22
- }
23
- },
24
- setup(e, { expose: n }) {
25
- n();
26
- let r = { AppIcon: t };
27
- return Object.defineProperty(r, "__isScriptSetup", {
28
- enumerable: !1,
29
- value: !0
30
- }), r;
31
- }
32
- }), U = { class: "mb-1 text-xs font-medium text-slate-500" }, W = {
33
- key: 0,
34
- class: "inline-flex items-center gap-1.5 text-[14px] font-medium text-success-700"
35
- }, ee = {
36
- key: 1,
37
- class: "inline-flex items-center gap-1.5 text-[14px] font-medium text-slate-400"
38
- };
39
- function te(e, t, n, r, i, a) {
40
- return k(), S("div", null, [C("dt", U, M(n.label), 1), C("dd", null, [n.value ? (k(), S("span", W, [T(r.AppIcon, {
41
- name: "circle-check",
42
- class: "h-4 w-4"
43
- }), t[0] ||= w(" Так ", -1)])) : (k(), S("span", ee, [T(r.AppIcon, {
44
- name: "circle-x",
45
- class: "h-4 w-4"
46
- }), t[1] ||= w(" Ні ", -1)]))])]);
47
- }
48
- var ne = /*#__PURE__*/ e(H, [["render", te], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/AppealDetailBoolean.vue"]]), re = /*@__PURE__*/ E({
49
- __name: "FormFilePicker",
50
- props: {
51
- fileName: {
52
- type: String,
53
- required: !1
54
- },
55
- accept: {
56
- type: String,
57
- required: !1
58
- },
59
- buttonLabel: {
60
- type: String,
61
- required: !1
62
- }
63
- },
64
- emits: ["change"],
65
- setup(e, { expose: n, emit: r }) {
66
- n();
67
- let i = e, a = r, o = A(null);
68
- function s() {
69
- o.value?.click();
70
- }
71
- function c(e) {
72
- let t = e.target.files?.[0] ?? null;
73
- a("change", t);
74
- }
75
- L(() => i.fileName, (e) => {
76
- !e && o.value && (o.value.value = "");
77
- });
78
- let l = {
79
- props: i,
80
- emit: a,
81
- inputRef: o,
82
- openPicker: s,
83
- onInputChange: c,
84
- AppIcon: t
85
- };
86
- return Object.defineProperty(l, "__isScriptSetup", {
87
- enumerable: !1,
88
- value: !0
89
- }), l;
90
- }
91
- }), G = { class: "rounded-xl border border-dashed border-slate-200 bg-slate-50/80 px-4 py-3 transition-colors hover:border-slate-300 hover:bg-slate-50" }, K = { class: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between" }, q = { class: "flex min-w-0 flex-1 items-center gap-3" }, J = { class: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-white text-slate-400 shadow-sm ring-1 ring-slate-100" }, Y = { class: "min-w-0" }, X = {
92
- key: 0,
93
- class: "truncate text-sm font-medium text-slate-800"
94
- }, ie = {
95
- key: 1,
96
- class: "text-sm text-slate-400"
97
- }, ae = ["accept"];
98
- function oe(e, t, n, r, i, a) {
99
- return k(), S("div", G, [C("div", K, [C("div", q, [C("span", J, [T(r.AppIcon, {
100
- name: "file-text",
101
- class: "h-[18px] w-[18px]"
102
- })]), C("div", Y, [n.fileName ? (k(), S("p", X, M(n.fileName), 1)) : (k(), S("p", ie, "Файл не обрано")), t[0] ||= C("p", { class: "mt-0.5 text-xs text-slate-400" }, "ZIP, GeoJSON або інший дозволений формат", -1)])]), C("button", {
103
- type: "button",
104
- class: "inline-flex shrink-0 items-center justify-center gap-2 rounded-lg border border-slate-200 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-sm transition-colors hover:border-brand-300 hover:bg-brand-50 hover:text-brand-700",
105
- onClick: r.openPicker
106
- }, [T(r.AppIcon, {
107
- name: "upload",
108
- class: "h-4 w-4 text-brand-500"
109
- }), w(" " + M(n.buttonLabel ?? "Обрати файл"), 1)])]), C("input", {
110
- ref: "inputRef",
111
- type: "file",
112
- class: "hidden",
113
- accept: n.accept,
114
- onChange: r.onInputChange
115
- }, null, 40, ae)]);
116
- }
117
- var se = /*#__PURE__*/ e(re, [["render", oe], ["__file", "C:/softpro/surveyor/admin/src/components/ui/FormFilePicker.vue"]]), Z = "applications";
118
- async function Q(e, t) {
119
- let n = new FormData();
120
- n.append("file", t, t.name);
121
- let r = await fetch(a(`/api/resource/${Z}/${encodeURIComponent(e)}/upload`), {
122
- method: "POST",
123
- credentials: "include",
124
- body: n
125
- });
126
- if (!r.ok) {
127
- let e = await r.text();
128
- try {
129
- let t = JSON.parse(e);
130
- throw Error(t.message || e || `HTTP ${r.status}`);
131
- } catch (t) {
132
- throw t instanceof Error && t.message !== e ? t : Error(e || `HTTP ${r.status}`);
133
- }
134
- }
135
- let i = await r.json(), o = i.file_path ?? i.path;
136
- if (!o) throw Error("Сервер не повернув шлях до файлу");
137
- return {
138
- file_path: o,
139
- token: i.token
140
- };
141
- }
142
- function ce(e) {
143
- return a(`/api/surveyor/applications/${encodeURIComponent(e)}/export/geometry`);
144
- }
145
- async function le(e, t) {
146
- let n = await fetch(a(`/api/surveyor/applications/${encodeURIComponent(e)}/export/vector`), {
147
- method: "POST",
148
- credentials: "include",
149
- headers: { "Content-Type": "application/json" },
150
- body: JSON.stringify(t)
151
- });
152
- if (!n.ok) {
153
- let e = await n.text();
154
- try {
155
- let t = JSON.parse(e);
156
- throw Error(t.message || e || `HTTP ${n.status}`);
157
- } catch (t) {
158
- throw t instanceof Error && t.message !== e ? t : Error(e || `HTTP ${n.status}`);
159
- }
160
- }
161
- let r = await n.blob(), i = (n.headers.get("Content-Disposition") ?? "").match(/filename\*?=(?:UTF-8''|")?([^";]+)/i), o = decodeURIComponent(i?.[1]?.replace(/"/g, "") ?? `vector_${e}.geojson`), s = URL.createObjectURL(r), c = document.createElement("a");
162
- c.href = s, c.download = o, c.click(), URL.revokeObjectURL(s);
163
- }
164
- async function ue(e, t, n) {
165
- return o(`/api/surveyor/applications/${encodeURIComponent(e)}/upload-source-data`, {
166
- method: "POST",
167
- body: JSON.stringify({
168
- file_path: t,
169
- ...n?.trim() ? { note: n.trim() } : {}
170
- })
171
- });
172
- }
173
- async function de(e, t) {
174
- return r(Z, e, { file_output: t });
175
- }
176
- async function fe(e, t) {
177
- return o(`/api/surveyor/applications/${encodeURIComponent(e)}/verify`, {
178
- method: "POST",
179
- body: JSON.stringify(t)
180
- });
181
- }
182
- async function pe(e) {
183
- return o(`/api/surveyor/applications/${encodeURIComponent(e)}/complete`, { method: "POST" });
184
- }
185
- //#endregion
186
- //#region admin/src/pages/requests/components/ApplicationWorkflowActions.vue?vue&type=script&setup=true&lang.ts
187
- var me = /*@__PURE__*/ E({
188
- __name: "ApplicationWorkflowActions",
189
- props: {
190
- applicationId: {
191
- type: String,
192
- required: !0
193
- },
194
- status: {
195
- type: String,
196
- required: !0
197
- }
198
- },
199
- emits: ["done", "error"],
200
- setup(e, { expose: t, emit: n }) {
201
- let r = e, i = n, a = A(!1), o = A(""), s = A(!1), c = A("issue"), l = A(""), d = A(null), f = A(""), p = A(!1), m = A(""), h = 0, g = A(!1), _ = A("verified"), v = A(""), b = A(null), x = A(""), S = A(!1), C = A(""), w = 0, T = A(!1), E = y(() => r.status === "awaitingData"), D = y(() => r.status === "underReview"), O = y(() => r.status === "verified");
202
- function k() {
203
- o.value = "";
204
- }
205
- function j() {
206
- d.value = null, f.value = "", m.value = "", p.value = !1, l.value = "", h += 1;
207
- }
208
- function M() {
209
- b.value = null, x.value = "", C.value = "", S.value = !1, v.value = "", w += 1;
210
- }
211
- L(s, (e) => {
212
- e || j();
213
- }), L(g, (e) => {
214
- e || M();
215
- });
216
- async function N(e) {
217
- a.value = !0, o.value = "";
218
- try {
219
- await e(), i("done");
220
- } catch (e) {
221
- let t = e instanceof Error ? e.message : "Не вдалося виконати дію";
222
- o.value = t, i("error", t);
223
- } finally {
224
- a.value = !1;
225
- }
226
- }
227
- function P() {
228
- k(), j(), c.value = "issue", s.value = !0;
229
- }
230
- function F() {
231
- k(), j(), c.value = "replace", s.value = !0;
232
- }
233
- function I() {
234
- k(), M(), g.value = !0;
235
- }
236
- function R() {
237
- k(), T.value = !0;
238
- }
239
- async function z(e) {
240
- if (d.value = e, f.value = "", m.value = "", !e) return;
241
- let t = ++h;
242
- p.value = !0;
243
- try {
244
- let n = await Q(r.applicationId, e);
245
- if (t !== h) return;
246
- f.value = n.file_path;
247
- } catch (e) {
248
- if (t !== h) return;
249
- m.value = e instanceof Error ? e.message : "Не вдалося завантажити файл", i("error", m.value);
250
- } finally {
251
- t === h && (p.value = !1);
252
- }
253
- }
254
- async function B(e) {
255
- if (b.value = e, x.value = "", C.value = "", !e) return;
256
- let t = ++w;
257
- S.value = !0;
258
- try {
259
- let n = await Q(r.applicationId, e);
260
- if (t !== w) return;
261
- x.value = n.file_path;
262
- } catch (e) {
263
- if (t !== w) return;
264
- C.value = e instanceof Error ? e.message : "Не вдалося завантажити файл", i("error", C.value);
265
- } finally {
266
- t === w && (S.value = !1);
267
- }
268
- }
269
- async function V() {
270
- if (!f.value) {
271
- o.value = m.value || "Спочатку завантажте файл вихідних даних";
272
- return;
273
- }
274
- await N(async () => {
275
- c.value === "replace" ? await de(r.applicationId, f.value) : await ue(r.applicationId, f.value, l.value), s.value = !1;
276
- });
277
- }
278
- async function H() {
279
- if (_.value === "dataIssued" && !v.value.trim()) {
280
- o.value = "Вкажіть причину повернення на доопрацювання";
281
- return;
282
- }
283
- if (b.value && !x.value) {
284
- o.value = C.value || "Дочекайтесь завантаження файлу або оберіть інший";
285
- return;
286
- }
287
- await N(async () => {
288
- await fe(r.applicationId, {
289
- status: _.value,
290
- ...x.value ? { file_path: x.value } : {},
291
- ..._.value === "dataIssued" || v.value.trim() ? { note_4_file_corrected_geodetic_survey: v.value.trim() } : {}
292
- }), g.value = !1;
293
- });
294
- }
295
- async function U() {
296
- await N(async () => {
297
- await pe(r.applicationId), T.value = !1;
298
- });
299
- }
300
- t({
301
- openIssue: P,
302
- openReplaceOutput: F,
303
- openVerify: I,
304
- openComplete: R,
305
- canIssue: E,
306
- canVerify: D,
307
- canComplete: O,
308
- actionError: o,
309
- busy: a
310
- });
311
- let W = {
312
- props: r,
313
- emit: i,
314
- busy: a,
315
- actionError: o,
316
- issueOpen: s,
317
- issueMode: c,
318
- issueNote: l,
319
- issueFile: d,
320
- issueUploadedPath: f,
321
- issueUploadBusy: p,
322
- issueUploadError: m,
323
- get issueUploadSeq() {
324
- return h;
325
- },
326
- set issueUploadSeq(e) {
327
- h = e;
328
- },
329
- verifyOpen: g,
330
- verifyDecision: _,
331
- verifyNote: v,
332
- verifyFile: b,
333
- verifyUploadedPath: x,
334
- verifyUploadBusy: S,
335
- verifyUploadError: C,
336
- get verifyUploadSeq() {
337
- return w;
338
- },
339
- set verifyUploadSeq(e) {
340
- w = e;
341
- },
342
- completeOpen: T,
343
- canIssue: E,
344
- canVerify: D,
345
- canComplete: O,
346
- resetErrors: k,
347
- resetIssueModal: j,
348
- resetVerifyModal: M,
349
- runAction: N,
350
- openIssue: P,
351
- openReplaceOutput: F,
352
- openVerify: I,
353
- openComplete: R,
354
- onIssueFileChange: z,
355
- onVerifyFileChange: B,
356
- submitIssue: V,
357
- submitVerify: H,
358
- submitComplete: U,
359
- BaseModal: u,
360
- FormFilePicker: se
361
- };
362
- return Object.defineProperty(W, "__isScriptSetup", {
363
- enumerable: !1,
364
- value: !0
365
- }), W;
366
- }
367
- }), he = { class: "space-y-4" }, ge = {
368
- key: 0,
369
- class: "mt-1.5 text-xs text-danger-700"
370
- }, _e = {
371
- key: 1,
372
- class: "mt-1.5 text-xs text-emerald-700"
373
- }, ve = { key: 0 }, ye = {
374
- key: 1,
375
- class: "text-xs text-danger-700"
376
- }, be = { class: "flex justify-end gap-2" }, xe = ["disabled"], Se = { class: "space-y-4" }, Ce = { class: "flex gap-4 text-sm" }, we = { class: "flex items-center gap-2" }, Te = { class: "flex items-center gap-2" }, Ee = { class: "mb-1 block text-xs font-medium text-slate-500" }, De = {
377
- key: 0,
378
- class: "mt-1.5 text-xs text-danger-700"
379
- }, Oe = {
380
- key: 1,
381
- class: "mt-1.5 text-xs text-emerald-700"
382
- }, ke = {
383
- key: 0,
384
- class: "text-xs text-danger-700"
385
- }, Ae = { class: "flex justify-end gap-2" }, je = ["disabled"], Me = { class: "flex justify-end gap-2" }, Ne = ["disabled"];
386
- function Pe(e, t, n, r, i, a) {
387
- return k(), S(v, null, [
388
- T(r.BaseModal, {
389
- modelValue: r.issueOpen,
390
- "onUpdate:modelValue": t[2] ||= (e) => r.issueOpen = e,
391
- title: r.issueMode === "replace" ? "Заміна вихідних даних" : "Видача вихідних даних"
392
- }, {
393
- footer: R(() => [C("div", be, [C("button", {
394
- type: "button",
395
- class: "rounded-lg px-4 py-2 text-sm text-slate-600 hover:bg-slate-100",
396
- onClick: t[1] ||= (e) => r.issueOpen = !1
397
- }, "Скасувати"), C("button", {
398
- type: "button",
399
- class: "rounded-lg bg-brand-600 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-700 disabled:opacity-50",
400
- disabled: r.busy || r.issueUploadBusy || !r.issueUploadedPath,
401
- onClick: r.submitIssue
402
- }, M(r.issueMode === "replace" ? "Зберегти" : "Видати"), 9, xe)])]),
403
- default: R(() => [C("div", he, [
404
- C("div", null, [
405
- t[10] ||= C("label", { class: "mb-1.5 block text-xs font-medium text-slate-500" }, "Файл", -1),
406
- T(r.FormFilePicker, {
407
- "file-name": r.issueUploadBusy ? "Завантаження…" : r.issueFile?.name,
408
- onChange: r.onIssueFileChange
409
- }, null, 8, ["file-name"]),
410
- r.issueUploadError ? (k(), S("p", ge, M(r.issueUploadError), 1)) : r.issueUploadedPath ? (k(), S("p", _e, "Файл завантажено")) : x("", !0)
411
- ]),
412
- r.issueMode === "issue" ? (k(), S("div", ve, [t[11] ||= C("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Примітка", -1), z(C("textarea", {
413
- "onUpdate:modelValue": t[0] ||= (e) => r.issueNote = e,
414
- rows: "3",
415
- class: "w-full rounded-lg border border-slate-200 px-3 py-2 text-sm shadow-sm focus:border-brand-300 focus:outline-none focus:ring-2 focus:ring-brand-100"
416
- }, null, 512), [[I, r.issueNote]])])) : x("", !0),
417
- r.actionError ? (k(), S("p", ye, M(r.actionError), 1)) : x("", !0)
418
- ])]),
419
- _: 1
420
- }, 8, ["modelValue", "title"]),
421
- T(r.BaseModal, {
422
- modelValue: r.verifyOpen,
423
- "onUpdate:modelValue": t[7] ||= (e) => r.verifyOpen = e,
424
- title: "Перевірка матеріалів",
425
- width: "max-w-xl"
426
- }, {
427
- footer: R(() => [C("div", Ae, [C("button", {
428
- type: "button",
429
- class: "rounded-lg px-4 py-2 text-sm text-slate-600 hover:bg-slate-100",
430
- onClick: t[6] ||= (e) => r.verifyOpen = !1
431
- }, "Скасувати"), C("button", {
432
- type: "button",
433
- class: "rounded-lg bg-brand-600 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-700 disabled:opacity-50",
434
- disabled: r.busy || r.verifyUploadBusy,
435
- onClick: r.submitVerify
436
- }, " Зберегти ", 8, je)])]),
437
- default: R(() => [C("div", Se, [
438
- C("div", Ce, [C("label", we, [z(C("input", {
439
- "onUpdate:modelValue": t[3] ||= (e) => r.verifyDecision = e,
440
- type: "radio",
441
- value: "verified"
442
- }, null, 512), [[P, r.verifyDecision]]), t[12] ||= w(" Прийняти ", -1)]), C("label", Te, [z(C("input", {
443
- "onUpdate:modelValue": t[4] ||= (e) => r.verifyDecision = e,
444
- type: "radio",
445
- value: "dataIssued"
446
- }, null, 512), [[P, r.verifyDecision]]), t[13] ||= w(" На доопрацювання ", -1)])]),
447
- C("div", null, [C("label", Ee, M(r.verifyDecision === "dataIssued" ? "Причина (обовʼязково)" : "Примітка"), 1), z(C("textarea", {
448
- "onUpdate:modelValue": t[5] ||= (e) => r.verifyNote = e,
449
- rows: "3",
450
- class: "w-full rounded-lg border border-slate-200 px-3 py-2 text-sm"
451
- }, null, 512), [[I, r.verifyNote]])]),
452
- C("div", null, [
453
- t[14] ||= C("label", { class: "mb-1.5 block text-xs font-medium text-slate-500" }, "Виправлений файл (за потреби)", -1),
454
- T(r.FormFilePicker, {
455
- "file-name": r.verifyUploadBusy ? "Завантаження…" : r.verifyFile?.name,
456
- "button-label": "Додати файл",
457
- onChange: r.onVerifyFileChange
458
- }, null, 8, ["file-name"]),
459
- r.verifyUploadError ? (k(), S("p", De, M(r.verifyUploadError), 1)) : r.verifyUploadedPath ? (k(), S("p", Oe, "Файл завантажено")) : x("", !0)
460
- ]),
461
- r.actionError ? (k(), S("p", ke, M(r.actionError), 1)) : x("", !0)
462
- ])]),
463
- _: 1
464
- }, 8, ["modelValue"]),
465
- T(r.BaseModal, {
466
- modelValue: r.completeOpen,
467
- "onUpdate:modelValue": t[9] ||= (e) => r.completeOpen = e,
468
- title: "Завершення заявки"
469
- }, {
470
- footer: R(() => [C("div", Me, [C("button", {
471
- type: "button",
472
- class: "rounded-lg px-4 py-2 text-sm text-slate-600 hover:bg-slate-100",
473
- onClick: t[8] ||= (e) => r.completeOpen = !1
474
- }, "Скасувати"), C("button", {
475
- type: "button",
476
- class: "rounded-lg bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-700 disabled:opacity-50",
477
- disabled: r.busy,
478
- onClick: r.submitComplete
479
- }, " Підтвердити ", 8, Ne)])]),
480
- default: R(() => [t[15] ||= C("p", { class: "text-sm text-slate-600" }, "Підтвердити внесення результатів до ЄЦТО та завершення заявки?", -1)]),
481
- _: 1
482
- }, 8, ["modelValue"])
483
- ], 64);
484
- }
485
- var Fe = /*#__PURE__*/ e(me, [["render", Pe], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/ApplicationWorkflowActions.vue"]]), Ie = "w-full rounded-lg border border-slate-200 px-3 py-2 text-sm shadow-sm focus:border-brand-300 focus:outline-none focus:ring-2 focus:ring-brand-100", Le = "w-full appearance-none rounded-lg border border-slate-200 bg-white py-2 pl-3 pr-9 text-sm shadow-sm focus:border-brand-300 focus:outline-none focus:ring-2 focus:ring-brand-100 disabled:bg-slate-50 disabled:text-slate-400", Re = /*@__PURE__*/ E({
486
- __name: "ApplicationVectorExportModal",
487
- props: /*@__PURE__*/ D({ applicationId: {
488
- type: String,
489
- required: !0
490
- } }, {
491
- modelValue: {
492
- type: Boolean,
493
- required: !0
494
- },
495
- modelModifiers: {}
496
- }),
497
- emits: ["update:modelValue"],
498
- setup(e, { expose: n }) {
499
- n();
500
- let r = e, o = N(e, "modelValue"), s = A(""), c = A(100), l = A("EPSG:4326"), d = A(!1), f = A(""), p = A(!1), m = A([]), h = [{
501
- id: "EPSG:4326",
502
- label: "EPSG:4326 (WGS 84)"
503
- }, {
504
- id: "EPSG:3857",
505
- label: "EPSG:3857 (Web Mercator)"
506
- }];
507
- function g() {
508
- s.value = "", c.value = 100, l.value = "EPSG:4326", f.value = "", d.value = !1;
509
- }
510
- async function _() {
511
- p.value = !0, m.value = [];
512
- try {
513
- let e = new URLSearchParams({ q: "" }), t = await fetch(a(`/api/suggestion/gis-layers?${e}`), { credentials: "include" });
514
- if (!t.ok) {
515
- let e = await t.text();
516
- throw Error(i(e, t.status));
517
- }
518
- let n = await t.json();
519
- m.value = (n.data ?? []).map((e) => ({
520
- id: String(e.id),
521
- label: e.text
522
- })), m.value.length === 1 && (s.value = m.value[0].id);
523
- } catch (e) {
524
- f.value = e instanceof Error ? e.message : "Не вдалося завантажити перелік шарів";
525
- } finally {
526
- p.value = !1;
527
- }
528
- }
529
- L(o, (e) => {
530
- e && (g(), _());
531
- }), L([
532
- s,
533
- c,
534
- l
535
- ], () => {
536
- f.value = "";
537
- });
538
- async function v() {
539
- f.value = "";
540
- let e = s.value.trim();
541
- if (!e) {
542
- f.value = "Оберіть шар для експорту";
543
- return;
544
- }
545
- let t = c.value;
546
- if (!Number.isFinite(t) || t < 0) {
547
- f.value = "Буфер має бути невідʼємним числом";
548
- return;
549
- }
550
- d.value = !0;
551
- try {
552
- await le(r.applicationId, {
553
- layer_id: e,
554
- buffer: t,
555
- crs: l.value
556
- }), o.value = !1;
557
- } catch (e) {
558
- f.value = e instanceof Error ? e.message : "Не вдалося експортувати вектор";
559
- } finally {
560
- d.value = !1;
561
- }
562
- }
563
- let y = {
564
- props: r,
565
- open: o,
566
- layerId: s,
567
- bufferMeters: c,
568
- crs: l,
569
- busy: d,
570
- error: f,
571
- layersLoading: p,
572
- layerOptions: m,
573
- CRS_OPTIONS: h,
574
- fieldClass: Ie,
575
- selectFieldClass: Le,
576
- resetForm: g,
577
- loadLayers: _,
578
- submit: v,
579
- BaseModal: u,
580
- AppIcon: t
581
- };
582
- return Object.defineProperty(y, "__isScriptSetup", {
583
- enumerable: !1,
584
- value: !0
585
- }), y;
586
- }
587
- }), ze = { class: "space-y-4" }, Be = { class: "relative" }, Ve = ["disabled"], He = {
588
- value: "",
589
- disabled: ""
590
- }, Ue = ["value"], We = {
591
- key: 0,
592
- class: "mt-1.5 text-xs text-slate-400"
593
- }, Ge = ["disabled"], Ke = { class: "relative" }, qe = ["disabled"], Je = ["value"], Ye = {
594
- key: 0,
595
- class: "text-xs text-danger-700"
596
- }, Xe = { class: "flex justify-end gap-2" }, Ze = ["disabled"], Qe = ["disabled"];
597
- function $e(e, t, n, r, i, a) {
598
- return k(), b(r.BaseModal, {
599
- modelValue: r.open,
600
- "onUpdate:modelValue": t[4] ||= (e) => r.open = e,
601
- title: "Експорт векторного шару",
602
- width: "max-w-md"
603
- }, {
604
- footer: R(() => [C("div", Xe, [C("button", {
605
- type: "button",
606
- class: "rounded-lg px-4 py-2 text-sm text-slate-600 hover:bg-slate-100",
607
- disabled: r.busy,
608
- onClick: t[3] ||= (e) => r.open = !1
609
- }, " Скасувати ", 8, Ze), C("button", {
610
- type: "button",
611
- class: "rounded-lg bg-brand-600 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-700 disabled:opacity-50",
612
- disabled: r.busy || r.layersLoading || !r.layerId,
613
- onClick: r.submit
614
- }, M(r.busy ? "Експорт…" : "Завантажити"), 9, Qe)])]),
615
- default: R(() => [C("div", ze, [
616
- C("div", null, [
617
- t[5] ||= C("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Шар", -1),
618
- C("div", Be, [z(C("select", {
619
- "onUpdate:modelValue": t[0] ||= (e) => r.layerId = e,
620
- class: O(r.selectFieldClass),
621
- disabled: r.layersLoading || r.busy || !r.layerOptions.length
622
- }, [C("option", He, M(r.layersLoading ? "Завантаження…" : "Оберіть шар"), 1), (k(!0), S(v, null, j(r.layerOptions, (e) => (k(), S("option", {
623
- key: e.id,
624
- value: e.id
625
- }, M(e.label), 9, Ue))), 128))], 8, Ve), [[F, r.layerId]]), T(r.AppIcon, {
626
- name: "chevron-down",
627
- class: "pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-500"
628
- })]),
629
- !r.layersLoading && !r.layerOptions.length && !r.error ? (k(), S("p", We, " Шари не знайдено. ")) : x("", !0)
630
- ]),
631
- C("div", null, [t[6] ||= C("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Буфер, м", -1), z(C("input", {
632
- "onUpdate:modelValue": t[1] ||= (e) => r.bufferMeters = e,
633
- type: "number",
634
- min: "0",
635
- step: "1",
636
- class: O(r.fieldClass),
637
- disabled: r.busy
638
- }, null, 8, Ge), [[
639
- I,
640
- r.bufferMeters,
641
- void 0,
642
- { number: !0 }
643
- ]])]),
644
- C("div", null, [t[7] ||= C("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Система координат", -1), C("div", Ke, [z(C("select", {
645
- "onUpdate:modelValue": t[2] ||= (e) => r.crs = e,
646
- class: O(r.selectFieldClass),
647
- disabled: r.busy
648
- }, [(k(), S(v, null, j(r.CRS_OPTIONS, (e) => C("option", {
649
- key: e.id,
650
- value: e.id
651
- }, M(e.label), 9, Je)), 64))], 8, qe), [[F, r.crs]]), T(r.AppIcon, {
652
- name: "chevron-down",
653
- class: "pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-500"
654
- })])]),
655
- r.error ? (k(), S("p", Ye, M(r.error), 1)) : x("", !0)
656
- ])]),
657
- _: 1
658
- }, 8, ["modelValue"]);
659
- }
660
- var et = /*#__PURE__*/ e(Re, [["render", $e], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/ApplicationVectorExportModal.vue"]]), tt = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg bg-brand-50 px-2.5 py-1.5 text-xs font-medium text-brand-600 transition-colors hover:bg-brand-100", nt = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg border border-brand-300/50 bg-white px-2.5 py-1.5 text-xs font-medium text-brand-600 shadow-sm transition-colors hover:border-brand-400 hover:bg-brand-50/40 disabled:opacity-50", rt = /*@__PURE__*/ E({
661
- __name: "card",
662
- setup(e, { expose: r }) {
663
- r();
664
- let i = V(), { listPath: a } = n("number"), u = A(null), v = A(""), b = A(!1), x = A(""), S = A(null), C = A(""), w = A(!1), T = A(!1), E = y(() => I(u.value?.organization)), D = y(() => I(u.value?.surveyor)), O = y(() => {
665
- let e = D.value;
666
- return e && [
667
- e.last_name,
668
- e.first_name,
669
- e.middle_name
670
- ].filter(Boolean).join(" ") || "—";
671
- }), k = y(() => ({
672
- name: "Адміністратор",
673
- role: "Перевірка",
674
- initials: "АД"
675
- }));
676
- function j(e) {
677
- let t = O.value === "—" ? "Заявник" : O.value, n = {
678
- name: t,
679
- role: "Заявник",
680
- initials: g(t)
681
- };
682
- if (!e.created_by) return m;
683
- if (e.created_by === s.currentUser?.id) return k.value;
684
- let r = D.value?.surveyor_id;
685
- return r && e.created_by === r ? n : k.value;
686
- }
687
- let M = y(() => u.value?.address_id_data?.text || "—"), N = y(() => u.value?.is_found_address_id === !0 || !!u.value?.address_id_data?.text?.trim()), P = y(() => f(u.value?.geom)), F = y(() => {
688
- let e = u.value;
689
- if (!e) return [];
690
- let t = [];
691
- return f(e.geom) && (t.push({
692
- id: "geometry",
693
- label: "Межі заявки",
694
- href: ce(e.app_id),
695
- action: "download"
696
- }), t.push({
697
- id: "vector-export",
698
- label: "Експортувати вектор",
699
- action: "exportVector"
700
- })), e.status === "reserve" ? t : (e.status === "awaitingData" && !e.file_output ? t.push({
701
- id: "issue",
702
- label: "Вихідні дані",
703
- action: "issue"
704
- }) : e.file_output && t.push({
705
- id: "output",
706
- token: e.file_output,
707
- label: "Вихідні дані",
708
- action: "download",
709
- replaceable: e.status !== "completed" && e.status !== "cancelled"
710
- }), e.file_corrected_geodetic_survey && t.push({
711
- id: "corrected",
712
- token: e.file_corrected_geodetic_survey,
713
- label: "Відкорегований файл топографо-геодезичного знімання",
714
- note: e.note_4_file_corrected_geodetic_survey?.trim() || void 0,
715
- action: "download"
716
- }), e.file_geodetic_survey && t.push({
717
- id: "survey",
718
- token: e.file_geodetic_survey,
719
- label: "Здане топографо-геодезичне знімання",
720
- action: "download"
721
- }), e.status === "underReview" && t.push({
722
- id: "verify",
723
- label: "Перевірка зданого знімання",
724
- action: "verify"
725
- }), e.status === "verified" && t.push({
726
- id: "complete",
727
- label: "Внесення в ЄЦТО",
728
- action: "complete"
729
- }), t);
730
- });
731
- function I(e) {
732
- return Array.isArray(e) ? e[0] ?? null : e ?? null;
733
- }
734
- function R(e) {
735
- if (!e) return "";
736
- let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
737
- return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
738
- }
739
- function z(e) {
740
- return `/api/file/${encodeURIComponent(e)}?download=true`;
741
- }
742
- async function H(e) {
743
- if (v.value = "", e) try {
744
- let t = await o(`/api/resource/certificates/${encodeURIComponent(e)}`);
745
- v.value = R(t.date_certificate);
746
- } catch {
747
- v.value = "";
748
- }
749
- }
750
- async function U(e) {
751
- b.value = !0, x.value = "", u.value = null, v.value = "";
752
- try {
753
- u.value = await o(`/api/resource/applications/${encodeURIComponent(e)}?include=organization,surveyor,status_history&limit=100`), await H(I(u.value.surveyor)?.certificate_id);
754
- } catch (e) {
755
- u.value = null, x.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
756
- } finally {
757
- b.value = !1;
758
- }
759
- }
760
- L(() => String(i.params.number), (e) => {
761
- e && U(e);
762
- }, { immediate: !0 });
763
- let W = {
764
- route: i,
765
- listPath: a,
766
- application: u,
767
- certificateDate: v,
768
- loading: b,
769
- error: x,
770
- workflowRef: S,
771
- workflowError: C,
772
- workflowBusy: w,
773
- vectorExportOpen: T,
774
- organization: E,
775
- surveyor: D,
776
- applicantName: O,
777
- commentCurrentAuthor: k,
778
- resolveNoteAuthor: j,
779
- address: M,
780
- showAddress: N,
781
- showMap: P,
782
- files: F,
783
- fileDownloadBtnClass: tt,
784
- fileUploadBtnClass: nt,
785
- firstRelation: I,
786
- formatDate: R,
787
- fileUrl: z,
788
- loadCertificateDate: H,
789
- loadApplication: U,
790
- AppIcon: t,
791
- get RouterLink() {
792
- return B;
793
- },
794
- AppealStatusBadge: d,
795
- AppealDetailSection: c,
796
- AppealDetailField: l,
797
- AppealDetailBoolean: ne,
798
- AppealDetailMap: p,
799
- ApplicationCommentsSection: h,
800
- ApplicationHistorySection: _,
801
- ApplicationWorkflowActions: Fe,
802
- ApplicationVectorExportModal: et
803
- };
804
- return Object.defineProperty(W, "__isScriptSetup", {
805
- enumerable: !1,
806
- value: !0
807
- }), W;
808
- }
809
- }), it = {
810
- key: 0,
811
- class: "px-4 py-16 text-center text-sm text-slate-400"
812
- }, at = { key: 1 }, ot = { class: "mb-6 pl-8 lg:pl-0" }, st = { class: "mb-4 flex items-center gap-1.5 text-sm" }, ct = { class: "font-medium text-slate-700" }, lt = { class: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between" }, ut = { class: "flex flex-col gap-1.5" }, dt = { class: "text-xl font-bold tracking-tight text-slate-900" }, ft = { class: "text-sm font-medium text-slate-500" }, pt = { class: "grid grid-cols-1 items-start gap-5 xl:grid-cols-[minmax(0,1fr)_420px]" }, mt = { class: "flex flex-col gap-5" }, ht = { class: "grid grid-cols-2 gap-x-6 gap-y-4" }, gt = { class: "grid grid-cols-2 gap-x-6 gap-y-4" }, _t = { class: "grid grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3" }, vt = { class: "grid grid-cols-1 gap-y-3" }, yt = { class: "grid min-w-0 grid-cols-1 gap-6 xl:grid-cols-2" }, bt = { class: "grid min-w-0 grid-cols-1 gap-x-5 gap-y-3.5 sm:grid-cols-2" }, xt = { class: "min-w-0 border-t border-slate-100 pt-6 xl:border-l xl:border-t-0 xl:pl-6 xl:pt-0" }, St = { class: "grid min-w-0 grid-cols-1 gap-x-5 gap-y-3.5 sm:grid-cols-2" }, Ct = { key: 1 }, wt = {
813
- key: 0,
814
- class: "mb-3 text-xs text-slate-500"
815
- }, Tt = {
816
- key: 1,
817
- class: "mb-3 text-xs text-danger-700"
818
- }, Et = {
819
- key: 2,
820
- class: "divide-y divide-slate-100"
821
- }, $ = { class: "min-w-0" }, Dt = { class: "break-words text-sm font-medium text-slate-800" }, Ot = {
822
- key: 0,
823
- class: "mt-0.5 text-xs text-slate-400"
824
- }, kt = {
825
- key: 0,
826
- class: "flex shrink-0 items-center gap-2"
827
- }, At = ["disabled"], jt = ["href"], Mt = ["disabled"], Nt = ["disabled"], Pt = ["disabled"], Ft = {
828
- key: 3,
829
- class: "text-sm text-slate-400"
830
- }, It = { class: "xl:sticky xl:top-6 xl:self-start" }, Lt = { class: "h-[600px] xl:h-[calc(100vh-3rem)] xl:max-h-[760px]" }, Rt = {
831
- key: 1,
832
- class: "flex h-full min-h-[320px] flex-col items-center justify-center rounded-2xl border border-slate-200 bg-white p-8 text-center shadow-card"
833
- }, zt = {
834
- key: 2,
835
- class: "rounded-xl border border-slate-200 bg-white px-6 py-16 text-center shadow-card"
836
- }, Bt = { class: "text-sm text-slate-500" };
837
- function Vt(e, t, n, r, i, a) {
838
- return r.loading ? (k(), S("div", it, " Завантаження… ")) : r.application ? (k(), S("div", at, [
839
- C("div", ot, [C("nav", st, [
840
- T(r.RouterLink, {
841
- to: r.listPath,
842
- class: "flex items-center gap-1 text-slate-400 transition-colors hover:text-brand-600"
843
- }, {
844
- default: R(() => [T(r.AppIcon, {
845
- name: "home",
846
- class: "h-3.5 w-3.5"
847
- }), t[8] ||= w(" Звернення ", -1)]),
848
- _: 1
849
- }, 8, ["to"]),
850
- T(r.AppIcon, {
851
- name: "chevron-right",
852
- class: "h-3.5 w-3.5 text-slate-300"
853
- }),
854
- C("span", ct, M(r.application.number || "—"), 1)
855
- ]), C("div", lt, [C("div", ut, [C("h1", dt, "Звернення " + M(r.application.number || "—"), 1), C("p", ft, M(r.organization?.name || "—"), 1)]), T(r.AppealStatusBadge, {
856
- status: r.application.status || "",
857
- label: r.application.status_data?.text || void 0
858
- }, null, 8, ["status", "label"])])]),
859
- C("div", pt, [C("div", mt, [
860
- T(r.AppealDetailSection, { title: "Заявка" }, {
861
- icon: R(() => [T(r.AppIcon, {
862
- name: "file-check-2",
863
- class: "h-[18px] w-[18px]"
864
- })]),
865
- default: R(() => [C("dl", ht, [
866
- T(r.AppealDetailField, {
867
- label: "Номер звернення",
868
- highlight: ""
869
- }, {
870
- default: R(() => [w(M(r.application.number || "—"), 1)]),
871
- _: 1
872
- }),
873
- C("div", null, [t[9] ||= C("dt", { class: "mb-1 text-xs font-medium text-slate-500" }, "Статус", -1), C("dd", null, [T(r.AppealStatusBadge, {
874
- status: r.application.status || "",
875
- label: r.application.status_data?.text || void 0,
876
- size: "sm"
877
- }, null, 8, ["status", "label"])])]),
878
- T(r.AppealDetailBoolean, {
879
- label: "Внесено в ЄЦТО",
880
- value: r.application.status === "completed" || !!r.application.integrated_at
881
- }, null, 8, ["value"]),
882
- T(r.AppealDetailField, { label: "Перевірив" }, {
883
- default: R(() => [w(M(r.application.verified_by_data?.text || "—"), 1)]),
884
- _: 1
885
- }),
886
- T(r.AppealDetailField, { label: "Вид робіт" }, {
887
- default: R(() => [w(M(r.application.work_type_data?.text || "—"), 1)]),
888
- _: 1
889
- }),
890
- T(r.AppealDetailField, {
891
- label: "Опис запиту",
892
- full: ""
893
- }, {
894
- default: R(() => [w(M(r.application.description || "—"), 1)]),
895
- _: 1
896
- }),
897
- T(r.AppealDetailField, {
898
- label: "Підстава виконання робіт",
899
- full: ""
900
- }, {
901
- default: R(() => [w(M(r.application.execution_basis || "—"), 1)]),
902
- _: 1
903
- }),
904
- T(r.AppealDetailField, {
905
- label: "Примітки",
906
- full: ""
907
- }, {
908
- default: R(() => [w(M(r.application.notes || "—"), 1)]),
909
- _: 1
910
- })
911
- ])]),
912
- _: 1
913
- }),
914
- T(r.AppealDetailSection, { title: "Об'єкт робіт" }, {
915
- icon: R(() => [T(r.AppIcon, {
916
- name: "building-2",
917
- class: "h-[18px] w-[18px]"
918
- })]),
919
- default: R(() => [C("dl", gt, [
920
- T(r.AppealDetailField, {
921
- label: "Площа, га",
922
- highlight: ""
923
- }, {
924
- default: R(() => [w(M(r.application.area ?? "—"), 1)]),
925
- _: 1
926
- }),
927
- r.showAddress ? (k(), b(r.AppealDetailField, {
928
- key: 0,
929
- label: "Адреса",
930
- full: ""
931
- }, {
932
- default: R(() => [w(M(r.address), 1)]),
933
- _: 1
934
- })) : x("", !0),
935
- r.application?.location ? (k(), b(r.AppealDetailField, {
936
- key: 1,
937
- label: "Місцезнаходження",
938
- full: ""
939
- }, {
940
- default: R(() => [w(M(r.application.location || "—"), 1)]),
941
- _: 1
942
- })) : x("", !0)
943
- ])]),
944
- _: 1
945
- }),
946
- T(r.AppealDetailSection, { title: "Дати та етапи" }, {
947
- icon: R(() => [T(r.AppIcon, {
948
- name: "calendar-days",
949
- class: "h-[18px] w-[18px]"
950
- })]),
951
- default: R(() => [C("dl", _t, [
952
- T(r.AppealDetailField, {
953
- label: "Дата прийому заявки",
954
- highlight: ""
955
- }, {
956
- default: R(() => [w(M(r.formatDate(r.application.created_at) || "—"), 1)]),
957
- _: 1
958
- }),
959
- T(r.AppealDetailField, { label: "Дата видачі даних" }, {
960
- default: R(() => [w(M(r.formatDate(r.application.source_data_issued_at) || "—"), 1)]),
961
- _: 1
962
- }),
963
- T(r.AppealDetailField, { label: "Дата скасування" }, {
964
- default: R(() => [w(M(r.formatDate(r.application.cancelled_at) || "—"), 1)]),
965
- _: 1
966
- }),
967
- T(r.AppealDetailField, { label: "Дата прийому даних" }, {
968
- default: R(() => [w(M(r.formatDate(r.application.survey_uploaded_at) || "—"), 1)]),
969
- _: 1
970
- }),
971
- T(r.AppealDetailField, { label: "Дата внесення в ЄЦТО" }, {
972
- default: R(() => [w(M(r.formatDate(r.application.integrated_at) || "—"), 1)]),
973
- _: 1
974
- }),
975
- T(r.AppealDetailField, { label: "Дата перевірки" }, {
976
- default: R(() => [w(M(r.formatDate(r.application.verified_at) || "—"), 1)]),
977
- _: 1
978
- })
979
- ])]),
980
- _: 1
981
- }),
982
- r.application.cancel_reason || r.application.status === "cancelled" ? (k(), b(r.AppealDetailSection, {
983
- key: 0,
984
- title: "Скасування",
985
- danger: ""
986
- }, {
987
- icon: R(() => [T(r.AppIcon, {
988
- name: "ban",
989
- class: "h-[18px] w-[18px]"
990
- })]),
991
- default: R(() => [C("dl", vt, [T(r.AppealDetailField, {
992
- label: "Причина скасування заявки",
993
- full: "",
994
- highlight: ""
995
- }, {
996
- default: R(() => [w(M(r.application.cancel_reason || "Причину не вказано"), 1)]),
997
- _: 1
998
- })])]),
999
- _: 1
1000
- })) : x("", !0),
1001
- T(r.AppealDetailSection, { title: "Інформація про заявника" }, {
1002
- icon: R(() => [T(r.AppIcon, {
1003
- name: "user",
1004
- class: "h-[18px] w-[18px]"
1005
- })]),
1006
- default: R(() => [C("div", yt, [C("dl", bt, [
1007
- T(r.AppealDetailField, {
1008
- label: "ПІБ",
1009
- highlight: "",
1010
- full: ""
1011
- }, {
1012
- default: R(() => [w(M(r.applicantName), 1)]),
1013
- _: 1
1014
- }),
1015
- T(r.AppealDetailField, { label: "Номер сертифікату" }, {
1016
- default: R(() => [w(M(r.surveyor?.certificate_id_data?.text || "—"), 1)]),
1017
- _: 1
1018
- }),
1019
- T(r.AppealDetailField, { label: "Дата сертифікату" }, {
1020
- default: R(() => [w(M(r.certificateDate || "—"), 1)]),
1021
- _: 1
1022
- }),
1023
- T(r.AppealDetailField, { label: "Номер телефону" }, {
1024
- default: R(() => [w(M(r.surveyor?.phone || "—"), 1)]),
1025
- _: 1
1026
- }),
1027
- T(r.AppealDetailField, { label: "Email" }, {
1028
- default: R(() => [w(M(r.surveyor?.email || "—"), 1)]),
1029
- _: 1
1030
- })
1031
- ]), C("div", xt, [t[10] ||= C("h3", { class: "mb-3 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Організація", -1), C("dl", St, [
1032
- T(r.AppealDetailField, {
1033
- label: "Назва організації",
1034
- highlight: "",
1035
- full: ""
1036
- }, {
1037
- default: R(() => [r.organization?.org_id ? (k(), b(r.RouterLink, {
1038
- key: 0,
1039
- to: {
1040
- name: "organization-detail",
1041
- params: { id: r.organization.org_id }
1042
- },
1043
- class: "break-words text-brand-600 hover:text-brand-800 hover:underline"
1044
- }, {
1045
- default: R(() => [w(M(r.organization.name || "—"), 1)]),
1046
- _: 1
1047
- }, 8, ["to"])) : (k(), S("span", Ct, "—"))]),
1048
- _: 1
1049
- }),
1050
- T(r.AppealDetailField, { label: "Телефон організації" }, {
1051
- default: R(() => [w(M(r.organization?.phone || "—"), 1)]),
1052
- _: 1
1053
- }),
1054
- T(r.AppealDetailField, { label: "Email організації" }, {
1055
- default: R(() => [w(M(r.organization?.email || "—"), 1)]),
1056
- _: 1
1057
- }),
1058
- T(r.AppealDetailField, {
1059
- label: "Юридична адреса",
1060
- full: ""
1061
- }, {
1062
- default: R(() => [w(M(r.organization?.legal_address || "—"), 1)]),
1063
- _: 1
1064
- })
1065
- ])])])]),
1066
- _: 1
1067
- }),
1068
- T(r.AppealDetailSection, { title: "Файли" }, {
1069
- icon: R(() => [T(r.AppIcon, {
1070
- name: "file-text",
1071
- class: "h-[18px] w-[18px]"
1072
- })]),
1073
- default: R(() => [
1074
- r.application.status === "reserve" ? (k(), S("p", wt, " Заявка в резерві: доступні лише межі території до зняття просторового конфлікту. ")) : x("", !0),
1075
- r.workflowError ? (k(), S("p", Tt, M(r.workflowError), 1)) : x("", !0),
1076
- r.files.length ? (k(), S("ul", Et, [(k(!0), S(v, null, j(r.files, (e) => (k(), S("li", {
1077
- key: e.id,
1078
- class: "flex items-center justify-between gap-4 py-3 first:pt-0 last:pb-0"
1079
- }, [C("div", $, [C("p", Dt, M(e.label), 1), e.note ? (k(), S("p", Ot, "Примітка: " + M(e.note), 1)) : x("", !0)]), e.action === "download" && (e.href || e.token) ? (k(), S("div", kt, [e.replaceable ? (k(), S("button", {
1080
- key: 0,
1081
- type: "button",
1082
- class: O(r.fileUploadBtnClass),
1083
- disabled: r.workflowBusy,
1084
- onClick: t[0] ||= (e) => {
1085
- r.workflowError = "", r.workflowRef?.openReplaceOutput();
1086
- }
1087
- }, [T(r.AppIcon, {
1088
- name: "upload",
1089
- class: "h-3 w-3"
1090
- }), t[11] ||= w(" Замінити ", -1)], 8, At)) : x("", !0), C("a", {
1091
- href: e.href || (e.token ? r.fileUrl(e.token) : void 0),
1092
- class: O(r.fileDownloadBtnClass)
1093
- }, [T(r.AppIcon, {
1094
- name: "download",
1095
- class: "h-3 w-3"
1096
- }), t[12] ||= w(" Завантажити ", -1)], 8, jt)])) : e.action === "issue" ? (k(), S("button", {
1097
- key: 1,
1098
- type: "button",
1099
- class: O(r.fileUploadBtnClass),
1100
- disabled: r.workflowBusy,
1101
- onClick: t[1] ||= (e) => {
1102
- r.workflowError = "", r.workflowRef?.openIssue();
1103
- }
1104
- }, [T(r.AppIcon, {
1105
- name: "upload",
1106
- class: "h-3 w-3"
1107
- }), t[13] ||= w(" Надіслати ", -1)], 8, Mt)) : e.action === "verify" ? (k(), S("button", {
1108
- key: 2,
1109
- type: "button",
1110
- class: O(r.fileUploadBtnClass),
1111
- disabled: r.workflowBusy,
1112
- onClick: t[2] ||= (e) => r.workflowRef?.openVerify()
1113
- }, [T(r.AppIcon, {
1114
- name: "file-check-2",
1115
- class: "h-3 w-3"
1116
- }), t[14] ||= w(" Перевірити ", -1)], 8, Nt)) : e.action === "complete" ? (k(), S("button", {
1117
- key: 3,
1118
- type: "button",
1119
- class: O(r.fileUploadBtnClass),
1120
- disabled: r.workflowBusy,
1121
- onClick: t[3] ||= (e) => r.workflowRef?.openComplete()
1122
- }, [T(r.AppIcon, {
1123
- name: "circle-check",
1124
- class: "h-3 w-3"
1125
- }), t[15] ||= w(" Підтвердити ", -1)], 8, Pt)) : e.action === "exportVector" ? (k(), S("button", {
1126
- key: 4,
1127
- type: "button",
1128
- class: O(r.fileDownloadBtnClass),
1129
- onClick: t[4] ||= (e) => {
1130
- r.workflowError = "", r.vectorExportOpen = !0;
1131
- }
1132
- }, [T(r.AppIcon, {
1133
- name: "download",
1134
- class: "h-3 w-3"
1135
- }), t[16] ||= w(" Завантажити ", -1)])) : x("", !0)]))), 128))])) : (k(), S("p", Ft, "Файли відсутні."))
1136
- ]),
1137
- _: 1
1138
- }),
1139
- r.application.app_id ? (k(), b(r.ApplicationCommentsSection, {
1140
- key: 1,
1141
- "application-id": r.application.app_id,
1142
- resource: "applications",
1143
- variant: "admin",
1144
- "current-author": r.commentCurrentAuthor,
1145
- "resolve-author": r.resolveNoteAuthor
1146
- }, null, 8, ["application-id", "current-author"])) : x("", !0),
1147
- T(r.ApplicationHistorySection, {
1148
- items: r.application.status_history || [],
1149
- variant: "admin"
1150
- }, null, 8, ["items"])
1151
- ]), C("div", It, [C("div", Lt, [r.showMap && r.application ? (k(), b(r.AppealDetailMap, {
1152
- key: r.application.app_id,
1153
- geom: r.application.geom,
1154
- address: r.address,
1155
- area: r.application.area,
1156
- location: r.application.location,
1157
- variant: "panel"
1158
- }, null, 8, [
1159
- "geom",
1160
- "address",
1161
- "area",
1162
- "location"
1163
- ])) : (k(), S("div", Rt, [T(r.AppIcon, {
1164
- name: "map",
1165
- class: "mb-3 h-8 w-8 text-slate-300"
1166
- }), t[17] ||= C("p", { class: "text-sm text-slate-500" }, "Геометрію заявки не вдалося відобразити", -1)]))])])]),
1167
- r.application.app_id ? (k(), b(r.ApplicationWorkflowActions, {
1168
- key: 0,
1169
- ref: "workflowRef",
1170
- "application-id": r.application.app_id,
1171
- status: r.application.status || "",
1172
- onDone: t[5] ||= (e) => {
1173
- r.workflowError = "", r.workflowBusy = !1, r.loadApplication(r.application.app_id);
1174
- },
1175
- onError: t[6] ||= (e) => r.workflowError = e
1176
- }, null, 8, ["application-id", "status"])) : x("", !0),
1177
- r.application.app_id ? (k(), b(r.ApplicationVectorExportModal, {
1178
- key: 1,
1179
- modelValue: r.vectorExportOpen,
1180
- "onUpdate:modelValue": t[7] ||= (e) => r.vectorExportOpen = e,
1181
- "application-id": r.application.app_id
1182
- }, null, 8, ["modelValue", "application-id"])) : x("", !0)
1183
- ])) : (k(), S("div", zt, [C("p", Bt, M(r.error || "Звернення не знайдено."), 1), T(r.RouterLink, {
1184
- to: r.listPath,
1185
- class: "mt-3 inline-block text-sm font-medium text-brand-600 hover:text-brand-700"
1186
- }, {
1187
- default: R(() => [...t[18] ||= [w(" Повернутися до реєстру ", -1)]]),
1188
- _: 1
1189
- }, 8, ["to"])]));
1190
- }
1191
- var Ht = /*#__PURE__*/ e(rt, [["render", Vt], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/card.vue"]]);
1192
- //#endregion
1193
- export { Ht as default };