@opengis/surveyor 0.0.2 → 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 (45) hide show
  1. package/dist/chunks/{AppealDetailField-CI-1qhs3.js → AppealDetailField-DNRGpnyD.js} +2 -2
  2. package/dist/chunks/{AppealStatusBadge-CSXnfarR.js → AppealStatusBadge-CefimzY3.js} +2 -2
  3. package/dist/chunks/{AppealStatusBadge-DYBe9hqP.js → AppealStatusBadge-Cu-UzdzA.js} +1 -1
  4. package/dist/chunks/{ApplicationHistorySection-C0wwhwA4.js → ApplicationHistorySection-PwToBfej.js} +4 -4
  5. package/dist/chunks/BaseModal-SQXvRRNW.js +90 -0
  6. package/dist/chunks/{FormFilePicker-C3XQw50i.js → FormFilePicker-CKVdZJU9.js} +2 -2
  7. package/dist/chunks/{MapLayerMenu-DjYCxEc3.js → MapLayerMenu-AUeTqgEp.js} +1 -1
  8. package/dist/chunks/{RegistryForm-CEUqFmsF.js → RegistryForm-wG-c8GKf.js} +1 -1
  9. package/dist/chunks/{RegistryFormModal-DfY4z_7r.js → RegistryFormModal-R_iZYqGE.js} +3 -3
  10. package/dist/chunks/{RegistryToolbar-BV4mYVAc.js → RegistryToolbar-322DKUXi.js} +6 -6
  11. package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +23 -0
  12. package/dist/chunks/{UserAccessBadge-D8JfgGfN.js → UserAccessBadge-DyZDv7Oo.js} +1 -1
  13. package/dist/chunks/{UserTypeBadge-YIwwoCho.js → UserTypeBadge-LvnMuKGo.js} +1 -1
  14. package/dist/chunks/{VerifiedBadge-Bba8WnuB.js → VerifiedBadge-bk0n-rlC.js} +2 -2
  15. package/dist/chunks/{applications-BB9JRcgl.js → applications-CsCsndMV.js} +1 -1
  16. package/dist/chunks/{card-fL26_Gvc.js → card-B_SfARf7.js} +358 -357
  17. package/dist/chunks/card-C3y-j2TA.js +298 -0
  18. package/dist/chunks/{card-CKD1N0QD.js → card-CWqi1K-x.js} +107 -106
  19. package/dist/chunks/{card-DUtDfwMk.js → card-DCyBFoDZ.js} +6 -6
  20. package/dist/chunks/card-DWpAv92l.js +539 -0
  21. package/dist/chunks/{card-B-ftozcq.js → card-X9UVFgdR.js} +256 -250
  22. package/dist/chunks/{certificates-BSd1i0un.js → certificates-Cwch72-o.js} +131 -130
  23. package/dist/chunks/{create-DxMC_IL1.js → create-DTP9x2uS.js} +283 -270
  24. package/dist/chunks/dom-BSjFG3O0.js +7 -0
  25. package/dist/chunks/{map-layers-DnmkOEld.js → map-layers-sT-gTiD_.js} +130 -125
  26. package/dist/chunks/{map-Z57iMvFb.js → map-qXQe_qam.js} +645 -632
  27. package/dist/chunks/{organizations-BbYipLwk.js → organizations-BtuMZ5s_.js} +1 -1
  28. package/dist/chunks/{organizations-BO1_JETm.js → organizations-ByVE2f0c.js} +128 -123
  29. package/dist/chunks/{profile-Dwwn_4Pr.js → profile-CuxlkEev.js} +3 -3
  30. package/dist/chunks/{profile-ByahbF4B.js → profile-DxZHxGum.js} +1 -1
  31. package/dist/chunks/requests-BTpLXrNj.js +233 -0
  32. package/dist/chunks/{requests-CFv5wwAN.js → requests-Bt8fEdRc.js} +7 -7
  33. package/dist/chunks/useEntityPath-C5Owtidc.js +98 -0
  34. package/dist/chunks/{users-DtTYsgMb.js → users-U1P6xCP4.js} +105 -99
  35. package/dist/index.css +1 -1
  36. package/dist/index.js +154 -114
  37. package/package.json +2 -5
  38. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -41
  39. package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -79
  40. package/surveyor-types.d.ts +5 -0
  41. package/dist/chunks/AppIcon-CIR6y5uE.js +0 -85
  42. package/dist/chunks/BaseModal-C7PVYz0m.js +0 -85
  43. package/dist/chunks/card-BctFHFZe.js +0 -538
  44. package/dist/chunks/card-CiNZxAd5.js +0 -297
  45. package/dist/chunks/requests-BCin936Z.js +0 -232
