@opengis/surveyor 0.0.1 → 0.0.3

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 (46) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +175 -33
  3. package/dist/chunks/BaseModal-SQXvRRNW.js +90 -0
  4. package/dist/chunks/{RegistryForm-pvIcFR-V.js → RegistryForm-wG-c8GKf.js} +1 -1
  5. package/dist/chunks/{RegistryFormModal-BjGu7Upv.js → RegistryFormModal-R_iZYqGE.js} +2 -2
  6. package/dist/chunks/{RegistryToolbar-CiUgsjpU.js → RegistryToolbar-322DKUXi.js} +3 -3
  7. package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +23 -0
  8. package/dist/chunks/{VerifiedBadge-B6droMOf.js → VerifiedBadge-bk0n-rlC.js} +1 -1
  9. package/dist/chunks/{buildSchema-nkA4Y0YG.js → buildSchema-CccjX9TJ.js} +1 -1
  10. package/dist/chunks/card-B_SfARf7.js +1190 -0
  11. package/dist/chunks/card-C3y-j2TA.js +298 -0
  12. package/dist/chunks/{card--DHsMNBd.js → card-CWqi1K-x.js} +107 -106
  13. package/dist/chunks/card-DWpAv92l.js +539 -0
  14. package/dist/chunks/{card-BZn5CDw9.js → card-X9UVFgdR.js} +254 -248
  15. package/dist/chunks/{certificates-DueBDDvc.js → certificates-Cwch72-o.js} +131 -130
  16. package/dist/chunks/{create-l28e-bWl.js → create-DTP9x2uS.js} +278 -265
  17. package/dist/chunks/dom-BSjFG3O0.js +7 -0
  18. package/dist/chunks/{filterQuery-B9XNx1f1.js → filterQuery-CvfZrkTC.js} +1 -1
  19. package/dist/chunks/{form-CdGS1nVO.js → form-Bh6i5n1U.js} +1 -1
  20. package/dist/chunks/{form-QTkkzwbC.js → form-DDjELqZ9.js} +1 -1
  21. package/dist/chunks/{map-layers-qxWjos2V.js → map-layers-sT-gTiD_.js} +130 -125
  22. package/dist/chunks/{map-BW3iOhQg.js → map-qXQe_qam.js} +643 -630
  23. package/dist/chunks/{organizations-CZOINYMq.js → organizations-ByVE2f0c.js} +129 -124
  24. package/dist/chunks/requests-BTpLXrNj.js +233 -0
  25. package/dist/chunks/{resendSurveyorRegistration-DopjOHaM.js → resendSurveyorRegistration-BHTTVIw1.js} +1 -1
  26. package/dist/chunks/{resources-Cl_EvaIy.js → resources-2e8RFqWR.js} +1 -1
  27. package/dist/chunks/{surveyorAccount-BceNQypZ.js → surveyorAccount-C7UiiIYg.js} +1 -1
  28. package/dist/chunks/useEntityPath-C5Owtidc.js +98 -0
  29. package/dist/chunks/{users-DlaogjC_.js → users-U1P6xCP4.js} +106 -100
  30. package/dist/index.css +1 -1
  31. package/dist/index.js +215 -98
  32. package/package.json +83 -77
  33. package/plugin.d.ts +15 -0
  34. package/plugin.js +8 -10
  35. package/server/app.ts +2 -1
  36. package/server/resources/surveyor-admin/application_comments.ts +3 -3
  37. package/server/suggests/index.ts +17 -0
  38. package/surveyor-types.d.ts +5 -0
  39. package/README.npm.md +0 -51
  40. package/dist/chunks/AppIcon-C-4QykTP.js +0 -85
  41. package/dist/chunks/BaseModal-DrTTkLmR.js +0 -85
  42. package/dist/chunks/card-9LaB42Ol.js +0 -538
  43. package/dist/chunks/card-CNqXSyqX.js +0 -297
  44. package/dist/chunks/card-CgGOgGyd.js +0 -973
  45. package/dist/chunks/requests-DQJIhz00.js +0 -232
  46. package/server/embed.ts +0 -49
