@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
@@ -1,12 +1,13 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { o as t } from "./profile-DxZHxGum.js";
3
- import { n, r, t as i } from "./AppealStatusBadge-CefimzY3.js";
4
- import { o as a } from "./applications-CsCsndMV.js";
5
- import { i as o, n as s, r as c, t as l } from "./organizations-BtuMZ5s_.js";
6
- import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, reactive as x, ref as S, renderList as C, toDisplayString as w, vModelText as T, watch as E, withCtx as D, withDirectives as O, withModifiers as k } from "vue";
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 A = /*@__PURE__*/ v({
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: n, emit: r }) {
27
- n();
28
- let i = e, a = r, o = [
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 = d(() => Math.max(1, Math.ceil(i.total / i.pageSize))), c = d(() => i.total === 0 ? 0 : (i.page - 1) * i.pageSize + 1), l = d(() => Math.min(i.page * i.pageSize, i.total)), u = d(() => {
33
- let e = s.value, t = Math.min(i.page, e), n = Array.from({ length: e }, (e, t) => t + 1).filter((n) => n === 1 || n === e || Math.abs(n - t) <= 1), r = [];
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 i = n[t - 1];
36
- t > 0 && i !== void 0 && e - i > 1 && r.push("..."), r.push(e);
37
- }), r;
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 f(e) {
40
- a("update:page", Math.max(1, Math.min(e, s.value)));
40
+ function d(e) {
41
+ i("update:page", Math.max(1, Math.min(e, s.value)));
41
42
  }
42
43
  let p = {
43
- props: i,
44
- emit: a,
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: f,
51
- AppIcon: t
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
- }), j = { class: "mt-4 flex flex-wrap items-center justify-between gap-4 border-t border-gray-200 py-3" }, M = { class: "flex items-center gap-2 text-sm text-gray-500" }, N = ["value"], P = ["value"], F = { class: "flex items-center gap-1" }, I = { class: "mr-2 text-sm text-gray-500" }, L = ["disabled"], R = ["disabled"], z = {
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
- }, B = ["onClick"], V = ["disabled"], H = ["disabled"];
62
- function U(e, t, n, r, i, a) {
63
- return b(), m("div", j, [h("label", M, [t[5] ||= h("span", null, "Рядків на сторінці:", -1), h("select", {
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
- }, [(b(), m(u, null, C(r.pageSizes, (e) => h("option", {
68
+ }, [(x(), h(d, null, w(r.pageSizes, (e) => g("option", {
68
69
  key: e,
69
70
  value: e
70
- }, w(e), 9, P)), 64))], 40, N)]), h("div", F, [
71
- h("span", I, w(r.from) + "–" + w(r.to) + " з " + w(n.total), 1),
72
- h("button", {
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
- }, [_(r.AppIcon, {
79
+ }, [v(r.AppIcon, {
79
80
  name: "chevrons-left",
80
81
  class: "h-[15px] w-[15px]"
81
- })], 8, L),
82
- h("button", {
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
- }, [_(r.AppIcon, {
89
+ }, [v(r.AppIcon, {
89
90
  name: "chevron-left",
90
91
  class: "h-[15px] w-[15px]"
91
- })], 8, R),
92
- (b(!0), m(u, null, C(r.pages, (e, t) => (b(), m(u, { key: `${e}-${t}` }, [e === "..." ? (b(), m("span", z, "…")) : (b(), m("button", {
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: y(["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
+ 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
- }, w(e), 11, B))], 64))), 128)),
98
- h("button", {
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
- }, [_(r.AppIcon, {
105
+ }, [v(r.AppIcon, {
105
106
  name: "chevron-right",
106
107
  class: "h-[15px] w-[15px]"
107
- })], 8, V),
108
- h("button", {
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
- }, [_(r.AppIcon, {
115
+ }, [v(r.AppIcon, {
115
116
  name: "chevrons-right",
116
117
  class: "h-[15px] w-[15px]"
117
- })], 8, H)
118
+ })], 8, U)
118
119
  ])]);
119
120
  }
120
- var ne = /*#__PURE__*/ e(A, [["render", U], ["__file", "C:/softpro/surveyor/cabinet/src/components/table/TablePagination.vue"]]), W = /*@__PURE__*/ v({
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: n, emit: r }) {
128
- n();
129
- let i = e, a = r, o = x({ ...i.filters }), s = [
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
- a("apply", l());
147
+ i("apply", l());
147
148
  }
148
149
  let d = {
149
- props: i,
150
- emit: a,
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: t
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
- }), G = { class: "flex h-full w-[420px] max-w-full animate-[slide-in_0.2s_ease] flex-col overflow-hidden bg-white shadow-2xl" }, K = { class: "flex items-center justify-between border-b border-gray-100 px-6 py-4" }, q = { class: "flex flex-1 flex-col gap-5 overflow-y-auto px-6 py-5" }, J = { class: "mb-2 block text-sm font-semibold text-gray-800" }, Y = { class: "relative block" }, X = ["onUpdate:modelValue", "placeholder"], Z = { 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
+ }), 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 b(), m("div", {
166
+ return x(), h("div", {
166
167
  class: "fixed inset-0 z-50 flex justify-end bg-slate-900/25",
167
- onMousedown: t[2] ||= k((e) => r.emit("close"), ["self"])
168
- }, [h("div", G, [
169
- h("div", K, [t[3] ||= h("h2", { class: "text-base font-semibold text-gray-900" }, "Фільтри", -1), h("button", {
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
- }, [_(r.AppIcon, {
175
+ }, [v(r.AppIcon, {
175
176
  name: "x",
176
177
  class: "h-[18px] w-[18px]"
177
178
  })])]),
178
- h("div", q, [(b(), m(u, null, C(r.textFields, ([e, t]) => h("label", {
179
+ g("div", Y, [(x(), h(d, null, w(r.textFields, ([e, t]) => g("label", {
179
180
  key: e,
180
181
  class: "block"
181
- }, [h("span", J, w(t), 1), h("span", Y, [O(h("input", {
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, X), [[T, r.local[e]]]), _(r.AppIcon, {
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)), (b(), m(u, null, C(r.dateFields, ([e, t]) => h("label", {
190
+ })])])), 64)), (x(), h(d, null, w(r.dateFields, ([e, t]) => g("label", {
190
191
  key: e,
191
192
  class: "block"
192
- }, [h("span", Z, w(t), 1), O(h("input", {
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), [[T, r.local[e]]])])), 64))]),
197
- h("div", ie, [h("button", {
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
- }, " Очистити "), h("button", {
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(W, [["render", ae], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/RequestFilters.vue"]]), Q = S(""), se = /*@__PURE__*/ v({
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: u }) {
211
- u();
212
- let f = te(), p = d(() => {
213
- let e = f.query.submitted;
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
- }), m = S("all"), h = S("list"), g = S(1), _ = S(10), v = S(!1), y = S(null);
216
- function b() {
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 x = S(b()), C = S([]), w = S(0), T = S(null), D = S(!0), O = S(""), k = d(() => o.value.find((e) => e.id === l.value)?.shortName ?? ""), A = d(() => Object.values(x.value).filter((e) => e.trim()).length), j = d(() => {
230
- let e = T.value, t = {};
231
- for (let n of r) {
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
- }), M = d(() => C.value.reduce((e, t) => e + t.area, 0));
237
- function N(e) {
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 P(e) {
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: N(e.org_id_data) || "—",
246
- address: N(e.address_id_data) || t || "—",
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: N(e.work_type_data) || e.work_type || "—",
250
+ workType: P(e.work_type_data) || e.work_type || "—",
250
251
  area: Number(e.area) || 0
251
252
  };
252
253
  }
253
- function F() {
254
- return [Q.value.trim(), [
255
- x.value.number,
256
- x.value.address,
257
- x.value.location
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 I(e) {
261
+ function L(e) {
261
262
  let t = {};
262
- return l.value && (t.org_id = l.value), e !== "all" && (t.status = e), t;
263
+ return i.value && (t.org_id = i.value), e !== "all" && (t.status = e), t;
263
264
  }
264
- let L = 0;
265
- async function R() {
266
- let e = ++L;
267
- D.value = !0, O.value = "";
265
+ let R = 0;
266
+ async function z() {
267
+ let e = ++R;
268
+ O.value = !0, k.value = "";
268
269
  try {
269
- let t = m.value, n = await a({
270
- page: g.value,
271
- limit: _.value,
270
+ let t = h.value, n = await u({
271
+ page: _.value,
272
+ limit: v.value,
272
273
  sort: "-created_at",
273
- search: F(),
274
- filters: I(t)
274
+ search: I(),
275
+ filters: L(t)
275
276
  });
276
- if (e !== L) return;
277
- let r = Number(n.total ?? n.summary?.count ?? 0), i = Math.max(1, Math.ceil((Number.isFinite(r) ? r : 0) / _.value) || 1);
278
- if (g.value > i) {
279
- g.value = i;
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
- C.value = (n.rows ?? []).map(P), w.value = Number.isFinite(r) ? r : 0, t === "all" && (T.value = n.summary ?? null);
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 !== L) return;
285
- C.value = [], w.value = 0, T.value = null, O.value = t instanceof Error ? t.message : "Не вдалося завантажити звернення";
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 === L && (D.value = !1);
288
+ e === R && (O.value = !1);
288
289
  }
289
290
  }
290
- function z() {
291
- (c.value || s.value) && (g.value === 1 ? R() : g.value = 1);
291
+ function B() {
292
+ (n.value || t.value) && (_.value === 1 ? z() : _.value = 1);
292
293
  }
293
- E([
294
- c,
295
- s,
296
- l,
297
- () => f.query.submitted
294
+ D([
295
+ n,
296
+ t,
297
+ i,
298
+ () => p.query.submitted
298
299
  ], () => {
299
- z();
300
- }, { immediate: !0 }), E([
301
- Q,
302
- x,
303
- m,
304
- _
300
+ B();
301
+ }, { immediate: !0 }), D([
302
+ o,
303
+ S,
304
+ h,
305
+ v
305
306
  ], () => {
306
- z();
307
- }), E(g, () => {
308
- (c.value || s.value) && R();
307
+ B();
308
+ }), D(_, () => {
309
+ (n.value || t.value) && z();
309
310
  });
310
- function B() {
311
- v.value = !0;
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 U = {
320
- route: f,
321
- submitSuccess: p,
322
- activeStatus: m,
323
- layout: h,
324
- page: g,
325
- pageSize: _,
326
- filtersOpen: v,
327
- hoveredId: y,
328
- emptyFilters: b,
329
- appliedFilters: x,
330
- appeals: C,
331
- total: w,
332
- summary: T,
333
- loading: D,
334
- loadError: O,
335
- orgName: k,
336
- activeFilterCount: A,
337
- statusCounts: j,
338
- totalArea: M,
339
- lookupText: N,
340
- mapAppeal: P,
341
- buildSearch: F,
342
- listFilters: I,
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 L;
345
+ return R;
345
346
  },
346
347
  set requestId(e) {
347
- L = e;
348
+ R = e;
348
349
  },
349
- loadAppeals: R,
350
- reloadFromFirstPage: z,
351
- openFilters: B,
352
- applyFilters: V,
353
- requestPath: H,
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: i,
358
- AppIcon: t,
359
- TablePagination: ne,
358
+ AppealStatusBadge: l,
359
+ AppIcon: a,
360
+ TablePagination: G,
360
361
  RequestFilters: oe,
361
362
  get APPEAL_STATUS() {
362
- return n;
363
+ return s;
363
364
  },
364
365
  get REQUEST_STATUS_TABS() {
365
- return r;
366
+ return c;
366
367
  }
367
368
  };
368
- return Object.defineProperty(U, "__isScriptSetup", {
369
+ return Object.defineProperty(W, "__isScriptSetup", {
369
370
  enumerable: !1,
370
371
  value: !0
371
- }), U;
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 b(), m("div", ce, [
397
- h("div", le, [h("div", ue, [h("div", de, [t[6] ||= h("h1", { class: "text-xl font-semibold text-gray-900" }, "Звернення", -1), h("p", fe, [_(r.AppIcon, {
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
- }), g(" " + w(r.orgName), 1)])])]), h("div", pe, [h("div", me, [(b(!0), m(u, null, C(r.REQUEST_STATUS_TABS, (e) => (b(), m("button", {
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: y(["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
+ 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
- }, [g(w(e.label) + " ", 1), h("span", { class: y(["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"]) }, w(r.statusCounts[e.key] || 0), 3)], 10, he))), 128))]), h("div", ge, [h("button", {
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
- _(r.AppIcon, {
411
+ v(r.AppIcon, {
411
412
  name: "sliders-horizontal",
412
413
  class: "h-3.5 w-3.5"
413
414
  }),
414
- t[7] ||= g(" Фільтри ", -1),
415
- r.activeFilterCount > 0 ? (b(), m("span", _e, w(r.activeFilterCount), 1)) : p("", !0)
416
- ]), h("div", ve, [h("button", {
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: y(["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
+ 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
- }, [_(r.AppIcon, {
422
+ }, [v(r.AppIcon, {
422
423
  name: "list",
423
424
  class: "h-[15px] w-[15px]"
424
- })], 2), h("button", {
425
+ })], 2), g("button", {
425
426
  type: "button",
426
- class: y(["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
+ 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
- }, [_(r.AppIcon, {
430
+ }, [v(r.AppIcon, {
430
431
  name: "layout-grid",
431
432
  class: "h-[15px] w-[15px]"
432
433
  })], 2)])])])]),
433
- h("div", ye, [r.submitSuccess ? (b(), m("p", be, " Звернення № " + w(r.submitSuccess) + " успішно подано. ", 1)) : p("", !0), r.loading && r.appeals.length === 0 ? (b(), m("div", xe, [...t[8] ||= [h("p", { class: "text-sm text-gray-500" }, "Завантаження…", -1)]])) : r.loadError ? (b(), m("div", Se, [_(r.AppIcon, {
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
- }), h("p", Ce, w(r.loadError), 1)])) : r.appeals.length === 0 ? (b(), m("div", we, [_(r.AppIcon, {
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] ||= h("p", { class: "text-sm text-gray-500" }, "Звернень не знайдено", -1)])) : (b(), m("div", {
440
+ }), t[9] ||= g("p", { class: "text-sm text-gray-500" }, "Звернень не знайдено", -1)])) : (x(), h("div", {
440
441
  key: 4,
441
- class: y(r.loading ? "opacity-60" : "")
442
- }, [r.layout === "list" ? (b(), m(u, { key: 0 }, [h("div", Te, [h("span", null, [t[10] ||= g(" Об'єктів: ", -1), h("strong", Ee, w(r.appeals.length) + " із " + w(r.total), 1)]), h("span", null, [t[11] ||= g(" Активна площа на сторінці: ", -1), h("span", De, w(r.totalArea.toFixed(1)) + " га", 1)])]), h("table", Oe, [
443
- t[12] ||= h("colgroup", null, [
444
- h("col", { style: { width: "18%" } }),
445
- h("col", { style: { width: "24%" } }),
446
- h("col", { style: { width: "24%" } }),
447
- h("col", { style: { width: "18%" } }),
448
- h("col", { style: { width: "16%" } })
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
- h("thead", null, [h("tr", null, [(b(), m(u, null, C([
451
+ g("thead", null, [g("tr", null, [(x(), h(d, null, w([
451
452
  "№",
452
453
  "Організація / особа",
453
454
  "Адреса",
454
455
  "Статус",
455
456
  "Вид робіт"
456
- ], (e) => h("th", {
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
- }, w(e), 1)), 64))])]),
460
- h("tbody", null, [(b(!0), m(u, null, C(r.appeals, (e) => (b(), m("tr", {
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
- h("td", Ae, [h("div", je, [_(r.RouterLink, {
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: D(() => [g(" #" + w(e.number), 1)]),
471
+ default: O(() => [_(" #" + T(e.number), 1)]),
471
472
  _: 2
472
- }, 1032, ["to"]), _(r.RouterLink, {
473
+ }, 1032, ["to"]), v(r.RouterLink, {
473
474
  to: r.requestPath(e.id),
474
- class: y(["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
+ 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: D(() => [_(r.AppIcon, {
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
- h("td", Me, [h("p", Ne, w(e.organization || "—"), 1)]),
484
- h("td", Pe, [h("p", $, w(e.address), 1)]),
485
- h("td", Fe, [_(r.AppealStatusBadge, {
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
- h("td", Ie, [h("p", Le, w(e.workType), 1)])
490
+ g("td", Ie, [g("p", Le, T(e.workType), 1)])
490
491
  ], 40, ke))), 128))])
491
- ])], 64)) : (b(), m("div", Re, [(b(!0), m(u, null, C(r.appeals, (e) => (b(), m("article", {
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
- }, [h("div", { class: y(["h-1", r.APPEAL_STATUS[e.status]?.dot ?? "bg-gray-400"]) }, null, 2), h("div", ze, [
495
- h("div", Be, [_(r.RouterLink, {
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: D(() => [g(" #" + w(e.number), 1)]),
500
+ default: O(() => [_(" #" + T(e.number), 1)]),
500
501
  _: 2
501
- }, 1032, ["to"]), _(r.AppealStatusBadge, {
502
+ }, 1032, ["to"]), v(r.AppealStatusBadge, {
502
503
  status: e.status,
503
504
  size: "sm",
504
505
  chevron: ""
505
506
  }, null, 8, ["status"])]),
506
- h("p", Ve, w(e.organization || "Без організації"), 1),
507
- h("p", He, w(e.address), 1),
508
- h("p", Ue, w(e.workType), 1)
509
- ])]))), 128))])), _(r.TablePagination, {
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 ? (b(), f(r.RequestFilters, {
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"])) : p("", !0)
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"]]);