@opengis/surveyor 0.0.2 → 0.0.4
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/{AppealDetailField-CI-1qhs3.js → AppealDetailField-DNRGpnyD.js} +2 -2
- package/dist/chunks/{AppealStatusBadge-CSXnfarR.js → AppealStatusBadge-CefimzY3.js} +2 -2
- package/dist/chunks/{AppealStatusBadge-DYBe9hqP.js → AppealStatusBadge-Cu-UzdzA.js} +1 -1
- package/dist/chunks/{ApplicationHistorySection-C0wwhwA4.js → ApplicationHistorySection-PwToBfej.js} +4 -4
- package/dist/chunks/BaseModal-SQXvRRNW.js +90 -0
- package/dist/chunks/{FormFilePicker-C3XQw50i.js → FormFilePicker-CKVdZJU9.js} +2 -2
- package/dist/chunks/{MapLayerMenu-DjYCxEc3.js → MapLayerMenu-AUeTqgEp.js} +1 -1
- package/dist/chunks/{RegistryForm-CEUqFmsF.js → RegistryForm-wG-c8GKf.js} +1 -1
- package/dist/chunks/{RegistryFormModal-DfY4z_7r.js → RegistryFormModal-R_iZYqGE.js} +3 -3
- package/dist/chunks/{RegistryToolbar-BV4mYVAc.js → RegistryToolbar-322DKUXi.js} +6 -6
- package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +23 -0
- package/dist/chunks/{UserAccessBadge-D8JfgGfN.js → UserAccessBadge-DyZDv7Oo.js} +1 -1
- package/dist/chunks/{UserTypeBadge-YIwwoCho.js → UserTypeBadge-LvnMuKGo.js} +1 -1
- package/dist/chunks/{VerifiedBadge-Bba8WnuB.js → VerifiedBadge-bk0n-rlC.js} +2 -2
- package/dist/chunks/{applications-BB9JRcgl.js → applications-CsCsndMV.js} +1 -1
- package/dist/chunks/{card-fL26_Gvc.js → card-B_SfARf7.js} +358 -357
- package/dist/chunks/card-C3y-j2TA.js +298 -0
- package/dist/chunks/{card-CKD1N0QD.js → card-CWqi1K-x.js} +107 -106
- package/dist/chunks/{card-DUtDfwMk.js → card-DCyBFoDZ.js} +6 -6
- package/dist/chunks/card-DWpAv92l.js +539 -0
- package/dist/chunks/{card-B-ftozcq.js → card-X9UVFgdR.js} +256 -250
- package/dist/chunks/{certificates-BSd1i0un.js → certificates-Cwch72-o.js} +131 -130
- package/dist/chunks/{create-DxMC_IL1.js → create-DTP9x2uS.js} +283 -270
- package/dist/chunks/dom-BSjFG3O0.js +7 -0
- package/dist/chunks/{map-Z57iMvFb.js → map-dvA3ayAK.js} +647 -634
- package/dist/chunks/{map-layers-DnmkOEld.js → map-layers-sT-gTiD_.js} +130 -125
- package/dist/chunks/{organizations-BbYipLwk.js → organizations-BtuMZ5s_.js} +1 -1
- package/dist/chunks/{organizations-BO1_JETm.js → organizations-ByVE2f0c.js} +128 -123
- package/dist/chunks/{profile-Dwwn_4Pr.js → profile-CuxlkEev.js} +3 -3
- package/dist/chunks/{profile-ByahbF4B.js → profile-DxZHxGum.js} +1 -1
- package/dist/chunks/requests-BTpLXrNj.js +233 -0
- package/dist/chunks/{requests-CFv5wwAN.js → requests-Bt8fEdRc.js} +7 -7
- package/dist/chunks/useEntityPath-C5Owtidc.js +98 -0
- package/dist/chunks/{users-DtTYsgMb.js → users-U1P6xCP4.js} +105 -99
- package/dist/index.css +1 -1
- package/dist/index.js +154 -114
- package/package.json +2 -5
- package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -41
- package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -79
- package/surveyor-types.d.ts +5 -0
- package/dist/chunks/AppIcon-CIR6y5uE.js +0 -85
- package/dist/chunks/BaseModal-C7PVYz0m.js +0 -85
- package/dist/chunks/card-BctFHFZe.js +0 -538
- package/dist/chunks/card-CiNZxAd5.js +0 -297
- 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 "./
|
|
3
|
-
import { i as
|
|
4
|
-
import { i
|
|
5
|
-
import { t as s } from "./UserAccessBadge-
|
|
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-
|
|
9
|
-
import {
|
|
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
|
|
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
|
-
}),
|
|
20
|
-
function
|
|
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
|
|
28
|
+
function L(e) {
|
|
28
29
|
let t = e.certificate_id_data?.text;
|
|
29
30
|
return t ? `№ ${t}` : "—";
|
|
30
31
|
}
|
|
31
|
-
function
|
|
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
|
|
36
|
+
let B = M(null), V = M({
|
|
36
37
|
top: "0px",
|
|
37
38
|
left: "0px"
|
|
38
39
|
});
|
|
39
|
-
function
|
|
40
|
-
if (
|
|
41
|
-
|
|
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
|
-
|
|
46
|
+
V.value = {
|
|
46
47
|
top: `${r}px`,
|
|
47
48
|
left: `${i}px`
|
|
48
|
-
},
|
|
49
|
+
}, B.value = e;
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function U(e) {
|
|
51
52
|
let t = e.target;
|
|
52
|
-
t instanceof Element && t.closest("[data-row-actions]") || (
|
|
53
|
+
t instanceof Element && t.closest("[data-row-actions]") || (B.value = null);
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
|
|
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",
|
|
64
|
+
document.addEventListener("click", U), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0);
|
|
64
65
|
}), A(() => {
|
|
65
|
-
document.removeEventListener("click",
|
|
66
|
+
document.removeEventListener("click", U), window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
|
|
66
67
|
});
|
|
67
|
-
let
|
|
68
|
-
async function
|
|
69
|
-
let e = ++
|
|
70
|
-
|
|
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
|
|
73
|
-
page:
|
|
74
|
-
limit:
|
|
73
|
+
let t = await r(i, {
|
|
74
|
+
page: C.value,
|
|
75
|
+
limit: w.value,
|
|
75
76
|
sort: a.sort,
|
|
76
|
-
search:
|
|
77
|
-
filters: await d(
|
|
77
|
+
search: x.value.trim() || void 0,
|
|
78
|
+
filters: await d(S.value)
|
|
78
79
|
});
|
|
79
|
-
if (e !==
|
|
80
|
-
|
|
80
|
+
if (e !== G) return;
|
|
81
|
+
j.value = t.rows ?? [], N.value = Number(t.total) || 0;
|
|
81
82
|
} catch (t) {
|
|
82
|
-
if (e !==
|
|
83
|
-
|
|
83
|
+
if (e !== G) return;
|
|
84
|
+
j.value = [], N.value = 0, F.value = t instanceof Error ? t.message : "Не вдалося завантажити користувачів";
|
|
84
85
|
} finally {
|
|
85
|
-
e ===
|
|
86
|
+
e === G && (P.value = !1);
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
T(() => {
|
|
90
|
+
q();
|
|
90
91
|
});
|
|
91
|
-
function
|
|
92
|
-
|
|
92
|
+
function J(e) {
|
|
93
|
+
S.value = e;
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
|
|
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
|
|
98
|
-
columns:
|
|
99
|
-
query:
|
|
100
|
-
filterValues:
|
|
101
|
-
page:
|
|
102
|
-
pageSize:
|
|
103
|
-
bindListLoader:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
|
121
|
+
return G;
|
|
120
122
|
},
|
|
121
123
|
set requestId(e) {
|
|
122
|
-
|
|
124
|
+
G = e;
|
|
123
125
|
},
|
|
124
|
-
emptyText:
|
|
125
|
-
loadRows:
|
|
126
|
-
onFilterValuesUpdate:
|
|
127
|
-
toggleColumn:
|
|
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
|
|
145
|
+
return ee;
|
|
143
146
|
}
|
|
144
147
|
};
|
|
145
|
-
return Object.defineProperty(
|
|
148
|
+
return Object.defineProperty(X, "__isScriptSetup", {
|
|
146
149
|
enumerable: !1,
|
|
147
150
|
value: !0
|
|
148
|
-
}),
|
|
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
|
-
},
|
|
176
|
+
}, te = {
|
|
174
177
|
key: 7,
|
|
175
178
|
class: "flex justify-center"
|
|
176
|
-
},
|
|
179
|
+
}, ne = [
|
|
177
180
|
"aria-expanded",
|
|
178
181
|
"aria-label",
|
|
179
182
|
"onClick"
|
|
180
|
-
],
|
|
181
|
-
function
|
|
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(
|
|
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:
|
|
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(
|
|
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",
|
|
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,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
|
295
|
+
var ae = /*#__PURE__*/ e(B, [["render", ie], ["__file", "C:/softpro/surveyor/admin/src/pages/users/index.vue"]]);
|
|
290
296
|
//#endregion
|
|
291
|
-
export {
|
|
297
|
+
export { ae as default };
|