@opengis/surveyor 0.0.14 → 0.0.16

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 (48) hide show
  1. package/dist/chunks/AppealStatusBadge-7KruOSVI.js +295 -0
  2. package/dist/chunks/ApplicationGeometryExportModal-DJbnKPm6.js +1245 -0
  3. package/dist/chunks/{BaseModal-SjP521X9.js → BaseModal-BJxKuONh.js} +1 -1
  4. package/dist/chunks/{RegistryFormModal-DhzEpxys.js → RegistryFormModal-BmBsUOF3.js} +1 -1
  5. package/dist/chunks/SurveyorTeleport-Cd6D92mo.js +30 -0
  6. package/dist/chunks/{applications-D6pHAQaK.js → applications-B6GAxopO.js} +16 -19
  7. package/dist/chunks/card-B113dNzv.js +1327 -0
  8. package/dist/chunks/card-COmcUdms.js +639 -0
  9. package/dist/chunks/{card-BBx1zR0E.js → card-Deae73xd.js} +2 -2
  10. package/dist/chunks/{certificates-DtfZTFN9.js → certificates-DHf1zGQs.js} +18 -8
  11. package/dist/chunks/{create-Cgeu7aKO.js → create-BVPqfJOb.js} +10 -10
  12. package/dist/chunks/{map-DkKsEnCM.js → map-BZi4eVl3.js} +893 -897
  13. package/dist/chunks/{map-layers-BmuIMLHa.js → map-layers-CKZK50de.js} +2 -2
  14. package/dist/chunks/{organizations-BO1dIl7v.js → organizations-DYGfYfHS.js} +2 -2
  15. package/dist/chunks/{requests-rWq8ok3C.js → requests-D1ix8U5f.js} +1 -1
  16. package/dist/chunks/requests-v1jHarHb.js +303 -0
  17. package/dist/chunks/{users-DOiQeVwn.js → users-frk3gmmd.js} +1 -1
  18. package/dist/index.css +1 -1
  19. package/dist/index.js +21 -21
  20. package/package.json +1 -1
  21. package/server/modules/surveyor/route.ts +13 -12
  22. package/server/modules/surveyor/services/applicationTile.ts +3 -3
  23. package/server/modules/surveyor/services/cancelApplication.ts +2 -1
  24. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +1 -1
  25. package/server/modules/surveyor/services/completeApplication.ts +1 -1
  26. package/server/modules/surveyor/services/identifyApplications.ts +2 -2
  27. package/server/modules/surveyor/services/issueSourceData.ts +1 -1
  28. package/server/modules/surveyor/services/registerSurveyor.ts +1 -1
  29. package/server/modules/surveyor/services/resendRegistration.ts +1 -1
  30. package/server/modules/surveyor/services/searchApplications.ts +2 -2
  31. package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +1 -1
  32. package/server/modules/surveyor/services/updateSurveyorStatus.ts +1 -1
  33. package/server/modules/surveyor/services/verifyApplication.ts +1 -1
  34. package/server/modules/surveyor/utils/shared.ts +28 -6
  35. package/server/resources/surveyor-admin/application_comments.ts +1 -1
  36. package/server/resources/surveyor-admin/application_status_history.ts +1 -1
  37. package/server/resources/surveyor-admin/applications.ts +12 -11
  38. package/server/resources/surveyor-admin/certificates.ts +26 -26
  39. package/server/resources/surveyor-admin/map_layers.ts +1 -1
  40. package/server/resources/surveyor-admin/organizations.ts +1 -1
  41. package/server/resources/surveyor-admin/surveyors.ts +1 -1
  42. package/server/suggests/index.ts +18 -1
  43. package/dist/chunks/AppealStatusBadge-Ct3EcB4_.js +0 -185
  44. package/dist/chunks/ApplicationHistorySection-D7KPV2cX.js +0 -788
  45. package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +0 -23
  46. package/dist/chunks/card-Bj4zFzbe.js +0 -1193
  47. package/dist/chunks/card-C-ohjNkC.js +0 -609
  48. package/dist/chunks/requests-BZ2jrt5J.js +0 -234
@@ -5,8 +5,8 @@ import { a as i, r as a } from "./resources-Cj8BzrBX.js";
5
5
  import { r as o } from "./filterQuery-Dka-mIso.js";
6
6
  import { i as ee, n as s, r as c, t as l } from "./RegistryToolbar-DXOEcD84.js";
