@opengis/surveyor 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/chunks/AppIcon-CO70tpMX.js +95 -0
  2. package/dist/chunks/{AppealStatusBadge-CefimzY3.js → AppealStatusBadge-BlAaNUSK.js} +16 -16
  3. package/dist/chunks/{ApplicationHistorySection-PwToBfej.js → ApplicationHistorySection-Cwq0-Frd.js} +252 -247
  4. package/dist/chunks/{FormFilePicker-CKVdZJU9.js → FormFilePicker-DxPQlxgy.js} +1 -1
  5. package/dist/chunks/{applications-CsCsndMV.js → applications-CLhv5l_j.js} +24 -24
  6. package/dist/chunks/auth-acuaYbYM.js +60 -0
  7. package/dist/chunks/{card-B_SfARf7.js → card-9r6Si3cz.js} +315 -315
  8. package/dist/chunks/card-rXkTqZqA.js +609 -0
  9. package/dist/chunks/create-BAsyL76t.js +1306 -0
  10. package/dist/chunks/forgot-DoG6vXhq.js +100 -0
  11. package/dist/chunks/list-search-D5VdmGdV.js +5 -0
  12. package/dist/chunks/login-BWGylcSU.js +124 -0
  13. package/dist/chunks/{map-dvA3ayAK.js → map-UTBxwT7-.js} +1 -1
  14. package/dist/chunks/{mapLayersApi-CWoQ2be-.js → mapLayersApi-CBLcbADa.js} +1 -1
  15. package/dist/chunks/organizations-DbVDoURw.js +93 -0
  16. package/dist/chunks/{profile-CuxlkEev.js → profile-CkwMFh82.js} +21 -19
  17. package/dist/chunks/profile-aXlo4qqA.js +104 -0
  18. package/dist/chunks/registration-3GLgq-ae.js +102 -0
  19. package/dist/chunks/{requests-Bt8fEdRc.js → requests-BM6XqgpC.js} +213 -212
  20. package/dist/chunks/reset-CP9LsLkC.js +111 -0
  21. package/dist/chunks/surveyor-CDkI2Dcp.js +92 -0
  22. package/dist/index.css +1 -1
  23. package/dist/index.js +533 -114
  24. package/package.json +1 -1
  25. package/surveyor-types.d.ts +4 -0
  26. package/dist/chunks/card-DCyBFoDZ.js +0 -607
  27. package/dist/chunks/create-DTP9x2uS.js +0 -1046
  28. package/dist/chunks/organizations-BtuMZ5s_.js +0 -14
  29. package/dist/chunks/profile-DxZHxGum.js +0 -164
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/surveyor",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "description": "Surveyor admin and geodesist cabinet UI for embedded host applications",
@@ -8,6 +8,10 @@ export declare const Users: DefineComponent
8
8
  export declare const MapLayers: DefineComponent
9
9
  export declare const CabinetRequests: DefineComponent
10
10
  export declare const CabinetProfile: DefineComponent
11
+ export declare const Cabinet: DefineComponent
12
+ export declare const CabinetHost: DefineComponent<{ base?: string }>
13
+ export declare const cabinetRoutes: import('vue-router').RouteRecordRaw[]
14
+ export declare function createCabinetRouter(base?: string): import('vue-router').Router
11
15
 
