@opengis/surveyor 0.0.16 → 0.0.18
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 +5 -0
- package/README.md +16 -0
- package/dist/chunks/{AppealDetailField-DNRGpnyD.js → AppealDetailField-ByK9ZqR4.js} +2 -2
- package/dist/chunks/{AppealStatusBadge-7KruOSVI.js → AppealStatusBadge-DzMn4RVy.js} +10 -10
- package/dist/chunks/{ApplicationGeometryExportModal-DJbnKPm6.js → ApplicationGeometryExportModal-DMPn9bkq.js} +176 -166
- package/dist/chunks/{MapLayerMenu-AUeTqgEp.js → MapLayerMenu-B0TEoCJm.js} +3 -3
- package/dist/chunks/{RegistryForm-BlK1lExt.js → RegistryForm-Dpis_ncj.js} +2 -2
- package/dist/chunks/{RegistryFormModal-BmBsUOF3.js → RegistryFormModal-CH4DbTvC.js} +2 -2
- package/dist/chunks/{RegistryToolbar-DXOEcD84.js → RegistryToolbar-DisEejvi.js} +3 -3
- package/dist/chunks/{TablePagination-CUtnDQQ_.js → TablePagination-thQkE5iA.js} +5 -5
- package/dist/chunks/{card-COmcUdms.js → card-BP4nulPr.js} +1 -1
- package/dist/chunks/{card-B113dNzv.js → card-CBOQibhl.js} +27 -27
- package/dist/chunks/{card-_YyJbLNI.js → card-Cs8_8A8i.js} +8 -8
- package/dist/chunks/{card-DEJs9IIP.js → card-DVuqR0rL.js} +8 -8
- package/dist/chunks/{card-Deae73xd.js → card-n83dNORm.js} +18 -18
- package/dist/chunks/{card-VnUCFC7v.js → card-u5I--_Gb.js} +13 -13
- package/dist/chunks/{certificates-DHf1zGQs.js → certificates-CDunSANR.js} +12 -12
- package/dist/chunks/{create-BVPqfJOb.js → create-DQPxIZMW.js} +1 -1
- package/dist/chunks/{forgot-DoG6vXhq.js → forgot-DfsFu-yY.js} +6 -6
- package/dist/chunks/{login-BWGylcSU.js → login-Dl0nTWs9.js} +6 -6
- package/dist/chunks/{map-BZi4eVl3.js → map-BoHEgBCw.js} +54 -54
- package/dist/chunks/{map-layers-CKZK50de.js → map-layers-CRE8lZzH.js} +8 -8
- package/dist/chunks/{organizations-DYGfYfHS.js → organizations-D6aazMAe.js} +14 -14
- package/dist/chunks/{registration-3GLgq-ae.js → registration-BSz1iLbO.js} +6 -6
- package/dist/chunks/{requests-v1jHarHb.js → requests-B9Ejt4av.js} +11 -11
- package/dist/chunks/{reset-CP9LsLkC.js → reset-D5G0x5Zi.js} +6 -6
- package/dist/chunks/{users-frk3gmmd.js → users-DMe6JYI0.js} +10 -10
- package/dist/index.css +1 -2
- package/dist/index.js +22 -26
- package/migrations/20261019170000_actor_lookup.sql +25 -10
- package/migrations/20261105120000_user_lookup.sql +15 -0
- package/package.json +80 -83
- package/server/resources/helpers/user_lookup.ts +2 -2
|
@@ -4,12 +4,12 @@ import { a as n, c as r, i, n as a, r as o, t as s, u as c } from "./appealMapLa
|
|
|
4
4
|
import { t as l } from "./application_status-BhNGiY2I.js";
|
|
5
5
|
import { a as u, d, i as f, l as p, r as m, s as h, t as g, u as _ } from "./mapLayersApi-CBLcbADa.js";
|
|
6
6
|
import { i as v, n as y, t as b } from "./geometry-DyhIVRcw.js";
|
|
7
|
-
import { t as ee } from "./MapLayerMenu-
|
|
7
|
+
import { t as ee } from "./MapLayerMenu-B0TEoCJm.js";
|
|
8
8
|
import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createVNode as D, defineComponent as O, mergeModels as k, nextTick as te, normalizeClass as A, normalizeStyle as j, onBeforeUnmount as M, onMounted as ne, onUnmounted as re, openBlock as N, ref as P, renderList as F, shallowRef as ie, toDisplayString as I, useModel as L, vModelText as ae, watch as R, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
|
|
9
9
|
import { ChevronDown as H, Crosshair as oe, History as U, MapPin as se, MapPinned as ce, MessageSquare as W, Send as G, ZoomIn as le, ZoomOut as ue } from "lucide-vue-next";
|
|
10
10
|
import { VsInputRichtext as K } from "@opengis/form";
|
|
11
11
|
//#region shared/map/components/AppealDetailMap.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var de = "appeal-map-popup-style", q = /*@__PURE__*/ O({
|
|
13
13
|
__name: "AppealDetailMap",
|
|
14
14
|
props: {
|
|
15
15
|
geom: {
|
|
@@ -79,8 +79,8 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
79
79
|
};
|
|
80
80
|
M.value = [r, ...t], F.value = M.value.filter((e) => e.defaultVisible).map((e) => e.id);
|
|
81
81
|
}
|
|
82
|
-
let B = null, V, H = null, U = null, W = !1, G = S(() => v(l.geom)), K = S(() => G.value ? y(G.value) : null),
|
|
83
|
-
function
|
|
82
|
+
let B = null, V, H = null, U = null, W = !1, G = S(() => v(l.geom)), K = S(() => G.value ? y(G.value) : null), q = S(() => K.value ? b(K.value) : null), fe = S(() => l.variant === "panel" ? "relative min-h-[320px] w-full flex-1" : ["relative w-full transition-all duration-300", l.expanded ? "h-[520px]" : "h-[340px]"]);
|
|
83
|
+
function pe() {
|
|
84
84
|
return {
|
|
85
85
|
type: "FeatureCollection",
|
|
86
86
|
features: G.value ? [{
|
|
@@ -90,14 +90,14 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
90
90
|
}] : []
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function J(e) {
|
|
94
94
|
K.value && e.fitBounds(K.value, {
|
|
95
95
|
...E,
|
|
96
96
|
duration: 500
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
let n =
|
|
99
|
+
function Y(e, t) {
|
|
100
|
+
let n = pe(), r = e.getSource(x);
|
|
101
101
|
r?.setData ? r.setData(n) : (e.addSource(x, {
|
|
102
102
|
type: "geojson",
|
|
103
103
|
data: n
|
|
@@ -117,9 +117,9 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
117
117
|
"line-color": "#2563eb",
|
|
118
118
|
"line-width": 3
|
|
119
119
|
}
|
|
120
|
-
})),
|
|
120
|
+
})), _e(e, t), ye(e, t);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function me(e, t) {
|
|
123
123
|
let n = e.trim(), r = n.match(/^(.+?)\s*\(([^)]+)\)\s*,?\s*(.*)$/);
|
|
124
124
|
if (r) {
|
|
125
125
|
let e = r[1].trim(), t = r[2].trim();
|
|
@@ -147,31 +147,31 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
147
147
|
subtitle: t?.trim() || ""
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function he() {
|
|
151
151
|
let e = l.address?.trim(), t = l.location?.trim(), n = !!(e && e !== "—"), r = !!(t && t !== "—");
|
|
152
|
-
return !n && !r ? null : n ?
|
|
152
|
+
return !n && !r ? null : n ? me(e, r ? t : void 0) : {
|
|
153
153
|
title: t,
|
|
154
154
|
subtitle: ""
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function ge() {
|
|
158
158
|
let e = document.createElement("div");
|
|
159
159
|
return e.className = "appeal-map-pin", e.innerHTML = "\n <svg width=\"28\" height=\"36\" viewBox=\"0 0 28 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M14 0C6.268 0 0 6.268 0 14c0 10.5 14 22 14 22s14-11.5 14-22C28 6.268 21.732 0 14 0z\" fill=\"#2563EB\"/>\n <circle cx=\"14\" cy=\"14\" r=\"5.5\" fill=\"white\"/>\n </svg>\n ", e;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
U?.remove(), U = null,
|
|
163
|
-
element:
|
|
161
|
+
function _e(e, t) {
|
|
162
|
+
U?.remove(), U = null, q.value && (U = new t.Marker({
|
|
163
|
+
element: ge(),
|
|
164
164
|
anchor: "bottom"
|
|
165
|
-
}).setLngLat(
|
|
165
|
+
}).setLngLat(q.value).addTo(e));
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
let e = document.getElementById(
|
|
169
|
-
e.id =
|
|
167
|
+
function ve() {
|
|
168
|
+
let e = document.getElementById(de) ?? document.createElement("style");
|
|
169
|
+
e.id = de, e.textContent = "\n.appeal-map-popup .maplibregl-popup-content {\n min-width: 0;\n padding: 8px 8px 8px 10px !important;\n margin: 0;\n border: 1px solid #e2e8f0 !important;\n border-radius: 14px !important;\n background: #fff !important;\n box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06) !important;\n}\n.appeal-map-popup .maplibregl-popup-tip {\n width: 0 !important;\n height: 0 !important;\n border: 8px solid transparent !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {\n border-top-color: #fff !important;\n border-bottom-width: 0 !important;\n}\n.appeal-map-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {\n border-bottom-color: #fff !important;\n border-top-width: 0 !important;\n}\n.appeal-map-popup-body {\n position: relative;\n display: block;\n max-width: 260px;\n margin: 0 !important;\n padding: 2px 28px 2px 2px !important;\n text-align: left;\n}\n.appeal-map-popup-text {\n min-width: 0;\n margin: 0 !important;\n padding: 2px 0 !important;\n}\n.appeal-map-popup-title {\n margin: 0 !important;\n padding: 0 !important;\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 1.35 !important;\n color: #0f172a !important;\n}\n.appeal-map-popup-subtitle {\n margin: 2px 0 0 !important;\n padding: 0 !important;\n font-size: 12px !important;\n font-weight: 400 !important;\n line-height: 1.35 !important;\n color: #64748b !important;\n}\n.appeal-map-popup-close,\n.appeal-map-popup-close:focus,\n.appeal-map-popup-close:focus-visible,\n.appeal-map-popup-close:active {\n position: absolute !important;\n top: -6px !important;\n right: -6px !important;\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 20px !important;\n height: 20px !important;\n padding: 0 !important;\n margin: 0 !important;\n border: 0 !important;\n border-radius: 6px !important;\n background: transparent !important;\n color: #94a3b8 !important;\n opacity: 1 !important;\n outline: none !important;\n outline-offset: 0 !important;\n box-shadow: none !important;\n appearance: none !important;\n -webkit-appearance: none !important;\n cursor: pointer !important;\n}\n.appeal-map-popup-close::-moz-focus-inner {\n border: 0 !important;\n padding: 0 !important;\n}\n.appeal-map-popup-close svg {\n display: block;\n width: 12px !important;\n height: 12px !important;\n}\n.appeal-map-popup-close:hover {\n background: #f1f5f9 !important;\n color: #334155 !important;\n}\n", e.parentNode || document.head.appendChild(e);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
173
|
-
let n =
|
|
174
|
-
if (!
|
|
171
|
+
function ye(e, t) {
|
|
172
|
+
ve(), H?.remove(), H = null;
|
|
173
|
+
let n = he();
|
|
174
|
+
if (!q.value || !n) return;
|
|
175
175
|
let { title: r, subtitle: i } = n, a = document.createElement("div");
|
|
176
176
|
a.className = "appeal-map-popup-body";
|
|
177
177
|
let o = document.createElement("div");
|
|
@@ -191,22 +191,22 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
191
191
|
maxWidth: "280px",
|
|
192
192
|
className: "appeal-map-popup",
|
|
193
193
|
anchor: "bottom"
|
|
194
|
-
}).setLngLat(
|
|
194
|
+
}).setLngLat(q.value).setDOMContent(a).addTo(e);
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function X(e) {
|
|
197
197
|
u(e, I(N.value), f(e, M.value, [C]));
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Z(e) {
|
|
200
200
|
h(e, M.value, F.value, C);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function be(e) {
|
|
203
203
|
N.value !== e && (N.value = e);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function xe(e) {
|
|
206
206
|
let t = F.value;
|
|
207
207
|
F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Q() {
|
|
210
210
|
let e = B, t = O.value, n = D.value;
|
|
211
211
|
if (!e || !t || !n || k.value || n.clientWidth === 0 || n.clientHeight === 0) return;
|
|
212
212
|
let r = new e.Map({
|
|
@@ -223,26 +223,26 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
223
223
|
locale: _
|
|
224
224
|
});
|
|
225
225
|
r.on("load", () => {
|
|
226
|
-
r.resize(),
|
|
226
|
+
r.resize(), Y(r, e), Z(r), A.value = !1;
|
|
227
227
|
}), r.on("error", (e) => {
|
|
228
228
|
console.warn("[AppealDetailMap]", e?.error ?? e);
|
|
229
229
|
}), k.value = r;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Se() {
|
|
232
232
|
k.value?.zoomIn({ duration: 250 });
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function $() {
|
|
235
235
|
k.value?.zoomOut({ duration: 250 });
|
|
236
236
|
}
|
|
237
237
|
function Ce() {
|
|
238
238
|
let e = k.value;
|
|
239
|
-
e &&
|
|
239
|
+
e && J(e);
|
|
240
240
|
}
|
|
241
241
|
function we() {
|
|
242
242
|
let e = k.value, t = B;
|
|
243
243
|
if (!e || !t) return;
|
|
244
244
|
let n = () => {
|
|
245
|
-
|
|
245
|
+
Y(e, t), J(e);
|
|
246
246
|
};
|
|
247
247
|
e.isStyleLoaded() ? n() : e.once("load", n);
|
|
248
248
|
}
|
|
@@ -253,7 +253,7 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
253
253
|
], we), R(N, () => {
|
|
254
254
|
let e = k.value;
|
|
255
255
|
if (!e) return;
|
|
256
|
-
let t = () =>
|
|
256
|
+
let t = () => X(e);
|
|
257
257
|
e.isStyleLoaded() ? t() : e.once("load", t);
|
|
258
258
|
}), R(F, () => {
|
|
259
259
|
let e = k.value;
|
|
@@ -267,7 +267,7 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
269
|
!W && D.value && (V = new ResizeObserver(() => {
|
|
270
|
-
k.value ? k.value.resize() :
|
|
270
|
+
k.value ? k.value.resize() : Q();
|
|
271
271
|
}), V.observe(D.value));
|
|
272
272
|
}), re(() => {
|
|
273
273
|
W = !0, V?.disconnect(), H?.remove(), H = null, U?.remove(), U = null, k.value?.remove(), k.value = null;
|
|
@@ -324,25 +324,25 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
324
324
|
},
|
|
325
325
|
geometry: G,
|
|
326
326
|
bounds: K,
|
|
327
|
-
center:
|
|
328
|
-
mapAreaClass:
|
|
329
|
-
buildGeoJson:
|
|
330
|
-
fitToGeometry:
|
|
331
|
-
ensureLayers:
|
|
332
|
-
splitAddressLabel:
|
|
333
|
-
resolvePopupText:
|
|
334
|
-
createPinElement:
|
|
335
|
-
showAddressMarker:
|
|
336
|
-
POPUP_STYLE_ID:
|
|
337
|
-
ensurePopupStyles:
|
|
338
|
-
showAddressPopup:
|
|
339
|
-
remountBasemap:
|
|
340
|
-
remountOverlays:
|
|
341
|
-
selectBase:
|
|
342
|
-
toggleOverlay:
|
|
343
|
-
initMap:
|
|
344
|
-
zoomIn:
|
|
345
|
-
zoomOut:
|
|
327
|
+
center: q,
|
|
328
|
+
mapAreaClass: fe,
|
|
329
|
+
buildGeoJson: pe,
|
|
330
|
+
fitToGeometry: J,
|
|
331
|
+
ensureLayers: Y,
|
|
332
|
+
splitAddressLabel: me,
|
|
333
|
+
resolvePopupText: he,
|
|
334
|
+
createPinElement: ge,
|
|
335
|
+
showAddressMarker: _e,
|
|
336
|
+
POPUP_STYLE_ID: de,
|
|
337
|
+
ensurePopupStyles: ve,
|
|
338
|
+
showAddressPopup: ye,
|
|
339
|
+
remountBasemap: X,
|
|
340
|
+
remountOverlays: Z,
|
|
341
|
+
selectBase: be,
|
|
342
|
+
toggleOverlay: xe,
|
|
343
|
+
initMap: Q,
|
|
344
|
+
zoomIn: Se,
|
|
345
|
+
zoomOut: $,
|
|
346
346
|
resetView: Ce,
|
|
347
347
|
refreshLayers: we,
|
|
348
348
|
get Crosshair() {
|
|
@@ -367,26 +367,26 @@ var q = "appeal-map-popup-style", J = /*@__PURE__*/ O({
|
|
|
367
367
|
value: !0
|
|
368
368
|
}), Te;
|
|
369
369
|
}
|
|
370
|
-
}),
|
|
370
|
+
}), fe = {
|
|
371
371
|
key: 0,
|
|
372
372
|
class: "flex shrink-0 items-center justify-between border-b border-slate-100 px-5 py-3.5"
|
|
373
|
-
},
|
|
373
|
+
}, pe = { class: "flex items-center gap-2.5" }, J = {
|
|
374
374
|
ref: "containerRef",
|
|
375
375
|
class: "absolute inset-0 h-full w-full"
|
|
376
|
-
},
|
|
376
|
+
}, Y = {
|
|
377
377
|
key: 0,
|
|
378
378
|
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
379
|
-
},
|
|
379
|
+
}, me = {
|
|
380
380
|
key: 1,
|
|
381
381
|
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/80 text-sm text-slate-500"
|
|
382
|
-
},
|
|
382
|
+
}, he = { class: "absolute right-3 top-3 z-10 flex flex-col gap-1.5" }, ge = {
|
|
383
383
|
key: 1,
|
|
384
384
|
class: "flex shrink-0 items-center gap-2 border-t border-slate-100 px-5 py-2.5 text-xs text-slate-400"
|
|
385
|
-
},
|
|
386
|
-
function
|
|
387
|
-
return N(), T("div", { class: A(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-
|
|
388
|
-
n.variant === "panel" ? (N(), T("header",
|
|
389
|
-
class: "h-[18px] w-[18px] text-
|
|
385
|
+
}, _e = { class: "break-words" };
|
|
386
|
+
function ve(e, t, n, r, i, a) {
|
|
387
|
+
return N(), T("div", { class: A(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : void 0) }, [
|
|
388
|
+
n.variant === "panel" ? (N(), T("header", fe, [E("div", pe, [D(r.MapPinned, {
|
|
389
|
+
class: "h-[18px] w-[18px] text-[#1f5ae0]",
|
|
390
390
|
"stroke-width": 2,
|
|
391
391
|
"aria-hidden": "true"
|
|
392
392
|
}), t[0] ||= E("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Інтерактивна карта", -1)]), t[1] ||= E("span", { class: "rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500" }, " Межі заявки ", -1)])) : w("", !0),
|
|
@@ -394,8 +394,8 @@ function Z(e, t, n, r, i, a) {
|
|
|
394
394
|
ref: "mapAreaRef",
|
|
395
395
|
class: A(r.mapAreaClass)
|
|
396
396
|
}, [
|
|
397
|
-
E("div",
|
|
398
|
-
r.mapLoadError ? (N(), T("p",
|
|
397
|
+
E("div", J, null, 512),
|
|
398
|
+
r.mapLoadError ? (N(), T("p", Y, I(r.mapLoadError), 1)) : r.mapLoading ? (N(), T("p", me, " Завантаження карти… ")) : w("", !0),
|
|
399
399
|
D(r.MapLayerMenu, {
|
|
400
400
|
"base-id": r.activeBaseId,
|
|
401
401
|
"active-overlay-ids": r.activeOverlayIds,
|
|
@@ -409,12 +409,12 @@ function Z(e, t, n, r, i, a) {
|
|
|
409
409
|
"base-layers",
|
|
410
410
|
"overlays"
|
|
411
411
|
]),
|
|
412
|
-
E("div",
|
|
412
|
+
E("div", he, [
|
|
413
413
|
E("button", {
|
|
414
414
|
type: "button",
|
|
415
415
|
title: "Збільшити",
|
|
416
416
|
"aria-label": "Збільшити",
|
|
417
|
-
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-
|
|
417
|
+
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
|
|
418
418
|
onClick: r.zoomIn
|
|
419
419
|
}, [D(r.ZoomIn, {
|
|
420
420
|
class: "h-4 w-4",
|
|
@@ -425,7 +425,7 @@ function Z(e, t, n, r, i, a) {
|
|
|
425
425
|
type: "button",
|
|
426
426
|
title: "Зменшити",
|
|
427
427
|
"aria-label": "Зменшити",
|
|
428
|
-
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-
|
|
428
|
+
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
|
|
429
429
|
onClick: r.zoomOut
|
|
430
430
|
}, [D(r.ZoomOut, {
|
|
431
431
|
class: "h-4 w-4",
|
|
@@ -436,7 +436,7 @@ function Z(e, t, n, r, i, a) {
|
|
|
436
436
|
type: "button",
|
|
437
437
|
title: "Відновити масштаб",
|
|
438
438
|
"aria-label": "Відновити масштаб",
|
|
439
|
-
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-
|
|
439
|
+
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-colors hover:bg-[#eef6ff] hover:text-[#1f5ae0]",
|
|
440
440
|
onClick: r.resetView
|
|
441
441
|
}, [D(r.Crosshair, {
|
|
442
442
|
class: "h-4 w-4",
|
|
@@ -445,7 +445,7 @@ function Z(e, t, n, r, i, a) {
|
|
|
445
445
|
})])
|
|
446
446
|
])
|
|
447
447
|
], 2),
|
|
448
|
-
n.variant === "panel" ? (N(), T("footer",
|
|
448
|
+
n.variant === "panel" ? (N(), T("footer", ge, [
|
|
449
449
|
D(r.MapPin, {
|
|
450
450
|
class: "h-3 w-3 shrink-0",
|
|
451
451
|
"stroke-width": 2,
|
|
@@ -453,21 +453,21 @@ function Z(e, t, n, r, i, a) {
|
|
|
453
453
|
}),
|
|
454
454
|
E("span", null, "Площа ділянки: " + I(n.area ?? "—") + " га", 1),
|
|
455
455
|
t[2] ||= E("span", { class: "text-slate-300" }, "·", -1),
|
|
456
|
-
E("span",
|
|
456
|
+
E("span", _e, I(n.location), 1)
|
|
457
457
|
])) : w("", !0)
|
|
458
458
|
], 2);
|
|
459
459
|
}
|
|
460
|
-
var
|
|
461
|
-
["render",
|
|
460
|
+
var ye = /*#__PURE__*/ e(q, [
|
|
461
|
+
["render", ve],
|
|
462
462
|
["__scopeId", "data-v-ded53fc4"],
|
|
463
463
|
["__file", "C:/softpro/surveyor/shared/map/components/AppealDetailMap.vue"]
|
|
464
464
|
]);
|
|
465
465
|
//#endregion
|
|
466
466
|
//#region shared/comments/applicationNotesApi.ts
|
|
467
|
-
function
|
|
467
|
+
function X(e, t, n) {
|
|
468
468
|
return `/api/resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${n}`;
|
|
469
469
|
}
|
|
470
|
-
async function
|
|
470
|
+
async function Z(e) {
|
|
471
471
|
let t = await e.text();
|
|
472
472
|
try {
|
|
473
473
|
let n = JSON.parse(t);
|
|
@@ -476,36 +476,36 @@ async function $(e) {
|
|
|
476
476
|
return t || `HTTP ${e.status}`;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
async function
|
|
480
|
-
let n = "".replace(/\/$/, ""), r = await fetch(`${n}${
|
|
481
|
-
if (!r.ok) throw Error(await
|
|
479
|
+
async function be(e, t) {
|
|
480
|
+
let n = "".replace(/\/$/, ""), r = await fetch(`${n}${X(e, t, "comments")}`, { credentials: "include" });
|
|
481
|
+
if (!r.ok) throw Error(await Z(r));
|
|
482
482
|
return [...(await r.json()).rows ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")));
|
|
483
483
|
}
|
|
484
|
-
async function
|
|
484
|
+
async function xe(e, t, n) {
|
|
485
485
|
let r = n.trim();
|
|
486
486
|
if (!r) throw Error("Введіть текст коментаря");
|
|
487
|
-
let i = "".replace(/\/$/, ""), a = await fetch(`${i}${
|
|
487
|
+
let i = "".replace(/\/$/, ""), a = await fetch(`${i}${X(e, t, "notes")}`, {
|
|
488
488
|
method: "POST",
|
|
489
489
|
credentials: "include",
|
|
490
490
|
headers: { "Content-Type": "application/json" },
|
|
491
491
|
body: JSON.stringify({ body: r })
|
|
492
492
|
});
|
|
493
|
-
if (!a.ok) throw Error(await
|
|
493
|
+
if (!a.ok) throw Error(await Z(a));
|
|
494
494
|
return a.json();
|
|
495
495
|
}
|
|
496
496
|
//#endregion
|
|
497
497
|
//#region shared/comments/noteDisplay.ts
|
|
498
|
-
function
|
|
498
|
+
function Q(e) {
|
|
499
499
|
return e.split(/\s+/).map((e) => e[0]).filter(Boolean).join("").slice(0, 2).toUpperCase();
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Se(e) {
|
|
502
502
|
if (!e) return "";
|
|
503
503
|
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})/);
|
|
504
504
|
if (t) return `${t[3]}.${t[2]}.${t[1]} ${t[4]}:${t[5]}`;
|
|
505
505
|
let n = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
506
506
|
return n ? `${n[3]}.${n[2]}.${n[1]}` : e;
|
|
507
507
|
}
|
|
508
|
-
var
|
|
508
|
+
var $ = {
|
|
509
509
|
name: "Невідомий користувач",
|
|
510
510
|
initials: "НК"
|
|
511
511
|
}, Ce = /* @__PURE__ */ new Set(/* @__PURE__ */ "A.B.BLOCKQUOTE.BR.CODE.DEL.EM.H1.H2.H3.H4.H5.H6.HR.I.IMG.LI.MARK.OL.P.PRE.S.SPAN.STRONG.SUB.SUP.TABLE.TBODY.TD.TH.THEAD.TR.U.UL".split(".")), we = /* @__PURE__ */ new Set([
|
|
@@ -566,16 +566,26 @@ function je(e) {
|
|
|
566
566
|
let n = new DOMParser().parseFromString(t, "text/html");
|
|
567
567
|
return ke(n.body), n.body.innerHTML;
|
|
568
568
|
}
|
|
569
|
-
function Me(e) {
|
|
570
|
-
let
|
|
571
|
-
return
|
|
569
|
+
function Me(e, t) {
|
|
570
|
+
let n = e.created_by_data?.text?.trim();
|
|
571
|
+
return n ? {
|
|
572
|
+
...t,
|
|
573
|
+
name: n,
|
|
574
|
+
initials: Q(n) || t.initials
|
|
575
|
+
} : t;
|
|
576
|
+
}
|
|
577
|
+
function Ne(e) {
|
|
578
|
+
let t = Me(e, $);
|
|
579
|
+
if (t.name !== $.name) return t;
|
|
580
|
+
let n = e.created_by?.trim();
|
|
581
|
+
return n ? {
|
|
572
582
|
name: "Користувач",
|
|
573
|
-
initials:
|
|
574
|
-
} :
|
|
583
|
+
initials: n.slice(0, 2).toUpperCase()
|
|
584
|
+
} : $;
|
|
575
585
|
}
|
|
576
586
|
//#endregion
|
|
577
587
|
//#region shared/comments/ApplicationCommentsSection.vue?vue&type=script&setup=true&lang.ts
|
|
578
|
-
var
|
|
588
|
+
var Pe = /*@__PURE__*/ O({
|
|
579
589
|
__name: "ApplicationCommentsSection",
|
|
580
590
|
props: {
|
|
581
591
|
applicationId: {
|
|
@@ -616,15 +626,15 @@ var Ne = /*@__PURE__*/ O({
|
|
|
616
626
|
"link",
|
|
617
627
|
"clear_formatting",
|
|
618
628
|
"help"
|
|
619
|
-
], r = e, i = P([]), a = P({}), o = P(!0), s = P(""), c = P(""), l = P(!1), u = P(""), d = S(() => r.variant === "admin"), f = S(() => Ae(c.value) && !l.value), p = S(() => d.value ? "rounded-2xl border border-slate-200 bg-white shadow-
|
|
629
|
+
], r = e, i = P([]), a = P({}), o = P(!0), s = P(""), c = P(""), l = P(!1), u = P(""), d = S(() => r.variant === "admin"), f = S(() => Ae(c.value) && !l.value), p = S(() => d.value ? "rounded-2xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), m = S(() => d.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), h = S(() => d.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), g = S(() => (d.value, "flex flex-col gap-4 p-5"));
|
|
620
630
|
function _(e) {
|
|
621
|
-
return a.value[e.note_id] ?? r.resolveAuthor?.(e) ??
|
|
631
|
+
return Me(e, a.value[e.note_id] ?? r.resolveAuthor?.(e) ?? Ne(e));
|
|
622
632
|
}
|
|
623
633
|
async function v() {
|
|
624
634
|
if (r.applicationId) {
|
|
625
635
|
o.value = !0, s.value = "";
|
|
626
636
|
try {
|
|
627
|
-
i.value = await
|
|
637
|
+
i.value = await be(r.resource, r.applicationId), a.value = {};
|
|
628
638
|
} catch (e) {
|
|
629
639
|
i.value = [], s.value = e instanceof Error ? e.message : "Не вдалося завантажити коментарі";
|
|
630
640
|
} finally {
|
|
@@ -637,7 +647,7 @@ var Ne = /*@__PURE__*/ O({
|
|
|
637
647
|
if (Ae(e) && !l.value && r.applicationId) {
|
|
638
648
|
l.value = !0, u.value = "";
|
|
639
649
|
try {
|
|
640
|
-
let t = await
|
|
650
|
+
let t = await xe(r.resource, r.applicationId, e);
|
|
641
651
|
a.value = {
|
|
642
652
|
...a.value,
|
|
643
653
|
[t.note_id]: r.currentAuthor
|
|
@@ -681,7 +691,7 @@ var Ne = /*@__PURE__*/ O({
|
|
|
681
691
|
return G;
|
|
682
692
|
},
|
|
683
693
|
get formatNoteDateTime() {
|
|
684
|
-
return
|
|
694
|
+
return Se;
|
|
685
695
|
},
|
|
686
696
|
get noteBodyHtml() {
|
|
687
697
|
return je;
|
|
@@ -692,56 +702,56 @@ var Ne = /*@__PURE__*/ O({
|
|
|
692
702
|
value: !0
|
|
693
703
|
}), b;
|
|
694
704
|
}
|
|
695
|
-
}),
|
|
705
|
+
}), Fe = {
|
|
696
706
|
key: 1,
|
|
697
707
|
class: "text-center text-sm text-red-600"
|
|
698
|
-
},
|
|
708
|
+
}, Ie = {
|
|
699
709
|
key: 1,
|
|
700
710
|
class: "flex flex-col gap-4"
|
|
701
|
-
},
|
|
711
|
+
}, Le = { class: "min-w-0 flex-1" }, Re = { class: "flex flex-wrap items-baseline justify-between gap-x-2" }, ze = { class: "text-[14px] font-semibold text-slate-800" }, Be = { class: "text-xs text-slate-400" }, Ve = {
|
|
702
712
|
key: 0,
|
|
703
|
-
class: "mb-1.5 text-xs font-medium text-
|
|
704
|
-
},
|
|
713
|
+
class: "mb-1.5 text-xs font-medium text-[#1f5ae0]"
|
|
714
|
+
}, He = ["innerHTML"], Ue = {
|
|
705
715
|
key: 1,
|
|
706
716
|
class: "rounded-xl bg-gray-50 px-4 py-3"
|
|
707
|
-
},
|
|
717
|
+
}, We = { class: "mb-1 flex items-center justify-between gap-2" }, Ge = { class: "text-xs font-semibold text-gray-800" }, Ke = { class: "text-xs text-gray-400" }, qe = {
|
|
708
718
|
key: 0,
|
|
709
719
|
class: "mb-1 text-xs font-medium text-[#2663EB]"
|
|
710
|
-
},
|
|
720
|
+
}, Je = ["innerHTML"], Ye = { class: "min-w-0 flex-1" }, Xe = { class: "!h-full overflow-hidden" }, Ze = { class: "mt-2 flex justify-end" }, Qe = ["disabled", "aria-label"], $e = { key: 0 }, et = {
|
|
711
721
|
key: 2,
|
|
712
722
|
class: "text-xs text-red-600"
|
|
713
723
|
};
|
|
714
|
-
function
|
|
724
|
+
function tt(e, t, n, r, i, a) {
|
|
715
725
|
return N(), T("section", { class: A(r.sectionClass) }, [E("header", { class: A(r.headerClass) }, [D(r.MessageSquare, {
|
|
716
|
-
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-
|
|
726
|
+
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
|
|
717
727
|
"stroke-width": 2,
|
|
718
728
|
"aria-hidden": "true"
|
|
719
729
|
}, null, 8, ["class"]), E("h2", { class: A(r.titleClass) }, "Коментарі", 2)], 2), E("div", { class: A(r.bodyClass) }, [r.loading ? (N(), T("p", {
|
|
720
730
|
key: 0,
|
|
721
731
|
class: A(["text-center text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
|
|
722
|
-
}, " Завантаження… ", 2)) : r.loadError ? (N(), T("p",
|
|
732
|
+
}, " Завантаження… ", 2)) : r.loadError ? (N(), T("p", Fe, I(r.loadError), 1)) : (N(), T(x, { key: 2 }, [
|
|
723
733
|
r.notes.length === 0 ? (N(), T("p", {
|
|
724
734
|
key: 0,
|
|
725
735
|
class: A(["text-center text-sm italic", r.isAdmin ? "py-2 text-slate-400" : "py-4 text-gray-400"])
|
|
726
|
-
}, " Коментарів ще немає ", 2)) : (N(), T("ul",
|
|
736
|
+
}, " Коментарів ще немає ", 2)) : (N(), T("ul", Ie, [(N(!0), T(x, null, F(r.notes, (e) => (N(), T("li", {
|
|
727
737
|
key: e.note_id,
|
|
728
738
|
class: "flex gap-3"
|
|
729
|
-
}, [E("div", { class: A(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-
|
|
730
|
-
E("div",
|
|
731
|
-
r.authorFor(e).role ? (N(), T("p",
|
|
739
|
+
}, [E("div", { class: A(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white text-xs"]) }, I(r.authorFor(e).initials), 3), E("div", Le, [r.isAdmin ? (N(), T(x, { key: 0 }, [
|
|
740
|
+
E("div", Re, [E("span", ze, I(r.authorFor(e).name), 1), E("time", Be, I(r.formatNoteDateTime(e.created_at)), 1)]),
|
|
741
|
+
r.authorFor(e).role ? (N(), T("p", Ve, I(r.authorFor(e).role), 1)) : w("", !0),
|
|
732
742
|
E("div", {
|
|
733
743
|
class: "comment-body comment-body--admin text-[13px] leading-relaxed text-slate-600",
|
|
734
744
|
innerHTML: r.noteBodyHtml(e.body)
|
|
735
|
-
}, null, 8,
|
|
736
|
-
], 64)) : (N(), T("div",
|
|
737
|
-
E("div",
|
|
738
|
-
r.authorFor(e).role ? (N(), T("p",
|
|
745
|
+
}, null, 8, He)
|
|
746
|
+
], 64)) : (N(), T("div", Ue, [
|
|
747
|
+
E("div", We, [E("span", Ge, I(r.authorFor(e).name), 1), E("time", Ke, I(r.formatNoteDateTime(e.created_at)), 1)]),
|
|
748
|
+
r.authorFor(e).role ? (N(), T("p", qe, I(r.authorFor(e).role), 1)) : w("", !0),
|
|
739
749
|
E("div", {
|
|
740
750
|
class: "comment-body text-sm text-gray-700",
|
|
741
751
|
innerHTML: r.noteBodyHtml(e.body)
|
|
742
|
-
}, null, 8,
|
|
752
|
+
}, null, 8, Je)
|
|
743
753
|
]))])]))), 128))])),
|
|
744
|
-
E("div", { class: A(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]) }, [E("div", { class: A(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-
|
|
754
|
+
E("div", { class: A(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]) }, [E("div", { class: A(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-[#d9eaff] text-[#1a46b8]" : "bg-[#2663EB] text-white"]) }, I(n.currentAuthor.initials), 3), E("div", Ye, [E("div", Xe, [D(r.VsInputRichtext, {
|
|
745
755
|
modelValue: r.draft,
|
|
746
756
|
"onUpdate:modelValue": t[0] ||= (e) => r.draft = e,
|
|
747
757
|
disabled: r.sending,
|
|
@@ -755,24 +765,24 @@ function $e(e, t, n, r, i, a) {
|
|
|
755
765
|
"disabled",
|
|
756
766
|
"placeholder",
|
|
757
767
|
"richtext-props"
|
|
758
|
-
]), E("div",
|
|
768
|
+
])]), E("div", Ze, [E("button", {
|
|
759
769
|
type: "button",
|
|
760
770
|
disabled: !r.canSend,
|
|
761
771
|
onClick: r.submit,
|
|
762
772
|
"aria-label": r.isAdmin ? void 0 : "Надіслати",
|
|
763
|
-
class: A(r.isAdmin ? "inline-flex items-center gap-1.5 rounded-lg bg-
|
|
773
|
+
class: A(r.isAdmin ? "inline-flex items-center gap-1.5 rounded-lg bg-[#1f5ae0] px-4 py-2.5 text-sm font-medium text-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)] transition-all hover:bg-[#1a46b8] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#2663EB] p-1.5 text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40")
|
|
764
774
|
}, [D(r.Send, {
|
|
765
775
|
class: "h-3.5 w-3.5",
|
|
766
776
|
"stroke-width": 2
|
|
767
|
-
}), r.isAdmin ? (N(), T("span",
|
|
768
|
-
r.sendError ? (N(), T("p",
|
|
777
|
+
}), r.isAdmin ? (N(), T("span", $e, I(r.sending ? "Надсилання…" : "Надіслати"), 1)) : w("", !0)], 10, Qe)])])], 2),
|
|
778
|
+
r.sendError ? (N(), T("p", et, I(r.sendError), 1)) : w("", !0)
|
|
769
779
|
], 64))], 2)], 2);
|
|
770
780
|
}
|
|
771
|
-
var
|
|
772
|
-
["render",
|
|
781
|
+
var nt = /*#__PURE__*/ e(Pe, [
|
|
782
|
+
["render", tt],
|
|
773
783
|
["__scopeId", "data-v-0f2a55e0"],
|
|
774
784
|
["__file", "C:/softpro/surveyor/shared/comments/ApplicationCommentsSection.vue"]
|
|
775
|
-
]),
|
|
785
|
+
]), rt = /*@__PURE__*/ O({
|
|
776
786
|
__name: "ApplicationHistorySection",
|
|
777
787
|
props: {
|
|
778
788
|
items: {
|
|
@@ -788,7 +798,7 @@ var et = /*#__PURE__*/ e(Ne, [
|
|
|
788
798
|
},
|
|
789
799
|
setup(e, { expose: t }) {
|
|
790
800
|
t();
|
|
791
|
-
let n = e, r = P(!0), i = S(() => n.variant === "admin"), a = S(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = S(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-
|
|
801
|
+
let n = e, r = P(!0), i = S(() => n.variant === "admin"), a = S(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = S(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-[0_1px_2px_0_rgb(15_23_42/0.04),0_1px_3px_0_rgb(15_23_42/0.06)]" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), s = S(() => i.value ? "flex items-center gap-2.5 border-b border-slate-100 px-5 py-3.5" : "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3"), c = S(() => i.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), u = S(() => i.value ? "px-5 py-4" : "p-5");
|
|
792
802
|
function d(e, t) {
|
|
793
803
|
return t?.text?.trim() || (e ? l.items.find((t) => t.code === e)?.name ?? e : "");
|
|
794
804
|
}
|
|
@@ -827,27 +837,27 @@ var et = /*#__PURE__*/ e(Ne, [
|
|
|
827
837
|
value: !0
|
|
828
838
|
}), m;
|
|
829
839
|
}
|
|
830
|
-
}),
|
|
840
|
+
}), it = {
|
|
831
841
|
key: 0,
|
|
832
842
|
class: "relative list-none"
|
|
833
|
-
},
|
|
834
|
-
function
|
|
843
|
+
}, at = { class: "relative z-10 mt-1 shrink-0" }, ot = { class: "min-w-0 flex-1" }, st = { class: "flex flex-wrap items-baseline justify-between gap-x-2 gap-y-1" };
|
|
844
|
+
function ct(e, t, n, r, i, a) {
|
|
835
845
|
return N(), T("section", { class: A(r.sectionClass) }, [E("header", { class: A(r.headerClass) }, [D(r.History, {
|
|
836
|
-
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-
|
|
846
|
+
class: A(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-[#1f5ae0]" : "h-3.5 w-3.5 text-gray-400"]),
|
|
837
847
|
"stroke-width": 2,
|
|
838
848
|
"aria-hidden": "true"
|
|
839
849
|
}, null, 8, ["class"]), E("h2", { class: A(r.titleClass) }, "Історія", 2)], 2), E("div", { class: A(r.bodyClass) }, [E("button", {
|
|
840
850
|
type: "button",
|
|
841
|
-
class: A(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-
|
|
851
|
+
class: A(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-[#1f5ae0]" : "text-gray-500 hover:text-[#2663EB]"]),
|
|
842
852
|
onClick: t[0] ||= (e) => r.open = !r.open
|
|
843
853
|
}, [E("span", null, I(r.open ? "Згорнути" : `Розгорнути (${r.events.length} подій)`), 1), D(r.ChevronDown, {
|
|
844
854
|
class: A(["h-4 w-4 transition-transform", r.open ? "" : "rotate-180"]),
|
|
845
855
|
"aria-hidden": "true"
|
|
846
|
-
}, null, 8, ["class"])], 2), r.open && r.events.length ? (N(), T("ol",
|
|
856
|
+
}, null, 8, ["class"])], 2), r.open && r.events.length ? (N(), T("ol", it, [t[1] ||= E("div", { class: "absolute bottom-2 left-[7px] top-2 w-px bg-slate-200" }, null, -1), (N(!0), T(x, null, F(r.events, (e, t) => (N(), T("li", {
|
|
847
857
|
key: e.history_id,
|
|
848
858
|
class: "relative flex gap-4 pb-6 last:pb-0"
|
|
849
|
-
}, [E("div",
|
|
850
|
-
E("div",
|
|
859
|
+
}, [E("div", at, [E("span", { class: A(["block h-[15px] w-[15px] rounded-full border-2 border-white", t === r.events.length - 1 ? "bg-[#3479f6]" : "bg-slate-300"]) }, null, 2)]), E("div", ot, [
|
|
860
|
+
E("div", st, [E("p", { class: A(["text-[14px] font-semibold", r.isAdmin ? "text-slate-800" : "text-gray-900"]) }, I(r.historyTitle(e)), 3), E("time", { class: A(["text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, I(r.formatDateTime(e.created_at) || "—"), 3)]),
|
|
851
861
|
e.reason ? (N(), T("p", {
|
|
852
862
|
key: 0,
|
|
853
863
|
class: A(["mt-1 text-[13px] leading-relaxed", r.isAdmin ? "text-slate-600" : "text-gray-600"])
|
|
@@ -858,10 +868,10 @@ function ot(e, t, n, r, i, a) {
|
|
|
858
868
|
class: A(["text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
|
|
859
869
|
}, " Історія відсутня. ", 2))], 2)], 2);
|
|
860
870
|
}
|
|
861
|
-
var
|
|
871
|
+
var lt = /*#__PURE__*/ e(rt, [["render", ct], ["__file", "C:/softpro/surveyor/shared/history/ApplicationHistorySection.vue"]]);
|
|
862
872
|
//#endregion
|
|
863
873
|
//#region shared/export/downloadAttachmentFilename.ts
|
|
864
|
-
function
|
|
874
|
+
function ut(e, t) {
|
|
865
875
|
let n = e.match(/filename\*?=(?:UTF-8''|")?([^";]+)/i)?.[1]?.replace(/"/g, "") ?? t;
|
|
866
876
|
try {
|
|
867
877
|
return decodeURIComponent(n);
|
|
@@ -871,7 +881,7 @@ function ct(e, t) {
|
|
|
871
881
|
}
|
|
872
882
|
//#endregion
|
|
873
883
|
//#region shared/export/CrsSuggestionSelect.vue?vue&type=script&setup=true&lang.ts
|
|
874
|
-
var
|
|
884
|
+
var dt = /*@__PURE__*/ O({
|
|
875
885
|
__name: "CrsSuggestionSelect",
|
|
876
886
|
props: {
|
|
877
887
|
modelValue: {
|
|
@@ -925,7 +935,7 @@ var lt = /*@__PURE__*/ O({
|
|
|
925
935
|
left: `${d.value.left}px`,
|
|
926
936
|
width: `${d.value.width}px`,
|
|
927
937
|
top: `${d.value.bottom + 4}px`
|
|
928
|
-
} : { visibility: "hidden" }), m = S(() => i.variant === "cabinet" ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-
|
|
938
|
+
} : { visibility: "hidden" }), m = S(() => i.variant === "cabinet" ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-[#8ec1ff] bg-white text-slate-900 ring-2 ring-[#d9eaff]"), h = S(() => i.variant === "cabinet" ? "border-gray-200 bg-white text-gray-900 hover:border-gray-300" : "border-slate-200 bg-white text-slate-900 hover:border-slate-300"), g = S(() => i.variant === "cabinet" ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "bg-[#eef6ff] font-medium text-[#1a46b8]");
|
|
929
939
|
function _() {
|
|
930
940
|
d.value = c.value?.getBoundingClientRect() ?? null;
|
|
931
941
|
}
|
|
@@ -986,18 +996,18 @@ var lt = /*@__PURE__*/ O({
|
|
|
986
996
|
value: !0
|
|
987
997
|
}), w;
|
|
988
998
|
}
|
|
989
|
-
}),
|
|
999
|
+
}), ft = {
|
|
990
1000
|
ref: "rootRef",
|
|
991
1001
|
class: "relative"
|
|
992
|
-
},
|
|
1002
|
+
}, pt = ["disabled"], mt = { class: "border-b border-slate-100 p-2" }, ht = { class: "max-h-48 overflow-y-auto" }, gt = {
|
|
993
1003
|
key: 0,
|
|
994
1004
|
class: "px-3 py-3 text-center text-xs text-slate-400"
|
|
995
|
-
},
|
|
1005
|
+
}, _t = {
|
|
996
1006
|
key: 1,
|
|
997
1007
|
class: "px-3 py-3 text-center text-xs text-slate-400"
|
|
998
|
-
},
|
|
999
|
-
function
|
|
1000
|
-
return N(), T("div", null, [E("label", { class: A(["mb-1 block text-xs font-medium", n.variant === "cabinet" ? "text-gray-700" : "text-slate-500"]) }, I(n.label), 3), E("div",
|
|
1008
|
+
}, vt = ["onClick"];
|
|
1009
|
+
function yt(e, t, n, r, i, a) {
|
|
1010
|
+
return N(), T("div", null, [E("label", { class: A(["mb-1 block text-xs font-medium", n.variant === "cabinet" ? "text-gray-700" : "text-slate-500"]) }, I(n.label), 3), E("div", ft, [E("button", {
|
|
1001
1011
|
type: "button",
|
|
1002
1012
|
disabled: n.disabled,
|
|
1003
1013
|
class: A(["flex w-full items-center justify-between rounded-lg border px-3 py-2 text-left text-sm shadow-sm transition-all disabled:cursor-not-allowed disabled:bg-slate-50 disabled:text-slate-400", n.disabled ? "border-slate-200" : r.open ? r.triggerOpenClass : r.triggerIdleClass]),
|
|
@@ -1009,36 +1019,36 @@ function _t(e, t, n, r, i, a) {
|
|
|
1009
1019
|
stroke: "currentColor",
|
|
1010
1020
|
"stroke-width": "2",
|
|
1011
1021
|
"aria-hidden": "true"
|
|
1012
|
-
}, [...t[2] ||= [E("path", { d: "m6 9 6 6 6-6" }, null, -1)]], 2))], 10,
|
|
1022
|
+
}, [...t[2] ||= [E("path", { d: "m6 9 6 6 6-6" }, null, -1)]], 2))], 10, pt), D(r.SurveyorTeleport, null, {
|
|
1013
1023
|
default: z(() => [r.open ? (N(), T("div", {
|
|
1014
1024
|
key: 0,
|
|
1015
1025
|
ref: "panelRef",
|
|
1016
1026
|
class: "fixed z-[100] overflow-hidden rounded-lg border border-slate-200 bg-white shadow-lg",
|
|
1017
1027
|
style: j(r.dropdownStyle),
|
|
1018
1028
|
onMousedown: t[1] ||= V(() => {}, ["stop"])
|
|
1019
|
-
}, [E("div",
|
|
1029
|
+
}, [E("div", mt, [B(E("input", {
|
|
1020
1030
|
ref: "inputRef",
|
|
1021
1031
|
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
1022
1032
|
type: "text",
|
|
1023
1033
|
placeholder: "Пошук…",
|
|
1024
|
-
class: "w-full rounded-md border border-slate-200 px-3 py-1.5 text-xs outline-none focus:border-
|
|
1025
|
-
}, null, 512), [[ae, r.query]])]), E("div",
|
|
1034
|
+
class: "w-full rounded-md border border-slate-200 px-3 py-1.5 text-xs outline-none focus:border-[#8ec1ff] focus:ring-2 focus:ring-[#d9eaff]"
|
|
1035
|
+
}, null, 512), [[ae, r.query]])]), E("div", ht, [n.loading && r.filtered.length === 0 ? (N(), T("p", gt, " Завантаження… ")) : r.filtered.length === 0 ? (N(), T("p", _t, " Нічого не знайдено ")) : w("", !0), (N(!0), T(x, null, F(r.filtered, (e) => (N(), T("button", {
|
|
1026
1036
|
key: e.id,
|
|
1027
1037
|
type: "button",
|
|
1028
1038
|
class: A(["w-full px-3 py-2 text-left text-sm transition-colors hover:bg-slate-50", n.modelValue === e.id ? r.selectedOptionClass : "text-slate-700"]),
|
|
1029
1039
|
onClick: (t) => r.select(e)
|
|
1030
|
-
}, I(e.text), 11,
|
|
1040
|
+
}, I(e.text), 11, vt))), 128))])], 36)) : w("", !0)]),
|
|
1031
1041
|
_: 1
|
|
1032
1042
|
})], 512)]);
|
|
1033
1043
|
}
|
|
1034
|
-
var
|
|
1044
|
+
var bt = /*#__PURE__*/ e(dt, [["render", yt], ["__file", "C:/softpro/surveyor/shared/export/CrsSuggestionSelect.vue"]]);
|
|
1035
1045
|
//#endregion
|
|
1036
1046
|
//#region shared/export/crsUtils.ts
|
|
1037
|
-
function
|
|
1047
|
+
function xt(e) {
|
|
1038
1048
|
let t = e.trim(), n = t.match(/^EPSG:(\d+)$/i);
|
|
1039
1049
|
return n ? n[1] : t;
|
|
1040
1050
|
}
|
|
1041
|
-
function
|
|
1051
|
+
function St(e) {
|
|
1042
1052
|
let t = e.trim();
|
|
1043
1053
|
if (/^EPSG:/i.test(t)) {
|
|
1044
1054
|
let e = t.match(/^EPSG:(\d+)$/i);
|
|
@@ -1048,7 +1058,7 @@ function bt(e) {
|
|
|
1048
1058
|
}
|
|
1049
1059
|
//#endregion
|
|
1050
1060
|
//#region shared/export/loadCrsSuggest.ts
|
|
1051
|
-
function
|
|
1061
|
+
function Ct(e, t = (e, t) => e || `HTTP ${t}`) {
|
|
1052
1062
|
let n = 0;
|
|
1053
1063
|
function r() {
|
|
1054
1064
|
n += 1;
|
|
@@ -1074,8 +1084,8 @@ function xt(e, t = (e, t) => e || `HTTP ${t}`) {
|
|
|
1074
1084
|
}
|
|
1075
1085
|
//#endregion
|
|
1076
1086
|
//#region shared/export/downloadApplicationGeometry.ts
|
|
1077
|
-
async function
|
|
1078
|
-
let r = new URLSearchParams({ srid:
|
|
1087
|
+
async function wt(e, t, n) {
|
|
1088
|
+
let r = new URLSearchParams({ srid: xt(n) }), i = await fetch(e(`/api/surveyor/applications/${encodeURIComponent(t)}/export/geometry?${r}`), { credentials: "include" });
|
|
1079
1089
|
if (!i.ok) {
|
|
1080
1090
|
let e = await i.text(), t = e || `HTTP ${i.status}`;
|
|
1081
1091
|
try {
|
|
@@ -1084,12 +1094,12 @@ async function St(e, t, n) {
|
|
|
1084
1094
|
} catch {}
|
|
1085
1095
|
throw Error(t);
|
|
1086
1096
|
}
|
|
1087
|
-
let a = await i.blob(), o =
|
|
1097
|
+
let a = await i.blob(), o = ut(i.headers.get("Content-Disposition") ?? "", `boundary_${t}.geojson`), s = URL.createObjectURL(a), c = document.createElement("a");
|
|
1088
1098
|
c.href = s, c.download = o, c.click(), URL.revokeObjectURL(s);
|
|
1089
1099
|
}
|
|
1090
1100
|
//#endregion
|
|
1091
1101
|
//#region shared/export/ApplicationGeometryExportModal.vue?vue&type=script&setup=true&lang.ts
|
|
1092
|
-
var
|
|
1102
|
+
var Tt = /*@__PURE__*/ O({
|
|
1093
1103
|
__name: "ApplicationGeometryExportModal",
|
|
1094
1104
|
props: /*@__PURE__*/ k({
|
|
1095
1105
|
applicationId: {
|
|
@@ -1119,7 +1129,7 @@ var Ct = /*@__PURE__*/ O({
|
|
|
1119
1129
|
emits: ["update:modelValue"],
|
|
1120
1130
|
setup(e, { expose: n }) {
|
|
1121
1131
|
n();
|
|
1122
|
-
let r = e, i = L(e, "modelValue"), a = P(""), o = P(""), s = P(!1), c = P(""), l = P(!1), u = P([]), d =
|
|
1132
|
+
let r = e, i = L(e, "modelValue"), a = P(""), o = P(""), s = P(!1), c = P(""), l = P(!1), u = P([]), d = Ct((e) => r.buildUrl(e), (e, t) => (r.errorMessage ?? ((e, t) => e || `HTTP ${t}`))(e, t));
|
|
1123
1133
|
function f() {
|
|
1124
1134
|
d.invalidateInFlight(), a.value = "", o.value = "", u.value = [], c.value = "", s.value = !1;
|
|
1125
1135
|
}
|
|
@@ -1148,7 +1158,7 @@ var Ct = /*@__PURE__*/ O({
|
|
|
1148
1158
|
}
|
|
1149
1159
|
s.value = !0;
|
|
1150
1160
|
try {
|
|
1151
|
-
await
|
|
1161
|
+
await wt(r.buildUrl, r.applicationId, e), i.value = !1;
|
|
1152
1162
|
} catch (e) {
|
|
1153
1163
|
c.value = e instanceof Error ? e.message : "Не вдалося експортувати межі заявки";
|
|
1154
1164
|
} finally {
|
|
@@ -1175,15 +1185,15 @@ var Ct = /*@__PURE__*/ O({
|
|
|
1175
1185
|
shellClass: r.variant === "cabinet" ? "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm" : "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/40 p-4",
|
|
1176
1186
|
panelClass: r.variant === "cabinet" ? "w-full max-w-md overflow-hidden rounded-2xl bg-white shadow-2xl" : "flex max-h-[90vh] w-full max-w-md flex-col overflow-hidden rounded-2xl bg-white shadow-xl",
|
|
1177
1187
|
SurveyorTeleport: t,
|
|
1178
|
-
CrsSuggestionSelect:
|
|
1188
|
+
CrsSuggestionSelect: bt
|
|
1179
1189
|
};
|
|
1180
1190
|
return Object.defineProperty(g, "__isScriptSetup", {
|
|
1181
1191
|
enumerable: !1,
|
|
1182
1192
|
value: !0
|
|
1183
1193
|
}), g;
|
|
1184
1194
|
}
|
|
1185
|
-
}),
|
|
1186
|
-
function
|
|
1195
|
+
}), Et = ["disabled"], Dt = ["disabled"];
|
|
1196
|
+
function Ot(e, t, n, r, i, a) {
|
|
1187
1197
|
return N(), C(r.SurveyorTeleport, null, {
|
|
1188
1198
|
default: z(() => [r.open ? (N(), T("div", {
|
|
1189
1199
|
key: 0,
|
|
@@ -1230,16 +1240,16 @@ function Et(e, t, n, r, i, a) {
|
|
|
1230
1240
|
class: A(["px-4 py-2 text-sm text-slate-600 transition-colors hover:bg-slate-100", n.variant === "cabinet" ? "rounded-xl bg-gray-100 py-2.5 font-medium text-gray-600 hover:bg-gray-200" : "rounded-lg"]),
|
|
1231
1241
|
disabled: r.busy,
|
|
1232
1242
|
onClick: r.cancel
|
|
1233
|
-
}, " Скасувати ", 10,
|
|
1243
|
+
}, " Скасувати ", 10, Et), E("button", {
|
|
1234
1244
|
type: "button",
|
|
1235
|
-
class: A(["px-4 py-2 text-sm font-semibold text-white disabled:opacity-50", n.variant === "cabinet" ? "rounded-xl bg-[#2663EB] py-2.5 font-medium hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-
|
|
1245
|
+
class: A(["px-4 py-2 text-sm font-semibold text-white disabled:opacity-50", n.variant === "cabinet" ? "rounded-xl bg-[#2663EB] py-2.5 font-medium hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40" : "rounded-lg bg-[#1f5ae0] hover:bg-[#1a46b8]"]),
|
|
1236
1246
|
disabled: r.busy || r.optionsLoading || !r.srid,
|
|
1237
1247
|
onClick: r.submit
|
|
1238
|
-
}, I(r.busy ? "Експорт…" : "Експортувати"), 11,
|
|
1248
|
+
}, I(r.busy ? "Експорт…" : "Експортувати"), 11, Dt)], 2)
|
|
1239
1249
|
], 2)], 34)) : w("", !0)]),
|
|
1240
1250
|
_: 1
|
|
1241
1251
|
});
|
|
1242
1252
|
}
|
|
1243
|
-
var
|
|
1253
|
+
var kt = /*#__PURE__*/ e(Tt, [["render", Ot], ["__file", "C:/softpro/surveyor/shared/export/ApplicationGeometryExportModal.vue"]]);
|
|
1244
1254
|
//#endregion
|
|
1245
|
-
export {
|
|
1255
|
+
export { ut as a, Q as c, bt as i, $ as l, Ct as n, lt as o, St as r, nt as s, kt as t, ye as u };
|