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