12
16
  export interface SurveyorHostPaths {
13
17
  map?: string
@@ -1,607 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { r as t } from "./geometry-DyhIVRcw.js";
3
- import { i as n, n as r, r as i, t as a } from "./ApplicationHistorySection-PwToBfej.js";
4
- import { a as o, n as s, o as c, r as l, t as u } from "./profile-DxZHxGum.js";
5
- import { t as ee } from "./FormFilePicker-CKVdZJU9.js";
6
- import { n as d, t as te } from "./AppealStatusBadge-CefimzY3.js";
7
- import { a as ne, n as f, t as p } from "./applications-CsCsndMV.js";
8
- import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as C, openBlock as w, ref as T, renderList as E, toDisplayString as D, vModelText as O, watch as re, withCtx as k, withDirectives as A } from "vue";
9
- import { RouterLink as ie, useRoute as ae } from "vue-router";
10
- //#region cabinet/src/api/application-workflow.ts
11
- var j = "public_applications";
12
- async function oe(e, t) {
13
- let n = new FormData();
14
- n.append("file", t, t.name);
15
- let r = await fetch(l(`/api/resource/${j}/${encodeURIComponent(e)}/upload`), {
16
- method: "POST",
17
- credentials: "include",
18
- body: n
19
- });
20
- if (!r.ok) throw Error(o(await r.text(), r.status));
21
- let i = await r.json(), a = i.file_path ?? i.filePath ?? i.path;
22
- if (!a) throw Error("Сервер не повернув шлях до файлу");
23
- return {
24
- file_path: a,
25
- token: i.token
26
- };
27
- }
28
- async function se(e, t, n) {
29
- let r = await fetch(l(`/api/surveyor/applications/${encodeURIComponent(e)}/upload-updated-data`), {
30
- method: "POST",
31
- credentials: "include",
32
- headers: { "Content-Type": "application/json" },
33
- body: JSON.stringify({
34
- file_path: t,
35
- ...n?.trim() ? { note: n.trim() } : {}
36
- })
37
- });
38
- if (!r.ok) throw Error(o(await r.text(), r.status));
39
- return r.json();
40
- }
41
- async function ce(e, t) {
42
- let n = await fetch(l(`/api/surveyor/applications/${encodeURIComponent(e)}/cancel`), {
43
- method: "POST",
44
- credentials: "include",
45
- headers: { "Content-Type": "application/json" },
46
- body: JSON.stringify({ reason: t.trim() })
47
- });
48
- if (!n.ok) throw Error(o(await n.text(), n.status));
49
- return n.json();
50
- }
51
- //#endregion
52
- //#region cabinet/src/lib/application-card-files.ts
53
- function M(e, t) {
54
- let n = [...e ?? []].sort((e, t) => String(e.created_at ?? "").localeCompare(String(t.created_at ?? ""))), r = {}, i = t.file_output?.trim(), a = t.file_geodetic_survey?.trim(), o = t.file_corrected_geodetic_survey?.trim();
55
- for (let e of n) {
56
- let t = e.reason?.trim();
57
- if (!t) continue;
58
- let n = e.file?.trim(), s = e.status_from ?? null, c = e.status_to ?? null;
59
- n && i && n === i && (r.output = t), n && a && n === a && (r.survey = t), n && o && n === o && (r.corrected = t), c === "dataIssued" && s === "awaitingData" && (r.output = t), c === "underReview" && s === "dataIssued" && (r.survey = t), c === "dataIssued" && s === "underReview" && (r.corrected = t), c === "verified" && s === "underReview" && t && (r.corrected = t);
60
- }
61
- return r;
62
- }
63
- function le(e, t) {
64
- let n = e.status ?? "", r = [], i = M(e.history, e);
65
- return t && r.push({
66
- id: "geometry",
67
- typeLabel: "Межі заявки",
68
- href: f(e.app_id)
69
- }), n === "reserve" ? r : (e.file_output && r.push({
70
- id: "output",
71
- typeLabel: "Вихідні дані",
72
- href: p(e.file_output),
73
- note: i.output
74
- }), e.file_geodetic_survey ? r.push({
75
- id: "survey",
76
- typeLabel: "Оновлені файли знімання",
77
- href: p(e.file_geodetic_survey),
78
- note: i.survey
79
- }) : n === "dataIssued" && r.push({
80
- id: "survey",
81
- typeLabel: "Оновлені файли знімання",
82
- action: "upload"
83
- }), e.file_corrected_geodetic_survey && r.push({
84
- id: "corrected",
85
- typeLabel: "Відкорегований файл топографо-геодезичного знімання",
86
- href: p(e.file_corrected_geodetic_survey),
87
- note: e.note_4_file_corrected_geodetic_survey?.trim() || i.corrected || void 0
88
- }), r);
89
- }
90
- function ue(e) {
91
- return e.status === "dataIssued" ? e.note_4_file_corrected_geodetic_survey?.trim() || M(e.history, e).corrected : void 0;
92
- }
93
- //#endregion
94
- //#region cabinet/src/pages/requests/card.vue?vue&type=script&setup=true&lang.ts
95
- var de = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg bg-[#EFF4FE] px-2.5 py-1.5 text-xs font-medium text-[#2663EB] transition-colors hover:bg-[#deeafd]", fe = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg border border-[#2663EB]/35 bg-white px-2.5 py-1.5 text-xs font-medium text-[#2663EB] shadow-sm transition-colors hover:border-[#2663EB]/55 hover:bg-[#F8FAFF] cursor-pointer disabled:cursor-not-allowed disabled:opacity-50", N = /*@__PURE__*/ S({
96
- __name: "card",
97
- setup(e, { expose: o }) {
98
- o();
99
- let l = ae(), f = T(!1), p = T(null), m = T(!0), g = T(""), _ = T(""), v = T(!1), y = T(!1), b = T(""), x = T(null), S = T(""), C = T(!1), w = T(""), E = T(""), D = T(!1), O = T(""), k = h(() => p.value?.status === "awaitingData"), A = h(() => p.value?.status === "dataIssued"), j = h(() => t(p.value?.geom)), M = h(() => {
100
- let e = p.value;
101
- return e?.number?.trim() || e?.app_id || "—";
102
- }), N = h(() => {
103
- let e = p.value;
104
- return e && (e.status_data?.text?.trim() || d[e.status ?? ""]?.label || e.status) || "—";
105
- }), P = h(() => (p.value ? d[p.value.status ?? ""] : void 0) ?? {
106
- label: N.value,
107
- classes: "bg-gray-100 text-gray-600 border-gray-200",
108
- dot: "bg-gray-400"
109
- }), F = h(() => {
110
- let e = p.value;
111
- return e ? le(e, t(e.geom)) : [];
112
- }), I = h(() => {
113
- let e = s(u) || "Заявник";
114
- return {
115
- name: e,
116
- role: "Заявник",
117
- initials: i(e)
118
- };
119
- });
120
- function L(e) {
121
- return e.created_by && e.created_by === u.uid ? I.value : {
122
- name: "Адміністрація",
123
- role: "Перевірка",
124
- initials: "АД"
125
- };
126
- }
127
- let R = h(() => {
128
- let e = p.value;
129
- return e ? ue(e) : void 0;
130
- }), z = h(() => {
131
- let e = p.value;
132
- return e ? [
133
- {
134
- label: "Створення заявки",
135
- value: q(e.created_at)
136
- },
137
- {
138
- label: "Видача даних",
139
- value: q(e.source_data_issued_at)
140
- },
141
- {
142
- label: "Прийом даних",
143
- value: q(e.survey_uploaded_at)
144
- },
145
- {
146
- label: "Здане знімання",
147
- value: q(e.verified_at)
148
- },
149
- {
150
- label: "Внесення в ЄЦТО",
151
- value: q(e.integrated_at)
152
- }
153
- ] : [];
154
- }), B = h(() => {
155
- let e = p.value;
156
- if (!e) return [];
157
- let t = e.address_id_data?.text?.trim() || e.location?.trim() || "—", n = e.work_type_data?.text?.trim() || e.work_type || "—";
158
- return [[
159
- {
160
- label: "№",
161
- value: M.value
162
- },
163
- {
164
- label: "Адреса",
165
- value: t
166
- },
167
- {
168
- label: "Статус",
169
- value: N.value
170
- },
171
- {
172
- label: "Вид робіт",
173
- value: n
174
- }
175
- ], [
176
- {
177
- label: "Опис запиту",
178
- value: K(e.description)
179
- },
180
- {
181
- label: "Підстава виконання робіт",
182
- value: K(e.execution_basis)
183
- },
184
- {
185
- label: "Примітки",
186
- value: K(e.notes)
187
- },
188
- ...e.status === "cancelled" ? [{
189
- label: "Причина скасування заявки",
190
- value: K(e.cancel_reason)
191
- }] : [],
192
- ...e.signature?.trim() ? [{
193
- label: "Підпис",
194
- value: e.signature.trim()
195
- }] : []
196
- ]];
197
- }), V = 0, H = 0;
198
- re(() => String(l.params.number ?? ""), (e) => {
199
- G(e);
200
- }, { immediate: !0 });
201
- function U() {
202
- return String(l.params.number ?? "").trim();
203
- }
204
- async function W() {
205
- await G(U());
206
- }
207
- async function G(e) {
208
- let t = ++V;
209
- if (m.value = !0, g.value = "", p.value = null, !e.trim()) {
210
- m.value = !1;
211
- return;
212
- }
213
- try {
214
- let n = await ne(e.trim());
215
- if (t !== V) return;
216
- p.value = n;
217
- } catch (e) {
218
- if (t !== V) return;
219
- p.value = null, g.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
220
- } finally {
221
- t === V && (m.value = !1);
222
- }
223
- }
224
- function K(e) {
225
- return e?.trim() || "—";
226
- }
227
- function q(e) {
228
- if (!e) return "—";
229
- let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
230
- return t ? `${t[3]}.${t[2]}.${t[1]}` : "—";
231
- }
232
- function J(e) {
233
- let t = Number(e);
234
- return Number.isFinite(t) ? String(Number(t.toFixed(4))) : "—";
235
- }
236
- function Y() {
237
- x.value = null, S.value = "", b.value = "", w.value = "", E.value = "", C.value = !1;
238
- }
239
- function X() {
240
- Y(), _.value = "", y.value = !0;
241
- }
242
- function Z() {
243
- y.value = !1, Y();
244
- }
245
- async function Q(e) {
246
- x.value = e, S.value = "", w.value = "";
247
- let t = p.value?.app_id;
248
- if (!e || !t) return;
249
- let n = ++H;
250
- C.value = !0;
251
- try {
252
- let r = await oe(t, e);
253
- if (n !== H) return;
254
- S.value = r.file_path;
255
- } catch (e) {
256
- if (n !== H) return;
257
- w.value = e instanceof Error ? e.message : "Не вдалося завантажити файл";
258
- } finally {
259
- n === H && (C.value = !1);
260
- }
261
- }
262
- async function pe() {
263
- let e = p.value?.app_id;
264
- if (e) {
265
- if (!S.value) {
266
- E.value = w.value || "Спочатку завантажте файл знімання";
267
- return;
268
- }
269
- v.value = !0, E.value = "";
270
- try {
271
- await se(e, S.value, b.value), Z(), await W();
272
- } catch (e) {
273
- E.value = e instanceof Error ? e.message : "Не вдалося подати матеріали";
274
- } finally {
275
- v.value = !1;
276
- }
277
- }
278
- }
279
- async function me() {
280
- let e = p.value?.app_id;
281
- if (!e || !O.value.trim()) {
282
- _.value = "Вкажіть причину скасування";
283
- return;
284
- }
285
- v.value = !0, _.value = "";
286
- try {
287
- await ce(e, O.value), D.value = !1, O.value = "", await W();
288
- } catch (e) {
289
- _.value = e instanceof Error ? e.message : "Не вдалося скасувати заявку";
290
- } finally {
291
- v.value = !1;
292
- }
293
- }
294
- let $ = {
295
- route: l,
296
- mapExpanded: f,
297
- application: p,
298
- loading: m,
299
- loadError: g,
300
- actionError: _,
301
- actionBusy: v,
302
- submitOpen: y,
303
- submitNote: b,
304
- submitFile: x,
305
- submitUploadedPath: S,
306
- submitUploadBusy: C,
307
- submitUploadError: w,
308
- submitActionError: E,
309
- cancelOpen: D,
310
- cancelReason: O,
311
- fileDownloadBtnClass: de,
312
- fileUploadBtnClass: fe,
313
- canCancel: k,
314
- canAddUpdatedSurvey: A,
315
- showMap: j,
316
- displayNumber: M,
317
- statusLabel: N,
318
- status: P,
319
- cardFiles: F,
320
- commentCurrentAuthor: I,
321
- resolveNoteAuthor: L,
322
- reworkMessage: R,
323
- dateRows: z,
324
- infoColumns: B,
325
- get requestId() {
326
- return V;
327
- },
328
- set requestId(e) {
329
- V = e;
330
- },
331
- get submitUploadSeq() {
332
- return H;
333
- },
334
- set submitUploadSeq(e) {
335
- H = e;
336
- },
337
- routeApplicationKey: U,
338
- reloadApplicationFromRoute: W,
339
- loadApplication: G,
340
- textOrDash: K,
341
- formatDate: q,
342
- formatArea: J,
343
- resetSubmitModal: Y,
344
- openSubmitModal: X,
345
- closeSubmitModal: Z,
346
- onSubmitFileChange: Q,
347
- confirmSubmitSurvey: pe,
348
- confirmCancel: me,
349
- get RouterLink() {
350
- return ie;
351
- },
352
- AppIcon: c,
353
- FormFilePicker: ee,
354
- AppealStatusBadge: te,
355
- AppealDetailMap: n,
356
- ApplicationCommentsSection: r,
357
- ApplicationHistorySection: a
358
- };
359
- return Object.defineProperty($, "__isScriptSetup", {
360
- enumerable: !1,
361
- value: !0
362
- }), $;
363
- }
364
- }), P = {
365
- key: 0,
366
- class: "mx-auto max-w-[1400px] px-6 py-24 text-center"
367
- }, F = {
368
- key: 1,
369
- class: "mx-auto max-w-[1400px] px-6 py-16 text-center"
370
- }, I = { class: "text-sm text-gray-500" }, L = {
371
- key: 2,
372
- class: "min-h-[calc(100vh-3.5rem)] bg-gray-50"
373
- }, R = { class: "border-b border-gray-200 bg-white py-4" }, z = { class: "mx-auto max-w-[1400px] px-6" }, B = { class: "mb-3 flex items-center gap-1.5 text-xs text-gray-400" }, V = { class: "font-medium text-gray-700" }, H = { class: "flex flex-wrap items-start justify-between gap-4" }, U = { class: "text-lg font-semibold text-gray-900" }, W = { class: "mt-0.5 text-sm text-gray-500" }, G = { class: "flex flex-wrap items-center gap-3" }, K = ["disabled"], q = ["disabled"], J = { class: "mx-auto max-w-[1400px] px-6 py-5" }, Y = { class: "grid grid-cols-1 gap-5 xl:grid-cols-[minmax(0,1fr)_420px]" }, X = { class: "space-y-4" }, Z = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, Q = { class: "flex items-center justify-between border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, pe = { class: "flex items-center gap-2" }, me = ["aria-label"], $ = {
374
- key: 1,
375
- class: "px-5 py-10 text-center text-sm text-gray-400"
376
- }, he = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, ge = { class: "grid grid-cols-1 gap-x-8 p-5 sm:grid-cols-2" }, _e = { class: "mb-0.5 text-xs text-gray-400" }, ve = { class: "text-sm font-medium text-gray-900" }, ye = { class: "space-y-4" }, be = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, xe = { class: "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, Se = { class: "divide-y divide-gray-100" }, Ce = { class: "text-xs text-gray-500" }, we = { class: "rounded-md bg-gray-100 px-2 py-0.5 text-xs font-semibold text-gray-900" }, Te = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, Ee = { class: "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, De = {
377
- key: 0,
378
- class: "border-b border-gray-100 px-5 py-3 text-xs text-gray-500"
379
- }, Oe = {
380
- key: 1,
381
- class: "border-b border-amber-100 bg-amber-50 px-5 py-3 text-xs text-amber-800"
382
- }, ke = { class: "divide-y divide-gray-100" }, Ae = {
383
- key: 0,
384
- class: "px-5 py-6 text-center text-sm italic text-gray-400"
385
- }, je = { class: "flex items-center justify-between gap-3" }, Me = { class: "min-w-0" }, Ne = { class: "text-xs font-medium leading-snug text-gray-700" }, Pe = {
386
- key: 0,
387
- class: "mt-0.5 text-xs text-gray-400"
388
- }, Fe = ["href"], Ie = ["disabled"], Le = { class: "rounded-2xl border border-gray-200 bg-white p-5" }, Re = { class: "grid grid-cols-2 gap-3" }, ze = { class: "rounded-xl bg-gray-50 p-3 text-center" }, Be = { class: "text-lg font-bold text-gray-900" }, Ve = { class: "text-xs font-semibold leading-tight" }, He = {
389
- key: 0,
390
- class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm"
391
- }, Ue = { class: "w-full max-w-md rounded-2xl bg-white p-6 shadow-2xl" }, We = { class: "mt-4 space-y-3" }, Ge = {
392
- key: 0,
393
- class: "text-xs text-red-600"
394
- }, Ke = {
395
- key: 1,
396
- class: "text-xs text-emerald-600"
397
- }, qe = {
398
- key: 2,
399
- class: "text-xs text-red-600"
400
- }, Je = { class: "mt-5 flex justify-end gap-2" }, Ye = ["disabled"], Xe = {
401
- key: 1,
402
- class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm"
403
- }, Ze = { class: "w-full max-w-md rounded-2xl bg-white p-6 shadow-2xl" }, Qe = {
404
- key: 0,
405
- class: "mt-2 text-xs text-red-600"
406
- }, $e = { class: "mt-5 flex justify-end gap-2" }, et = ["disabled"], tt = {
407
- key: 3,
408
- class: "mx-auto max-w-[1400px] px-6 py-16 text-center"
409
- };
410
- function nt(e, t, n, r, i, a) {
411
- return r.loading ? (w(), v("div", P, [...t[8] ||= [y("p", { class: "text-sm text-gray-500" }, "Завантаження…", -1)]])) : r.loadError ? (w(), v("div", F, [y("p", I, D(r.loadError), 1), x(r.RouterLink, {
412
- to: "/requests",
413
- class: "mt-3 inline-block text-sm font-medium text-[#2663EB] hover:underline"
414
- }, {
415
- default: k(() => [...t[9] ||= [b(" Повернутися до звернень ", -1)]]),
416
- _: 1
417
- })])) : r.application ? (w(), v("div", L, [
418
- y("div", R, [y("div", z, [y("nav", B, [
419
- x(r.RouterLink, {
420
- to: "/requests",
421
- class: "flex items-center gap-1 transition-colors hover:text-gray-700"
422
- }, {
423
- default: k(() => [x(r.AppIcon, {
424
- name: "home",
425
- class: "h-3 w-3"
426
- }), t[10] ||= y("span", null, "Звернення", -1)]),
427
- _: 1
428
- }),
429
- x(r.AppIcon, {
430
- name: "chevron-right",
431
- class: "h-3 w-3"
432
- }),
433
- y("span", V, "#" + D(r.displayNumber), 1)
434
- ]), y("div", H, [y("div", null, [y("h1", U, " Звернення #" + D(r.displayNumber), 1), y("p", W, D(r.application.org_id_data?.text || "—"), 1)]), y("div", G, [
435
- x(r.AppealStatusBadge, { status: r.application.status ?? "" }, null, 8, ["status"]),
436
- r.canCancel ? (w(), v("button", {
437
- key: 0,
438
- type: "button",
439
- class: "flex items-center gap-1.5 rounded-lg border border-red-200 px-3 py-1.5 text-xs font-medium text-red-600 transition-all hover:bg-red-50 active:scale-95 disabled:opacity-50",
440
- disabled: r.actionBusy,
441
- onClick: t[0] ||= (e) => {
442
- r.cancelOpen = !0, r.actionError = "";
443
- }
444
- }, [x(r.AppIcon, {
445
- name: "circle-x",
446
- class: "h-3.5 w-3.5"
447
- }), t[11] ||= b(" Скасувати ", -1)], 8, K)) : _("", !0),
448
- r.canAddUpdatedSurvey ? (w(), v("button", {
449
- key: 1,
450
- type: "button",
451
- class: "flex items-center gap-1.5 rounded-lg border border-[#2663EB] px-3 py-1.5 text-xs font-medium text-[#2663EB] transition-all hover:bg-[#EFF4FE] cursor-pointer active:scale-95 disabled:cursor-not-allowed disabled:opacity-50",
452
- disabled: r.actionBusy,
453
- onClick: t[1] ||= (e) => r.openSubmitModal()
454
- }, [x(r.AppIcon, {
455
- name: "upload-cloud",
456
- class: "h-[15px] w-[15px]"
457
- }), t[12] ||= b(" Додати оновлені файли знімання ", -1)], 8, q)) : _("", !0)
458
- ])])])]),
459
- y("div", J, [y("div", Y, [y("div", X, [
460
- y("section", Z, [y("div", Q, [y("div", pe, [x(r.AppIcon, {
461
- name: "map-pin",
462
- class: "h-3.5 w-3.5 text-gray-400"
463
- }), t[13] ||= y("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Карта об'єкта ", -1)]), r.showMap ? (w(), v("button", {
464
- key: 0,
465
- type: "button",
466
- class: "rounded-md p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
467
- "aria-label": r.mapExpanded ? "Зменшити карту" : "Збільшити карту",
468
- onClick: t[2] ||= (e) => r.mapExpanded = !r.mapExpanded
469
- }, [x(r.AppIcon, {
470
- name: r.mapExpanded ? "minimize-2" : "maximize-2",
471
- class: "h-3.5 w-3.5"
472
- }, null, 8, ["name"])], 8, me)) : _("", !0)]), r.showMap ? (w(), g(r.AppealDetailMap, {
473
- key: r.application.app_id,
474
- geom: r.application.geom,
475
- address: r.application.address_id_data?.text,
476
- location: r.application.location,
477
- expanded: r.mapExpanded
478
- }, null, 8, [
479
- "geom",
480
- "address",
481
- "location",
482
- "expanded"
483
- ])) : (w(), v("p", $, " Геометрію не вказано "))]),
484
- y("section", he, [t[14] ||= y("div", { class: "border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, [y("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Основна інформація ")], -1), y("div", ge, [(w(!0), v(m, null, E(r.infoColumns, (e, t) => (w(), v("div", { key: t }, [(w(!0), v(m, null, E(e, (t, n) => (w(), v("div", {
485
- key: t.label,
486
- class: C(["py-2.5", n < e.length - 1 ? "border-b border-gray-100" : ""])
487
- }, [y("p", _e, D(t.label), 1), y("p", ve, D(t.value), 1)], 2))), 128))]))), 128))])]),
488
- r.application ? (w(), g(r.ApplicationCommentsSection, {
489
- key: 0,
490
- "application-id": r.application.app_id,
491
- resource: "public_applications",
492
- variant: "cabinet",
493
- "current-author": r.commentCurrentAuthor,
494
- "resolve-author": r.resolveNoteAuthor
495
- }, null, 8, ["application-id", "current-author"])) : _("", !0),
496
- x(r.ApplicationHistorySection, {
497
- items: r.application.history,
498
- variant: "cabinet"
499
- }, null, 8, ["items"])
500
- ]), y("div", ye, [
501
- y("section", be, [y("div", xe, [x(r.AppIcon, {
502
- name: "calendar-days",
503
- class: "h-3.5 w-3.5 text-gray-400"
504
- }), t[15] ||= y("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Дати ", -1)]), y("div", Se, [(w(!0), v(m, null, E(r.dateRows, (e) => (w(), v("div", {
505
- key: e.label,
506
- class: "flex items-center justify-between gap-3 px-5 py-3"
507
- }, [y("span", Ce, D(e.label), 1), y("span", we, D(e.value), 1)]))), 128))])]),
508
- y("section", Te, [
509
- y("div", Ee, [x(r.AppIcon, {
510
- name: "file-text",
511
- class: "h-3.5 w-3.5 text-gray-400"
512
- }), t[16] ||= y("h2", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, " Файли ", -1)]),
513
- r.application.status === "reserve" ? (w(), v("p", De, " Заявка в резерві через перетин з активною заявкою. Доступні лише межі території. ")) : _("", !0),
514
- r.reworkMessage ? (w(), v("p", Oe, " Коментар перевірки: " + D(r.reworkMessage), 1)) : _("", !0),
515
- y("div", ke, [r.cardFiles.length === 0 ? (w(), v("p", Ae, " Файли відсутні ")) : _("", !0), (w(!0), v(m, null, E(r.cardFiles, (e) => (w(), v("div", {
516
- key: e.id,
517
- class: "px-5 py-3.5"
518
- }, [y("div", je, [y("div", Me, [y("p", Ne, D(e.typeLabel), 1), e.note ? (w(), v("p", Pe, " Примітка: " + D(e.note), 1)) : _("", !0)]), e.href ? (w(), v("a", {
519
- key: 0,
520
- href: e.href,
521
- class: C(r.fileDownloadBtnClass)
522
- }, [x(r.AppIcon, {
523
- name: "download",
524
- class: "h-3 w-3"
525
- }), t[17] ||= b(" Завантажити ", -1)], 8, Fe)) : e.action === "upload" ? (w(), v("button", {
526
- key: 1,
527
- type: "button",
528
- class: C(r.fileUploadBtnClass),
529
- disabled: r.actionBusy,
530
- onClick: t[3] ||= (e) => r.openSubmitModal()
531
- }, [x(r.AppIcon, {
532
- name: "upload",
533
- class: "h-3 w-3"
534
- }), t[18] ||= b(" Додати ", -1)], 8, Ie)) : _("", !0)])]))), 128))])
535
- ]),
536
- y("section", Le, [y("div", Re, [y("div", ze, [
537
- t[19] ||= y("p", { class: "mb-1 text-xs text-gray-400" }, "Площа", -1),
538
- y("p", Be, D(r.formatArea(r.application.area)), 1),
539
- t[20] ||= y("p", { class: "text-xs text-gray-400" }, "га", -1)
540
- ]), y("div", { class: C(["rounded-xl border p-3 text-center", r.status.classes]) }, [
541
- t[21] ||= y("p", { class: "mb-1 text-xs opacity-70" }, "Статус", -1),
542
- y("span", { class: C(["mx-auto mb-1 block h-3 w-3 rounded-full", r.status.dot]) }, null, 2),
543
- y("p", Ve, D(r.statusLabel), 1)
544
- ], 2)])])
545
- ])])]),
546
- r.submitOpen ? (w(), v("div", He, [y("div", Ue, [
547
- t[22] ||= y("h3", { class: "text-base font-semibold text-gray-900" }, " Подання матеріалів знімання ", -1),
548
- t[23] ||= y("p", { class: "mt-1 text-xs text-gray-500" }, " Файл буде надіслано на перевірку. ", -1),
549
- y("div", We, [
550
- x(r.FormFilePicker, {
551
- "file-name": r.submitUploadBusy ? "Завантаження…" : r.submitFile?.name,
552
- onChange: r.onSubmitFileChange
553
- }, null, 8, ["file-name"]),
554
- r.submitUploadError ? (w(), v("p", Ge, D(r.submitUploadError), 1)) : r.submitUploadedPath ? (w(), v("p", Ke, " Файл завантажено ")) : _("", !0),
555
- r.submitActionError ? (w(), v("p", qe, D(r.submitActionError), 1)) : _("", !0),
556
- A(y("textarea", {
557
- "onUpdate:modelValue": t[4] ||= (e) => r.submitNote = e,
558
- rows: "3",
559
- placeholder: "Примітка (необовʼязково)",
560
- class: "w-full rounded-lg border border-gray-200 px-3 py-2 text-sm focus:border-[#2663EB]/40 focus:outline-none focus:ring-2 focus:ring-[#EFF4FE]"
561
- }, null, 512), [[O, r.submitNote]])
562
- ]),
563
- y("div", Je, [y("button", {
564
- type: "button",
565
- class: "rounded-lg px-4 py-2 text-sm text-gray-600 hover:bg-gray-100",
566
- onClick: r.closeSubmitModal
567
- }, " Скасувати "), y("button", {
568
- type: "button",
569
- class: "rounded-lg bg-[#2663EB] px-4 py-2 text-sm font-medium text-white hover:bg-[#1d4ed8] disabled:opacity-50",
570
- disabled: r.actionBusy || r.submitUploadBusy || !r.submitUploadedPath,
571
- onClick: r.confirmSubmitSurvey
572
- }, " Подати ", 8, Ye)])
573
- ])])) : _("", !0),
574
- r.cancelOpen ? (w(), v("div", Xe, [y("div", Ze, [
575
- t[24] ||= y("h3", { class: "text-base font-semibold text-gray-900" }, "Скасування заявки", -1),
576
- A(y("textarea", {
577
- "onUpdate:modelValue": t[5] ||= (e) => r.cancelReason = e,
578
- rows: "4",
579
- placeholder: "Причина скасування",
580
- class: "mt-4 w-full rounded-lg border border-gray-200 px-3 py-2 text-sm",
581
- onInput: t[6] ||= (e) => r.actionError = ""
582
- }, null, 544), [[O, r.cancelReason]]),
583
- r.actionError ? (w(), v("p", Qe, D(r.actionError), 1)) : _("", !0),
584
- y("div", $e, [y("button", {
585
- type: "button",
586
- class: "rounded-lg px-4 py-2 text-sm text-gray-600 hover:bg-gray-100",
587
- onClick: t[7] ||= (e) => {
588
- r.cancelOpen = !1, r.actionError = "";
589
- }
590
- }, " Закрити "), y("button", {
591
- type: "button",
592
- class: "rounded-lg bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 disabled:opacity-50",
593
- disabled: r.actionBusy,
594
- onClick: r.confirmCancel
595
- }, " Скасувати заявку ", 8, et)])
596
- ])])) : _("", !0)
597
- ])) : (w(), v("div", tt, [t[26] ||= y("p", { class: "text-sm text-gray-500" }, "Звернення не знайдено.", -1), x(r.RouterLink, {
598
- to: "/requests",
599
- class: "mt-3 inline-block text-sm font-medium text-[#2663EB] hover:underline"
600
- }, {
601
- default: k(() => [...t[25] ||= [b(" Повернутися до звернень ", -1)]]),
602
- _: 1
603
- })]));
604
- }
605
- var rt = /*#__PURE__*/ e(N, [["render", nt], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/card.vue"]]);
606
- //#endregion
607
- export { rt as default };