@opengis/surveyor 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{ApplicationHistorySection-PwToBfej.js → ApplicationHistorySection-Cwq0-Frd.js} +252 -247
- package/dist/chunks/{applications-CLhv5l_j.js → applications-D6pHAQaK.js} +1 -1
- package/dist/chunks/{card-B_SfARf7.js → card-6z-m7UkM.js} +317 -317
- package/dist/chunks/{card-BDqeihxR.js → card-Dlp8_KhV.js} +75 -75
- package/dist/chunks/create-CAVC1qXJ.js +1306 -0
- package/dist/chunks/{map-dvA3ayAK.js → map-UTBxwT7-.js} +1 -1
- package/dist/chunks/{mapLayersApi-CWoQ2be-.js → mapLayersApi-CBLcbADa.js} +1 -1
- package/dist/chunks/{requests-BM6XqgpC.js → requests-rWq8ok3C.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +8 -8
- package/package.json +1 -1
- package/server/modules/surveyor/schema.ts +1 -0
- package/server/modules/surveyor/services/createApplication.ts +3 -2
- package/server/modules/surveyor/utils/application.ts +1 -0
- package/server/resources/surveyor-admin/applications.ts +1 -1
- package/server/resources/surveyor-user/applications.ts +1 -1
- package/dist/chunks/create-BPWuoys6.js +0 -1047
package/dist/chunks/{ApplicationHistorySection-PwToBfej.js → ApplicationHistorySection-Cwq0-Frd.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { a as t, c as n, i as r, n as i, r as a, t as o, u as s } from "./appealMapLayers-CQMK3rrz.js";
|
|
3
3
|
import { t as c } from "./application_status-BhNGiY2I.js";
|
|
4
|
-
import { a as l, d as u, i as d, l as f, r as p, s as m, t as ee, u as h } from "./mapLayersApi-
|
|
5
|
-
import { i as
|
|
6
|
-
import { t as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { ChevronDown as
|
|
4
|
+
import { a as l, d as u, i as d, l as f, r as p, s as m, t as ee, u as h } from "./mapLayersApi-CBLcbADa.js";
|
|
5
|
+
import { i as g, n as te, t as _ } from "./geometry-DyhIVRcw.js";
|
|
6
|
+
import { t as ne } from "./MapLayerMenu-AUeTqgEp.js";
|
|
7
|
+
import { Fragment as v, computed as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, normalizeClass as E, onMounted as re, onUnmounted as ie, openBlock as D, ref as O, renderList as k, shallowRef as ae, toDisplayString as A, vModelText as j, watch as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
|
|
8
|
+
import { ChevronDown as I, Crosshair as oe, History as L, MapPin as se, MapPinned as ce, MessageSquare as R, Send as z, ZoomIn as le, ZoomOut as ue } from "lucide-vue-next";
|
|
9
9
|
//#region shared/map/components/AppealDetailMap.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var B = /*@__PURE__*/ T({
|
|
11
11
|
__name: "AppealDetailMap",
|
|
12
12
|
props: {
|
|
13
13
|
geom: {
|
|
@@ -43,18 +43,18 @@ var z = /*@__PURE__*/ w({
|
|
|
43
43
|
},
|
|
44
44
|
setup(e, { expose: c }) {
|
|
45
45
|
c();
|
|
46
|
-
let
|
|
46
|
+
let v = e, b = r, x = i, S = a, C = [30.5234, 50.4501], w = {
|
|
47
47
|
padding: 30,
|
|
48
48
|
maxZoom: 17
|
|
49
|
-
},
|
|
50
|
-
function F(e) {
|
|
51
|
-
return A.value.find((t) => t.id === e) ?? A.value[0] ?? o[0];
|
|
52
|
-
}
|
|
49
|
+
}, T = O(null), E = O(null), D = ae(null), k = O(""), A = O(!0), j = O(o), N = O([]), P = O(n), F = O([]);
|
|
53
50
|
function I(e) {
|
|
51
|
+
return j.value.find((t) => t.id === e) ?? j.value[0] ?? o[0];
|
|
52
|
+
}
|
|
53
|
+
function L(e) {
|
|
54
54
|
return e.kind === "applications";
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
let e = t.find(
|
|
56
|
+
function R() {
|
|
57
|
+
let e = t.find(L);
|
|
58
58
|
if (!e) throw Error("Static applications overlay is missing");
|
|
59
59
|
let n = typeof window < "u" ? window.location.origin : "";
|
|
60
60
|
return {
|
|
@@ -62,10 +62,10 @@ var z = /*@__PURE__*/ w({
|
|
|
62
62
|
tiles: e.tiles.map((e) => e.startsWith("/") ? `${n}${e}` : e)
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
65
|
+
async function z() {
|
|
66
66
|
let e = await ee("application-card");
|
|
67
|
-
|
|
68
|
-
let t = e.overlays.filter((e) => e.kind !== "geometry" && e.kind !== "applications"), n = e.overlays.find(
|
|
67
|
+
j.value = e.baseLayers, P.value = e.defaultBaseId;
|
|
68
|
+
let t = e.overlays.filter((e) => e.kind !== "geometry" && e.kind !== "applications"), n = e.overlays.find(L) ?? R(), r = {
|
|
69
69
|
id: n.id,
|
|
70
70
|
label: n.label,
|
|
71
71
|
kind: "applications",
|
|
@@ -75,49 +75,49 @@ var z = /*@__PURE__*/ w({
|
|
|
75
75
|
hasFilters: n.hasFilters,
|
|
76
76
|
defaultVisible: !1
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
N.value = [r, ...t], F.value = N.value.filter((e) => e.defaultVisible).map((e) => e.id);
|
|
79
79
|
}
|
|
80
|
-
let
|
|
81
|
-
function
|
|
80
|
+
let B = null, V, H = null, U = null, W = !1, G = y(() => g(v.geom)), K = y(() => G.value ? te(G.value) : null), q = y(() => K.value ? _(K.value) : null), de = y(() => v.variant === "panel" ? "relative min-h-[320px] w-full flex-1" : ["relative w-full transition-all duration-300", v.expanded ? "h-[520px]" : "h-[340px]"]);
|
|
81
|
+
function J() {
|
|
82
82
|
return {
|
|
83
83
|
type: "FeatureCollection",
|
|
84
|
-
features:
|
|
84
|
+
features: G.value ? [{
|
|
85
85
|
type: "Feature",
|
|
86
|
-
geometry:
|
|
86
|
+
geometry: G.value,
|
|
87
87
|
properties: {}
|
|
88
88
|
}] : []
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
...
|
|
91
|
+
function Y(e) {
|
|
92
|
+
K.value && e.fitBounds(K.value, {
|
|
93
|
+
...w,
|
|
94
94
|
duration: 500
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
let n =
|
|
99
|
-
r?.setData ? r.setData(n) : (e.addSource(
|
|
97
|
+
function X(e, t) {
|
|
98
|
+
let n = J(), r = e.getSource(b);
|
|
99
|
+
r?.setData ? r.setData(n) : (e.addSource(b, {
|
|
100
100
|
type: "geojson",
|
|
101
101
|
data: n
|
|
102
102
|
}), e.addLayer({
|
|
103
|
-
id:
|
|
103
|
+
id: x,
|
|
104
104
|
type: "fill",
|
|
105
|
-
source:
|
|
105
|
+
source: b,
|
|
106
106
|
paint: {
|
|
107
107
|
"fill-color": "#3b82f6",
|
|
108
108
|
"fill-opacity": .35
|
|
109
109
|
}
|
|
110
110
|
}), e.addLayer({
|
|
111
|
-
id:
|
|
111
|
+
id: S,
|
|
112
112
|
type: "line",
|
|
113
|
-
source:
|
|
113
|
+
source: b,
|
|
114
114
|
paint: {
|
|
115
115
|
"line-color": "#2563eb",
|
|
116
116
|
"line-width": 3
|
|
117
117
|
}
|
|
118
118
|
})), pe(e, t), me(e, t);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Z(e, t) {
|
|
121
121
|
let n = e.trim(), r = n.match(/^(.+?)\s*\(([^)]+)\)\s*,?\s*(.*)$/);
|
|
122
122
|
if (r) {
|
|
123
123
|
let e = r[1].trim(), t = r[2].trim();
|
|
@@ -142,27 +142,27 @@ var z = /*@__PURE__*/ w({
|
|
|
142
142
|
subtitle: t?.trim() || ""
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
let e =
|
|
147
|
-
return !n && !r ? null : n ?
|
|
145
|
+
function Q() {
|
|
146
|
+
let e = v.address?.trim(), t = v.location?.trim(), n = !!(e && e !== "—"), r = !!(t && t !== "—");
|
|
147
|
+
return !n && !r ? null : n ? Z(e, r ? t : void 0) : {
|
|
148
148
|
title: t,
|
|
149
149
|
subtitle: ""
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function fe() {
|
|
153
153
|
let e = document.createElement("div");
|
|
154
154
|
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;
|
|
155
155
|
}
|
|
156
156
|
function pe(e, t) {
|
|
157
|
-
|
|
158
|
-
element:
|
|
157
|
+
U?.remove(), U = null, q.value && (U = new t.Marker({
|
|
158
|
+
element: fe(),
|
|
159
159
|
anchor: "bottom"
|
|
160
|
-
}).setLngLat(
|
|
160
|
+
}).setLngLat(q.value).addTo(e));
|
|
161
161
|
}
|
|
162
162
|
function me(e, t) {
|
|
163
|
-
|
|
164
|
-
let n =
|
|
165
|
-
if (!
|
|
163
|
+
H?.remove(), H = null;
|
|
164
|
+
let n = Q();
|
|
165
|
+
if (!q.value || !n) return;
|
|
166
166
|
let { title: r, subtitle: i } = n, a = document.createElement("div");
|
|
167
167
|
a.className = "appeal-map-popup-body";
|
|
168
168
|
let o = document.createElement("p");
|
|
@@ -170,154 +170,154 @@ var z = /*@__PURE__*/ w({
|
|
|
170
170
|
let e = document.createElement("p");
|
|
171
171
|
e.className = "appeal-map-popup-subtitle", e.textContent = i, a.appendChild(e);
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
H = new t.Popup({
|
|
174
174
|
closeButton: !0,
|
|
175
175
|
closeOnClick: !1,
|
|
176
176
|
offset: 36,
|
|
177
177
|
maxWidth: "260px",
|
|
178
178
|
className: "appeal-map-popup",
|
|
179
179
|
anchor: "bottom"
|
|
180
|
-
}).setLngLat(
|
|
180
|
+
}).setLngLat(q.value).setDOMContent(a).addTo(e);
|
|
181
181
|
}
|
|
182
182
|
function $(e) {
|
|
183
|
-
l(e,
|
|
183
|
+
l(e, I(P.value), d(e, N.value, [x]));
|
|
184
184
|
}
|
|
185
185
|
function he(e) {
|
|
186
|
-
m(e,
|
|
186
|
+
m(e, N.value, F.value, x);
|
|
187
187
|
}
|
|
188
188
|
function ge(e) {
|
|
189
|
-
|
|
189
|
+
P.value !== e && (P.value = e);
|
|
190
190
|
}
|
|
191
191
|
function _e(e) {
|
|
192
|
-
let t =
|
|
193
|
-
|
|
192
|
+
let t = F.value;
|
|
193
|
+
F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
194
194
|
}
|
|
195
195
|
function ve() {
|
|
196
|
-
let e =
|
|
197
|
-
if (!e || !t || !n ||
|
|
196
|
+
let e = B, t = E.value, n = T.value;
|
|
197
|
+
if (!e || !t || !n || D.value || n.clientWidth === 0 || n.clientHeight === 0) return;
|
|
198
198
|
let r = new e.Map({
|
|
199
199
|
container: t,
|
|
200
|
-
style: s(
|
|
201
|
-
...
|
|
202
|
-
bounds:
|
|
203
|
-
fitBoundsOptions:
|
|
200
|
+
style: s(I(P.value)),
|
|
201
|
+
...K.value ? {
|
|
202
|
+
bounds: K.value,
|
|
203
|
+
fitBoundsOptions: w
|
|
204
204
|
} : {
|
|
205
|
-
center:
|
|
205
|
+
center: C,
|
|
206
206
|
zoom: 16
|
|
207
207
|
},
|
|
208
208
|
attributionControl: !1,
|
|
209
209
|
locale: h
|
|
210
210
|
});
|
|
211
211
|
r.on("load", () => {
|
|
212
|
-
r.resize(),
|
|
212
|
+
r.resize(), X(r, e), he(r), A.value = !1;
|
|
213
213
|
}), r.on("error", (e) => {
|
|
214
214
|
console.warn("[AppealDetailMap]", e?.error ?? e);
|
|
215
|
-
}),
|
|
215
|
+
}), D.value = r;
|
|
216
216
|
}
|
|
217
217
|
function ye() {
|
|
218
|
-
|
|
218
|
+
D.value?.zoomIn({ duration: 250 });
|
|
219
219
|
}
|
|
220
220
|
function be() {
|
|
221
|
-
|
|
221
|
+
D.value?.zoomOut({ duration: 250 });
|
|
222
222
|
}
|
|
223
223
|
function xe() {
|
|
224
|
-
let e =
|
|
225
|
-
e &&
|
|
224
|
+
let e = D.value;
|
|
225
|
+
e && Y(e);
|
|
226
226
|
}
|
|
227
227
|
function Se() {
|
|
228
|
-
let e =
|
|
228
|
+
let e = D.value, t = B;
|
|
229
229
|
if (!e || !t) return;
|
|
230
230
|
let n = () => {
|
|
231
|
-
|
|
231
|
+
X(e, t), Y(e);
|
|
232
232
|
};
|
|
233
233
|
e.isStyleLoaded() ? n() : e.once("load", n);
|
|
234
234
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
], Se),
|
|
240
|
-
let e =
|
|
235
|
+
M(() => [
|
|
236
|
+
G.value,
|
|
237
|
+
v.address,
|
|
238
|
+
v.location
|
|
239
|
+
], Se), M(P, () => {
|
|
240
|
+
let e = D.value;
|
|
241
241
|
if (!e) return;
|
|
242
242
|
let t = () => $(e);
|
|
243
243
|
e.isStyleLoaded() ? t() : e.once("load", t);
|
|
244
|
-
}),
|
|
245
|
-
let e =
|
|
246
|
-
e?.isStyleLoaded() && p(e,
|
|
247
|
-
}),
|
|
244
|
+
}), M(F, () => {
|
|
245
|
+
let e = D.value;
|
|
246
|
+
e?.isStyleLoaded() && p(e, N.value, F.value);
|
|
247
|
+
}), re(async () => {
|
|
248
248
|
try {
|
|
249
|
-
let [e] = await Promise.all([u(),
|
|
250
|
-
|
|
249
|
+
let [e] = await Promise.all([u(), z()]);
|
|
250
|
+
B = e;
|
|
251
251
|
} catch (e) {
|
|
252
|
-
console.error(e),
|
|
252
|
+
console.error(e), A.value = !1, k.value = f;
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
|
-
!
|
|
256
|
-
|
|
257
|
-
}),
|
|
258
|
-
}),
|
|
259
|
-
|
|
255
|
+
!W && T.value && (V = new ResizeObserver(() => {
|
|
256
|
+
D.value ? D.value.resize() : ve();
|
|
257
|
+
}), V.observe(T.value));
|
|
258
|
+
}), ie(() => {
|
|
259
|
+
W = !0, V?.disconnect(), H?.remove(), H = null, U?.remove(), U = null, D.value?.remove(), D.value = null;
|
|
260
260
|
});
|
|
261
261
|
let Ce = {
|
|
262
|
-
props:
|
|
263
|
-
POLYGON_SOURCE_ID:
|
|
264
|
-
POLYGON_FILL_ID:
|
|
265
|
-
POLYGON_LINE_ID:
|
|
266
|
-
FALLBACK_CENTER:
|
|
267
|
-
FIT_OPTIONS:
|
|
268
|
-
mapAreaRef:
|
|
269
|
-
containerRef:
|
|
270
|
-
mapRef:
|
|
271
|
-
mapLoadError:
|
|
272
|
-
mapLoading:
|
|
273
|
-
baseLayers:
|
|
274
|
-
overlayLayers:
|
|
275
|
-
activeBaseId:
|
|
276
|
-
activeOverlayIds:
|
|
277
|
-
baseLayer:
|
|
278
|
-
isApplications:
|
|
279
|
-
fallbackApplicationsOverlay:
|
|
280
|
-
loadLayerSettings:
|
|
262
|
+
props: v,
|
|
263
|
+
POLYGON_SOURCE_ID: b,
|
|
264
|
+
POLYGON_FILL_ID: x,
|
|
265
|
+
POLYGON_LINE_ID: S,
|
|
266
|
+
FALLBACK_CENTER: C,
|
|
267
|
+
FIT_OPTIONS: w,
|
|
268
|
+
mapAreaRef: T,
|
|
269
|
+
containerRef: E,
|
|
270
|
+
mapRef: D,
|
|
271
|
+
mapLoadError: k,
|
|
272
|
+
mapLoading: A,
|
|
273
|
+
baseLayers: j,
|
|
274
|
+
overlayLayers: N,
|
|
275
|
+
activeBaseId: P,
|
|
276
|
+
activeOverlayIds: F,
|
|
277
|
+
baseLayer: I,
|
|
278
|
+
isApplications: L,
|
|
279
|
+
fallbackApplicationsOverlay: R,
|
|
280
|
+
loadLayerSettings: z,
|
|
281
281
|
get ml() {
|
|
282
|
-
return
|
|
282
|
+
return B;
|
|
283
283
|
},
|
|
284
284
|
set ml(e) {
|
|
285
|
-
|
|
285
|
+
B = e;
|
|
286
286
|
},
|
|
287
287
|
get resizeObserver() {
|
|
288
|
-
return
|
|
288
|
+
return V;
|
|
289
289
|
},
|
|
290
290
|
set resizeObserver(e) {
|
|
291
|
-
|
|
291
|
+
V = e;
|
|
292
292
|
},
|
|
293
293
|
get addressPopup() {
|
|
294
|
-
return
|
|
294
|
+
return H;
|
|
295
295
|
},
|
|
296
296
|
set addressPopup(e) {
|
|
297
|
-
|
|
297
|
+
H = e;
|
|
298
298
|
},
|
|
299
299
|
get addressMarker() {
|
|
300
|
-
return
|
|
300
|
+
return U;
|
|
301
301
|
},
|
|
302
302
|
set addressMarker(e) {
|
|
303
|
-
|
|
303
|
+
U = e;
|
|
304
304
|
},
|
|
305
305
|
get disposed() {
|
|
306
|
-
return
|
|
306
|
+
return W;
|
|
307
307
|
},
|
|
308
308
|
set disposed(e) {
|
|
309
|
-
|
|
309
|
+
W = e;
|
|
310
310
|
},
|
|
311
|
-
geometry:
|
|
312
|
-
bounds:
|
|
313
|
-
center:
|
|
314
|
-
mapAreaClass:
|
|
315
|
-
buildGeoJson:
|
|
316
|
-
fitToGeometry:
|
|
317
|
-
ensureLayers:
|
|
318
|
-
splitAddressLabel:
|
|
319
|
-
resolvePopupText:
|
|
320
|
-
createPinElement:
|
|
311
|
+
geometry: G,
|
|
312
|
+
bounds: K,
|
|
313
|
+
center: q,
|
|
314
|
+
mapAreaClass: de,
|
|
315
|
+
buildGeoJson: J,
|
|
316
|
+
fitToGeometry: Y,
|
|
317
|
+
ensureLayers: X,
|
|
318
|
+
splitAddressLabel: Z,
|
|
319
|
+
resolvePopupText: Q,
|
|
320
|
+
createPinElement: fe,
|
|
321
321
|
showAddressMarker: pe,
|
|
322
322
|
showAddressPopup: me,
|
|
323
323
|
remountBasemap: $,
|
|
@@ -330,57 +330,57 @@ var z = /*@__PURE__*/ w({
|
|
|
330
330
|
resetView: xe,
|
|
331
331
|
refreshLayers: Se,
|
|
332
332
|
get Crosshair() {
|
|
333
|
-
return
|
|
333
|
+
return oe;
|
|
334
334
|
},
|
|
335
335
|
get MapPin() {
|
|
336
|
-
return
|
|
336
|
+
return se;
|
|
337
337
|
},
|
|
338
338
|
get MapPinned() {
|
|
339
|
-
return
|
|
339
|
+
return ce;
|
|
340
340
|
},
|
|
341
341
|
get ZoomIn() {
|
|
342
|
-
return
|
|
342
|
+
return le;
|
|
343
343
|
},
|
|
344
344
|
get ZoomOut() {
|
|
345
|
-
return
|
|
345
|
+
return ue;
|
|
346
346
|
},
|
|
347
|
-
MapLayerMenu:
|
|
347
|
+
MapLayerMenu: ne
|
|
348
348
|
};
|
|
349
349
|
return Object.defineProperty(Ce, "__isScriptSetup", {
|
|
350
350
|
enumerable: !1,
|
|
351
351
|
value: !0
|
|
352
352
|
}), Ce;
|
|
353
353
|
}
|
|
354
|
-
}),
|
|
354
|
+
}), V = {
|
|
355
355
|
key: 0,
|
|
356
356
|
class: "flex shrink-0 items-center justify-between border-b border-slate-100 px-5 py-3.5"
|
|
357
|
-
},
|
|
357
|
+
}, H = { class: "flex items-center gap-2.5" }, U = {
|
|
358
358
|
ref: "containerRef",
|
|
359
359
|
class: "absolute inset-0 h-full w-full"
|
|
360
|
-
},
|
|
360
|
+
}, W = {
|
|
361
361
|
key: 0,
|
|
362
362
|
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
363
|
-
},
|
|
363
|
+
}, G = {
|
|
364
364
|
key: 1,
|
|
365
365
|
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/80 text-sm text-slate-500"
|
|
366
|
-
},
|
|
366
|
+
}, K = { class: "absolute right-3 top-3 z-10 flex flex-col gap-1.5" }, q = {
|
|
367
367
|
key: 1,
|
|
368
368
|
class: "flex shrink-0 items-center gap-2 border-t border-slate-100 px-5 py-2.5 text-xs text-slate-400"
|
|
369
|
-
},
|
|
370
|
-
function
|
|
371
|
-
return
|
|
372
|
-
n.variant === "panel" ? (
|
|
369
|
+
}, de = { class: "break-words" };
|
|
370
|
+
function J(e, t, n, r, i, a) {
|
|
371
|
+
return D(), x("div", { class: E(n.variant === "panel" ? "flex h-full flex-col rounded-xl border border-slate-200 bg-white shadow-card" : void 0) }, [
|
|
372
|
+
n.variant === "panel" ? (D(), x("header", V, [S("div", H, [w(r.MapPinned, {
|
|
373
373
|
class: "h-[18px] w-[18px] text-brand-600",
|
|
374
374
|
"stroke-width": 2,
|
|
375
375
|
"aria-hidden": "true"
|
|
376
|
-
}), t[0] ||=
|
|
377
|
-
|
|
376
|
+
}), t[0] ||= S("h2", { class: "text-[15px] font-semibold text-slate-800" }, "Інтерактивна карта", -1)]), t[1] ||= S("span", { class: "rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500" }, " Межі заявки ", -1)])) : b("", !0),
|
|
377
|
+
S("div", {
|
|
378
378
|
ref: "mapAreaRef",
|
|
379
|
-
class:
|
|
379
|
+
class: E(r.mapAreaClass)
|
|
380
380
|
}, [
|
|
381
|
-
|
|
382
|
-
r.mapLoadError ? (
|
|
383
|
-
|
|
381
|
+
S("div", U, null, 512),
|
|
382
|
+
r.mapLoadError ? (D(), x("p", W, A(r.mapLoadError), 1)) : r.mapLoading ? (D(), x("p", G, " Завантаження карти… ")) : b("", !0),
|
|
383
|
+
w(r.MapLayerMenu, {
|
|
384
384
|
"base-id": r.activeBaseId,
|
|
385
385
|
"active-overlay-ids": r.activeOverlayIds,
|
|
386
386
|
"base-layers": r.baseLayers,
|
|
@@ -393,65 +393,65 @@ function q(e, t, n, r, i, a) {
|
|
|
393
393
|
"base-layers",
|
|
394
394
|
"overlays"
|
|
395
395
|
]),
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
S("div", K, [
|
|
397
|
+
S("button", {
|
|
398
398
|
type: "button",
|
|
399
399
|
title: "Збільшити",
|
|
400
400
|
"aria-label": "Збільшити",
|
|
401
401
|
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-card transition-colors hover:bg-brand-50 hover:text-brand-600",
|
|
402
402
|
onClick: r.zoomIn
|
|
403
|
-
}, [
|
|
403
|
+
}, [w(r.ZoomIn, {
|
|
404
404
|
class: "h-4 w-4",
|
|
405
405
|
"stroke-width": 2,
|
|
406
406
|
"aria-hidden": "true"
|
|
407
407
|
})]),
|
|
408
|
-
|
|
408
|
+
S("button", {
|
|
409
409
|
type: "button",
|
|
410
410
|
title: "Зменшити",
|
|
411
411
|
"aria-label": "Зменшити",
|
|
412
412
|
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-card transition-colors hover:bg-brand-50 hover:text-brand-600",
|
|
413
413
|
onClick: r.zoomOut
|
|
414
|
-
}, [
|
|
414
|
+
}, [w(r.ZoomOut, {
|
|
415
415
|
class: "h-4 w-4",
|
|
416
416
|
"stroke-width": 2,
|
|
417
417
|
"aria-hidden": "true"
|
|
418
418
|
})]),
|
|
419
|
-
|
|
419
|
+
S("button", {
|
|
420
420
|
type: "button",
|
|
421
421
|
title: "Відновити масштаб",
|
|
422
422
|
"aria-label": "Відновити масштаб",
|
|
423
423
|
class: "flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 shadow-card transition-colors hover:bg-brand-50 hover:text-brand-600",
|
|
424
424
|
onClick: r.resetView
|
|
425
|
-
}, [
|
|
425
|
+
}, [w(r.Crosshair, {
|
|
426
426
|
class: "h-4 w-4",
|
|
427
427
|
"stroke-width": 2,
|
|
428
428
|
"aria-hidden": "true"
|
|
429
429
|
})])
|
|
430
430
|
])
|
|
431
431
|
], 2),
|
|
432
|
-
n.variant === "panel" ? (
|
|
433
|
-
|
|
432
|
+
n.variant === "panel" ? (D(), x("footer", q, [
|
|
433
|
+
w(r.MapPin, {
|
|
434
434
|
class: "h-3 w-3 shrink-0",
|
|
435
435
|
"stroke-width": 2,
|
|
436
436
|
"aria-hidden": "true"
|
|
437
437
|
}),
|
|
438
|
-
|
|
439
|
-
t[2] ||=
|
|
440
|
-
|
|
441
|
-
])) :
|
|
438
|
+
S("span", null, "Площа ділянки: " + A(n.area ?? "—") + " га", 1),
|
|
439
|
+
t[2] ||= S("span", { class: "text-slate-300" }, "·", -1),
|
|
440
|
+
S("span", de, A(n.location), 1)
|
|
441
|
+
])) : b("", !0)
|
|
442
442
|
], 2);
|
|
443
443
|
}
|
|
444
|
-
var
|
|
445
|
-
["render",
|
|
444
|
+
var Y = /*#__PURE__*/ e(B, [
|
|
445
|
+
["render", J],
|
|
446
446
|
["__scopeId", "data-v-ded53fc4"],
|
|
447
447
|
["__file", "C:/softpro/surveyor/shared/map/components/AppealDetailMap.vue"]
|
|
448
448
|
]);
|
|
449
449
|
//#endregion
|
|
450
450
|
//#region shared/comments/applicationNotesApi.ts
|
|
451
|
-
function
|
|
452
|
-
return `/api/resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}
|
|
451
|
+
function X(e, t, n) {
|
|
452
|
+
return `/api/resource/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${n}`;
|
|
453
453
|
}
|
|
454
|
-
async function
|
|
454
|
+
async function Z(e) {
|
|
455
455
|
let t = await e.text();
|
|
456
456
|
try {
|
|
457
457
|
let n = JSON.parse(t);
|
|
@@ -460,21 +460,21 @@ async function X(e) {
|
|
|
460
460
|
return t || `HTTP ${e.status}`;
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
async function
|
|
464
|
-
let n = "".replace(/\/$/, ""), r = await fetch(`${n}${
|
|
465
|
-
if (!r.ok) throw Error(await
|
|
463
|
+
async function Q(e, t) {
|
|
464
|
+
let n = "".replace(/\/$/, ""), r = await fetch(`${n}${X(e, t, "comments")}`, { credentials: "include" });
|
|
465
|
+
if (!r.ok) throw Error(await Z(r));
|
|
466
466
|
return [...(await r.json()).rows ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")));
|
|
467
467
|
}
|
|
468
|
-
async function
|
|
468
|
+
async function fe(e, t, n) {
|
|
469
469
|
let r = n.trim();
|
|
470
470
|
if (!r) throw Error("Введіть текст коментаря");
|
|
471
|
-
let i = "".replace(/\/$/, ""), a = await fetch(`${i}${
|
|
471
|
+
let i = "".replace(/\/$/, ""), a = await fetch(`${i}${X(e, t, "notes")}`, {
|
|
472
472
|
method: "POST",
|
|
473
473
|
credentials: "include",
|
|
474
474
|
headers: { "Content-Type": "application/json" },
|
|
475
475
|
body: JSON.stringify({ body: r })
|
|
476
476
|
});
|
|
477
|
-
if (!a.ok) throw Error(await
|
|
477
|
+
if (!a.ok) throw Error(await Z(a));
|
|
478
478
|
return a.json();
|
|
479
479
|
}
|
|
480
480
|
//#endregion
|
|
@@ -489,15 +489,20 @@ function me(e) {
|
|
|
489
489
|
let n = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
490
490
|
return n ? `${n[3]}.${n[2]}.${n[1]}` : e;
|
|
491
491
|
}
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
var $ = {
|
|
493
|
+
name: "Невідомий користувач",
|
|
494
|
+
initials: "НК"
|
|
495
|
+
};
|
|
496
|
+
function he(e) {
|
|
497
|
+
let t = e.created_by?.trim();
|
|
498
|
+
return t ? {
|
|
494
499
|
name: "Користувач",
|
|
495
|
-
initials:
|
|
496
|
-
}
|
|
500
|
+
initials: t.slice(0, 2).toUpperCase()
|
|
501
|
+
} : $;
|
|
497
502
|
}
|
|
498
503
|
//#endregion
|
|
499
504
|
//#region shared/comments/ApplicationCommentsSection.vue?vue&type=script&setup=true&lang.ts
|
|
500
|
-
var
|
|
505
|
+
var ge = /*@__PURE__*/ T({
|
|
501
506
|
__name: "ApplicationCommentsSection",
|
|
502
507
|
props: {
|
|
503
508
|
applicationId: {
|
|
@@ -524,15 +529,15 @@ var he = /*@__PURE__*/ w({
|
|
|
524
529
|
},
|
|
525
530
|
setup(e, { expose: t }) {
|
|
526
531
|
t();
|
|
527
|
-
let n = e, r =
|
|
532
|
+
let n = e, r = O([]), i = O({}), a = O(!0), o = O(""), s = O(""), c = O(!1), l = O(""), u = y(() => n.variant === "admin"), d = y(() => u.value ? "rounded-2xl border border-slate-200 bg-white shadow-card" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), f = y(() => u.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"), p = y(() => u.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), m = y(() => (u.value, "flex flex-col gap-4 p-5"));
|
|
528
533
|
function ee(e) {
|
|
529
|
-
return i.value[e.note_id] ?? n.resolveAuthor?.(e) ??
|
|
534
|
+
return i.value[e.note_id] ?? n.resolveAuthor?.(e) ?? he(e);
|
|
530
535
|
}
|
|
531
536
|
async function h() {
|
|
532
537
|
if (n.applicationId) {
|
|
533
538
|
a.value = !0, o.value = "";
|
|
534
539
|
try {
|
|
535
|
-
r.value = await
|
|
540
|
+
r.value = await Q(n.resource, n.applicationId), i.value = {};
|
|
536
541
|
} catch (e) {
|
|
537
542
|
r.value = [], o.value = e instanceof Error ? e.message : "Не вдалося завантажити коментарі";
|
|
538
543
|
} finally {
|
|
@@ -540,12 +545,12 @@ var he = /*@__PURE__*/ w({
|
|
|
540
545
|
}
|
|
541
546
|
}
|
|
542
547
|
}
|
|
543
|
-
async function
|
|
548
|
+
async function g() {
|
|
544
549
|
let e = s.value.trim();
|
|
545
550
|
if (e && !c.value && n.applicationId) {
|
|
546
551
|
c.value = !0, l.value = "";
|
|
547
552
|
try {
|
|
548
|
-
let t = await
|
|
553
|
+
let t = await fe(n.resource, n.applicationId, e);
|
|
549
554
|
i.value = {
|
|
550
555
|
...i.value,
|
|
551
556
|
[t.note_id]: n.currentAuthor
|
|
@@ -557,13 +562,13 @@ var he = /*@__PURE__*/ w({
|
|
|
557
562
|
}
|
|
558
563
|
}
|
|
559
564
|
}
|
|
560
|
-
function
|
|
561
|
-
e.preventDefault(),
|
|
565
|
+
function te(e) {
|
|
566
|
+
e.preventDefault(), g();
|
|
562
567
|
}
|
|
563
|
-
|
|
568
|
+
M(() => n.applicationId, () => {
|
|
564
569
|
h();
|
|
565
570
|
}, { immediate: !0 });
|
|
566
|
-
let
|
|
571
|
+
let _ = {
|
|
567
572
|
props: n,
|
|
568
573
|
notes: r,
|
|
569
574
|
localAuthors: i,
|
|
@@ -579,106 +584,106 @@ var he = /*@__PURE__*/ w({
|
|
|
579
584
|
bodyClass: m,
|
|
580
585
|
authorFor: ee,
|
|
581
586
|
loadNotes: h,
|
|
582
|
-
submit:
|
|
583
|
-
onSubmit:
|
|
587
|
+
submit: g,
|
|
588
|
+
onSubmit: te,
|
|
584
589
|
get MessageSquare() {
|
|
585
|
-
return
|
|
590
|
+
return R;
|
|
586
591
|
},
|
|
587
592
|
get Send() {
|
|
588
|
-
return
|
|
593
|
+
return z;
|
|
589
594
|
},
|
|
590
595
|
get formatNoteDateTime() {
|
|
591
596
|
return me;
|
|
592
597
|
}
|
|
593
598
|
};
|
|
594
|
-
return Object.defineProperty(
|
|
599
|
+
return Object.defineProperty(_, "__isScriptSetup", {
|
|
595
600
|
enumerable: !1,
|
|
596
601
|
value: !0
|
|
597
|
-
}),
|
|
602
|
+
}), _;
|
|
598
603
|
}
|
|
599
|
-
}),
|
|
604
|
+
}), _e = {
|
|
600
605
|
key: 1,
|
|
601
606
|
class: "text-center text-sm text-red-600"
|
|
602
|
-
},
|
|
607
|
+
}, ve = {
|
|
603
608
|
key: 1,
|
|
604
609
|
class: "flex flex-col gap-4"
|
|
605
|
-
},
|
|
610
|
+
}, ye = { class: "min-w-0 flex-1" }, be = { class: "flex flex-wrap items-baseline justify-between gap-x-2" }, xe = { class: "text-[14px] font-semibold text-slate-800" }, Se = { class: "text-xs text-slate-400" }, Ce = {
|
|
606
611
|
key: 0,
|
|
607
612
|
class: "mb-1.5 text-xs font-medium text-brand-600"
|
|
608
|
-
},
|
|
613
|
+
}, we = { class: "whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600" }, Te = {
|
|
609
614
|
key: 1,
|
|
610
615
|
class: "rounded-xl bg-gray-50 px-4 py-3"
|
|
611
|
-
},
|
|
616
|
+
}, Ee = { class: "mb-1 flex items-center justify-between gap-2" }, De = { class: "text-xs font-semibold text-gray-800" }, Oe = { class: "text-xs text-gray-400" }, ke = {
|
|
612
617
|
key: 0,
|
|
613
618
|
class: "mb-1 text-xs font-medium text-[#2663EB]"
|
|
614
|
-
},
|
|
619
|
+
}, Ae = { class: "whitespace-pre-wrap text-sm text-gray-700" }, je = { class: "relative min-w-0 flex-1" }, Me = [
|
|
615
620
|
"disabled",
|
|
616
621
|
"placeholder",
|
|
617
622
|
"onKeydown"
|
|
618
|
-
],
|
|
623
|
+
], Ne = ["disabled"], Pe = ["disabled"], Fe = {
|
|
619
624
|
key: 2,
|
|
620
625
|
class: "text-xs text-red-600"
|
|
621
626
|
};
|
|
622
|
-
function
|
|
623
|
-
return
|
|
624
|
-
class:
|
|
627
|
+
function Ie(e, t, n, r, i, a) {
|
|
628
|
+
return D(), x("section", { class: E(r.sectionClass) }, [S("header", { class: E(r.headerClass) }, [w(r.MessageSquare, {
|
|
629
|
+
class: E(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-brand-600" : "h-3.5 w-3.5 text-gray-400"]),
|
|
625
630
|
"stroke-width": 2,
|
|
626
631
|
"aria-hidden": "true"
|
|
627
|
-
}, null, 8, ["class"]),
|
|
632
|
+
}, null, 8, ["class"]), S("h2", { class: E(r.titleClass) }, "Коментарі", 2)], 2), S("div", { class: E(r.bodyClass) }, [r.loading ? (D(), x("p", {
|
|
628
633
|
key: 0,
|
|
629
|
-
class:
|
|
630
|
-
}, " Завантаження… ", 2)) : r.loadError ? (
|
|
631
|
-
r.notes.length === 0 ? (
|
|
634
|
+
class: E(["text-center text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
|
|
635
|
+
}, " Завантаження… ", 2)) : r.loadError ? (D(), x("p", _e, A(r.loadError), 1)) : (D(), x(v, { key: 2 }, [
|
|
636
|
+
r.notes.length === 0 ? (D(), x("p", {
|
|
632
637
|
key: 0,
|
|
633
|
-
class:
|
|
634
|
-
}, " Коментарів ще немає ", 2)) : (
|
|
638
|
+
class: E(["text-center text-sm italic", r.isAdmin ? "py-2 text-slate-400" : "py-4 text-gray-400"])
|
|
639
|
+
}, " Коментарів ще немає ", 2)) : (D(), x("ul", ve, [(D(!0), x(v, null, k(r.notes, (e) => (D(), x("li", {
|
|
635
640
|
key: e.note_id,
|
|
636
641
|
class: "flex gap-3"
|
|
637
|
-
}, [
|
|
638
|
-
|
|
639
|
-
r.authorFor(e).role ? (
|
|
640
|
-
|
|
641
|
-
], 64)) : (
|
|
642
|
-
|
|
643
|
-
r.authorFor(e).role ? (
|
|
644
|
-
|
|
642
|
+
}, [S("div", { class: E(["flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold", r.isAdmin ? "bg-brand-100 text-brand-700" : "bg-[#2663EB] text-white text-xs"]) }, A(r.authorFor(e).initials), 3), S("div", ye, [r.isAdmin ? (D(), x(v, { key: 0 }, [
|
|
643
|
+
S("div", be, [S("span", xe, A(r.authorFor(e).name), 1), S("time", Se, A(r.formatNoteDateTime(e.created_at)), 1)]),
|
|
644
|
+
r.authorFor(e).role ? (D(), x("p", Ce, A(r.authorFor(e).role), 1)) : b("", !0),
|
|
645
|
+
S("p", we, A(e.body), 1)
|
|
646
|
+
], 64)) : (D(), x("div", Te, [
|
|
647
|
+
S("div", Ee, [S("span", De, A(r.authorFor(e).name), 1), S("time", Oe, A(r.formatNoteDateTime(e.created_at)), 1)]),
|
|
648
|
+
r.authorFor(e).role ? (D(), x("p", ke, A(r.authorFor(e).role), 1)) : b("", !0),
|
|
649
|
+
S("p", Ae, A(e.body), 1)
|
|
645
650
|
]))])]))), 128))])),
|
|
646
|
-
|
|
647
|
-
class:
|
|
651
|
+
S("form", {
|
|
652
|
+
class: E(["flex items-start gap-3 border-t pt-4", r.isAdmin ? "border-slate-100" : "border-gray-100"]),
|
|
648
653
|
onSubmit: r.onSubmit
|
|
649
654
|
}, [
|
|
650
|
-
|
|
651
|
-
|
|
655
|
+
S("div", { class: E(["mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold", r.isAdmin ? "bg-brand-100 text-brand-700" : "bg-[#2663EB] text-white"]) }, A(n.currentAuthor.initials), 3),
|
|
656
|
+
S("div", je, [N(S("textarea", {
|
|
652
657
|
"onUpdate:modelValue": t[0] ||= (e) => r.draft = e,
|
|
653
658
|
rows: "3",
|
|
654
659
|
disabled: r.sending,
|
|
655
660
|
placeholder: r.isAdmin ? "Додати коментар…" : "Напишіть коментар...",
|
|
656
|
-
class:
|
|
657
|
-
onKeydown:
|
|
658
|
-
}, null, 42,
|
|
661
|
+
class: E(["w-full resize-none rounded-xl border px-4 py-3 text-sm transition-colors focus:outline-none focus:ring-2 disabled:opacity-60", r.isAdmin ? "border-slate-200 bg-slate-50 text-slate-700 placeholder:text-slate-400 focus:border-brand-400 focus:bg-white focus:ring-brand-400/30" : "border-gray-200 pr-12 text-gray-900 placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-[#2663EB]/20"]),
|
|
662
|
+
onKeydown: P(F(r.submit, ["exact", "prevent"]), ["enter"])
|
|
663
|
+
}, null, 42, Me), [[j, r.draft]]), r.isAdmin ? b("", !0) : (D(), x("button", {
|
|
659
664
|
key: 0,
|
|
660
665
|
type: "submit",
|
|
661
666
|
disabled: !r.draft.trim() || r.sending,
|
|
662
667
|
class: "absolute bottom-3 right-3 rounded-lg bg-[#2663EB] p-1.5 text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40",
|
|
663
668
|
"aria-label": "Надіслати"
|
|
664
|
-
}, [
|
|
669
|
+
}, [w(r.Send, {
|
|
665
670
|
class: "h-3.5 w-3.5",
|
|
666
671
|
"stroke-width": 2
|
|
667
|
-
})], 8,
|
|
668
|
-
r.isAdmin ? (
|
|
672
|
+
})], 8, Ne))]),
|
|
673
|
+
r.isAdmin ? (D(), x("button", {
|
|
669
674
|
key: 0,
|
|
670
675
|
type: "submit",
|
|
671
676
|
disabled: !r.draft.trim() || r.sending,
|
|
672
677
|
class: "inline-flex shrink-0 items-center gap-1.5 rounded-lg bg-brand-600 px-4 py-2.5 text-sm font-medium text-white shadow-card transition-all hover:bg-brand-700 disabled:cursor-not-allowed disabled:opacity-40"
|
|
673
|
-
}, [
|
|
678
|
+
}, [w(r.Send, {
|
|
674
679
|
class: "h-3.5 w-3.5",
|
|
675
680
|
"stroke-width": 2
|
|
676
|
-
}),
|
|
681
|
+
}), C(" " + A(r.sending ? "Надсилання…" : "Надіслати"), 1)], 8, Pe)) : b("", !0)
|
|
677
682
|
], 34),
|
|
678
|
-
r.sendError ? (
|
|
683
|
+
r.sendError ? (D(), x("p", Fe, A(r.sendError), 1)) : b("", !0)
|
|
679
684
|
], 64))], 2)], 2);
|
|
680
685
|
}
|
|
681
|
-
var
|
|
686
|
+
var Le = /*#__PURE__*/ e(ge, [["render", Ie], ["__file", "C:/softpro/surveyor/shared/comments/ApplicationCommentsSection.vue"]]), Re = /*@__PURE__*/ T({
|
|
682
687
|
__name: "ApplicationHistorySection",
|
|
683
688
|
props: {
|
|
684
689
|
items: {
|
|
@@ -694,7 +699,7 @@ var Ie = /*#__PURE__*/ e(he, [["render", Fe], ["__file", "C:/softpro/surveyor/sh
|
|
|
694
699
|
},
|
|
695
700
|
setup(e, { expose: t }) {
|
|
696
701
|
t();
|
|
697
|
-
let n = e, r =
|
|
702
|
+
let n = e, r = O(!0), i = y(() => n.variant === "admin"), a = y(() => [...n.items ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? "")))), o = y(() => i.value ? "rounded-xl border border-slate-200 bg-white shadow-card" : "overflow-hidden rounded-2xl border border-gray-200 bg-white"), s = y(() => 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"), l = y(() => i.value ? "text-[15px] font-semibold text-slate-800" : "text-xs font-semibold uppercase tracking-wider text-gray-500"), u = y(() => i.value ? "px-5 py-4" : "p-5");
|
|
698
703
|
function d(e, t) {
|
|
699
704
|
return t?.text?.trim() || (e ? c.items.find((t) => t.code === e)?.name ?? e : "");
|
|
700
705
|
}
|
|
@@ -722,10 +727,10 @@ var Ie = /*#__PURE__*/ e(he, [["render", Fe], ["__file", "C:/softpro/surveyor/sh
|
|
|
722
727
|
historyTitle: f,
|
|
723
728
|
formatDateTime: p,
|
|
724
729
|
get ChevronDown() {
|
|
725
|
-
return
|
|
730
|
+
return I;
|
|
726
731
|
},
|
|
727
732
|
get History() {
|
|
728
|
-
return
|
|
733
|
+
return L;
|
|
729
734
|
}
|
|
730
735
|
};
|
|
731
736
|
return Object.defineProperty(m, "__isScriptSetup", {
|
|
@@ -733,37 +738,37 @@ var Ie = /*#__PURE__*/ e(he, [["render", Fe], ["__file", "C:/softpro/surveyor/sh
|
|
|
733
738
|
value: !0
|
|
734
739
|
}), m;
|
|
735
740
|
}
|
|
736
|
-
}),
|
|
741
|
+
}), ze = {
|
|
737
742
|
key: 0,
|
|
738
743
|
class: "relative list-none"
|
|
739
|
-
},
|
|
740
|
-
function
|
|
741
|
-
return
|
|
742
|
-
class:
|
|
744
|
+
}, Be = { class: "relative z-10 mt-1 shrink-0" }, Ve = { class: "min-w-0 flex-1" }, He = { class: "flex flex-wrap items-baseline justify-between gap-x-2 gap-y-1" };
|
|
745
|
+
function Ue(e, t, n, r, i, a) {
|
|
746
|
+
return D(), x("section", { class: E(r.sectionClass) }, [S("header", { class: E(r.headerClass) }, [w(r.History, {
|
|
747
|
+
class: E(["shrink-0", r.isAdmin ? "h-[18px] w-[18px] text-brand-600" : "h-3.5 w-3.5 text-gray-400"]),
|
|
743
748
|
"stroke-width": 2,
|
|
744
749
|
"aria-hidden": "true"
|
|
745
|
-
}, null, 8, ["class"]),
|
|
750
|
+
}, null, 8, ["class"]), S("h2", { class: E(r.titleClass) }, "Історія", 2)], 2), S("div", { class: E(r.bodyClass) }, [S("button", {
|
|
746
751
|
type: "button",
|
|
747
|
-
class:
|
|
752
|
+
class: E(["mb-3 flex w-full items-center justify-between text-xs font-medium transition-colors", r.isAdmin ? "text-slate-500 hover:text-brand-600" : "text-gray-500 hover:text-[#2663EB]"]),
|
|
748
753
|
onClick: t[0] ||= (e) => r.open = !r.open
|
|
749
|
-
}, [
|
|
750
|
-
class:
|
|
754
|
+
}, [S("span", null, A(r.open ? "Згорнути" : `Розгорнути (${r.events.length} подій)`), 1), w(r.ChevronDown, {
|
|
755
|
+
class: E(["h-4 w-4 transition-transform", r.open ? "" : "rotate-180"]),
|
|
751
756
|
"aria-hidden": "true"
|
|
752
|
-
}, null, 8, ["class"])], 2), r.open && r.events.length ? (
|
|
757
|
+
}, null, 8, ["class"])], 2), r.open && r.events.length ? (D(), x("ol", ze, [t[1] ||= S("div", { class: "absolute bottom-2 left-[7px] top-2 w-px bg-slate-200" }, null, -1), (D(!0), x(v, null, k(r.events, (e, t) => (D(), x("li", {
|
|
753
758
|
key: e.history_id,
|
|
754
759
|
class: "relative flex gap-4 pb-6 last:pb-0"
|
|
755
|
-
}, [
|
|
756
|
-
|
|
757
|
-
e.reason ? (
|
|
760
|
+
}, [S("div", Be, [S("span", { class: E(["block h-[15px] w-[15px] rounded-full border-2 border-white", t === r.events.length - 1 ? "bg-brand-500" : "bg-slate-300"]) }, null, 2)]), S("div", Ve, [
|
|
761
|
+
S("div", He, [S("p", { class: E(["text-[14px] font-semibold", r.isAdmin ? "text-slate-800" : "text-gray-900"]) }, A(r.historyTitle(e)), 3), S("time", { class: E(["text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, A(r.formatDateTime(e.created_at) || "—"), 3)]),
|
|
762
|
+
e.reason ? (D(), x("p", {
|
|
758
763
|
key: 0,
|
|
759
|
-
class:
|
|
760
|
-
},
|
|
761
|
-
|
|
762
|
-
])]))), 128))])) : r.events.length ?
|
|
764
|
+
class: E(["mt-1 text-[13px] leading-relaxed", r.isAdmin ? "text-slate-600" : "text-gray-600"])
|
|
765
|
+
}, A(e.reason), 3)) : b("", !0),
|
|
766
|
+
S("p", { class: E(["mt-1 text-xs", r.isAdmin ? "text-slate-400" : "text-gray-400"]) }, A(e.changed_by_data?.text || "—"), 3)
|
|
767
|
+
])]))), 128))])) : r.events.length ? b("", !0) : (D(), x("p", {
|
|
763
768
|
key: 1,
|
|
764
|
-
class:
|
|
769
|
+
class: E(["text-sm", r.isAdmin ? "text-slate-400" : "text-gray-400"])
|
|
765
770
|
}, " Історія відсутня. ", 2))], 2)], 2);
|
|
766
771
|
}
|
|
767
|
-
var
|
|
772
|
+
var We = /*#__PURE__*/ e(Re, [["render", Ue], ["__file", "C:/softpro/surveyor/shared/history/ApplicationHistorySection.vue"]]);
|
|
768
773
|
//#endregion
|
|
769
|
-
export {
|
|
774
|
+
export { Y as a, $ as i, Le as n, pe as r, We as t };
|