@opengis/surveyor 0.0.0-stage → 0.0.2
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/CHANGELOG.md +42 -0
- package/README.md +188 -3
- package/dist/chunks/AppIcon-CIR6y5uE.js +85 -0
- package/dist/chunks/AppealDetailField-CI-1qhs3.js +58 -0
- package/dist/chunks/AppealStatusBadge-CSXnfarR.js +132 -0
- package/dist/chunks/AppealStatusBadge-DYBe9hqP.js +171 -0
- package/dist/chunks/ApplicationHistorySection-C0wwhwA4.js +769 -0
- package/dist/chunks/BaseModal-C7PVYz0m.js +85 -0
- package/dist/chunks/FormFilePicker-C3XQw50i.js +76 -0
- package/dist/chunks/MapLayerMenu-DjYCxEc3.js +145 -0
- package/dist/chunks/RegistryForm-CEUqFmsF.js +99 -0
- package/dist/chunks/RegistryFormModal-DfY4z_7r.js +85 -0
- package/dist/chunks/RegistryToolbar-BV4mYVAc.js +452 -0
- package/dist/chunks/UserAccessBadge-D8JfgGfN.js +44 -0
- package/dist/chunks/UserTypeBadge-YIwwoCho.js +188 -0
- package/dist/chunks/VerifiedBadge-Bba8WnuB.js +34 -0
- package/dist/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/chunks/account-types-Br7gx_D_.js +35 -0
- package/dist/chunks/account_types-DLL1w122.js +25 -0
- package/dist/chunks/appealMapLayers-CQMK3rrz.js +115 -0
- package/dist/chunks/application_status-BhNGiY2I.js +45 -0
- package/dist/chunks/applications-BB9JRcgl.js +132 -0
- package/dist/chunks/buildSchema-CccjX9TJ.js +37 -0
- package/dist/chunks/card-B-ftozcq.js +739 -0
- package/dist/chunks/card-BctFHFZe.js +538 -0
- package/dist/chunks/card-CKD1N0QD.js +330 -0
- package/dist/chunks/card-CiNZxAd5.js +297 -0
- package/dist/chunks/card-DUtDfwMk.js +607 -0
- package/dist/chunks/card-fL26_Gvc.js +1189 -0
- package/dist/chunks/certificates-BSd1i0un.js +424 -0
- package/dist/chunks/create-DxMC_IL1.js +1033 -0
- package/dist/chunks/filterQuery-CvfZrkTC.js +99 -0
- package/dist/chunks/form-Bh6i5n1U.js +315 -0
- package/dist/chunks/form-DDjELqZ9.js +89 -0
- package/dist/chunks/geometry-DyhIVRcw.js +67 -0
- package/dist/chunks/map-Z57iMvFb.js +2763 -0
- package/dist/chunks/map-layers-DnmkOEld.js +400 -0
- package/dist/chunks/mapLayersApi-CWoQ2be-.js +251 -0
- package/dist/chunks/organizations-BO1_JETm.js +476 -0
- package/dist/chunks/organizations-BbYipLwk.js +14 -0
- package/dist/chunks/profile-ByahbF4B.js +164 -0
- package/dist/chunks/profile-Dwwn_4Pr.js +243 -0
- package/dist/chunks/requests-BCin936Z.js +232 -0
- package/dist/chunks/requests-CFv5wwAN.js +530 -0
- package/dist/chunks/resendSurveyorRegistration-BHTTVIw1.js +27 -0
- package/dist/chunks/resources-2e8RFqWR.js +129 -0
- package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/chunks/surveyorAccount-C7UiiIYg.js +78 -0
- package/dist/chunks/users-DtTYsgMb.js +291 -0
- package/dist/chunks/work_types-Hwme-FEX.js +34 -0
- package/dist/index.css +3 -0
- package/dist/index.js +336 -0
- package/migrations/20260924120000_surveyor_schema.sql +450 -0
- package/migrations/20261008170000_address_lookup.sql +20 -0
- package/migrations/20261016120000_map_layers.sql +156 -0
- package/migrations/20261016150000_password_reset.sql +15 -0
- package/migrations/20261016170000_address_lookup_format.sql +37 -0
- package/migrations/20261016180000_settlement_lookup.sql +16 -0
- package/migrations/20261019170000_actor_lookup.sql +15 -0
- package/package.json +86 -6
- package/plugin.d.ts +15 -0
- package/plugin.js +8 -0
- package/server/app.ts +51 -0
- package/server/dictionaries/index.ts +17 -0
- package/server/dictionaries/surveyor/account_types.ts +12 -0
- package/server/dictionaries/surveyor/application_status.ts +16 -0
- package/server/dictionaries/surveyor/map_layer_components.ts +11 -0
- package/server/dictionaries/surveyor/map_layer_groups.ts +10 -0
- package/server/dictionaries/surveyor/map_layer_types.ts +11 -0
- package/server/dictionaries/surveyor/work_types.ts +15 -0
- package/server/dictionaries/surveyor/yes_no.ts +11 -0
- package/server/fastify.d.ts +12 -0
- package/server/index.ts +23 -0
- package/server/modules/surveyor/route.ts +410 -0
- package/server/modules/surveyor/schema.ts +439 -0
- package/server/modules/surveyor/services/applicationTile.ts +53 -0
- package/server/modules/surveyor/services/cancelApplication.ts +74 -0
- package/server/modules/surveyor/services/changeSurveyorPassword.ts +52 -0
- package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -0
- package/server/modules/surveyor/services/completeApplication.ts +46 -0
- package/server/modules/surveyor/services/completeSurveyorRegistration.ts +48 -0
- package/server/modules/surveyor/services/createApplication.ts +169 -0
- package/server/modules/surveyor/services/geometryExport.ts +34 -0
- package/server/modules/surveyor/services/geometryImport.ts +66 -0
- package/server/modules/surveyor/services/getSurveyorUser.ts +56 -0
- package/server/modules/surveyor/services/identifyApplications.ts +82 -0
- package/server/modules/surveyor/services/issueSourceData.ts +55 -0
- package/server/modules/surveyor/services/loginSurveyor.ts +67 -0
- package/server/modules/surveyor/services/mapLayers.ts +61 -0
- package/server/modules/surveyor/services/rasterExport.ts +15 -0
- package/server/modules/surveyor/services/registerSurveyor.ts +161 -0
- package/server/modules/surveyor/services/requestPasswordReset.ts +49 -0
- package/server/modules/surveyor/services/resendRegistration.ts +42 -0
- package/server/modules/surveyor/services/resetSurveyorPassword.ts +53 -0
- package/server/modules/surveyor/services/searchApplications.ts +63 -0
- package/server/modules/surveyor/services/submitSurvey.ts +70 -0
- package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +52 -0
- package/server/modules/surveyor/services/updateSurveyorStatus.ts +53 -0
- package/server/modules/surveyor/services/vectorExport.ts +86 -0
- package/server/modules/surveyor/services/verifyApplication.ts +59 -0
- package/server/modules/surveyor/utils/accessibleApplication.ts +37 -0
- package/server/modules/surveyor/utils/application.ts +68 -0
- package/server/modules/surveyor/utils/export.ts +39 -0
- package/server/modules/surveyor/utils/firstBoundary.ts +48 -0
- package/server/modules/surveyor/utils/mail.ts +161 -0
- package/server/modules/surveyor/utils/permissions.ts +29 -0
- package/server/modules/surveyor/utils/registration.ts +33 -0
- package/server/modules/surveyor/utils/shared.ts +305 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_registration.pt.hbs +80 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_send_mail.pt.hbs +79 -0
- package/server/modules/surveyor/utils/vectorLayer.ts +41 -0
- package/server/plugins/convertVector.ts +74 -0
- package/server/plugins/proto/convertVector.proto +21 -0
- package/server/plugins/swagger.ts +54 -0
- package/server/plugins/vite.dev.ts +52 -0
- package/server/plugins/vite.prod.ts +55 -0
- package/server/resources/helpers/actor_lookup.ts +5 -0
- package/server/resources/helpers/address_lookup.ts +8 -0
- package/server/resources/helpers/settlement_lookup.ts +7 -0
- package/server/resources/helpers/user_lookup.ts +5 -0
- package/server/resources/index.ts +30 -0
- package/server/resources/surveyor-admin/application_comments.ts +24 -0
- package/server/resources/surveyor-admin/application_status_history.ts +46 -0
- package/server/resources/surveyor-admin/applications.ts +125 -0
- package/server/resources/surveyor-admin/certificates.ts +87 -0
- package/server/resources/surveyor-admin/map_layers.ts +69 -0
- package/server/resources/surveyor-admin/organization_surveyors.ts +32 -0
- package/server/resources/surveyor-admin/organizations.ts +61 -0
- package/server/resources/surveyor-admin/surveyors.ts +71 -0
- package/server/resources/surveyor-user/application_status_history.ts +52 -0
- package/server/resources/surveyor-user/applications.ts +131 -0
- package/server/resources/surveyor-user/certificates.ts +67 -0
- package/server/resources/surveyor-user/organizations.ts +40 -0
- package/server/resources/surveyor-user/surveyors.ts +69 -0
- package/server/suggests/index.ts +17 -0
- package/server/tsconfig.json +3 -0
- package/surveyor-types.d.ts +30 -0
|
@@ -0,0 +1,1189 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { t } from "./AppIcon-CIR6y5uE.js";
|
|
3
|
+
import { a as n, c as r, l as i, o as a, s as o } from "./resources-2e8RFqWR.js";
|
|
4
|
+
import { n as s, t as c } from "./AppealDetailField-CI-1qhs3.js";
|
|
5
|
+
import { t as l } from "./BaseModal-C7PVYz0m.js";
|
|
6
|
+
import { t as u } from "./AppealStatusBadge-DYBe9hqP.js";
|
|
7
|
+
import { r as d } from "./geometry-DyhIVRcw.js";
|
|
8
|
+
import { i as f, n as p, r as m, t as h } from "./ApplicationHistorySection-C0wwhwA4.js";
|
|
9
|
+
import { Fragment as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, mergeModels as T, normalizeClass as E, openBlock as D, ref as O, renderList as k, toDisplayString as A, useModel as j, vModelRadio as M, vModelSelect as N, vModelText as P, watch as F, withCtx as I, withDirectives as L } from "vue";
|
|
10
|
+
import { RouterLink as R, useRoute as z } from "vue-router";
|
|
11
|
+
//#region admin/src/pages/requests/components/AppealDetailBoolean.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var B = /*@__PURE__*/ w({
|
|
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
|
+
}), V = { class: "mb-1 text-xs font-medium text-slate-500" }, H = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "inline-flex items-center gap-1.5 text-[14px] font-medium text-success-700"
|
|
35
|
+
}, U = {
|
|
36
|
+
key: 1,
|
|
37
|
+
class: "inline-flex items-center gap-1.5 text-[14px] font-medium text-slate-400"
|
|
38
|
+
};
|
|
39
|
+
function W(e, t, n, r, i, a) {
|
|
40
|
+
return D(), b("div", null, [x("dt", V, A(n.label), 1), x("dd", null, [n.value ? (D(), b("span", H, [C(r.AppIcon, {
|
|
41
|
+
name: "circle-check",
|
|
42
|
+
class: "h-4 w-4"
|
|
43
|
+
}), t[0] ||= S(" Так ", -1)])) : (D(), b("span", U, [C(r.AppIcon, {
|
|
44
|
+
name: "circle-x",
|
|
45
|
+
class: "h-4 w-4"
|
|
46
|
+
}), t[1] ||= S(" Ні ", -1)]))])]);
|
|
47
|
+
}
|
|
48
|
+
var ee = /*#__PURE__*/ e(B, [["render", W], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/components/AppealDetailBoolean.vue"]]), te = /*@__PURE__*/ w({
|
|
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 = O(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
|
+
F(() => 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
|
+
}), ne = { 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" }, re = { class: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between" }, G = { class: "flex min-w-0 flex-1 items-center gap-3" }, K = { 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" }, q = { class: "min-w-0" }, J = {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: "truncate text-sm font-medium text-slate-800"
|
|
94
|
+
}, Y = {
|
|
95
|
+
key: 1,
|
|
96
|
+
class: "text-sm text-slate-400"
|
|
97
|
+
}, X = ["accept"];
|
|
98
|
+
function ie(e, t, n, r, i, a) {
|
|
99
|
+
return D(), b("div", ne, [x("div", re, [x("div", G, [x("span", K, [C(r.AppIcon, {
|
|
100
|
+
name: "file-text",
|
|
101
|
+
class: "h-[18px] w-[18px]"
|
|
102
|
+
})]), x("div", q, [n.fileName ? (D(), b("p", J, A(n.fileName), 1)) : (D(), b("p", Y, "Файл не обрано")), t[0] ||= x("p", { class: "mt-0.5 text-xs text-slate-400" }, "ZIP, GeoJSON або інший дозволений формат", -1)])]), x("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
|
+
}, [C(r.AppIcon, {
|
|
107
|
+
name: "upload",
|
|
108
|
+
class: "h-4 w-4 text-brand-500"
|
|
109
|
+
}), S(" " + A(n.buttonLabel ?? "Обрати файл"), 1)])]), x("input", {
|
|
110
|
+
ref: "inputRef",
|
|
111
|
+
type: "file",
|
|
112
|
+
class: "hidden",
|
|
113
|
+
accept: n.accept,
|
|
114
|
+
onChange: r.onInputChange
|
|
115
|
+
}, null, 40, X)]);
|
|
116
|
+
}
|
|
117
|
+
var ae = /*#__PURE__*/ e(te, [["render", ie], ["__file", "D:/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(o(`/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(), a = i.file_path ?? i.path;
|
|
136
|
+
if (!a) throw Error("Сервер не повернув шлях до файлу");
|
|
137
|
+
return {
|
|
138
|
+
file_path: a,
|
|
139
|
+
token: i.token
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function oe(e) {
|
|
143
|
+
return o(`/api/surveyor/applications/${encodeURIComponent(e)}/export/geometry`);
|
|
144
|
+
}
|
|
145
|
+
async function se(e, t) {
|
|
146
|
+
let n = await fetch(o(`/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), a = decodeURIComponent(i?.[1]?.replace(/"/g, "") ?? `vector_${e}.geojson`), s = URL.createObjectURL(r), c = document.createElement("a");
|
|
162
|
+
c.href = s, c.download = a, c.click(), URL.revokeObjectURL(s);
|
|
163
|
+
}
|
|
164
|
+
async function ce(e, t, r) {
|
|
165
|
+
return n(`/api/surveyor/applications/${encodeURIComponent(e)}/upload-source-data`, {
|
|
166
|
+
method: "POST",
|
|
167
|
+
body: JSON.stringify({
|
|
168
|
+
file_path: t,
|
|
169
|
+
...r?.trim() ? { note: r.trim() } : {}
|
|
170
|
+
})
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
async function le(e, t) {
|
|
174
|
+
return a(Z, e, { file_output: t });
|
|
175
|
+
}
|
|
176
|
+
async function ue(e, t) {
|
|
177
|
+
return n(`/api/surveyor/applications/${encodeURIComponent(e)}/verify`, {
|
|
178
|
+
method: "POST",
|
|
179
|
+
body: JSON.stringify(t)
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
async function de(e) {
|
|
183
|
+
return n(`/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 fe = /*@__PURE__*/ w({
|
|
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 = O(!1), o = O(""), s = O(!1), c = O("issue"), u = O(""), d = O(null), f = O(""), p = O(!1), m = O(""), h = 0, g = O(!1), v = O("verified"), y = O(""), b = O(null), x = O(""), S = O(!1), C = O(""), w = 0, T = O(!1), E = _(() => r.status === "awaitingData"), D = _(() => r.status === "underReview"), k = _(() => r.status === "verified");
|
|
202
|
+
function A() {
|
|
203
|
+
o.value = "";
|
|
204
|
+
}
|
|
205
|
+
function j() {
|
|
206
|
+
d.value = null, f.value = "", m.value = "", p.value = !1, u.value = "", h += 1;
|
|
207
|
+
}
|
|
208
|
+
function M() {
|
|
209
|
+
b.value = null, x.value = "", C.value = "", S.value = !1, y.value = "", w += 1;
|
|
210
|
+
}
|
|
211
|
+
F(s, (e) => {
|
|
212
|
+
e || j();
|
|
213
|
+
}), F(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
|
+
A(), j(), c.value = "issue", s.value = !0;
|
|
229
|
+
}
|
|
230
|
+
function I() {
|
|
231
|
+
A(), j(), c.value = "replace", s.value = !0;
|
|
232
|
+
}
|
|
233
|
+
function L() {
|
|
234
|
+
A(), M(), g.value = !0;
|
|
235
|
+
}
|
|
236
|
+
function R() {
|
|
237
|
+
A(), 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 le(r.applicationId, f.value) : await ce(r.applicationId, f.value, u.value), s.value = !1;
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
async function H() {
|
|
279
|
+
if (v.value === "dataIssued" && !y.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 ue(r.applicationId, {
|
|
289
|
+
status: v.value,
|
|
290
|
+
...x.value ? { file_path: x.value } : {},
|
|
291
|
+
...v.value === "dataIssued" || y.value.trim() ? { note_4_file_corrected_geodetic_survey: y.value.trim() } : {}
|
|
292
|
+
}), g.value = !1;
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
async function U() {
|
|
296
|
+
await N(async () => {
|
|
297
|
+
await de(r.applicationId), T.value = !1;
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
t({
|
|
301
|
+
openIssue: P,
|
|
302
|
+
openReplaceOutput: I,
|
|
303
|
+
openVerify: L,
|
|
304
|
+
openComplete: R,
|
|
305
|
+
canIssue: E,
|
|
306
|
+
canVerify: D,
|
|
307
|
+
canComplete: k,
|
|
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: u,
|
|
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: v,
|
|
331
|
+
verifyNote: y,
|
|
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: k,
|
|
346
|
+
resetErrors: A,
|
|
347
|
+
resetIssueModal: j,
|
|
348
|
+
resetVerifyModal: M,
|
|
349
|
+
runAction: N,
|
|
350
|
+
openIssue: P,
|
|
351
|
+
openReplaceOutput: I,
|
|
352
|
+
openVerify: L,
|
|
353
|
+
openComplete: R,
|
|
354
|
+
onIssueFileChange: z,
|
|
355
|
+
onVerifyFileChange: B,
|
|
356
|
+
submitIssue: V,
|
|
357
|
+
submitVerify: H,
|
|
358
|
+
submitComplete: U,
|
|
359
|
+
BaseModal: l,
|
|
360
|
+
FormFilePicker: ae
|
|
361
|
+
};
|
|
362
|
+
return Object.defineProperty(W, "__isScriptSetup", {
|
|
363
|
+
enumerable: !1,
|
|
364
|
+
value: !0
|
|
365
|
+
}), W;
|
|
366
|
+
}
|
|
367
|
+
}), pe = { class: "space-y-4" }, me = {
|
|
368
|
+
key: 0,
|
|
369
|
+
class: "mt-1.5 text-xs text-danger-700"
|
|
370
|
+
}, he = {
|
|
371
|
+
key: 1,
|
|
372
|
+
class: "mt-1.5 text-xs text-emerald-700"
|
|
373
|
+
}, ge = { key: 0 }, _e = {
|
|
374
|
+
key: 1,
|
|
375
|
+
class: "text-xs text-danger-700"
|
|
376
|
+
}, ve = { class: "flex justify-end gap-2" }, ye = ["disabled"], be = { class: "space-y-4" }, xe = { class: "flex gap-4 text-sm" }, Se = { class: "flex items-center gap-2" }, Ce = { class: "flex items-center gap-2" }, we = { class: "mb-1 block text-xs font-medium text-slate-500" }, Te = {
|
|
377
|
+
key: 0,
|
|
378
|
+
class: "mt-1.5 text-xs text-danger-700"
|
|
379
|
+
}, Ee = {
|
|
380
|
+
key: 1,
|
|
381
|
+
class: "mt-1.5 text-xs text-emerald-700"
|
|
382
|
+
}, De = {
|
|
383
|
+
key: 0,
|
|
384
|
+
class: "text-xs text-danger-700"
|
|
385
|
+
}, Oe = { class: "flex justify-end gap-2" }, ke = ["disabled"], Ae = { class: "flex justify-end gap-2" }, je = ["disabled"];
|
|
386
|
+
function Me(e, t, n, r, i, a) {
|
|
387
|
+
return D(), b(g, null, [
|
|
388
|
+
C(r.BaseModal, {
|
|
389
|
+
modelValue: r.issueOpen,
|
|
390
|
+
"onUpdate:modelValue": t[2] ||= (e) => r.issueOpen = e,
|
|
391
|
+
title: r.issueMode === "replace" ? "Заміна вихідних даних" : "Видача вихідних даних"
|
|
392
|
+
}, {
|
|
393
|
+
footer: I(() => [x("div", ve, [x("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
|
+
}, "Скасувати"), x("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
|
+
}, A(r.issueMode === "replace" ? "Зберегти" : "Видати"), 9, ye)])]),
|
|
403
|
+
default: I(() => [x("div", pe, [
|
|
404
|
+
x("div", null, [
|
|
405
|
+
t[10] ||= x("label", { class: "mb-1.5 block text-xs font-medium text-slate-500" }, "Файл", -1),
|
|
406
|
+
C(r.FormFilePicker, {
|
|
407
|
+
"file-name": r.issueUploadBusy ? "Завантаження…" : r.issueFile?.name,
|
|
408
|
+
onChange: r.onIssueFileChange
|
|
409
|
+
}, null, 8, ["file-name"]),
|
|
410
|
+
r.issueUploadError ? (D(), b("p", me, A(r.issueUploadError), 1)) : r.issueUploadedPath ? (D(), b("p", he, "Файл завантажено")) : y("", !0)
|
|
411
|
+
]),
|
|
412
|
+
r.issueMode === "issue" ? (D(), b("div", ge, [t[11] ||= x("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Примітка", -1), L(x("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), [[P, r.issueNote]])])) : y("", !0),
|
|
417
|
+
r.actionError ? (D(), b("p", _e, A(r.actionError), 1)) : y("", !0)
|
|
418
|
+
])]),
|
|
419
|
+
_: 1
|
|
420
|
+
}, 8, ["modelValue", "title"]),
|
|
421
|
+
C(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: I(() => [x("div", Oe, [x("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
|
+
}, "Скасувати"), x("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, ke)])]),
|
|
437
|
+
default: I(() => [x("div", be, [
|
|
438
|
+
x("div", xe, [x("label", Se, [L(x("input", {
|
|
439
|
+
"onUpdate:modelValue": t[3] ||= (e) => r.verifyDecision = e,
|
|
440
|
+
type: "radio",
|
|
441
|
+
value: "verified"
|
|
442
|
+
}, null, 512), [[M, r.verifyDecision]]), t[12] ||= S(" Прийняти ", -1)]), x("label", Ce, [L(x("input", {
|
|
443
|
+
"onUpdate:modelValue": t[4] ||= (e) => r.verifyDecision = e,
|
|
444
|
+
type: "radio",
|
|
445
|
+
value: "dataIssued"
|
|
446
|
+
}, null, 512), [[M, r.verifyDecision]]), t[13] ||= S(" На доопрацювання ", -1)])]),
|
|
447
|
+
x("div", null, [x("label", we, A(r.verifyDecision === "dataIssued" ? "Причина (обовʼязково)" : "Примітка"), 1), L(x("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), [[P, r.verifyNote]])]),
|
|
452
|
+
x("div", null, [
|
|
453
|
+
t[14] ||= x("label", { class: "mb-1.5 block text-xs font-medium text-slate-500" }, "Виправлений файл (за потреби)", -1),
|
|
454
|
+
C(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 ? (D(), b("p", Te, A(r.verifyUploadError), 1)) : r.verifyUploadedPath ? (D(), b("p", Ee, "Файл завантажено")) : y("", !0)
|
|
460
|
+
]),
|
|
461
|
+
r.actionError ? (D(), b("p", De, A(r.actionError), 1)) : y("", !0)
|
|
462
|
+
])]),
|
|
463
|
+
_: 1
|
|
464
|
+
}, 8, ["modelValue"]),
|
|
465
|
+
C(r.BaseModal, {
|
|
466
|
+
modelValue: r.completeOpen,
|
|
467
|
+
"onUpdate:modelValue": t[9] ||= (e) => r.completeOpen = e,
|
|
468
|
+
title: "Завершення заявки"
|
|
469
|
+
}, {
|
|
470
|
+
footer: I(() => [x("div", Ae, [x("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
|
+
}, "Скасувати"), x("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, je)])]),
|
|
480
|
+
default: I(() => [t[15] ||= x("p", { class: "text-sm text-slate-600" }, "Підтвердити внесення результатів до ЄЦТО та завершення заявки?", -1)]),
|
|
481
|
+
_: 1
|
|
482
|
+
}, 8, ["modelValue"])
|
|
483
|
+
], 64);
|
|
484
|
+
}
|
|
485
|
+
var Ne = /*#__PURE__*/ e(fe, [["render", Me], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/components/ApplicationWorkflowActions.vue"]]), Pe = "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", Fe = "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", Ie = /*@__PURE__*/ w({
|
|
486
|
+
__name: "ApplicationVectorExportModal",
|
|
487
|
+
props: /*@__PURE__*/ T({ 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, a = j(e, "modelValue"), s = O(""), c = O(100), u = O("EPSG:4326"), d = O(!1), f = O(""), p = O(!1), m = O([]), 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, u.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(o(`/api/suggest/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
|
+
F(a, (e) => {
|
|
530
|
+
e && (g(), _());
|
|
531
|
+
}), F([
|
|
532
|
+
s,
|
|
533
|
+
c,
|
|
534
|
+
u
|
|
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 se(r.applicationId, {
|
|
553
|
+
layer_id: e,
|
|
554
|
+
buffer: t,
|
|
555
|
+
crs: u.value
|
|
556
|
+
}), a.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: a,
|
|
566
|
+
layerId: s,
|
|
567
|
+
bufferMeters: c,
|
|
568
|
+
crs: u,
|
|
569
|
+
busy: d,
|
|
570
|
+
error: f,
|
|
571
|
+
layersLoading: p,
|
|
572
|
+
layerOptions: m,
|
|
573
|
+
CRS_OPTIONS: h,
|
|
574
|
+
fieldClass: Pe,
|
|
575
|
+
selectFieldClass: Fe,
|
|
576
|
+
resetForm: g,
|
|
577
|
+
loadLayers: _,
|
|
578
|
+
submit: v,
|
|
579
|
+
BaseModal: l,
|
|
580
|
+
AppIcon: t
|
|
581
|
+
};
|
|
582
|
+
return Object.defineProperty(y, "__isScriptSetup", {
|
|
583
|
+
enumerable: !1,
|
|
584
|
+
value: !0
|
|
585
|
+
}), y;
|
|
586
|
+
}
|
|
587
|
+
}), Le = { class: "space-y-4" }, Re = { class: "relative" }, ze = ["disabled"], Be = {
|
|
588
|
+
value: "",
|
|
589
|
+
disabled: ""
|
|
590
|
+
}, Ve = ["value"], He = {
|
|
591
|
+
key: 0,
|
|
592
|
+
class: "mt-1.5 text-xs text-slate-400"
|
|
593
|
+
}, Ue = ["disabled"], We = { class: "relative" }, Ge = ["disabled"], Ke = ["value"], qe = {
|
|
594
|
+
key: 0,
|
|
595
|
+
class: "text-xs text-danger-700"
|
|
596
|
+
}, Je = { class: "flex justify-end gap-2" }, Ye = ["disabled"], Xe = ["disabled"];
|
|
597
|
+
function Ze(e, t, n, r, i, a) {
|
|
598
|
+
return D(), v(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: I(() => [x("div", Je, [x("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, Ye), x("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
|
+
}, A(r.busy ? "Експорт…" : "Завантажити"), 9, Xe)])]),
|
|
615
|
+
default: I(() => [x("div", Le, [
|
|
616
|
+
x("div", null, [
|
|
617
|
+
t[5] ||= x("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Шар", -1),
|
|
618
|
+
x("div", Re, [L(x("select", {
|
|
619
|
+
"onUpdate:modelValue": t[0] ||= (e) => r.layerId = e,
|
|
620
|
+
class: E(r.selectFieldClass),
|
|
621
|
+
disabled: r.layersLoading || r.busy || !r.layerOptions.length
|
|
622
|
+
}, [x("option", Be, A(r.layersLoading ? "Завантаження…" : "Оберіть шар"), 1), (D(!0), b(g, null, k(r.layerOptions, (e) => (D(), b("option", {
|
|
623
|
+
key: e.id,
|
|
624
|
+
value: e.id
|
|
625
|
+
}, A(e.label), 9, Ve))), 128))], 8, ze), [[N, r.layerId]]), C(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 ? (D(), b("p", He, " Шари не знайдено. ")) : y("", !0)
|
|
630
|
+
]),
|
|
631
|
+
x("div", null, [t[6] ||= x("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Буфер, м", -1), L(x("input", {
|
|
632
|
+
"onUpdate:modelValue": t[1] ||= (e) => r.bufferMeters = e,
|
|
633
|
+
type: "number",
|
|
634
|
+
min: "0",
|
|
635
|
+
step: "1",
|
|
636
|
+
class: E(r.fieldClass),
|
|
637
|
+
disabled: r.busy
|
|
638
|
+
}, null, 8, Ue), [[
|
|
639
|
+
P,
|
|
640
|
+
r.bufferMeters,
|
|
641
|
+
void 0,
|
|
642
|
+
{ number: !0 }
|
|
643
|
+
]])]),
|
|
644
|
+
x("div", null, [t[7] ||= x("label", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Система координат", -1), x("div", We, [L(x("select", {
|
|
645
|
+
"onUpdate:modelValue": t[2] ||= (e) => r.crs = e,
|
|
646
|
+
class: E(r.selectFieldClass),
|
|
647
|
+
disabled: r.busy
|
|
648
|
+
}, [(D(), b(g, null, k(r.CRS_OPTIONS, (e) => x("option", {
|
|
649
|
+
key: e.id,
|
|
650
|
+
value: e.id
|
|
651
|
+
}, A(e.label), 9, Ke)), 64))], 8, Ge), [[N, r.crs]]), C(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 ? (D(), b("p", qe, A(r.error), 1)) : y("", !0)
|
|
656
|
+
])]),
|
|
657
|
+
_: 1
|
|
658
|
+
}, 8, ["modelValue"]);
|
|
659
|
+
}
|
|
660
|
+
var Qe = /*#__PURE__*/ e(Ie, [["render", Ze], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/components/ApplicationVectorExportModal.vue"]]), $e = "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", et = "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", tt = /*@__PURE__*/ w({
|
|
661
|
+
__name: "card",
|
|
662
|
+
setup(e, { expose: i }) {
|
|
663
|
+
i();
|
|
664
|
+
let a = z(), o = O(null), l = O(""), g = O(!1), v = O(""), y = O(null), b = O(""), x = O(!1), S = O(!1), C = _(() => N(o.value?.organization)), w = _(() => N(o.value?.surveyor)), T = _(() => {
|
|
665
|
+
let e = w.value;
|
|
666
|
+
return e && [
|
|
667
|
+
e.last_name,
|
|
668
|
+
e.first_name,
|
|
669
|
+
e.middle_name
|
|
670
|
+
].filter(Boolean).join(" ") || "—";
|
|
671
|
+
}), E = _(() => ({
|
|
672
|
+
name: "Адміністратор",
|
|
673
|
+
role: "Перевірка",
|
|
674
|
+
initials: "АД"
|
|
675
|
+
}));
|
|
676
|
+
function D(e) {
|
|
677
|
+
let t = T.value === "—" ? "Заявник" : T.value, n = {
|
|
678
|
+
name: t,
|
|
679
|
+
role: "Заявник",
|
|
680
|
+
initials: m(t)
|
|
681
|
+
};
|
|
682
|
+
if (!e.created_by) return n;
|
|
683
|
+
if (e.created_by === r.currentUser?.id) return E.value;
|
|
684
|
+
let i = w.value?.surveyor_id;
|
|
685
|
+
return i && e.created_by === i ? n : E.value;
|
|
686
|
+
}
|
|
687
|
+
let k = _(() => o.value?.address_id_data?.text || "—"), A = _(() => o.value?.is_found_address_id === !0 || !!o.value?.address_id_data?.text?.trim()), j = _(() => d(o.value?.geom)), M = _(() => {
|
|
688
|
+
let e = o.value;
|
|
689
|
+
if (!e) return [];
|
|
690
|
+
let t = [];
|
|
691
|
+
return d(e.geom) && (t.push({
|
|
692
|
+
id: "geometry",
|
|
693
|
+
label: "Межі заявки",
|
|
694
|
+
href: oe(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 N(e) {
|
|
732
|
+
return Array.isArray(e) ? e[0] ?? null : e ?? null;
|
|
733
|
+
}
|
|
734
|
+
function P(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 I(e) {
|
|
740
|
+
return `/api/file/${encodeURIComponent(e)}?download=true`;
|
|
741
|
+
}
|
|
742
|
+
async function L(e) {
|
|
743
|
+
if (l.value = "", e) try {
|
|
744
|
+
let t = await n(`/api/resource/certificates/${encodeURIComponent(e)}`);
|
|
745
|
+
l.value = P(t.date_certificate);
|
|
746
|
+
} catch {
|
|
747
|
+
l.value = "";
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
async function B(e) {
|
|
751
|
+
g.value = !0, v.value = "", o.value = null, l.value = "";
|
|
752
|
+
try {
|
|
753
|
+
o.value = await n(`/api/resource/applications/${encodeURIComponent(e)}?include=organization,surveyor,history&limit=100`), await L(N(o.value.surveyor)?.certificate_id);
|
|
754
|
+
} catch (e) {
|
|
755
|
+
o.value = null, v.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
|
|
756
|
+
} finally {
|
|
757
|
+
g.value = !1;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
F(() => String(a.params.number), (e) => {
|
|
761
|
+
e && B(e);
|
|
762
|
+
}, { immediate: !0 });
|
|
763
|
+
let V = {
|
|
764
|
+
route: a,
|
|
765
|
+
application: o,
|
|
766
|
+
certificateDate: l,
|
|
767
|
+
loading: g,
|
|
768
|
+
error: v,
|
|
769
|
+
workflowRef: y,
|
|
770
|
+
workflowError: b,
|
|
771
|
+
workflowBusy: x,
|
|
772
|
+
vectorExportOpen: S,
|
|
773
|
+
organization: C,
|
|
774
|
+
surveyor: w,
|
|
775
|
+
applicantName: T,
|
|
776
|
+
commentCurrentAuthor: E,
|
|
777
|
+
resolveNoteAuthor: D,
|
|
778
|
+
address: k,
|
|
779
|
+
showAddress: A,
|
|
780
|
+
showMap: j,
|
|
781
|
+
files: M,
|
|
782
|
+
fileDownloadBtnClass: $e,
|
|
783
|
+
fileUploadBtnClass: et,
|
|
784
|
+
firstRelation: N,
|
|
785
|
+
formatDate: P,
|
|
786
|
+
fileUrl: I,
|
|
787
|
+
loadCertificateDate: L,
|
|
788
|
+
loadApplication: B,
|
|
789
|
+
AppIcon: t,
|
|
790
|
+
get RouterLink() {
|
|
791
|
+
return R;
|
|
792
|
+
},
|
|
793
|
+
AppealStatusBadge: u,
|
|
794
|
+
AppealDetailSection: s,
|
|
795
|
+
AppealDetailField: c,
|
|
796
|
+
AppealDetailBoolean: ee,
|
|
797
|
+
AppealDetailMap: f,
|
|
798
|
+
ApplicationCommentsSection: p,
|
|
799
|
+
ApplicationHistorySection: h,
|
|
800
|
+
ApplicationWorkflowActions: Ne,
|
|
801
|
+
ApplicationVectorExportModal: Qe
|
|
802
|
+
};
|
|
803
|
+
return Object.defineProperty(V, "__isScriptSetup", {
|
|
804
|
+
enumerable: !1,
|
|
805
|
+
value: !0
|
|
806
|
+
}), V;
|
|
807
|
+
}
|
|
808
|
+
}), nt = {
|
|
809
|
+
key: 0,
|
|
810
|
+
class: "px-4 py-16 text-center text-sm text-slate-400"
|
|
811
|
+
}, rt = { key: 1 }, it = { class: "mb-6 pl-8 lg:pl-0" }, at = { class: "mb-4 flex items-center gap-1.5 text-sm" }, ot = { class: "font-medium text-slate-700" }, st = { class: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between" }, ct = { class: "flex flex-col gap-1.5" }, lt = { class: "text-xl font-bold tracking-tight text-slate-900" }, ut = { class: "text-sm font-medium text-slate-500" }, dt = { class: "grid grid-cols-1 items-start gap-5 xl:grid-cols-[minmax(0,1fr)_420px]" }, ft = { class: "flex flex-col gap-5" }, pt = { class: "grid grid-cols-2 gap-x-6 gap-y-4" }, mt = { class: "grid grid-cols-2 gap-x-6 gap-y-4" }, ht = { class: "grid grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3" }, gt = { class: "grid grid-cols-1 gap-y-3" }, _t = { class: "grid min-w-0 grid-cols-1 gap-6 xl:grid-cols-2" }, vt = { class: "grid min-w-0 grid-cols-1 gap-x-5 gap-y-3.5 sm:grid-cols-2" }, yt = { class: "min-w-0 border-t border-slate-100 pt-6 xl:border-l xl:border-t-0 xl:pl-6 xl:pt-0" }, bt = { class: "grid min-w-0 grid-cols-1 gap-x-5 gap-y-3.5 sm:grid-cols-2" }, xt = { key: 1 }, St = {
|
|
812
|
+
key: 0,
|
|
813
|
+
class: "mb-3 text-xs text-slate-500"
|
|
814
|
+
}, Ct = {
|
|
815
|
+
key: 1,
|
|
816
|
+
class: "mb-3 text-xs text-danger-700"
|
|
817
|
+
}, wt = {
|
|
818
|
+
key: 2,
|
|
819
|
+
class: "divide-y divide-slate-100"
|
|
820
|
+
}, Tt = { class: "min-w-0" }, Et = { class: "break-words text-sm font-medium text-slate-800" }, $ = {
|
|
821
|
+
key: 0,
|
|
822
|
+
class: "mt-0.5 text-xs text-slate-400"
|
|
823
|
+
}, Dt = {
|
|
824
|
+
key: 0,
|
|
825
|
+
class: "flex shrink-0 items-center gap-2"
|
|
826
|
+
}, Ot = ["disabled"], kt = ["href"], At = ["disabled"], jt = ["disabled"], Mt = ["disabled"], Nt = {
|
|
827
|
+
key: 3,
|
|
828
|
+
class: "text-sm text-slate-400"
|
|
829
|
+
}, Pt = { class: "xl:sticky xl:top-6 xl:self-start" }, Ft = { class: "h-[600px] xl:h-[calc(100vh-3rem)] xl:max-h-[760px]" }, It = {
|
|
830
|
+
key: 1,
|
|
831
|
+
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"
|
|
832
|
+
}, Lt = {
|
|
833
|
+
key: 2,
|
|
834
|
+
class: "rounded-xl border border-slate-200 bg-white px-6 py-16 text-center shadow-card"
|
|
835
|
+
}, Rt = { class: "text-sm text-slate-500" };
|
|
836
|
+
function zt(e, t, n, r, i, a) {
|
|
837
|
+
return r.loading ? (D(), b("div", nt, " Завантаження… ")) : r.application ? (D(), b("div", rt, [
|
|
838
|
+
x("div", it, [x("nav", at, [
|
|
839
|
+
C(r.RouterLink, {
|
|
840
|
+
to: "/requests",
|
|
841
|
+
class: "flex items-center gap-1 text-slate-400 transition-colors hover:text-brand-600"
|
|
842
|
+
}, {
|
|
843
|
+
default: I(() => [C(r.AppIcon, {
|
|
844
|
+
name: "home",
|
|
845
|
+
class: "h-3.5 w-3.5"
|
|
846
|
+
}), t[8] ||= S(" Звернення ", -1)]),
|
|
847
|
+
_: 1
|
|
848
|
+
}),
|
|
849
|
+
C(r.AppIcon, {
|
|
850
|
+
name: "chevron-right",
|
|
851
|
+
class: "h-3.5 w-3.5 text-slate-300"
|
|
852
|
+
}),
|
|
853
|
+
x("span", ot, A(r.application.number || "—"), 1)
|
|
854
|
+
]), x("div", st, [x("div", ct, [x("h1", lt, "Звернення " + A(r.application.number || "—"), 1), x("p", ut, A(r.organization?.name || "—"), 1)]), C(r.AppealStatusBadge, {
|
|
855
|
+
status: r.application.status || "",
|
|
856
|
+
label: r.application.status_data?.text || void 0
|
|
857
|
+
}, null, 8, ["status", "label"])])]),
|
|
858
|
+
x("div", dt, [x("div", ft, [
|
|
859
|
+
C(r.AppealDetailSection, { title: "Заявка" }, {
|
|
860
|
+
icon: I(() => [C(r.AppIcon, {
|
|
861
|
+
name: "file-check-2",
|
|
862
|
+
class: "h-[18px] w-[18px]"
|
|
863
|
+
})]),
|
|
864
|
+
default: I(() => [x("dl", pt, [
|
|
865
|
+
C(r.AppealDetailField, {
|
|
866
|
+
label: "Номер звернення",
|
|
867
|
+
highlight: ""
|
|
868
|
+
}, {
|
|
869
|
+
default: I(() => [S(A(r.application.number || "—"), 1)]),
|
|
870
|
+
_: 1
|
|
871
|
+
}),
|
|
872
|
+
x("div", null, [t[9] ||= x("dt", { class: "mb-1 text-xs font-medium text-slate-500" }, "Статус", -1), x("dd", null, [C(r.AppealStatusBadge, {
|
|
873
|
+
status: r.application.status || "",
|
|
874
|
+
label: r.application.status_data?.text || void 0,
|
|
875
|
+
size: "sm"
|
|
876
|
+
}, null, 8, ["status", "label"])])]),
|
|
877
|
+
C(r.AppealDetailBoolean, {
|
|
878
|
+
label: "Внесено в ЄЦТО",
|
|
879
|
+
value: r.application.status === "completed" || !!r.application.integrated_at
|
|
880
|
+
}, null, 8, ["value"]),
|
|
881
|
+
C(r.AppealDetailField, { label: "Перевірив" }, {
|
|
882
|
+
default: I(() => [S(A(r.application.verified_by_data?.text || "—"), 1)]),
|
|
883
|
+
_: 1
|
|
884
|
+
}),
|
|
885
|
+
C(r.AppealDetailField, { label: "Вид робіт" }, {
|
|
886
|
+
default: I(() => [S(A(r.application.work_type_data?.text || "—"), 1)]),
|
|
887
|
+
_: 1
|
|
888
|
+
}),
|
|
889
|
+
C(r.AppealDetailField, {
|
|
890
|
+
label: "Опис запиту",
|
|
891
|
+
full: ""
|
|
892
|
+
}, {
|
|
893
|
+
default: I(() => [S(A(r.application.description || "—"), 1)]),
|
|
894
|
+
_: 1
|
|
895
|
+
}),
|
|
896
|
+
C(r.AppealDetailField, {
|
|
897
|
+
label: "Підстава виконання робіт",
|
|
898
|
+
full: ""
|
|
899
|
+
}, {
|
|
900
|
+
default: I(() => [S(A(r.application.execution_basis || "—"), 1)]),
|
|
901
|
+
_: 1
|
|
902
|
+
}),
|
|
903
|
+
C(r.AppealDetailField, {
|
|
904
|
+
label: "Примітки",
|
|
905
|
+
full: ""
|
|
906
|
+
}, {
|
|
907
|
+
default: I(() => [S(A(r.application.notes || "—"), 1)]),
|
|
908
|
+
_: 1
|
|
909
|
+
})
|
|
910
|
+
])]),
|
|
911
|
+
_: 1
|
|
912
|
+
}),
|
|
913
|
+
C(r.AppealDetailSection, { title: "Об'єкт робіт" }, {
|
|
914
|
+
icon: I(() => [C(r.AppIcon, {
|
|
915
|
+
name: "building-2",
|
|
916
|
+
class: "h-[18px] w-[18px]"
|
|
917
|
+
})]),
|
|
918
|
+
default: I(() => [x("dl", mt, [
|
|
919
|
+
C(r.AppealDetailField, {
|
|
920
|
+
label: "Площа, га",
|
|
921
|
+
highlight: ""
|
|
922
|
+
}, {
|
|
923
|
+
default: I(() => [S(A(r.application.area ?? "—"), 1)]),
|
|
924
|
+
_: 1
|
|
925
|
+
}),
|
|
926
|
+
r.showAddress ? (D(), v(r.AppealDetailField, {
|
|
927
|
+
key: 0,
|
|
928
|
+
label: "Адреса",
|
|
929
|
+
full: ""
|
|
930
|
+
}, {
|
|
931
|
+
default: I(() => [S(A(r.address), 1)]),
|
|
932
|
+
_: 1
|
|
933
|
+
})) : y("", !0),
|
|
934
|
+
r.application?.location ? (D(), v(r.AppealDetailField, {
|
|
935
|
+
key: 1,
|
|
936
|
+
label: "Місцезнаходження",
|
|
937
|
+
full: ""
|
|
938
|
+
}, {
|
|
939
|
+
default: I(() => [S(A(r.application.location || "—"), 1)]),
|
|
940
|
+
_: 1
|
|
941
|
+
})) : y("", !0)
|
|
942
|
+
])]),
|
|
943
|
+
_: 1
|
|
944
|
+
}),
|
|
945
|
+
C(r.AppealDetailSection, { title: "Дати та етапи" }, {
|
|
946
|
+
icon: I(() => [C(r.AppIcon, {
|
|
947
|
+
name: "calendar-days",
|
|
948
|
+
class: "h-[18px] w-[18px]"
|
|
949
|
+
})]),
|
|
950
|
+
default: I(() => [x("dl", ht, [
|
|
951
|
+
C(r.AppealDetailField, {
|
|
952
|
+
label: "Дата прийому заявки",
|
|
953
|
+
highlight: ""
|
|
954
|
+
}, {
|
|
955
|
+
default: I(() => [S(A(r.formatDate(r.application.created_at) || "—"), 1)]),
|
|
956
|
+
_: 1
|
|
957
|
+
}),
|
|
958
|
+
C(r.AppealDetailField, { label: "Дата видачі даних" }, {
|
|
959
|
+
default: I(() => [S(A(r.formatDate(r.application.source_data_issued_at) || "—"), 1)]),
|
|
960
|
+
_: 1
|
|
961
|
+
}),
|
|
962
|
+
C(r.AppealDetailField, { label: "Дата скасування" }, {
|
|
963
|
+
default: I(() => [S(A(r.formatDate(r.application.cancelled_at) || "—"), 1)]),
|
|
964
|
+
_: 1
|
|
965
|
+
}),
|
|
966
|
+
C(r.AppealDetailField, { label: "Дата прийому даних" }, {
|
|
967
|
+
default: I(() => [S(A(r.formatDate(r.application.survey_uploaded_at) || "—"), 1)]),
|
|
968
|
+
_: 1
|
|
969
|
+
}),
|
|
970
|
+
C(r.AppealDetailField, { label: "Дата внесення в ЄЦТО" }, {
|
|
971
|
+
default: I(() => [S(A(r.formatDate(r.application.integrated_at) || "—"), 1)]),
|
|
972
|
+
_: 1
|
|
973
|
+
}),
|
|
974
|
+
C(r.AppealDetailField, { label: "Дата перевірки" }, {
|
|
975
|
+
default: I(() => [S(A(r.formatDate(r.application.verified_at) || "—"), 1)]),
|
|
976
|
+
_: 1
|
|
977
|
+
})
|
|
978
|
+
])]),
|
|
979
|
+
_: 1
|
|
980
|
+
}),
|
|
981
|
+
r.application.cancel_reason || r.application.status === "cancelled" ? (D(), v(r.AppealDetailSection, {
|
|
982
|
+
key: 0,
|
|
983
|
+
title: "Скасування",
|
|
984
|
+
danger: ""
|
|
985
|
+
}, {
|
|
986
|
+
icon: I(() => [C(r.AppIcon, {
|
|
987
|
+
name: "ban",
|
|
988
|
+
class: "h-[18px] w-[18px]"
|
|
989
|
+
})]),
|
|
990
|
+
default: I(() => [x("dl", gt, [C(r.AppealDetailField, {
|
|
991
|
+
label: "Причина скасування заявки",
|
|
992
|
+
full: "",
|
|
993
|
+
highlight: ""
|
|
994
|
+
}, {
|
|
995
|
+
default: I(() => [S(A(r.application.cancel_reason || "Причину не вказано"), 1)]),
|
|
996
|
+
_: 1
|
|
997
|
+
})])]),
|
|
998
|
+
_: 1
|
|
999
|
+
})) : y("", !0),
|
|
1000
|
+
C(r.AppealDetailSection, { title: "Інформація про заявника" }, {
|
|
1001
|
+
icon: I(() => [C(r.AppIcon, {
|
|
1002
|
+
name: "user",
|
|
1003
|
+
class: "h-[18px] w-[18px]"
|
|
1004
|
+
})]),
|
|
1005
|
+
default: I(() => [x("div", _t, [x("dl", vt, [
|
|
1006
|
+
C(r.AppealDetailField, {
|
|
1007
|
+
label: "ПІБ",
|
|
1008
|
+
highlight: "",
|
|
1009
|
+
full: ""
|
|
1010
|
+
}, {
|
|
1011
|
+
default: I(() => [S(A(r.applicantName), 1)]),
|
|
1012
|
+
_: 1
|
|
1013
|
+
}),
|
|
1014
|
+
C(r.AppealDetailField, { label: "Номер сертифікату" }, {
|
|
1015
|
+
default: I(() => [S(A(r.surveyor?.certificate_id_data?.text || "—"), 1)]),
|
|
1016
|
+
_: 1
|
|
1017
|
+
}),
|
|
1018
|
+
C(r.AppealDetailField, { label: "Дата сертифікату" }, {
|
|
1019
|
+
default: I(() => [S(A(r.certificateDate || "—"), 1)]),
|
|
1020
|
+
_: 1
|
|
1021
|
+
}),
|
|
1022
|
+
C(r.AppealDetailField, { label: "Номер телефону" }, {
|
|
1023
|
+
default: I(() => [S(A(r.surveyor?.phone || "—"), 1)]),
|
|
1024
|
+
_: 1
|
|
1025
|
+
}),
|
|
1026
|
+
C(r.AppealDetailField, { label: "Email" }, {
|
|
1027
|
+
default: I(() => [S(A(r.surveyor?.email || "—"), 1)]),
|
|
1028
|
+
_: 1
|
|
1029
|
+
})
|
|
1030
|
+
]), x("div", yt, [t[10] ||= x("h3", { class: "mb-3 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Організація", -1), x("dl", bt, [
|
|
1031
|
+
C(r.AppealDetailField, {
|
|
1032
|
+
label: "Назва організації",
|
|
1033
|
+
highlight: "",
|
|
1034
|
+
full: ""
|
|
1035
|
+
}, {
|
|
1036
|
+
default: I(() => [r.organization?.org_id ? (D(), v(r.RouterLink, {
|
|
1037
|
+
key: 0,
|
|
1038
|
+
to: `/organizations/${r.organization.org_id}`,
|
|
1039
|
+
class: "break-words text-brand-600 hover:text-brand-800 hover:underline"
|
|
1040
|
+
}, {
|
|
1041
|
+
default: I(() => [S(A(r.organization.name || "—"), 1)]),
|
|
1042
|
+
_: 1
|
|
1043
|
+
}, 8, ["to"])) : (D(), b("span", xt, "—"))]),
|
|
1044
|
+
_: 1
|
|
1045
|
+
}),
|
|
1046
|
+
C(r.AppealDetailField, { label: "Телефон організації" }, {
|
|
1047
|
+
default: I(() => [S(A(r.organization?.phone || "—"), 1)]),
|
|
1048
|
+
_: 1
|
|
1049
|
+
}),
|
|
1050
|
+
C(r.AppealDetailField, { label: "Email організації" }, {
|
|
1051
|
+
default: I(() => [S(A(r.organization?.email || "—"), 1)]),
|
|
1052
|
+
_: 1
|
|
1053
|
+
}),
|
|
1054
|
+
C(r.AppealDetailField, {
|
|
1055
|
+
label: "Юридична адреса",
|
|
1056
|
+
full: ""
|
|
1057
|
+
}, {
|
|
1058
|
+
default: I(() => [S(A(r.organization?.legal_address || "—"), 1)]),
|
|
1059
|
+
_: 1
|
|
1060
|
+
})
|
|
1061
|
+
])])])]),
|
|
1062
|
+
_: 1
|
|
1063
|
+
}),
|
|
1064
|
+
C(r.AppealDetailSection, { title: "Файли" }, {
|
|
1065
|
+
icon: I(() => [C(r.AppIcon, {
|
|
1066
|
+
name: "file-text",
|
|
1067
|
+
class: "h-[18px] w-[18px]"
|
|
1068
|
+
})]),
|
|
1069
|
+
default: I(() => [
|
|
1070
|
+
r.application.status === "reserve" ? (D(), b("p", St, " Заявка в резерві: доступні лише межі території до зняття просторового конфлікту. ")) : y("", !0),
|
|
1071
|
+
r.workflowError ? (D(), b("p", Ct, A(r.workflowError), 1)) : y("", !0),
|
|
1072
|
+
r.files.length ? (D(), b("ul", wt, [(D(!0), b(g, null, k(r.files, (e) => (D(), b("li", {
|
|
1073
|
+
key: e.id,
|
|
1074
|
+
class: "flex items-center justify-between gap-4 py-3 first:pt-0 last:pb-0"
|
|
1075
|
+
}, [x("div", Tt, [x("p", Et, A(e.label), 1), e.note ? (D(), b("p", $, "Примітка: " + A(e.note), 1)) : y("", !0)]), e.action === "download" && (e.href || e.token) ? (D(), b("div", Dt, [e.replaceable ? (D(), b("button", {
|
|
1076
|
+
key: 0,
|
|
1077
|
+
type: "button",
|
|
1078
|
+
class: E(r.fileUploadBtnClass),
|
|
1079
|
+
disabled: r.workflowBusy,
|
|
1080
|
+
onClick: t[0] ||= (e) => {
|
|
1081
|
+
r.workflowError = "", r.workflowRef?.openReplaceOutput();
|
|
1082
|
+
}
|
|
1083
|
+
}, [C(r.AppIcon, {
|
|
1084
|
+
name: "upload",
|
|
1085
|
+
class: "h-3 w-3"
|
|
1086
|
+
}), t[11] ||= S(" Замінити ", -1)], 8, Ot)) : y("", !0), x("a", {
|
|
1087
|
+
href: e.href || (e.token ? r.fileUrl(e.token) : void 0),
|
|
1088
|
+
class: E(r.fileDownloadBtnClass)
|
|
1089
|
+
}, [C(r.AppIcon, {
|
|
1090
|
+
name: "download",
|
|
1091
|
+
class: "h-3 w-3"
|
|
1092
|
+
}), t[12] ||= S(" Завантажити ", -1)], 8, kt)])) : e.action === "issue" ? (D(), b("button", {
|
|
1093
|
+
key: 1,
|
|
1094
|
+
type: "button",
|
|
1095
|
+
class: E(r.fileUploadBtnClass),
|
|
1096
|
+
disabled: r.workflowBusy,
|
|
1097
|
+
onClick: t[1] ||= (e) => {
|
|
1098
|
+
r.workflowError = "", r.workflowRef?.openIssue();
|
|
1099
|
+
}
|
|
1100
|
+
}, [C(r.AppIcon, {
|
|
1101
|
+
name: "upload",
|
|
1102
|
+
class: "h-3 w-3"
|
|
1103
|
+
}), t[13] ||= S(" Надіслати ", -1)], 8, At)) : e.action === "verify" ? (D(), b("button", {
|
|
1104
|
+
key: 2,
|
|
1105
|
+
type: "button",
|
|
1106
|
+
class: E(r.fileUploadBtnClass),
|
|
1107
|
+
disabled: r.workflowBusy,
|
|
1108
|
+
onClick: t[2] ||= (e) => r.workflowRef?.openVerify()
|
|
1109
|
+
}, [C(r.AppIcon, {
|
|
1110
|
+
name: "file-check-2",
|
|
1111
|
+
class: "h-3 w-3"
|
|
1112
|
+
}), t[14] ||= S(" Перевірити ", -1)], 8, jt)) : e.action === "complete" ? (D(), b("button", {
|
|
1113
|
+
key: 3,
|
|
1114
|
+
type: "button",
|
|
1115
|
+
class: E(r.fileUploadBtnClass),
|
|
1116
|
+
disabled: r.workflowBusy,
|
|
1117
|
+
onClick: t[3] ||= (e) => r.workflowRef?.openComplete()
|
|
1118
|
+
}, [C(r.AppIcon, {
|
|
1119
|
+
name: "circle-check",
|
|
1120
|
+
class: "h-3 w-3"
|
|
1121
|
+
}), t[15] ||= S(" Підтвердити ", -1)], 8, Mt)) : e.action === "exportVector" ? (D(), b("button", {
|
|
1122
|
+
key: 4,
|
|
1123
|
+
type: "button",
|
|
1124
|
+
class: E(r.fileDownloadBtnClass),
|
|
1125
|
+
onClick: t[4] ||= (e) => {
|
|
1126
|
+
r.workflowError = "", r.vectorExportOpen = !0;
|
|
1127
|
+
}
|
|
1128
|
+
}, [C(r.AppIcon, {
|
|
1129
|
+
name: "download",
|
|
1130
|
+
class: "h-3 w-3"
|
|
1131
|
+
}), t[16] ||= S(" Завантажити ", -1)])) : y("", !0)]))), 128))])) : (D(), b("p", Nt, "Файли відсутні."))
|
|
1132
|
+
]),
|
|
1133
|
+
_: 1
|
|
1134
|
+
}),
|
|
1135
|
+
r.application.app_id ? (D(), v(r.ApplicationCommentsSection, {
|
|
1136
|
+
key: 1,
|
|
1137
|
+
"application-id": r.application.app_id,
|
|
1138
|
+
resource: "applications",
|
|
1139
|
+
variant: "admin",
|
|
1140
|
+
"current-author": r.commentCurrentAuthor,
|
|
1141
|
+
"resolve-author": r.resolveNoteAuthor
|
|
1142
|
+
}, null, 8, ["application-id", "current-author"])) : y("", !0),
|
|
1143
|
+
C(r.ApplicationHistorySection, {
|
|
1144
|
+
items: r.application.history,
|
|
1145
|
+
variant: "admin"
|
|
1146
|
+
}, null, 8, ["items"])
|
|
1147
|
+
]), x("div", Pt, [x("div", Ft, [r.showMap && r.application ? (D(), v(r.AppealDetailMap, {
|
|
1148
|
+
key: r.application.app_id,
|
|
1149
|
+
geom: r.application.geom,
|
|
1150
|
+
address: r.address,
|
|
1151
|
+
area: r.application.area,
|
|
1152
|
+
location: r.application.location,
|
|
1153
|
+
variant: "panel"
|
|
1154
|
+
}, null, 8, [
|
|
1155
|
+
"geom",
|
|
1156
|
+
"address",
|
|
1157
|
+
"area",
|
|
1158
|
+
"location"
|
|
1159
|
+
])) : (D(), b("div", It, [C(r.AppIcon, {
|
|
1160
|
+
name: "map",
|
|
1161
|
+
class: "mb-3 h-8 w-8 text-slate-300"
|
|
1162
|
+
}), t[17] ||= x("p", { class: "text-sm text-slate-500" }, "Геометрію заявки не вдалося відобразити", -1)]))])])]),
|
|
1163
|
+
r.application.app_id ? (D(), v(r.ApplicationWorkflowActions, {
|
|
1164
|
+
key: 0,
|
|
1165
|
+
ref: "workflowRef",
|
|
1166
|
+
"application-id": r.application.app_id,
|
|
1167
|
+
status: r.application.status || "",
|
|
1168
|
+
onDone: t[5] ||= (e) => {
|
|
1169
|
+
r.workflowError = "", r.workflowBusy = !1, r.loadApplication(r.application.app_id);
|
|
1170
|
+
},
|
|
1171
|
+
onError: t[6] ||= (e) => r.workflowError = e
|
|
1172
|
+
}, null, 8, ["application-id", "status"])) : y("", !0),
|
|
1173
|
+
r.application.app_id ? (D(), v(r.ApplicationVectorExportModal, {
|
|
1174
|
+
key: 1,
|
|
1175
|
+
modelValue: r.vectorExportOpen,
|
|
1176
|
+
"onUpdate:modelValue": t[7] ||= (e) => r.vectorExportOpen = e,
|
|
1177
|
+
"application-id": r.application.app_id
|
|
1178
|
+
}, null, 8, ["modelValue", "application-id"])) : y("", !0)
|
|
1179
|
+
])) : (D(), b("div", Lt, [x("p", Rt, A(r.error || "Звернення не знайдено."), 1), C(r.RouterLink, {
|
|
1180
|
+
to: "/requests",
|
|
1181
|
+
class: "mt-3 inline-block text-sm font-medium text-brand-600 hover:text-brand-700"
|
|
1182
|
+
}, {
|
|
1183
|
+
default: I(() => [...t[18] ||= [S(" Повернутися до реєстру ", -1)]]),
|
|
1184
|
+
_: 1
|
|
1185
|
+
})]));
|
|
1186
|
+
}
|
|
1187
|
+
var Bt = /*#__PURE__*/ e(tt, [["render", zt], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/card.vue"]]);
|
|
1188
|
+
//#endregion
|
|
1189
|
+
export { Bt as default };
|