@opengis/surveyor 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AppIcon-CO70tpMX.js +95 -0
- package/dist/chunks/{AppealStatusBadge-CefimzY3.js → AppealStatusBadge-BlAaNUSK.js} +16 -16
- package/dist/chunks/{FormFilePicker-CKVdZJU9.js → FormFilePicker-DxPQlxgy.js} +1 -1
- package/dist/chunks/{applications-CsCsndMV.js → applications-CLhv5l_j.js} +24 -24
- package/dist/chunks/auth-acuaYbYM.js +60 -0
- package/dist/chunks/{card-DCyBFoDZ.js → card-BDqeihxR.js} +264 -262
- package/dist/chunks/{create-DTP9x2uS.js → create-BPWuoys6.js} +216 -215
- package/dist/chunks/forgot-DoG6vXhq.js +100 -0
- package/dist/chunks/list-search-D5VdmGdV.js +5 -0
- package/dist/chunks/login-BWGylcSU.js +124 -0
- package/dist/chunks/organizations-DbVDoURw.js +93 -0
- package/dist/chunks/{profile-CuxlkEev.js → profile-CkwMFh82.js} +21 -19
- package/dist/chunks/profile-aXlo4qqA.js +104 -0
- package/dist/chunks/registration-3GLgq-ae.js +102 -0
- package/dist/chunks/{requests-Bt8fEdRc.js → requests-BM6XqgpC.js} +213 -212
- package/dist/chunks/reset-CP9LsLkC.js +111 -0
- package/dist/chunks/surveyor-CDkI2Dcp.js +92 -0
- package/dist/index.css +1 -1
- package/dist/index.js +533 -114
- package/package.json +1 -1
- package/surveyor-types.d.ts +4 -0
- package/dist/chunks/organizations-BtuMZ5s_.js +0 -14
- package/dist/chunks/profile-DxZHxGum.js +0 -164
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { n as t, r as n, s as r, t as i } from "./organizations-DbVDoURw.js";
|
|
3
|
+
import { t as a } from "./AppIcon-CO70tpMX.js";
|
|
4
|
+
import { t as o } from "./list-search-D5VdmGdV.js";
|
|
5
|
+
import { n as s, r as c, t as l } from "./AppealStatusBadge-BlAaNUSK.js";
|
|
6
|
+
import { o as u } from "./applications-CLhv5l_j.js";
|
|
7
|
+
import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, normalizeClass as b, openBlock as x, reactive as S, ref as C, renderList as w, toDisplayString as T, vModelText as E, watch as D, withCtx as O, withDirectives as k, withModifiers as A } from "vue";
|
|
7
8
|
import { RouterLink as ee, useRoute as te } from "vue-router";
|
|
8
9
|
//#region cabinet/src/components/table/TablePagination.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
10
|
+
var j = /*@__PURE__*/ y({
|
|
10
11
|
__name: "TablePagination",
|
|
11
12
|
props: {
|
|
12
13
|
page: {
|
|
@@ -23,110 +24,110 @@ var A = /*@__PURE__*/ v({
|
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
emits: ["update:page", "update:pageSize"],
|
|
26
|
-
setup(e, { expose:
|
|
27
|
-
|
|
28
|
-
let
|
|
27
|
+
setup(e, { expose: t, emit: n }) {
|
|
28
|
+
t();
|
|
29
|
+
let r = e, i = n, o = [
|
|
29
30
|
10,
|
|
30
31
|
25,
|
|
31
32
|
50
|
|
32
|
-
], s =
|
|
33
|
-
let e = s.value, t = Math.min(
|
|
33
|
+
], s = f(() => Math.max(1, Math.ceil(r.total / r.pageSize))), c = f(() => r.total === 0 ? 0 : (r.page - 1) * r.pageSize + 1), l = f(() => Math.min(r.page * r.pageSize, r.total)), u = f(() => {
|
|
34
|
+
let e = s.value, t = Math.min(r.page, e), n = Array.from({ length: e }, (e, t) => t + 1).filter((n) => n === 1 || n === e || Math.abs(n - t) <= 1), i = [];
|
|
34
35
|
return n.forEach((e, t) => {
|
|
35
|
-
let
|
|
36
|
-
t > 0 &&
|
|
37
|
-
}),
|
|
36
|
+
let r = n[t - 1];
|
|
37
|
+
t > 0 && r !== void 0 && e - r > 1 && i.push("..."), i.push(e);
|
|
38
|
+
}), i;
|
|
38
39
|
});
|
|
39
|
-
function
|
|
40
|
-
|
|
40
|
+
function d(e) {
|
|
41
|
+
i("update:page", Math.max(1, Math.min(e, s.value)));
|
|
41
42
|
}
|
|
42
43
|
let p = {
|
|
43
|
-
props:
|
|
44
|
-
emit:
|
|
44
|
+
props: r,
|
|
45
|
+
emit: i,
|
|
45
46
|
pageSizes: o,
|
|
46
47
|
totalPages: s,
|
|
47
48
|
from: c,
|
|
48
49
|
to: l,
|
|
49
50
|
pages: u,
|
|
50
|
-
goTo:
|
|
51
|
-
AppIcon:
|
|
51
|
+
goTo: d,
|
|
52
|
+
AppIcon: a
|
|
52
53
|
};
|
|
53
54
|
return Object.defineProperty(p, "__isScriptSetup", {
|
|
54
55
|
enumerable: !1,
|
|
55
56
|
value: !0
|
|
56
57
|
}), p;
|
|
57
58
|
}
|
|
58
|
-
}),
|
|
59
|
+
}), M = { class: "mt-4 flex flex-wrap items-center justify-between gap-4 border-t border-gray-200 py-3" }, N = { class: "flex items-center gap-2 text-sm text-gray-500" }, P = ["value"], F = ["value"], I = { class: "flex items-center gap-1" }, L = { class: "mr-2 text-sm text-gray-500" }, R = ["disabled"], z = ["disabled"], B = {
|
|
59
60
|
key: 0,
|
|
60
61
|
class: "px-1 text-sm text-gray-400"
|
|
61
|
-
},
|
|
62
|
-
function
|
|
63
|
-
return
|
|
62
|
+
}, V = ["onClick"], H = ["disabled"], U = ["disabled"];
|
|
63
|
+
function W(e, t, n, r, i, a) {
|
|
64
|
+
return x(), h("div", M, [g("label", N, [t[5] ||= g("span", null, "Рядків на сторінці:", -1), g("select", {
|
|
64
65
|
value: n.pageSize,
|
|
65
66
|
class: "rounded-lg border border-gray-200 bg-white px-2 py-1 text-sm text-gray-700 outline-none focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/20",
|
|
66
67
|
onChange: t[0] ||= (e) => r.emit("update:pageSize", Number(e.target.value))
|
|
67
|
-
}, [(
|
|
68
|
+
}, [(x(), h(d, null, w(r.pageSizes, (e) => g("option", {
|
|
68
69
|
key: e,
|
|
69
70
|
value: e
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
}, T(e), 9, F)), 64))], 40, P)]), g("div", I, [
|
|
72
|
+
g("span", L, T(r.from) + "–" + T(r.to) + " з " + T(n.total), 1),
|
|
73
|
+
g("button", {
|
|
73
74
|
type: "button",
|
|
74
75
|
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
75
76
|
disabled: n.page <= 1,
|
|
76
77
|
"aria-label": "Перша сторінка",
|
|
77
78
|
onClick: t[1] ||= (e) => r.goTo(1)
|
|
78
|
-
}, [
|
|
79
|
+
}, [v(r.AppIcon, {
|
|
79
80
|
name: "chevrons-left",
|
|
80
81
|
class: "h-[15px] w-[15px]"
|
|
81
|
-
})], 8,
|
|
82
|
-
|
|
82
|
+
})], 8, R),
|
|
83
|
+
g("button", {
|
|
83
84
|
type: "button",
|
|
84
85
|
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
85
86
|
disabled: n.page <= 1,
|
|
86
87
|
"aria-label": "Попередня сторінка",
|
|
87
88
|
onClick: t[2] ||= (e) => r.goTo(n.page - 1)
|
|
88
|
-
}, [
|
|
89
|
+
}, [v(r.AppIcon, {
|
|
89
90
|
name: "chevron-left",
|
|
90
91
|
class: "h-[15px] w-[15px]"
|
|
91
|
-
})], 8,
|
|
92
|
-
(
|
|
92
|
+
})], 8, z),
|
|
93
|
+
(x(!0), h(d, null, w(r.pages, (e, t) => (x(), h(d, { key: `${e}-${t}` }, [e === "..." ? (x(), h("span", B, "…")) : (x(), h("button", {
|
|
93
94
|
key: 1,
|
|
94
95
|
type: "button",
|
|
95
|
-
class:
|
|
96
|
+
class: b(["h-8 min-w-[32px] rounded-lg px-2 text-sm font-medium transition-colors", n.page === e ? "bg-[#2663EB] text-white" : "text-gray-600 hover:bg-gray-100"]),
|
|
96
97
|
onClick: (t) => r.goTo(e)
|
|
97
|
-
},
|
|
98
|
-
|
|
98
|
+
}, T(e), 11, V))], 64))), 128)),
|
|
99
|
+
g("button", {
|
|
99
100
|
type: "button",
|
|
100
101
|
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
101
102
|
disabled: n.page >= r.totalPages,
|
|
102
103
|
"aria-label": "Наступна сторінка",
|
|
103
104
|
onClick: t[3] ||= (e) => r.goTo(n.page + 1)
|
|
104
|
-
}, [
|
|
105
|
+
}, [v(r.AppIcon, {
|
|
105
106
|
name: "chevron-right",
|
|
106
107
|
class: "h-[15px] w-[15px]"
|
|
107
|
-
})], 8,
|
|
108
|
-
|
|
108
|
+
})], 8, H),
|
|
109
|
+
g("button", {
|
|
109
110
|
type: "button",
|
|
110
111
|
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
111
112
|
disabled: n.page >= r.totalPages,
|
|
112
113
|
"aria-label": "Остання сторінка",
|
|
113
114
|
onClick: t[4] ||= (e) => r.goTo(r.totalPages)
|
|
114
|
-
}, [
|
|
115
|
+
}, [v(r.AppIcon, {
|
|
115
116
|
name: "chevrons-right",
|
|
116
117
|
class: "h-[15px] w-[15px]"
|
|
117
|
-
})], 8,
|
|
118
|
+
})], 8, U)
|
|
118
119
|
])]);
|
|
119
120
|
}
|
|
120
|
-
var
|
|
121
|
+
var G = /*#__PURE__*/ e(j, [["render", W], ["__file", "C:/softpro/surveyor/cabinet/src/components/table/TablePagination.vue"]]), K = /*@__PURE__*/ y({
|
|
121
122
|
__name: "RequestFilters",
|
|
122
123
|
props: { filters: {
|
|
123
124
|
type: Object,
|
|
124
125
|
required: !0
|
|
125
126
|
} },
|
|
126
127
|
emits: ["apply", "close"],
|
|
127
|
-
setup(e, { expose:
|
|
128
|
-
|
|
129
|
-
let
|
|
128
|
+
setup(e, { expose: t, emit: n }) {
|
|
129
|
+
t();
|
|
130
|
+
let r = e, i = n, o = S({ ...r.filters }), s = [
|
|
130
131
|
["year", "Рік подачі заявки"],
|
|
131
132
|
["number", "Номер звернення"],
|
|
132
133
|
["address", "Адреса"],
|
|
@@ -143,77 +144,77 @@ var ne = /*#__PURE__*/ e(A, [["render", U], ["__file", "C:/softpro/surveyor/cabi
|
|
|
143
144
|
}
|
|
144
145
|
function u() {
|
|
145
146
|
for (let e of Object.keys(o)) o[e] = "";
|
|
146
|
-
|
|
147
|
+
i("apply", l());
|
|
147
148
|
}
|
|
148
149
|
let d = {
|
|
149
|
-
props:
|
|
150
|
-
emit:
|
|
150
|
+
props: r,
|
|
151
|
+
emit: i,
|
|
151
152
|
local: o,
|
|
152
153
|
textFields: s,
|
|
153
154
|
dateFields: c,
|
|
154
155
|
snapshot: l,
|
|
155
156
|
clear: u,
|
|
156
|
-
AppIcon:
|
|
157
|
+
AppIcon: a
|
|
157
158
|
};
|
|
158
159
|
return Object.defineProperty(d, "__isScriptSetup", {
|
|
159
160
|
enumerable: !1,
|
|
160
161
|
value: !0
|
|
161
162
|
}), d;
|
|
162
163
|
}
|
|
163
|
-
}),
|
|
164
|
+
}), q = { class: "flex h-full w-[420px] max-w-full animate-[slide-in_0.2s_ease] flex-col overflow-hidden bg-white shadow-2xl" }, J = { class: "flex items-center justify-between border-b border-gray-100 px-6 py-4" }, Y = { class: "flex flex-1 flex-col gap-5 overflow-y-auto px-6 py-5" }, X = { class: "mb-2 block text-sm font-semibold text-gray-800" }, Z = { class: "relative block" }, Q = ["onUpdate:modelValue", "placeholder"], ne = { class: "mb-2 block text-sm font-semibold text-gray-800" }, re = ["onUpdate:modelValue"], ie = { class: "flex gap-3 border-t border-gray-100 px-6 py-4" };
|
|
164
165
|
function ae(e, t, n, r, i, a) {
|
|
165
|
-
return
|
|
166
|
+
return x(), h("div", {
|
|
166
167
|
class: "fixed inset-0 z-50 flex justify-end bg-slate-900/25",
|
|
167
|
-
onMousedown: t[2] ||=
|
|
168
|
-
}, [
|
|
169
|
-
|
|
168
|
+
onMousedown: t[2] ||= A((e) => r.emit("close"), ["self"])
|
|
169
|
+
}, [g("div", q, [
|
|
170
|
+
g("div", J, [t[3] ||= g("h2", { class: "text-base font-semibold text-gray-900" }, "Фільтри", -1), g("button", {
|
|
170
171
|
type: "button",
|
|
171
172
|
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
|
|
172
173
|
"aria-label": "Закрити",
|
|
173
174
|
onClick: t[0] ||= (e) => r.emit("close")
|
|
174
|
-
}, [
|
|
175
|
+
}, [v(r.AppIcon, {
|
|
175
176
|
name: "x",
|
|
176
177
|
class: "h-[18px] w-[18px]"
|
|
177
178
|
})])]),
|
|
178
|
-
|
|
179
|
+
g("div", Y, [(x(), h(d, null, w(r.textFields, ([e, t]) => g("label", {
|
|
179
180
|
key: e,
|
|
180
181
|
class: "block"
|
|
181
|
-
}, [
|
|
182
|
+
}, [g("span", X, T(t), 1), g("span", Z, [k(g("input", {
|
|
182
183
|
"onUpdate:modelValue": (t) => r.local[e] = t,
|
|
183
184
|
type: "text",
|
|
184
185
|
placeholder: t,
|
|
185
186
|
class: "w-full rounded-xl border border-gray-200 px-4 py-3 pr-10 text-sm outline-none transition-colors placeholder:text-gray-400 focus:border-[#2663EB]"
|
|
186
|
-
}, null, 8,
|
|
187
|
+
}, null, 8, Q), [[E, r.local[e]]]), v(r.AppIcon, {
|
|
187
188
|
name: "search",
|
|
188
189
|
class: "pointer-events-none absolute right-3 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-gray-300"
|
|
189
|
-
})])])), 64)), (
|
|
190
|
+
})])])), 64)), (x(), h(d, null, w(r.dateFields, ([e, t]) => g("label", {
|
|
190
191
|
key: e,
|
|
191
192
|
class: "block"
|
|
192
|
-
}, [
|
|
193
|
+
}, [g("span", ne, T(t), 1), k(g("input", {
|
|
193
194
|
"onUpdate:modelValue": (t) => r.local[e] = t,
|
|
194
195
|
type: "date",
|
|
195
196
|
class: "w-full appearance-none rounded-xl border border-gray-200 px-4 py-3 text-sm text-gray-500 outline-none transition-colors focus:border-[#2663EB]"
|
|
196
|
-
}, null, 8, re), [[
|
|
197
|
-
|
|
197
|
+
}, null, 8, re), [[E, r.local[e]]])])), 64))]),
|
|
198
|
+
g("div", ie, [g("button", {
|
|
198
199
|
type: "button",
|
|
199
200
|
class: "flex-1 rounded-xl bg-gray-100 py-2.5 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",
|
|
200
201
|
onClick: r.clear
|
|
201
|
-
}, " Очистити "),
|
|
202
|
+
}, " Очистити "), g("button", {
|
|
202
203
|
type: "button",
|
|
203
204
|
class: "flex-1 rounded-xl bg-[#2663EB] py-2.5 text-sm font-medium text-white transition-colors hover:bg-[#1d4fd8]",
|
|
204
205
|
onClick: t[1] ||= (e) => r.emit("apply", r.snapshot())
|
|
205
206
|
}, " Застосувати ")])
|
|
206
207
|
])], 32);
|
|
207
208
|
}
|
|
208
|
-
var oe = /*#__PURE__*/ e(
|
|
209
|
+
var oe = /*#__PURE__*/ e(K, [["render", ae], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/RequestFilters.vue"]]), se = /*@__PURE__*/ y({
|
|
209
210
|
__name: "index",
|
|
210
|
-
setup(e, { expose:
|
|
211
|
-
|
|
212
|
-
let
|
|
213
|
-
let e =
|
|
211
|
+
setup(e, { expose: d }) {
|
|
212
|
+
d();
|
|
213
|
+
let p = te(), m = f(() => {
|
|
214
|
+
let e = p.query.submitted;
|
|
214
215
|
return typeof e == "string" && e ? e : "";
|
|
215
|
-
}),
|
|
216
|
-
function
|
|
216
|
+
}), h = C("all"), g = C("list"), _ = C(1), v = C(10), y = C(!1), b = C(null);
|
|
217
|
+
function x() {
|
|
217
218
|
return {
|
|
218
219
|
year: "",
|
|
219
220
|
number: "",
|
|
@@ -226,149 +227,149 @@ var oe = /*#__PURE__*/ e(W, [["render", ae], ["__file", "C:/softpro/surveyor/cab
|
|
|
226
227
|
ectsoDate: ""
|
|
227
228
|
};
|
|
228
229
|
}
|
|
229
|
-
let
|
|
230
|
-
let e =
|
|
231
|
-
for (let n of
|
|
230
|
+
let S = C(x()), w = C([]), T = C(0), E = C(null), O = C(!0), k = C(""), A = f(() => r.value.find((e) => e.id === i.value)?.shortName ?? ""), j = f(() => Object.values(S.value).filter((e) => e.trim()).length), M = f(() => {
|
|
231
|
+
let e = E.value, t = {};
|
|
232
|
+
for (let n of c) {
|
|
232
233
|
let r = n.key === "all" ? e?.count : e?.[n.key], i = Number(r ?? 0);
|
|
233
234
|
t[n.key] = Number.isFinite(i) ? i : 0;
|
|
234
235
|
}
|
|
235
236
|
return t;
|
|
236
|
-
}),
|
|
237
|
-
function
|
|
237
|
+
}), N = f(() => w.value.reduce((e, t) => e + t.area, 0));
|
|
238
|
+
function P(e) {
|
|
238
239
|
return e?.text?.trim() ?? "";
|
|
239
240
|
}
|
|
240
|
-
function
|
|
241
|
+
function F(e) {
|
|
241
242
|
let t = e.location?.trim() ?? "";
|
|
242
243
|
return {
|
|
243
244
|
id: e.app_id,
|
|
244
245
|
number: e.number?.trim() || e.app_id,
|
|
245
|
-
organization:
|
|
246
|
-
address:
|
|
246
|
+
organization: P(e.org_id_data) || "—",
|
|
247
|
+
address: P(e.address_id_data) || t || "—",
|
|
247
248
|
location: t,
|
|
248
249
|
status: e.status ?? "",
|
|
249
|
-
workType:
|
|
250
|
+
workType: P(e.work_type_data) || e.work_type || "—",
|
|
250
251
|
area: Number(e.area) || 0
|
|
251
252
|
};
|
|
252
253
|
}
|
|
253
|
-
function
|
|
254
|
-
return [
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
function I() {
|
|
255
|
+
return [o.value.trim(), [
|
|
256
|
+
S.value.number,
|
|
257
|
+
S.value.address,
|
|
258
|
+
S.value.location
|
|
258
259
|
].map((e) => e.trim()).filter(Boolean).join(" ")].filter(Boolean).join(" ").trim() || void 0;
|
|
259
260
|
}
|
|
260
|
-
function
|
|
261
|
+
function L(e) {
|
|
261
262
|
let t = {};
|
|
262
|
-
return
|
|
263
|
+
return i.value && (t.org_id = i.value), e !== "all" && (t.status = e), t;
|
|
263
264
|
}
|
|
264
|
-
let
|
|
265
|
-
async function
|
|
266
|
-
let e = ++
|
|
267
|
-
|
|
265
|
+
let R = 0;
|
|
266
|
+
async function z() {
|
|
267
|
+
let e = ++R;
|
|
268
|
+
O.value = !0, k.value = "";
|
|
268
269
|
try {
|
|
269
|
-
let t =
|
|
270
|
-
page:
|
|
271
|
-
limit:
|
|
270
|
+
let t = h.value, n = await u({
|
|
271
|
+
page: _.value,
|
|
272
|
+
limit: v.value,
|
|
272
273
|
sort: "-created_at",
|
|
273
|
-
search:
|
|
274
|
-
filters:
|
|
274
|
+
search: I(),
|
|
275
|
+
filters: L(t)
|
|
275
276
|
});
|
|
276
|
-
if (e !==
|
|
277
|
-
let r = Number(n.total ?? n.summary?.count ?? 0), i = Math.max(1, Math.ceil((Number.isFinite(r) ? r : 0) /
|
|
278
|
-
if (
|
|
279
|
-
|
|
277
|
+
if (e !== R) return;
|
|
278
|
+
let r = Number(n.total ?? n.summary?.count ?? 0), i = Math.max(1, Math.ceil((Number.isFinite(r) ? r : 0) / v.value) || 1);
|
|
279
|
+
if (_.value > i) {
|
|
280
|
+
_.value = i;
|
|
280
281
|
return;
|
|
281
282
|
}
|
|
282
|
-
|
|
283
|
+
w.value = (n.rows ?? []).map(F), T.value = Number.isFinite(r) ? r : 0, t === "all" && (E.value = n.summary ?? null);
|
|
283
284
|
} catch (t) {
|
|
284
|
-
if (e !==
|
|
285
|
-
|
|
285
|
+
if (e !== R) return;
|
|
286
|
+
w.value = [], T.value = 0, E.value = null, k.value = t instanceof Error ? t.message : "Не вдалося завантажити звернення";
|
|
286
287
|
} finally {
|
|
287
|
-
e ===
|
|
288
|
+
e === R && (O.value = !1);
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
-
(
|
|
291
|
+
function B() {
|
|
292
|
+
(n.value || t.value) && (_.value === 1 ? z() : _.value = 1);
|
|
292
293
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
() =>
|
|
294
|
+
D([
|
|
295
|
+
n,
|
|
296
|
+
t,
|
|
297
|
+
i,
|
|
298
|
+
() => p.query.submitted
|
|
298
299
|
], () => {
|
|
299
|
-
|
|
300
|
-
}, { immediate: !0 }),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
300
|
+
B();
|
|
301
|
+
}, { immediate: !0 }), D([
|
|
302
|
+
o,
|
|
303
|
+
S,
|
|
304
|
+
h,
|
|
305
|
+
v
|
|
305
306
|
], () => {
|
|
306
|
-
|
|
307
|
-
}),
|
|
308
|
-
(
|
|
307
|
+
B();
|
|
308
|
+
}), D(_, () => {
|
|
309
|
+
(n.value || t.value) && z();
|
|
309
310
|
});
|
|
310
|
-
function
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
function V(e) {
|
|
314
|
-
x.value = e, v.value = !1;
|
|
311
|
+
function V() {
|
|
312
|
+
y.value = !0;
|
|
315
313
|
}
|
|
316
314
|
function H(e) {
|
|
315
|
+
S.value = e, y.value = !1;
|
|
316
|
+
}
|
|
317
|
+
function U(e) {
|
|
317
318
|
return `/requests/${encodeURIComponent(e)}`;
|
|
318
319
|
}
|
|
319
|
-
let
|
|
320
|
-
route:
|
|
321
|
-
submitSuccess:
|
|
322
|
-
activeStatus:
|
|
323
|
-
layout:
|
|
324
|
-
page:
|
|
325
|
-
pageSize:
|
|
326
|
-
filtersOpen:
|
|
327
|
-
hoveredId:
|
|
328
|
-
emptyFilters:
|
|
329
|
-
appliedFilters:
|
|
330
|
-
appeals:
|
|
331
|
-
total:
|
|
332
|
-
summary:
|
|
333
|
-
loading:
|
|
334
|
-
loadError:
|
|
335
|
-
orgName:
|
|
336
|
-
activeFilterCount:
|
|
337
|
-
statusCounts:
|
|
338
|
-
totalArea:
|
|
339
|
-
lookupText:
|
|
340
|
-
mapAppeal:
|
|
341
|
-
buildSearch:
|
|
342
|
-
listFilters:
|
|
320
|
+
let W = {
|
|
321
|
+
route: p,
|
|
322
|
+
submitSuccess: m,
|
|
323
|
+
activeStatus: h,
|
|
324
|
+
layout: g,
|
|
325
|
+
page: _,
|
|
326
|
+
pageSize: v,
|
|
327
|
+
filtersOpen: y,
|
|
328
|
+
hoveredId: b,
|
|
329
|
+
emptyFilters: x,
|
|
330
|
+
appliedFilters: S,
|
|
331
|
+
appeals: w,
|
|
332
|
+
total: T,
|
|
333
|
+
summary: E,
|
|
334
|
+
loading: O,
|
|
335
|
+
loadError: k,
|
|
336
|
+
orgName: A,
|
|
337
|
+
activeFilterCount: j,
|
|
338
|
+
statusCounts: M,
|
|
339
|
+
totalArea: N,
|
|
340
|
+
lookupText: P,
|
|
341
|
+
mapAppeal: F,
|
|
342
|
+
buildSearch: I,
|
|
343
|
+
listFilters: L,
|
|
343
344
|
get requestId() {
|
|
344
|
-
return
|
|
345
|
+
return R;
|
|
345
346
|
},
|
|
346
347
|
set requestId(e) {
|
|
347
|
-
|
|
348
|
+
R = e;
|
|
348
349
|
},
|
|
349
|
-
loadAppeals:
|
|
350
|
-
reloadFromFirstPage:
|
|
351
|
-
openFilters:
|
|
352
|
-
applyFilters:
|
|
353
|
-
requestPath:
|
|
350
|
+
loadAppeals: z,
|
|
351
|
+
reloadFromFirstPage: B,
|
|
352
|
+
openFilters: V,
|
|
353
|
+
applyFilters: H,
|
|
354
|
+
requestPath: U,
|
|
354
355
|
get RouterLink() {
|
|
355
356
|
return ee;
|
|
356
357
|
},
|
|
357
|
-
AppealStatusBadge:
|
|
358
|
-
AppIcon:
|
|
359
|
-
TablePagination:
|
|
358
|
+
AppealStatusBadge: l,
|
|
359
|
+
AppIcon: a,
|
|
360
|
+
TablePagination: G,
|
|
360
361
|
RequestFilters: oe,
|
|
361
362
|
get APPEAL_STATUS() {
|
|
362
|
-
return
|
|
363
|
+
return s;
|
|
363
364
|
},
|
|
364
365
|
get REQUEST_STATUS_TABS() {
|
|
365
|
-
return
|
|
366
|
+
return c;
|
|
366
367
|
}
|
|
367
368
|
};
|
|
368
|
-
return Object.defineProperty(
|
|
369
|
+
return Object.defineProperty(W, "__isScriptSetup", {
|
|
369
370
|
enumerable: !1,
|
|
370
371
|
value: !0
|
|
371
|
-
}),
|
|
372
|
+
}), W;
|
|
372
373
|
}
|
|
373
374
|
}), ce = { class: "min-h-[calc(100vh-3.5rem)] bg-gray-50" }, le = { class: "border-b border-gray-200 bg-white pt-5 pb-0" }, ue = { class: "mx-auto max-w-[1400px] px-6" }, de = { class: "mb-4" }, fe = { class: "mt-0.5 flex items-center gap-1.5 text-sm text-gray-400" }, pe = { class: "mx-auto max-w-[1400px] px-6" }, me = { class: "flex flex-wrap items-center mb-1" }, he = ["onClick"], ge = { class: "flex items-center gap-2 pb-1 pt-1" }, _e = {
|
|
374
375
|
key: 0,
|
|
@@ -393,120 +394,120 @@ var oe = /*#__PURE__*/ e(W, [["render", ae], ["__file", "C:/softpro/surveyor/cab
|
|
|
393
394
|
class: "grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3"
|
|
394
395
|
}, ze = { class: "p-4" }, Be = { class: "mb-3 flex items-start justify-between gap-2" }, Ve = { class: "mb-1 truncate text-sm font-semibold text-gray-900" }, He = { class: "mb-3 truncate text-xs text-gray-400" }, Ue = { class: "line-clamp-2 text-xs text-gray-500" };
|
|
395
396
|
function We(e, t, n, r, i, a) {
|
|
396
|
-
return
|
|
397
|
-
|
|
397
|
+
return x(), h("div", ce, [
|
|
398
|
+
g("div", le, [g("div", ue, [g("div", de, [t[6] ||= g("h1", { class: "text-xl font-semibold text-gray-900" }, "Звернення", -1), g("p", fe, [v(r.AppIcon, {
|
|
398
399
|
name: "building-2",
|
|
399
400
|
class: "h-[13px] w-[13px] text-gray-300"
|
|
400
|
-
}),
|
|
401
|
+
}), _(" " + T(r.orgName), 1)])])]), g("div", pe, [g("div", me, [(x(!0), h(d, null, w(r.REQUEST_STATUS_TABS, (e) => (x(), h("button", {
|
|
401
402
|
key: e.key,
|
|
402
403
|
type: "button",
|
|
403
|
-
class:
|
|
404
|
+
class: b(["flex items-center gap-1.5 whitespace-nowrap border-b-2 px-2.5 py-2.5 text-sm font-medium transition-colors", r.activeStatus === e.key ? "border-[#2663EB] text-[#2663EB]" : "border-transparent text-gray-500 hover:text-gray-700"]),
|
|
404
405
|
onClick: (t) => r.activeStatus = e.key
|
|
405
|
-
}, [
|
|
406
|
+
}, [_(T(e.label) + " ", 1), g("span", { class: b(["rounded-full px-1.5 py-0.5 text-xs font-medium", r.activeStatus === e.key ? "bg-[#2663EB] text-white" : "bg-gray-100 text-gray-500"]) }, T(r.statusCounts[e.key] || 0), 3)], 10, he))), 128))]), g("div", ge, [g("button", {
|
|
406
407
|
type: "button",
|
|
407
408
|
class: "relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm text-gray-600 transition-colors hover:border-gray-300",
|
|
408
409
|
onClick: r.openFilters
|
|
409
410
|
}, [
|
|
410
|
-
|
|
411
|
+
v(r.AppIcon, {
|
|
411
412
|
name: "sliders-horizontal",
|
|
412
413
|
class: "h-3.5 w-3.5"
|
|
413
414
|
}),
|
|
414
|
-
t[7] ||=
|
|
415
|
-
r.activeFilterCount > 0 ? (
|
|
416
|
-
]),
|
|
415
|
+
t[7] ||= _(" Фільтри ", -1),
|
|
416
|
+
r.activeFilterCount > 0 ? (x(), h("span", _e, T(r.activeFilterCount), 1)) : m("", !0)
|
|
417
|
+
]), g("div", ve, [g("button", {
|
|
417
418
|
type: "button",
|
|
418
|
-
class:
|
|
419
|
+
class: b(["rounded-md p-1.5 transition-all", r.layout === "list" ? "bg-white text-gray-900 shadow-sm" : "text-gray-400 hover:text-gray-600"]),
|
|
419
420
|
"aria-label": "Список",
|
|
420
421
|
onClick: t[0] ||= (e) => r.layout = "list"
|
|
421
|
-
}, [
|
|
422
|
+
}, [v(r.AppIcon, {
|
|
422
423
|
name: "list",
|
|
423
424
|
class: "h-[15px] w-[15px]"
|
|
424
|
-
})], 2),
|
|
425
|
+
})], 2), g("button", {
|
|
425
426
|
type: "button",
|
|
426
|
-
class:
|
|
427
|
+
class: b(["rounded-md p-1.5 transition-all", r.layout === "grid" ? "bg-white text-gray-900 shadow-sm" : "text-gray-400 hover:text-gray-600"]),
|
|
427
428
|
"aria-label": "Картки",
|
|
428
429
|
onClick: t[1] ||= (e) => r.layout = "grid"
|
|
429
|
-
}, [
|
|
430
|
+
}, [v(r.AppIcon, {
|
|
430
431
|
name: "layout-grid",
|
|
431
432
|
class: "h-[15px] w-[15px]"
|
|
432
433
|
})], 2)])])])]),
|
|
433
|
-
|
|
434
|
+
g("div", ye, [r.submitSuccess ? (x(), h("p", be, " Звернення № " + T(r.submitSuccess) + " успішно подано. ", 1)) : m("", !0), r.loading && r.appeals.length === 0 ? (x(), h("div", xe, [...t[8] ||= [g("p", { class: "text-sm text-gray-500" }, "Завантаження…", -1)]])) : r.loadError ? (x(), h("div", Se, [v(r.AppIcon, {
|
|
434
435
|
name: "alert-circle",
|
|
435
436
|
class: "mx-auto mb-3 h-9 w-9 text-gray-300"
|
|
436
|
-
}),
|
|
437
|
+
}), g("p", Ce, T(r.loadError), 1)])) : r.appeals.length === 0 ? (x(), h("div", we, [v(r.AppIcon, {
|
|
437
438
|
name: "alert-circle",
|
|
438
439
|
class: "mx-auto mb-3 h-9 w-9 text-gray-300"
|
|
439
|
-
}), t[9] ||=
|
|
440
|
+
}), t[9] ||= g("p", { class: "text-sm text-gray-500" }, "Звернень не знайдено", -1)])) : (x(), h("div", {
|
|
440
441
|
key: 4,
|
|
441
|
-
class:
|
|
442
|
-
}, [r.layout === "list" ? (
|
|
443
|
-
t[12] ||=
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
442
|
+
class: b(r.loading ? "opacity-60" : "")
|
|
443
|
+
}, [r.layout === "list" ? (x(), h(d, { key: 0 }, [g("div", Te, [g("span", null, [t[10] ||= _(" Об'єктів: ", -1), g("strong", Ee, T(r.appeals.length) + " із " + T(r.total), 1)]), g("span", null, [t[11] ||= _(" Активна площа на сторінці: ", -1), g("span", De, T(r.totalArea.toFixed(1)) + " га", 1)])]), g("table", Oe, [
|
|
444
|
+
t[12] ||= g("colgroup", null, [
|
|
445
|
+
g("col", { style: { width: "18%" } }),
|
|
446
|
+
g("col", { style: { width: "24%" } }),
|
|
447
|
+
g("col", { style: { width: "24%" } }),
|
|
448
|
+
g("col", { style: { width: "18%" } }),
|
|
449
|
+
g("col", { style: { width: "16%" } })
|
|
449
450
|
], -1),
|
|
450
|
-
|
|
451
|
+
g("thead", null, [g("tr", null, [(x(), h(d, null, w([
|
|
451
452
|
"№",
|
|
452
453
|
"Організація / особа",
|
|
453
454
|
"Адреса",
|
|
454
455
|
"Статус",
|
|
455
456
|
"Вид робіт"
|
|
456
|
-
], (e) =>
|
|
457
|
+
], (e) => g("th", {
|
|
457
458
|
key: e,
|
|
458
459
|
class: "px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-400"
|
|
459
|
-
},
|
|
460
|
-
|
|
460
|
+
}, T(e), 1)), 64))])]),
|
|
461
|
+
g("tbody", null, [(x(!0), h(d, null, w(r.appeals, (e) => (x(), h("tr", {
|
|
461
462
|
key: e.id,
|
|
462
463
|
class: "bg-white transition-shadow hover:shadow-sm",
|
|
463
464
|
onMouseenter: (t) => r.hoveredId = e.id,
|
|
464
465
|
onMouseleave: t[2] ||= (e) => r.hoveredId = null
|
|
465
466
|
}, [
|
|
466
|
-
|
|
467
|
+
g("td", Ae, [g("div", je, [v(r.RouterLink, {
|
|
467
468
|
to: r.requestPath(e.id),
|
|
468
469
|
class: "whitespace-nowrap text-sm font-medium text-[#2663EB] hover:underline"
|
|
469
470
|
}, {
|
|
470
|
-
default:
|
|
471
|
+
default: O(() => [_(" #" + T(e.number), 1)]),
|
|
471
472
|
_: 2
|
|
472
|
-
}, 1032, ["to"]),
|
|
473
|
+
}, 1032, ["to"]), v(r.RouterLink, {
|
|
473
474
|
to: r.requestPath(e.id),
|
|
474
|
-
class:
|
|
475
|
+
class: b(["rounded-lg p-1.5 text-gray-400 transition-all hover:bg-gray-100 hover:text-gray-700", r.hoveredId === e.id ? "opacity-100" : "opacity-0"]),
|
|
475
476
|
title: "Переглянути"
|
|
476
477
|
}, {
|
|
477
|
-
default:
|
|
478
|
+
default: O(() => [v(r.AppIcon, {
|
|
478
479
|
name: "eye",
|
|
479
480
|
class: "h-[13px] w-[13px]"
|
|
480
481
|
})]),
|
|
481
482
|
_: 1
|
|
482
483
|
}, 8, ["to", "class"])])]),
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
g("td", Me, [g("p", Ne, T(e.organization || "—"), 1)]),
|
|
485
|
+
g("td", Pe, [g("p", $, T(e.address), 1)]),
|
|
486
|
+
g("td", Fe, [v(r.AppealStatusBadge, {
|
|
486
487
|
status: e.status,
|
|
487
488
|
size: "sm"
|
|
488
489
|
}, null, 8, ["status"])]),
|
|
489
|
-
|
|
490
|
+
g("td", Ie, [g("p", Le, T(e.workType), 1)])
|
|
490
491
|
], 40, ke))), 128))])
|
|
491
|
-
])], 64)) : (
|
|
492
|
+
])], 64)) : (x(), h("div", Re, [(x(!0), h(d, null, w(r.appeals, (e) => (x(), h("article", {
|
|
492
493
|
key: e.id,
|
|
493
494
|
class: "overflow-hidden rounded-2xl border border-gray-200 bg-white transition-all hover:border-gray-300 hover:shadow-md"
|
|
494
|
-
}, [
|
|
495
|
-
|
|
495
|
+
}, [g("div", { class: b(["h-1", r.APPEAL_STATUS[e.status]?.dot ?? "bg-gray-400"]) }, null, 2), g("div", ze, [
|
|
496
|
+
g("div", Be, [v(r.RouterLink, {
|
|
496
497
|
to: r.requestPath(e.id),
|
|
497
498
|
class: "font-mono text-xs font-semibold text-[#2663EB]"
|
|
498
499
|
}, {
|
|
499
|
-
default:
|
|
500
|
+
default: O(() => [_(" #" + T(e.number), 1)]),
|
|
500
501
|
_: 2
|
|
501
|
-
}, 1032, ["to"]),
|
|
502
|
+
}, 1032, ["to"]), v(r.AppealStatusBadge, {
|
|
502
503
|
status: e.status,
|
|
503
504
|
size: "sm",
|
|
504
505
|
chevron: ""
|
|
505
506
|
}, null, 8, ["status"])]),
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
])]))), 128))])),
|
|
507
|
+
g("p", Ve, T(e.organization || "Без організації"), 1),
|
|
508
|
+
g("p", He, T(e.address), 1),
|
|
509
|
+
g("p", Ue, T(e.workType), 1)
|
|
510
|
+
])]))), 128))])), v(r.TablePagination, {
|
|
510
511
|
page: r.page,
|
|
511
512
|
"onUpdate:page": t[3] ||= (e) => r.page = e,
|
|
512
513
|
"page-size": r.pageSize,
|
|
@@ -517,12 +518,12 @@ function We(e, t, n, r, i, a) {
|
|
|
517
518
|
"page-size",
|
|
518
519
|
"total"
|
|
519
520
|
])], 2))]),
|
|
520
|
-
r.filtersOpen ? (
|
|
521
|
+
r.filtersOpen ? (x(), p(r.RequestFilters, {
|
|
521
522
|
key: 0,
|
|
522
523
|
filters: r.appliedFilters,
|
|
523
524
|
onApply: r.applyFilters,
|
|
524
525
|
onClose: t[5] ||= (e) => r.filtersOpen = !1
|
|
525
|
-
}, null, 8, ["filters"])) :
|
|
526
|
+
}, null, 8, ["filters"])) : m("", !0)
|
|
526
527
|
]);
|
|
527
528
|
}
|
|
528
529
|
var Ge = /*#__PURE__*/ e(se, [["render", We], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/index.vue"]]);
|