7
7
  import { t as u } from "./TablePagination-CUtnDQQ_.js";
8
- import { t as d } from "./SurveyorTeleport-CnSF0Ptl.js";
9
- import { t as f } from "./RegistryFormModal-DhzEpxys.js";
8
+ import { t as d } from "./SurveyorTeleport-Cd6D92mo.js";
9
+ import { t as f } from "./RegistryFormModal-BmBsUOF3.js";
10
10
  import { i as p, n as te, o as m, r as h, s as g, t as _ } from "./form-DZ3CbtkT.js";
11
11
  import { computed as ne, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, normalizeClass as T, normalizeStyle as E, onMounted as D, onUnmounted as O, openBlock as k, ref as A, toDisplayString as j, vModelText as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
12
12
  import { RouterLink as I, useRouter as L } from "vue-router";
@@ -6,8 +6,8 @@ import { t as te } from "./VerifiedBadge-bk0n-rlC.js";
6
6
  import { i as a } from "./filterQuery-Dka-mIso.js";
7
7
  import { i as o, n as s, r as c, t as l } from "./RegistryToolbar-DXOEcD84.js";
8
8
  import { t as u } from "./TablePagination-CUtnDQQ_.js";
9
- import { t as d } from "./SurveyorTeleport-CnSF0Ptl.js";
10
- import { t as f } from "./RegistryFormModal-DhzEpxys.js";
9
+ import { t as d } from "./SurveyorTeleport-Cd6D92mo.js";
10
+ import { t as f } from "./RegistryFormModal-BmBsUOF3.js";
11
11
  import { n as p, t as m } from "./form-CEfc_shb.js";
12
12
  import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, defineComponent as C, normalizeStyle as w, onMounted as T, onUnmounted as E, openBlock as D, ref as O, renderList as k, toDisplayString as A, vModelText as j, withCtx as M, withDirectives as N, withModifiers as P } from "vue";
13
13
  import { RouterLink as F, useRouter as I } from "vue-router";
@@ -3,7 +3,7 @@ import { n as t, r as n, s as r, t as i } from "./organizations-DbVDoURw.js";
3
3
  import { t as a } from "./AppIcon-CO70tpMX.js";
4
4
  import { t as o } from "./list-search-D5VdmGdV.js";
5
5
  import { n as s, r as c, t as l } from "./AppealStatusBadge-BlAaNUSK.js";
6
- import { o as u } from "./applications-D6pHAQaK.js";
6
+ import { a as u } from "./applications-B6GAxopO.js";
7
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";
8
8
  import { RouterLink as ee, useRoute as te } from "vue-router";
9
9
  //#region cabinet/src/components/table/TablePagination.vue?vue&type=script&setup=true&lang.ts