@@ -1,131 +1,134 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./AppIcon-CIR6y5uE.js";
3
- import { i as n } from "./resources-2e8RFqWR.js";
4
- import { i as r, n as i, r as a, t as o } from "./UserTypeBadge-YIwwoCho.js";
5
- import { t as s } from "./UserAccessBadge-D8JfgGfN.js";
2
+ import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
3
+ import { i as r } from "./resources-2e8RFqWR.js";
4
+ import { i, n as ee, r as a, t as o } from "./UserTypeBadge-LvnMuKGo.js";
5
+ import { t as s } from "./UserAccessBadge-DyZDv7Oo.js";
6
6
  import { a as c, n as l } from "./surveyorAccount-C7UiiIYg.js";
7
7
  import { a as u, c as d } from "./filterQuery-CvfZrkTC.js";
8
- import { a as f, i as p, n as m, r as h, t as g } from "./RegistryToolbar-BV4mYVAc.js";
9
- import { Fragment as _, Teleport 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";
8
+ import { a as f, i as p, n as m, r as h, t as g } from "./RegistryToolbar-322DKUXi.js";
9
+ import { t as _ } from "./SurveyorTeleport-CnSF0Ptl.js";
10
+ 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";
10
11
  import { RouterLink as z } from "vue-router";
11
12
  //#region admin/src/pages/users/index.vue?vue&type=script&setup=true&lang.ts
12
13
  var B = /*@__PURE__*/ E({
13
14
  __name: "index",
14
- setup(e, { expose: _ }) {
15
- _();
16
- let v = a.columns, { query: b, filterValues: x, page: S, pageSize: C, bindListLoader: w } = f({
15
+ setup(e, { expose: v }) {
16
+ v();
17
+ let b = a.columns, { query: x, filterValues: S, page: C, pageSize: w, bindListLoader: T } = f({
17
18
  arrayFilterKeys: ["type", "organization"],
18
19
  buildFilters: u
19
- }), T = M(!1), E = M(v.map((e) => e.key)), D = M([]), O = M(0), j = M(!1), N = M("");
20
- function P(e) {
20
+ }), { detailPath: E } = n(), D = M(!1), O = M(b.map((e) => e.key)), j = M([]), N = M(0), P = M(!1), F = M("");
21
+ function I(e) {
21
22
  return [
22
23
  e.last_name,
23
24
  e.first_name,
24
25
  e.middle_name
25
26
  ].filter(Boolean).join(" ") || "—";
26
27
  }
27
- function F(e) {
28
+ function L(e) {
28
29
  let t = e.certificate_id_data?.text;
29
30
  return t ? `№ ${t}` : "—";
30
31
  }
31
- function I(e) {
32
+ function R(e) {
32
33
  let t = (e.org_ids_data ?? []).map((e) => e?.text).filter(Boolean);
33
34
  return t.length ? t.join(", ") : "—";
34
35
  }
35
- let L = M(null), R = M({
36
+ let B = M(null), V = M({
36
37
  top: "0px",
37
38
  left: "0px"
38
39
  });
39
- function B(e, t) {
40
- if (L.value === e) {
41
- L.value = null;
40
+ function H(e, t) {
41
+ if (B.value === e) {
42
+ B.value = null;
42
43
  return;
43
44
  }
44
45
  let n = t.currentTarget.getBoundingClientRect(), r = window.innerHeight - n.bottom < 60 ? n.top - 52 - 4 : n.bottom + 4, i = Math.min(Math.max(8, n.right - 224), window.innerWidth - 224 - 8);
45
- R.value = {
46
+ V.value = {
46
47
  top: `${r}px`,
47
48
  left: `${i}px`
48
- }, L.value = e;
49
+ }, B.value = e;
49
50
  }
50
- function V(e) {
51
+ function U(e) {
51
52
  let t = e.target;
52
- t instanceof Element && t.closest("[data-row-actions]") || (L.value = null);
53
+ t instanceof Element && t.closest("[data-row-actions]") || (B.value = null);
53
54
  }
54
- function H(e) {
55
- L.value = null, l(e, P(e), (t) => {
56
- D.value = D.value.map((n) => n.surveyor_id === e.surveyor_id ? {
55
+ function W(e) {
56
+ B.value = null, l(e, I(e), (t) => {
57
+ j.value = j.value.map((n) => n.surveyor_id === e.surveyor_id ? {
57
58
  ...n,
58
59
  enabled: t
59
60
  } : n);
60
61
  });
61
62
  }
62
63
  k(() => {
63
- document.addEventListener("click", V), window.addEventListener("resize", V), window.addEventListener("scroll", V, !0);
64
+ document.addEventListener("click", U), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0);
64
65
  }), A(() => {
65
- document.removeEventListener("click", V), window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
66
+ document.removeEventListener("click", U), window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
66
67
  });
67
- let U = 0, W = y(() => j.value ? "Завантаження…" : N.value ? N.value : "Користувачів за заданими фільтрами не знайдено.");
68
- async function G() {
69
- let e = ++U;
70
- j.value = !0, N.value = "";
68
+ let G = 0, K = y(() => P.value ? "Завантаження…" : F.value ? F.value : "Користувачів за заданими фільтрами не знайдено.");
69
+ async function q() {
70
+ let e = ++G;
71
+ P.value = !0, F.value = "";
71
72
  try {
72
- let t = await n(r, {
73
- page: S.value,
74
- limit: C.value,
73
+ let t = await r(i, {
74
+ page: C.value,
75
+ limit: w.value,
75
76
  sort: a.sort,
76
- search: b.value.trim() || void 0,
77
- filters: await d(x.value)
77
+ search: x.value.trim() || void 0,
78
+ filters: await d(S.value)
78
79
  });
79
- if (e !== U) return;
80
- D.value = t.rows ?? [], O.value = Number(t.total) || 0;
80
+ if (e !== G) return;
81
+ j.value = t.rows ?? [], N.value = Number(t.total) || 0;
81
82
  } catch (t) {
82
- if (e !== U) return;
83
- D.value = [], O.value = 0, N.value = t instanceof Error ? t.message : "Не вдалося завантажити користувачів";
83
+ if (e !== G) return;
84
+ j.value = [], N.value = 0, F.value = t instanceof Error ? t.message : "Не вдалося завантажити користувачів";
84
85
  } finally {
85
- e === U && (j.value = !1);
86
+ e === G && (P.value = !1);
86
87
  }
87
88
  }
88
- w(() => {
89
- G();
89
+ T(() => {
90
+ q();
90
91
  });
91
- function K(e) {
92
- x.value = e;
92
+ function J(e) {
93
+ S.value = e;
93
94
  }
94
- function q(e) {
95
- E.value = E.value.includes(e) ? E.value.length > 1 ? E.value.filter((t) => t !== e) : E.value : [...E.value, e];
95
+ function Y(e) {
96
+ O.value = O.value.includes(e) ? O.value.length > 1 ? O.value.filter((t) => t !== e) : O.value : [...O.value, e];
96
97
  }
97
- let J = {
98
- columns: v,
99
- query: b,
100
- filterValues: x,
101
- page: S,
102
- pageSize: C,
103
- bindListLoader: w,
104
- columnsOpen: T,
105
- visibleColumns: E,
106
- rows: D,
107
- total: O,
108
- loading: j,
109
- error: N,
110
- personName: P,
111
- certificateNumber: F,
112
- organizationNames: I,
113
- actionsOpen: L,
114
- menuStyle: R,
115
- toggleActions: B,
116
- closeActions: V,
117
- toggleAccountBlock: H,
98
+ let X = {
99
+ columns: b,
100
+ query: x,
101
+ filterValues: S,
102
+ page: C,
103
+ pageSize: w,
104
+ bindListLoader: T,
105
+ detailPath: E,
106
+ columnsOpen: D,
107
+ visibleColumns: O,
108
+ rows: j,
109
+ total: N,
110
+ loading: P,
111
+ error: F,
112
+ personName: I,
113
+ certificateNumber: L,
114
+ organizationNames: R,
115
+ actionsOpen: B,
116
+ menuStyle: V,
117
+ toggleActions: H,
118
+ closeActions: U,
119
+ toggleAccountBlock: W,
118
120
  get requestId() {
119
- return U;
121
+ return G;
120
122
  },
121
123
  set requestId(e) {
122
- U = e;
124
+ G = e;
123
125
  },
124
- emptyText: W,
125
- loadRows: G,
126
- onFilterValuesUpdate: K,
127
- toggleColumn: q,
126
+ emptyText: K,
127
+ loadRows: q,
128
+ onFilterValuesUpdate: J,
129
+ toggleColumn: Y,
128
130
  AppIcon: t,
131
+ SurveyorTeleport: _,
129
132
  get RouterLink() {
130
133
  return z;
131
134
  },
@@ -139,13 +142,13 @@ var B = /*@__PURE__*/ E({
139
142
  UserAccessBadge: s,
140
143
  UserTypeBadge: o,
141
144
  get config() {
142
- return i;
145
+ return ee;
143
146
  }
144
147
  };
145
- return Object.defineProperty(J, "__isScriptSetup", {
148
+ return Object.defineProperty(X, "__isScriptSetup", {
146
149
  enumerable: !1,
147
150
  value: !0
148
- }), J;
151
+ }), X;
149
152
  }
150
153
  }), V = { class: "px-4" }, H = { class: "relative block" }, U = {
151
154
  type: "button",
@@ -170,15 +173,15 @@ var B = /*@__PURE__*/ E({
170
173
  }, $ = {
171
174
  key: 5,
172
175
  class: "whitespace-nowrap text-slate-600"
173
- }, ee = {
176
+ }, te = {
174
177
  key: 7,
175
178
  class: "flex justify-center"
176
- }, te = [
179
+ }, ne = [
177
180
  "aria-expanded",
178
181
  "aria-label",
179
182
  "onClick"
180
- ], ne = ["onClick"];
181
- function re(e, t, n, r, i, a) {
183
+ ], re = ["onClick"];
184
+ function ie(e, t, n, r, i, ee) {
182
185
  return j(), S("div", null, [T(r.PageHeader, {
183
186
  title: "Реєстр користувачів",
184
187
  subtitle: "Користувачі геодезичного кабінету"
@@ -208,7 +211,7 @@ function re(e, t, n, r, i, a) {
208
211
  }, [T(r.AppIcon, {
209
212
  name: "columns-3",
210
213
  class: "h-4 w-4"
211
- })]), r.columnsOpen ? (j(), S("div", G, [t[4] ||= C("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Налаштувати колонки", -1), (j(!0), S(_, null, N(r.columns, (e) => (j(), S("label", {
214
+ })]), r.columnsOpen ? (j(), S("div", G, [t[4] ||= C("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Налаштувати колонки", -1), (j(!0), S(v, null, N(r.columns, (e) => (j(), S("label", {
212
215
  key: e.key,
213
216
  class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
214
217
  }, [C("input", {
@@ -231,18 +234,18 @@ function re(e, t, n, r, i, a) {
231
234
  }, {
232
235
  cell: I(({ row: e, column: t }) => [t === "fullName" ? (j(), b(r.RouterLink, {
233
236
  key: 0,
234
- to: `/users/${e.surveyor_id}`,
237
+ to: r.detailPath(e.surveyor_id),
235
238
  class: "block w-full max-w-full break-words text-left font-semibold text-brand-700 hover:text-brand-900 hover:underline"
236
239
  }, {
237
240
  default: I(() => [w(P(r.personName(e)), 1)]),
238
241
  _: 2
239
- }, 1032, ["to"])) : t === "type" ? (j(), S(_, { key: 1 }, [e.certificate_type ? (j(), b(r.UserTypeBadge, {
242
+ }, 1032, ["to"])) : t === "type" ? (j(), S(v, { key: 1 }, [e.certificate_type ? (j(), b(r.UserTypeBadge, {
240
243
  key: 0,
241
244
  type: e.certificate_type
242
245
  }, null, 8, ["type"])) : (j(), S("span", Y, "—"))], 64)) : t === "organization" ? (j(), S("span", X, P(r.organizationNames(e)), 1)) : t === "certificate" ? (j(), S("span", Z, P(r.certificateNumber(e)), 1)) : t === "email" ? (j(), S("span", Q, P(e.email || "—"), 1)) : t === "phone" ? (j(), S("span", $, P(e.phone || "—"), 1)) : t === "status" ? (j(), b(r.UserAccessBadge, {
243
246
  key: 6,
244
247
  "account-blocked": !r.surveyorEnabled(e)
245
- }, null, 8, ["account-blocked"])) : t === "actions" ? (j(), S("div", ee, [C("button", {
248
+ }, null, 8, ["account-blocked"])) : t === "actions" ? (j(), S("div", te, [C("button", {
246
249
  type: "button",
247
250
  "data-row-actions": "",
248
251
  class: "inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg text-slate-400 transition-colors hover:bg-brand-50 hover:text-brand-700",
@@ -252,19 +255,22 @@ function re(e, t, n, r, i, a) {
252
255
  }, [T(r.AppIcon, {
253
256
  name: "more-vertical",
254
257
  class: "h-4 w-4"
255
- })], 8, te), (j(), b(v, { to: "body" }, [r.actionsOpen === e.surveyor_id ? (j(), S("div", {
256
- key: 0,
257
- "data-row-actions": "",
258
- class: "fixed z-50 w-56 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover",
259
- style: O(r.menuStyle)
260
- }, [C("button", {
261
- type: "button",
262
- class: D(["flex w-full items-center gap-2 px-3 py-2.5 text-sm transition-colors", r.surveyorEnabled(e) ? "text-red-600 hover:bg-red-50" : "text-slate-700 hover:bg-slate-50"]),
263
- onClick: (t) => r.toggleAccountBlock(e)
264
- }, [T(r.AppIcon, {
265
- name: r.surveyorEnabled(e) ? "ban" : "power",
266
- class: D(["h-4 w-4 shrink-0", r.surveyorEnabled(e) ? "" : "text-slate-400"])
267
- }, null, 8, ["name", "class"]), w(" " + P(r.surveyorEnabled(e) ? "Заблокувати повністю" : "Розблокувати"), 1)], 10, ne)], 4)) : x("", !0)]))])) : x("", !0)]),
258
+ })], 8, ne), T(r.SurveyorTeleport, null, {
259
+ default: I(() => [r.actionsOpen === e.surveyor_id ? (j(), S("div", {
260
+ key: 0,
261
+ "data-row-actions": "",
262
+ class: "fixed z-50 w-56 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover",
263
+ style: O(r.menuStyle)
264
+ }, [C("button", {
265
+ type: "button",
266
+ class: D(["flex w-full items-center gap-2 px-3 py-2.5 text-sm transition-colors", r.surveyorEnabled(e) ? "text-red-600 hover:bg-red-50" : "text-slate-700 hover:bg-slate-50"]),
267
+ onClick: (t) => r.toggleAccountBlock(e)
268
+ }, [T(r.AppIcon, {
269
+ name: r.surveyorEnabled(e) ? "ban" : "power",
270
+ class: D(["h-4 w-4 shrink-0", r.surveyorEnabled(e) ? "" : "text-slate-400"])
271
+ }, null, 8, ["name", "class"]), w(" " + P(r.surveyorEnabled(e) ? "Заблокувати повністю" : "Розблокувати"), 1)], 10, re)], 4)) : x("", !0)]),
272
+ _: 2
273
+ }, 1024)])) : x("", !0)]),
268
274
  _: 1
269
275
  }, 8, [
270
276
  "rows",
@@ -286,6 +292,6 @@ function re(e, t, n, r, i, a) {
286
292
  ])) : x("", !0)
287
293
  ])]);
288
294
  }
289
- var ie = /*#__PURE__*/ e(B, [["render", re], ["__file", "D:/Softpro/surveyor/admin/src/pages/users/index.vue"]]);
295
+ var ae = /*#__PURE__*/ e(B, [["render", ie], ["__file", "C:/softpro/surveyor/admin/src/pages/users/index.vue"]]);
290
296
  //#endregion
291
- export { ie as default };
297
+ export { ae as default };