@@ -0,0 +1,233 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
3
+ import { i as r } from "./resources-2e8RFqWR.js";
4
+ import { t as i } from "./filterQuery-CvfZrkTC.js";
5
+ import { a, i as o, n as s, r as c, t as l } from "./RegistryToolbar-322DKUXi.js";
6
+ import { n as u, r as d, s as f, t as p } from "./AppealStatusBadge-Cu-UzdzA.js";
7
+ 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, openBlock as C, ref as w, renderList as T, toDisplayString as E, vModelText as D, withCtx as O, withDirectives as k } from "vue";
8
+ import { RouterLink as A } from "vue-router";
9
+ //#region admin/src/pages/requests/index.vue?vue&type=script&setup=true&lang.ts
10
+ var j = /*@__PURE__*/ S({
11
+ __name: "index",
12
+ setup(e, { expose: m }) {
13
+ m();
14
+ let g = d.columns, _ = g.flatMap((e) => e.sort ? [e.sort] : []), { query: v, filterValues: y, page: b, pageSize: x, sort: S, listFilters: C, bindListLoader: T } = a({
15
+ arrayFilterKeys: ["status", "year"],
16
+ defaultSort: d.sort,
17
+ sortFields: _,
18
+ buildFilters: i
19
+ }), { detailPath: E } = n("number"), D = w(!1), O = w([
20
+ "number",
21
+ "organization",
22
+ "address",
23
+ "status",
24
+ "workType",
25
+ "createdAt"
26
+ ]), k = w([]), j = w(0), M = w(!1), N = w("");
27
+ function P(e) {
28
+ if (!e) return "—";
29
+ let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
30
+ return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
31
+ }
32
+ function F(e) {
33
+ return e.address_id_data?.text || e.location || "—";
34
+ }
35
+ let I = 0, L = h(() => M.value ? "Завантаження…" : N.value ? N.value : "За заданими фільтрами звернень не знайдено.");
36
+ async function R() {
37
+ let e = ++I;
38
+ M.value = !0, N.value = "";
39
+ try {
40
+ let t = await r(f, {
41
+ page: b.value,
42
+ limit: x.value,
43
+ sort: S.value,
44
+ search: v.value.trim() || void 0,
45
+ filters: C.value
46
+ });
47
+ if (e !== I) return;
48
+ k.value = t.rows ?? [], j.value = Number(t.total) || 0;
49
+ } catch (t) {
50
+ if (e !== I) return;
51
+ k.value = [], j.value = 0, N.value = t instanceof Error ? t.message : "Не вдалося завантажити звернення";
52
+ } finally {
53
+ e === I && (M.value = !1);
54
+ }
55
+ }
56
+ T(() => {
57
+ R();
58
+ });
59
+ function z(e) {
60
+ y.value = e;
61
+ }
62
+ function B(e) {
63
+ S.value !== e && (b.value !== 1 && (b.value = 1), S.value = e);
64
+ }
65
+ function V(e) {
66
+ O.value = O.value.includes(e) ? O.value.length > 1 ? O.value.filter((t) => t !== e) : O.value : O.value.length < 7 ? [...O.value, e] : O.value;
67
+ }
68
+ let H = {
69
+ columns: g,
70
+ sortableFields: _,
71
+ query: v,
72
+ filterValues: y,
73
+ page: b,
74
+ pageSize: x,
75
+ sort: S,
76
+ listFilters: C,
77
+ bindListLoader: T,
78
+ detailPath: E,
79
+ columnsOpen: D,
80
+ visibleColumns: O,
81
+ rows: k,
82
+ total: j,
83
+ loading: M,
84
+ error: N,
85
+ formatDate: P,
86
+ addressLabel: F,
87
+ get requestId() {
88
+ return I;
89
+ },
90
+ set requestId(e) {
91
+ I = e;
92
+ },
93
+ emptyText: L,
94
+ loadRows: R,
95
+ onFilterValuesUpdate: z,
96
+ onSort: B,
97
+ toggleColumn: V,
98
+ AppIcon: t,
99
+ get RouterLink() {
100
+ return A;
101
+ },
102
+ AppealStatusBadge: p,
103
+ PageHeader: o,
104
+ RegistryTable: c,
105
+ TablePagination: s,
106
+ RegistryToolbar: l,
107
+ get config() {
108
+ return u;
109
+ }
110
+ };
111
+ return Object.defineProperty(H, "__isScriptSetup", {
112
+ enumerable: !1,
113
+ value: !0
114
+ }), H;
115
+ }
116
+ }), M = { class: "px-4" }, N = { class: "relative block" }, P = {
117
+ type: "button",
118
+ class: "inline-flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 transition-colors hover:border-brand-300 hover:text-brand-700",
119
+ "aria-label": "Експорт"
120
+ }, F = { class: "relative" }, I = {
121
+ key: 0,
122
+ class: "absolute right-0 top-12 z-20 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
123
+ }, L = ["checked", "onChange"], R = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, z = { class: "font-semibold text-slate-600" }, B = {
124
+ key: 1,
125
+ class: "min-w-0"
126
+ }, V = { class: "break-words font-semibold text-slate-700" }, H = { class: "break-words text-xs text-slate-400" }, U = {
127
+ key: 2,
128
+ class: "text-slate-600"
129
+ }, W = {
130
+ key: 4,
131
+ class: "text-slate-600"
132
+ }, G = {
133
+ key: 5,
134
+ class: "whitespace-nowrap text-slate-600"
135
+ }, K = {
136
+ key: 6,
137
+ class: "text-slate-600"
138
+ };
139
+ function q(e, t, n, r, i, a) {
140
+ return C(), v("div", null, [x(r.PageHeader, {
141
+ title: "Звернення на видачу та прийом матеріалів",
142
+ subtitle: "Реєстр звернень геодезичного кабінету"
143
+ }), y("section", M, [
144
+ x(r.RegistryToolbar, {
145
+ nowrap: "",
146
+ "search-min": "min-w-[160px]",
147
+ "filter-config": r.config.filter,
148
+ "filter-values": r.filterValues,
149
+ "onUpdate:filterValues": r.onFilterValuesUpdate
150
+ }, {
151
+ search: O(() => [y("label", N, [x(r.AppIcon, {
152
+ name: "search",
153
+ class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
154
+ }), k(y("input", {
155
+ "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
156
+ type: "search",
157
+ placeholder: "Пошук…",
158
+ class: "h-10 w-full rounded-lg border border-slate-200 bg-white pl-9 pr-3 text-sm text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:border-brand-400 focus:ring-1 focus:ring-brand-400"
159
+ }, null, 512), [[D, r.query]])])]),
160
+ actions: O(() => [y("button", P, [x(r.AppIcon, {
161
+ name: "download",
162
+ class: "h-4 w-4"
163
+ })]), y("div", F, [y("button", {
164
+ type: "button",
165
+ class: "inline-flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 transition-colors hover:border-brand-300 hover:text-brand-700",
166
+ onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
167
+ }, [x(r.AppIcon, {
168
+ name: "columns-3",
169
+ class: "h-4 w-4"
170
+ })]), r.columnsOpen ? (C(), v("div", I, [
171
+ t[4] ||= y("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Налаштувати колонки", -1),
172
+ (C(!0), v(m, null, T(r.columns, (e) => (C(), v("label", {
173
+ key: e.key,
174
+ class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
175
+ }, [y("input", {
176
+ type: "checkbox",
177
+ checked: r.visibleColumns.includes(e.key),
178
+ class: "h-4 w-4 accent-brand-600",
179
+ onChange: (t) => r.toggleColumn(e.key)
180
+ }, null, 40, L), b(" " + E(e.label), 1)]))), 128)),
181
+ t[5] ||= y("p", { class: "px-2 pt-1 text-[11px] text-slate-400" }, "До 7 колонок одночасно", -1)
182
+ ])) : _("", !0)])]),
183
+ _: 1
184
+ }, 8, ["filter-config", "filter-values"]),
185
+ y("div", R, [y("span", null, [t[6] ||= b("Знайдено звернень: ", -1), y("strong", z, E(r.total), 1)])]),
186
+ x(r.RegistryTable, {
187
+ class: "mt-3",
188
+ rows: r.rows,
189
+ columns: r.columns,
190
+ "visible-keys": r.visibleColumns,
191
+ "row-key": "app_id",
192
+ sort: r.sort,
193
+ "empty-text": r.emptyText,
194
+ onSort: r.onSort
195
+ }, {
196
+ cell: O(({ row: e, column: t }) => [t === "number" ? (C(), g(r.RouterLink, {
197
+ key: 0,
198
+ to: r.detailPath(e.app_id),
199
+ class: "font-semibold text-brand-700 underline-offset-4 transition-colors hover:text-brand-900 hover:underline"
200
+ }, {
201
+ default: O(() => [b(E(e.number || "—"), 1)]),
202
+ _: 2
203
+ }, 1032, ["to"])) : t === "organization" ? (C(), v("div", B, [y("p", V, E(e.org_id_data?.text || "—"), 1), y("p", H, E(e.surveyor_id_data?.text || "—"), 1)])) : t === "address" ? (C(), v("span", U, E(r.addressLabel(e)), 1)) : t === "status" ? (C(), g(r.AppealStatusBadge, {
204
+ key: 3,
205
+ status: e.status || "",
206
+ label: e.status_data?.text || void 0,
207
+ size: "sm"
208
+ }, null, 8, ["status", "label"])) : t === "workType" ? (C(), v("span", W, E(e.work_type_data?.text || "—"), 1)) : t === "createdAt" ? (C(), v("span", G, E(r.formatDate(e.created_at)), 1)) : t === "checkedBy" ? (C(), v("span", K, E(e.verified_by_data?.text || "—"), 1)) : _("", !0)]),
209
+ _: 1
210
+ }, 8, [
211
+ "rows",
212
+ "columns",
213
+ "visible-keys",
214
+ "sort",
215
+ "empty-text"
216
+ ]),
217
+ r.total > 0 ? (C(), g(r.TablePagination, {
218
+ key: 0,
219
+ page: r.page,
220
+ "onUpdate:page": t[2] ||= (e) => r.page = e,
221
+ "page-size": r.pageSize,
222
+ "onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
223
+ total: r.total
224
+ }, null, 8, [
225
+ "page",
226
+ "page-size",
227
+ "total"
228
+ ])) : _("", !0)
229
+ ])]);
230
+ }
231
+ var J = /*#__PURE__*/ e(j, [["render", q], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/index.vue"]]);
232
+ //#endregion
233
+ export { J as default };
@@ -1,4 +1,4 @@
1
- import { a as e } from "./resources-Cl_EvaIy.js";
1
+ import { a as e } from "./resources-2e8RFqWR.js";
2
2
  import { notify as t } from "@opengis/core";
3
3
  //#region admin/src/utils/resendSurveyorRegistration.ts
4
4
  function n(e) {
@@ -126,4 +126,4 @@ async function m(e, t) {
126
126
  await c(`/api/resource/${e}/${t}`, { method: "DELETE" });
127
127
  }
128
128
  //#endregion
129
- export { c as a, s as c, u as i, m as n, p as o, d as r, t as s, f as t };
129
+ export { c as a, s as c, u as i, r as l, m as n, p as o, d as r, t as s, f as t };
@@ -1,4 +1,4 @@
1
- import { a as e } from "./resources-Cl_EvaIy.js";
1
+ import { a as e } from "./resources-2e8RFqWR.js";
2
2
  import { confirm as t, notify as n } from "@opengis/core";
3
3
  //#region admin/src/utils/surveyorAccount.ts
4
4
  function r(e) {
@@ -0,0 +1,98 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { computed as t, createBlock as n, defineComponent as r, openBlock as i, resolveDynamicComponent as a } from "vue";
3
+ import { useRoute as o } from "vue-router";
4
+ import { ArrowDown as s, ArrowRight as c, ArrowUp as l, ArrowUpDown as u, Award as d, Ban as f, Building2 as p, CalendarDays as m, Check as h, ChevronDown as g, ChevronLeft as _, ChevronRight as v, ChevronsLeft as y, ChevronsRight as b, CircleCheck as x, CircleX as S, ClipboardList as C, Columns3 as w, Download as T, ExternalLink as E, Eye as D, FileCheck2 as O, FileText as k, Filter as A, History as j, Home as ee, KeyRound as M, Layers as N, LogOut as P, Map as F, MapPinned as I, MessageSquare as L, MoreVertical as R, Pencil as z, Plus as B, Power as V, Search as H, Send as U, Settings as W, ShieldCheck as G, Trash2 as K, Upload as q, User as J, UserX as Y, Users as X, UsersRound as Z } from "lucide-vue-next";
5
+ //#region admin/src/components/ui/AppIcon.vue?vue&type=script&setup=true&lang.ts
6
+ var Q = /*@__PURE__*/ r({
7
+ __name: "AppIcon",
8
+ props: {
9
+ name: {
10
+ type: null,
11
+ required: !0
12
+ },
13
+ strokeWidth: {
14
+ type: [Number, String],
15
+ required: !1,
16
+ default: 2
17
+ }
18
+ },
19
+ setup(e, { expose: n }) {
20
+ n();
21
+ let r = {
22
+ "arrow-down": s,
23
+ "arrow-right": c,
24
+ "arrow-up": l,
25
+ "arrow-up-down": u,
26
+ award: d,
27
+ ban: f,
28
+ "building-2": p,
29
+ "calendar-days": m,
30
+ check: h,
31
+ "chevron-down": g,
32
+ "chevron-left": _,
33
+ "chevron-right": v,
34
+ "chevrons-left": y,
35
+ "chevrons-right": b,
36
+ "circle-check": x,
37
+ "circle-x": S,
38
+ "clipboard-list": C,
39
+ "columns-3": w,
40
+ download: T,
41
+ "external-link": E,
42
+ eye: D,
43
+ "file-check-2": O,
44
+ "file-text": k,
45
+ filter: A,
46
+ history: j,
47
+ home: ee,
48
+ "key-round": M,
49
+ layers: N,
50
+ "log-out": P,
51
+ map: F,
52
+ "map-pinned": I,
53
+ "message-square": L,
54
+ "more-vertical": R,
55
+ pencil: z,
56
+ plus: B,
57
+ power: V,
58
+ search: H,
59
+ send: U,
60
+ settings: W,
61
+ "shield-check": G,
62
+ "trash-2": K,
63
+ upload: q,
64
+ user: J,
65
+ "user-x": Y,
66
+ users: X,
67
+ "users-round": Z
68
+ }, i = e, a = {
69
+ icons: r,
70
+ props: i,
71
+ icon: t(() => r[i.name])
72
+ };
73
+ return Object.defineProperty(a, "__isScriptSetup", {
74
+ enumerable: !1,
75
+ value: !0
76
+ }), a;
77
+ }
78
+ });
79
+ //#endregion
80
+ //#region admin/src/components/ui/AppIcon.vue
81
+ function $(e, t, r, o, s, c) {
82
+ return i(), n(a(o.icon), { "stroke-width": r.strokeWidth }, null, 8, ["stroke-width"]);
83
+ }
84
+ var te = /*#__PURE__*/ e(Q, [["render", $], ["__file", "C:/softpro/surveyor/admin/src/components/ui/AppIcon.vue"]]);
85
+ //#endregion
86
+ //#region admin/src/composables/useEntityPath.ts
87
+ function ne(e = "id") {
88
+ let n = o(), r = t(() => {
89
+ let t = n.path.replace(/\/+$/, "");
90
+ return n.params[e] ? t.replace(/\/[^/]+$/, "") : t;
91
+ });
92
+ return {
93
+ listPath: r,
94
+ detailPath: (e) => `${r.value}/${encodeURIComponent(String(e))}`
95
+ };
96
+ }
97
+ //#endregion
98
+ export { te as n, ne as t };