@@ -0,0 +1,303 @@
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 { a as r } from "./resources-Cj8BzrBX.js";
4
+ import { t as i } from "./filterQuery-Dka-mIso.js";
5
+ import { i as a, n as o, r as s, t as c } from "./RegistryToolbar-DXOEcD84.js";
6
+ import { t as l } from "./TablePagination-CUtnDQQ_.js";
7
+ import { t as u } from "./SurveyorTeleport-Cd6D92mo.js";
8
+ import { i as d, n as f, t as p, u as m } from "./AppealStatusBadge-7KruOSVI.js";
9
+ import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, defineComponent as C, normalizeStyle as w, onMounted as T, onUnmounted as E, openBlock as D, ref as O, renderList as k, toDisplayString as A, vModelText as j, withCtx as M, withDirectives as N, withModifiers as P } from "vue";
10
+ import { RouterLink as F, useRouter as I } from "vue-router";
11
+ //#region admin/src/pages/requests/index.vue?vue&type=script&setup=true&lang.ts
12
+ var L = /*@__PURE__*/ C({
13
+ __name: "index",
14
+ setup(e, { expose: h }) {
15
+ h();
16
+ let _ = d.columns, v = _.flatMap((e) => e.sort ? [e.sort] : []), { query: y, filterValues: b, page: x, pageSize: S, sort: C, listFilters: w, bindListLoader: D } = a({
17
+ arrayFilterKeys: ["status", "year"],
18
+ defaultSort: d.sort,
19
+ sortFields: v,
20
+ buildFilters: i
21
+ }), k = I(), { detailPath: A } = n("number"), j = O(!1), M = O([
22
+ "number",
23
+ "organization",
24
+ "address",
25
+ "status",
26
+ "workType",
27
+ "createdAt",
28
+ "actions"
29
+ ]), N = O(null), P = O({
30
+ top: "0px",
31
+ left: "0px"
32
+ }), L = O([]), R = O(0), z = O(!1), B = O("");
33
+ function V(e) {
34
+ if (!e) return "—";
35
+ let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
36
+ return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
37
+ }
38
+ function H(e) {
39
+ return e.address_id_data?.text || e.location || "—";
40
+ }
41
+ function U(e, t) {
42
+ if (N.value === e) {
43
+ N.value = null;
44
+ return;
45
+ }
46
+ let n = t.currentTarget.getBoundingClientRect(), r = window.innerHeight - n.bottom < 56 ? n.top - 48 - 4 : n.bottom + 4, i = Math.min(Math.max(8, n.right - 176), window.innerWidth - 176 - 8);
47
+ P.value = {
48
+ top: `${r}px`,
49
+ left: `${i}px`
50
+ }, N.value = e;
51
+ }
52
+ function W(e) {
53
+ N.value = null, k.push({
54
+ path: A(e.app_id),
55
+ query: { edit: "1" }
56
+ });
57
+ }
58
+ function G(e) {
59
+ let t = e.target;
60
+ t instanceof Element && t.closest("[data-row-actions]") || (N.value = null);
61
+ }
62
+ let K = 0, q = g(() => z.value ? "Завантаження…" : B.value ? B.value : "За заданими фільтрами звернень не знайдено.");
63
+ async function J() {
64
+ let e = ++K;
65
+ z.value = !0, B.value = "";
66
+ try {
67
+ let t = await r(m, {
68
+ page: x.value,
69
+ limit: S.value,
70
+ sort: C.value,
71
+ search: y.value.trim() || void 0,
72
+ filters: w.value
73
+ });
74
+ if (e !== K) return;
75
+ L.value = t.rows ?? [], R.value = Number(t.total) || 0;
76
+ } catch (t) {
77
+ if (e !== K) return;
78
+ L.value = [], R.value = 0, B.value = t instanceof Error ? t.message : "Не вдалося завантажити звернення";
79
+ } finally {
80
+ e === K && (z.value = !1);
81
+ }
82
+ }
83
+ D(() => {
84
+ N.value = null, J();
85
+ }), T(() => {
86
+ document.addEventListener("click", G), window.addEventListener("resize", G), window.addEventListener("scroll", G, !0);
87
+ }), E(() => {
88
+ document.removeEventListener("click", G), window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
89
+ });
90
+ function Y(e) {
91
+ b.value = e;
92
+ }
93
+ function X(e) {
94
+ C.value !== e && (x.value !== 1 && (x.value = 1), C.value = e);
95
+ }
96
+ function Z(e) {
97
+ M.value = M.value.includes(e) ? M.value.length > 1 ? M.value.filter((t) => t !== e) : M.value : M.value.length < 8 ? [...M.value, e] : M.value;
98
+ }
99
+ let Q = {
100
+ columns: _,
101
+ sortableFields: v,
102
+ query: y,
103
+ filterValues: b,
104
+ page: x,
105
+ pageSize: S,
106
+ sort: C,
107
+ listFilters: w,
108
+ bindListLoader: D,
109
+ router: k,
110
+ detailPath: A,
111
+ columnsOpen: j,
112
+ visibleColumns: M,
113
+ actionsOpen: N,
114
+ menuStyle: P,
115
+ rows: L,
116
+ total: R,
117
+ loading: z,
118
+ error: B,
119
+ formatDate: V,
120
+ addressLabel: H,
121
+ toggleActions: U,
122
+ editApplication: W,
123
+ closeActions: G,
124
+ get requestId() {
125
+ return K;
126
+ },
127
+ set requestId(e) {
128
+ K = e;
129
+ },
130
+ emptyText: q,
131
+ loadRows: J,
132
+ onFilterValuesUpdate: Y,
133
+ onSort: X,
134
+ toggleColumn: Z,
135
+ AppIcon: t,
136
+ SurveyorTeleport: u,
137
+ get RouterLink() {
138
+ return F;
139
+ },
140
+ AppealStatusBadge: p,
141
+ PageHeader: s,
142
+ RegistryTable: o,
143
+ TablePagination: l,
144
+ RegistryToolbar: c,
145
+ get config() {
146
+ return f;
147
+ }
148
+ };
149
+ return Object.defineProperty(Q, "__isScriptSetup", {
150
+ enumerable: !1,
151
+ value: !0
152
+ }), Q;
153
+ }
154
+ }), R = { class: "px-4" }, z = { class: "relative block" }, B = {
155
+ type: "button",
156
+ 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",
157
+ "aria-label": "Експорт"
158
+ }, V = { class: "relative" }, H = {
159
+ key: 0,
160
+ class: "absolute right-0 top-12 z-20 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
161
+ }, U = ["checked", "onChange"], W = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, G = { class: "font-semibold text-slate-600" }, K = {
162
+ key: 1,
163
+ class: "min-w-0"
164
+ }, q = { class: "break-words font-semibold text-slate-700" }, J = { class: "break-words text-xs text-slate-400" }, Y = {
165
+ key: 2,
166
+ class: "text-slate-600"
167
+ }, X = {
168
+ key: 4,
169
+ class: "text-slate-600"
170
+ }, Z = {
171
+ key: 5,
172
+ class: "whitespace-nowrap text-slate-600"
173
+ }, Q = {
174
+ key: 6,
175
+ class: "text-slate-600"
176
+ }, $ = {
177
+ key: 7,
178
+ class: "flex justify-center"
179
+ }, ee = [
180
+ "aria-expanded",
181
+ "aria-label",
182
+ "onClick"
183
+ ], te = ["onClick"];
184
+ function ne(e, t, n, r, i, a) {
185
+ return D(), y("div", null, [S(r.PageHeader, {
186
+ title: "Звернення на видачу та прийом матеріалів",
187
+ subtitle: "Реєстр звернень геодезичного кабінету"
188
+ }), b("section", R, [
189
+ S(r.RegistryToolbar, {
190
+ nowrap: "",
191
+ "search-min": "min-w-[160px] max-w-[300px]",
192
+ "filter-config": r.config.filter,
193
+ "filter-values": r.filterValues,
194
+ "onUpdate:filterValues": r.onFilterValuesUpdate
195
+ }, {
196
+ search: M(() => [b("label", z, [S(r.AppIcon, {
197
+ name: "search",
198
+ class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
199
+ }), N(b("input", {
200
+ "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
201
+ type: "search",
202
+ placeholder: "Пошук…",
203
+ 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"
204
+ }, null, 512), [[j, r.query]])])]),
205
+ actions: M(() => [b("button", B, [S(r.AppIcon, {
206
+ name: "download",
207
+ class: "h-4 w-4"
208
+ })]), b("div", V, [b("button", {
209
+ type: "button",
210
+ 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",
211
+ onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
212
+ }, [S(r.AppIcon, {
213
+ name: "columns-3",
214
+ class: "h-4 w-4"
215
+ })]), r.columnsOpen ? (D(), y("div", H, [
216
+ t[4] ||= b("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Налаштувати колонки", -1),
217
+ (D(!0), y(h, null, k(r.columns, (e) => (D(), y("label", {
218
+ key: e.key,
219
+ class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
220
+ }, [b("input", {
221
+ type: "checkbox",
222
+ checked: r.visibleColumns.includes(e.key),
223
+ class: "h-4 w-4 accent-brand-600",
224
+ onChange: (t) => r.toggleColumn(e.key)
225
+ }, null, 40, U), x(" " + A(e.label), 1)]))), 128)),
226
+ t[5] ||= b("p", { class: "px-2 pt-1 text-[11px] text-slate-400" }, "До 8 колонок одночасно", -1)
227
+ ])) : v("", !0)])]),
228
+ _: 1
229
+ }, 8, ["filter-config", "filter-values"]),
230
+ b("div", W, [b("span", null, [t[6] ||= x("Знайдено звернень: ", -1), b("strong", G, A(r.total), 1)])]),
231
+ S(r.RegistryTable, {
232
+ class: "mt-3",
233
+ rows: r.rows,
234
+ columns: r.columns,
235
+ "visible-keys": r.visibleColumns,
236
+ "row-key": "app_id",
237
+ sort: r.sort,
238
+ "empty-text": r.emptyText,
239
+ onSort: r.onSort
240
+ }, {
241
+ cell: M(({ row: e, column: n }) => [n === "number" ? (D(), _(r.RouterLink, {
242
+ key: 0,
243
+ to: r.detailPath(e.app_id),
244
+ class: "font-semibold text-brand-700 underline-offset-4 transition-colors hover:text-brand-900 hover:underline"
245
+ }, {
246
+ default: M(() => [x(A(e.number || "—"), 1)]),
247
+ _: 2
248
+ }, 1032, ["to"])) : n === "organization" ? (D(), y("div", K, [b("p", q, A(e.org_id_data?.text || "—"), 1), b("p", J, A(e.surveyor_id_data?.text || "—"), 1)])) : n === "address" ? (D(), y("span", Y, A(r.addressLabel(e)), 1)) : n === "status" ? (D(), _(r.AppealStatusBadge, {
249
+ key: 3,
250
+ status: e.status || "",
251
+ label: e.status_data?.text || void 0,
252
+ size: "sm"
253
+ }, null, 8, ["status", "label"])) : n === "workType" ? (D(), y("span", X, A(e.work_type_data?.text || "—"), 1)) : n === "createdAt" ? (D(), y("span", Z, A(r.formatDate(e.created_at)), 1)) : n === "checkedBy" ? (D(), y("span", Q, A(e.verified_by_data?.text || "—"), 1)) : n === "actions" ? (D(), y("div", $, [b("button", {
254
+ type: "button",
255
+ "data-row-actions": "",
256
+ class: "inline-flex h-8 w-8 items-center justify-center rounded-lg text-slate-400 transition-colors hover:bg-brand-50 hover:text-brand-700",
257
+ "aria-expanded": r.actionsOpen === e.app_id,
258
+ "aria-label": `Дії для звернення ${e.number || e.app_id}`,
259
+ onClick: P((t) => r.toggleActions(e.app_id, t), ["stop"])
260
+ }, [S(r.AppIcon, {
261
+ name: "more-vertical",
262
+ class: "h-4 w-4"
263
+ })], 8, ee), S(r.SurveyorTeleport, null, {
264
+ default: M(() => [r.actionsOpen === e.app_id ? (D(), y("div", {
265
+ key: 0,
266
+ "data-row-actions": "",
267
+ class: "fixed z-50 w-44 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover",
268
+ style: w(r.menuStyle)
269
+ }, [b("button", {
270
+ type: "button",
271
+ class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50",
272
+ onClick: (t) => r.editApplication(e)
273
+ }, [S(r.AppIcon, {
274
+ name: "pencil",
275
+ class: "h-4 w-4 text-slate-400"
276
+ }), t[7] ||= x(" Редагувати ", -1)], 8, te)], 4)) : v("", !0)]),
277
+ _: 2
278
+ }, 1024)])) : v("", !0)]),
279
+ _: 1
280
+ }, 8, [
281
+ "rows",
282
+ "columns",
283
+ "visible-keys",
284
+ "sort",
285
+ "empty-text"
286
+ ]),
287
+ r.total > 0 ? (D(), _(r.TablePagination, {
288
+ key: 0,
289
+ page: r.page,
290
+ "onUpdate:page": t[2] ||= (e) => r.page = e,
291
+ "page-size": r.pageSize,
292
+ "onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
293
+ total: r.total
294
+ }, null, 8, [
295
+ "page",
296
+ "page-size",
297
+ "total"
298
+ ])) : v("", !0)
299
+ ])]);
300
+ }
301
+ var re = /*#__PURE__*/ e(L, [["render", ne], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/index.vue"]]);
302
+ //#endregion
303
+ export { re as default };
@@ -7,7 +7,7 @@ import { a as c, n as l } from "./surveyorAccount-Cfba7ZVZ.js";
7
7
  import { a as u, c as d } from "./filterQuery-Dka-mIso.js";
8
8
  import { i as f, n as p, r as m, t as h } from "./RegistryToolbar-DXOEcD84.js";
9
9
  import { t as g } from "./TablePagination-CUtnDQQ_.js";
10
- import { t as _ } from "./SurveyorTeleport-CnSF0Ptl.js";
10
+ import { t as _ } from "./SurveyorTeleport-Cd6D92mo.js";
11
11
  import { Fragment as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createTextVNode as w, createVNode as T, defineComponent as E, normalizeClass as D, normalizeStyle as O, onMounted as k, onUnmounted as A, openBlock as j, ref as M, renderList as N, toDisplayString as P, vModelText as F, withCtx as I, withDirectives as L, withModifiers as R } from "vue";
12
12
  import { RouterLink as z } from "vue-router";
13
13
  //#region admin/src/pages/users/index.vue?vue&type=script&setup=true&lang.ts