@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,538 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
-
import { t } from "./AppIcon-CIR6y5uE.js";
|
|
3
|
-
import { a as n, o as r } from "./resources-2e8RFqWR.js";
|
|
4
|
-
import { t as i } from "./UserTypeBadge-YIwwoCho.js";
|
|
5
|
-
import { n as a, t as ee } from "./AppealDetailField-CI-1qhs3.js";
|
|
6
|
-
import { a as te, i as ne, n as re, r as o, t as ie } from "./surveyorAccount-C7UiiIYg.js";
|
|
7
|
-
import { n as ae, t as oe } from "./resendSurveyorRegistration-BHTTVIw1.js";
|
|
8
|
-
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, vModelText as C, watch as se, withCtx as w, withDirectives as T, withModifiers as E } from "vue";
|
|
9
|
-
import { RouterLink as D, useRoute as O } from "vue-router";
|
|
10
|
-
import { confirm as k, notify as A } from "@opengis/core";
|
|
11
|
-
//#region admin/src/pages/users/card.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var j = "h-10 w-full rounded-lg border border-slate-200 bg-white px-3 text-sm text-slate-700 outline-none transition-colors focus:border-brand-400 focus:ring-1 focus:ring-brand-400", M = /*@__PURE__*/ h({
|
|
13
|
-
__name: "card",
|
|
14
|
-
setup(e, { expose: s }) {
|
|
15
|
-
s();
|
|
16
|
-
let l = O(), u = b(null), d = b(!1), f = b(!1), p = b(!1), m = b(""), h = b(!1), g = b(!1), y = b({
|
|
17
|
-
last_name: "",
|
|
18
|
-
first_name: "",
|
|
19
|
-
middle_name: "",
|
|
20
|
-
email: "",
|
|
21
|
-
phone: ""
|
|
22
|
-
}), x = c(() => {
|
|
23
|
-
let e = u.value?.certificate;
|
|
24
|
-
return Array.isArray(e) ? e[0] ?? null : e ?? null;
|
|
25
|
-
}), S = c(() => u.value?.organizations ?? []), C = c(() => S.value.length > 1), w = b([]);
|
|
26
|
-
function T(e) {
|
|
27
|
-
return !C.value || w.value.includes(e);
|
|
28
|
-
}
|
|
29
|
-
function E(e) {
|
|
30
|
-
w.value = w.value.includes(e) ? w.value.filter((t) => t !== e) : [...w.value, e];
|
|
31
|
-
}
|
|
32
|
-
function M(e) {
|
|
33
|
-
return e.membership_enabled !== !1;
|
|
34
|
-
}
|
|
35
|
-
let N = c(() => u.value?.applications ?? []);
|
|
36
|
-
function P(e) {
|
|
37
|
-
return [
|
|
38
|
-
e.last_name,
|
|
39
|
-
e.first_name,
|
|
40
|
-
e.middle_name
|
|
41
|
-
].filter(Boolean).join(" ") || "—";
|
|
42
|
-
}
|
|
43
|
-
let F = c(() => h.value ? P(y.value) : u.value ? P(u.value) : ""), I = c(() => String(x.value?.certificate_type ?? "")), L = c(() => u.value ? oe(u.value) : !1), R = c(() => u.value ? ie(u.value) : !1), z = c(() => !u.value || te(u.value));
|
|
44
|
-
function B(e) {
|
|
45
|
-
if (!e) return "";
|
|
46
|
-
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
47
|
-
return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
|
|
48
|
-
}
|
|
49
|
-
function V(e) {
|
|
50
|
-
return e.address_id_data?.text || e.location || "—";
|
|
51
|
-
}
|
|
52
|
-
function H(e) {
|
|
53
|
-
y.value = {
|
|
54
|
-
last_name: e.last_name ?? "",
|
|
55
|
-
first_name: e.first_name ?? "",
|
|
56
|
-
middle_name: e.middle_name ?? "",
|
|
57
|
-
email: e.email ?? "",
|
|
58
|
-
phone: e.phone ?? ""
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function U() {
|
|
62
|
-
u.value && (H(u.value), g.value = !1, h.value = !0);
|
|
63
|
-
}
|
|
64
|
-
function W() {
|
|
65
|
-
u.value && H(u.value), h.value = !1;
|
|
66
|
-
}
|
|
67
|
-
async function G() {
|
|
68
|
-
if (!u.value || f.value) return;
|
|
69
|
-
let e = {
|
|
70
|
-
last_name: y.value.last_name.trim(),
|
|
71
|
-
first_name: y.value.first_name.trim(),
|
|
72
|
-
middle_name: y.value.middle_name.trim(),
|
|
73
|
-
email: y.value.email.trim().toLowerCase(),
|
|
74
|
-
phone: y.value.phone.trim()
|
|
75
|
-
};
|
|
76
|
-
if (!e.last_name || !e.first_name || !e.email) {
|
|
77
|
-
A({
|
|
78
|
-
type: "warning",
|
|
79
|
-
title: "Перевірте поля",
|
|
80
|
-
message: "Прізвище, імʼя та email обовʼязкові"
|
|
81
|
-
});
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
f.value = !0;
|
|
85
|
-
try {
|
|
86
|
-
await r("surveyors", u.value.surveyor_id, e), u.value = {
|
|
87
|
-
...u.value,
|
|
88
|
-
...e
|
|
89
|
-
}, h.value = !1;
|
|
90
|
-
} catch (e) {
|
|
91
|
-
A({
|
|
92
|
-
type: "error",
|
|
93
|
-
title: "Помилка збереження",
|
|
94
|
-
message: e instanceof Error ? e.message : "Не вдалося зберегти користувача"
|
|
95
|
-
});
|
|
96
|
-
} finally {
|
|
97
|
-
f.value = !1;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
async function K() {
|
|
101
|
-
if (u.value && !p.value && L.value) {
|
|
102
|
-
g.value = !1, p.value = !0;
|
|
103
|
-
try {
|
|
104
|
-
await ae(u.value.surveyor_id);
|
|
105
|
-
} finally {
|
|
106
|
-
p.value = !1;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function q() {
|
|
111
|
-
if (!u.value || !R.value) return;
|
|
112
|
-
let e = u.value.surveyor_id, t = P(u.value);
|
|
113
|
-
g.value = !1, k({
|
|
114
|
-
title: "Зміна пароля",
|
|
115
|
-
type: "warning",
|
|
116
|
-
message: `Згенерувати новий пароль для «${t}»? Поточний пароль перестане діяти, новий буде надіслано на email.`,
|
|
117
|
-
confirmButtonText: "Згенерувати",
|
|
118
|
-
cancelButtonText: "Скасувати",
|
|
119
|
-
onConfirm: () => o(e)
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function J() {
|
|
123
|
-
if (!u.value) return;
|
|
124
|
-
let e = u.value.surveyor_id;
|
|
125
|
-
g.value = !1, re(u.value, P(u.value), (t) => {
|
|
126
|
-
u.value?.surveyor_id === e && (u.value = {
|
|
127
|
-
...u.value,
|
|
128
|
-
enabled: t
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function Y(e) {
|
|
133
|
-
if (!u.value) return;
|
|
134
|
-
let t = u.value.surveyor_id, n = e.org_id, r = e.name || "—", i = P(u.value), a = !M(e);
|
|
135
|
-
k({
|
|
136
|
-
title: a ? "Активація" : "Деактивація",
|
|
137
|
-
type: a ? "warning" : "error",
|
|
138
|
-
message: a ? `Активувати користувача «${i}» в організації «${r}»?` : `Деактивувати користувача «${i}» в організації «${r}»? Доступ до заявок цієї організації буде вимкнено.`,
|
|
139
|
-
confirmButtonText: a ? "Активувати" : "Деактивувати",
|
|
140
|
-
cancelButtonText: "Скасувати",
|
|
141
|
-
onConfirm: async () => {
|
|
142
|
-
await ne(t, n, a) && u.value?.surveyor_id === t && (u.value = {
|
|
143
|
-
...u.value,
|
|
144
|
-
organizations: (u.value.organizations ?? []).map((e) => e.org_id === n ? {
|
|
145
|
-
...e,
|
|
146
|
-
membership_enabled: a
|
|
147
|
-
} : e)
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
function X(e) {
|
|
153
|
-
let t = e?.target;
|
|
154
|
-
t instanceof Element && t.closest("[data-user-header-menu]") || (g.value = !1);
|
|
155
|
-
}
|
|
156
|
-
async function Z(e) {
|
|
157
|
-
d.value = !0, m.value = "", u.value = null, g.value = !1, h.value = !1, w.value = [];
|
|
158
|
-
try {
|
|
159
|
-
u.value = await n(`/api/resource/surveyors/${encodeURIComponent(e)}?include=certificate,organizations,applications&limit=100`);
|
|
160
|
-
} catch (e) {
|
|
161
|
-
u.value = null, m.value = e instanceof Error ? e.message : "Не вдалося завантажити користувача";
|
|
162
|
-
} finally {
|
|
163
|
-
d.value = !1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
se(() => String(l.params.id), (e) => {
|
|
167
|
-
e && Z(e);
|
|
168
|
-
}, { immediate: !0 }), _(() => document.addEventListener("click", X)), v(() => document.removeEventListener("click", X));
|
|
169
|
-
let Q = {
|
|
170
|
-
fieldClass: j,
|
|
171
|
-
route: l,
|
|
172
|
-
surveyor: u,
|
|
173
|
-
loading: d,
|
|
174
|
-
saving: f,
|
|
175
|
-
resending: p,
|
|
176
|
-
error: m,
|
|
177
|
-
editing: h,
|
|
178
|
-
menuOpen: g,
|
|
179
|
-
draft: y,
|
|
180
|
-
certificate: x,
|
|
181
|
-
organizations: S,
|
|
182
|
-
organizationsAccordion: C,
|
|
183
|
-
openOrganizations: w,
|
|
184
|
-
organizationOpen: T,
|
|
185
|
-
toggleOrganization: E,
|
|
186
|
-
membershipEnabled: M,
|
|
187
|
-
applications: N,
|
|
188
|
-
personName: P,
|
|
189
|
-
fullName: F,
|
|
190
|
-
registryType: I,
|
|
191
|
-
showResendRegistration: L,
|
|
192
|
-
showResetPassword: R,
|
|
193
|
-
accountEnabled: z,
|
|
194
|
-
formatDate: B,
|
|
195
|
-
appealAddress: V,
|
|
196
|
-
fillDraft: H,
|
|
197
|
-
startEdit: U,
|
|
198
|
-
cancelEdit: W,
|
|
199
|
-
saveEdit: G,
|
|
200
|
-
resendRegistrationInvite: K,
|
|
201
|
-
resetPassword: q,
|
|
202
|
-
toggleAccountBlock: J,
|
|
203
|
-
toggleMembership: Y,
|
|
204
|
-
closeMenu: X,
|
|
205
|
-
loadSurveyor: Z,
|
|
206
|
-
AppIcon: t,
|
|
207
|
-
get RouterLink() {
|
|
208
|
-
return D;
|
|
209
|
-
},
|
|
210
|
-
AppealDetailSection: a,
|
|
211
|
-
AppealDetailField: ee,
|
|
212
|
-
UserTypeBadge: i
|
|
213
|
-
};
|
|
214
|
-
return Object.defineProperty(Q, "__isScriptSetup", {
|
|
215
|
-
enumerable: !1,
|
|
216
|
-
value: !0
|
|
217
|
-
}), Q;
|
|
218
|
-
}
|
|
219
|
-
}), N = {
|
|
220
|
-
key: 0,
|
|
221
|
-
class: "px-4 py-16 text-center text-sm text-slate-400"
|
|
222
|
-
}, P = {
|
|
223
|
-
key: 1,
|
|
224
|
-
class: "pl-0"
|
|
225
|
-
}, F = { class: "mb-6" }, I = { class: "mb-4 flex items-center gap-1.5 text-sm" }, L = { class: "font-medium text-slate-700" }, R = { class: "flex items-start justify-between gap-4" }, z = { class: "flex min-w-0 flex-wrap items-center gap-3" }, B = { class: "text-xl font-bold tracking-tight text-slate-900" }, V = {
|
|
226
|
-
key: 1,
|
|
227
|
-
class: "inline-flex items-center rounded-full border border-slate-200 bg-slate-50 px-2 py-0.5 text-xs font-medium text-slate-600"
|
|
228
|
-
}, H = {
|
|
229
|
-
class: "relative shrink-0",
|
|
230
|
-
"data-user-header-menu": ""
|
|
231
|
-
}, U = ["aria-expanded"], W = {
|
|
232
|
-
key: 0,
|
|
233
|
-
class: "absolute right-0 top-11 z-20 w-64 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover"
|
|
234
|
-
}, G = ["disabled"], K = { class: "flex flex-col gap-5" }, q = {
|
|
235
|
-
key: 0,
|
|
236
|
-
class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2"
|
|
237
|
-
}, J = { class: "block" }, Y = { class: "block" }, X = { class: "block" }, Z = { class: "block" }, Q = { class: "block sm:col-span-2" }, ce = {
|
|
238
|
-
key: 1,
|
|
239
|
-
class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2"
|
|
240
|
-
}, le = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, ue = {
|
|
241
|
-
key: 0,
|
|
242
|
-
class: "py-6 text-center text-sm text-slate-400"
|
|
243
|
-
}, de = ["aria-expanded", "onClick"], fe = { class: "flex min-w-0 flex-wrap items-center gap-2" }, pe = { class: "break-words text-sm font-semibold text-slate-800" }, me = {
|
|
244
|
-
key: 0,
|
|
245
|
-
class: "text-xs font-medium text-amber-700"
|
|
246
|
-
}, he = { class: "flex flex-wrap items-center gap-3" }, ge = ["onClick"], _e = {
|
|
247
|
-
key: 0,
|
|
248
|
-
class: "py-6 text-center text-sm text-slate-400"
|
|
249
|
-
}, ve = {
|
|
250
|
-
key: 1,
|
|
251
|
-
class: "overflow-x-auto"
|
|
252
|
-
}, ye = { class: "min-w-full table-fixed text-left text-[13px]" }, be = { class: "divide-y divide-slate-100" }, $ = { class: "px-1 py-3" }, xe = { class: "px-1 py-3 text-slate-600" }, Se = { class: "px-1 py-3 text-slate-600" }, Ce = {
|
|
253
|
-
key: 0,
|
|
254
|
-
class: "flex justify-end gap-3 rounded-xl border border-slate-200 bg-white px-5 py-4 shadow-card"
|
|
255
|
-
}, we = ["disabled"], Te = ["disabled"], Ee = {
|
|
256
|
-
key: 2,
|
|
257
|
-
class: "rounded-xl border border-slate-200 bg-white px-6 py-16 text-center shadow-card"
|
|
258
|
-
}, De = { class: "text-sm text-slate-500" };
|
|
259
|
-
function Oe(e, t, n, r, i, a) {
|
|
260
|
-
return r.loading ? (y(), d("div", N, " Завантаження… ")) : r.surveyor ? (y(), d("div", P, [f("header", F, [f("nav", I, [
|
|
261
|
-
m(r.RouterLink, {
|
|
262
|
-
to: "/users",
|
|
263
|
-
class: "flex items-center gap-1 text-slate-400 transition-colors hover:text-brand-600"
|
|
264
|
-
}, {
|
|
265
|
-
default: w(() => [m(r.AppIcon, {
|
|
266
|
-
name: "home",
|
|
267
|
-
class: "h-3.5 w-3.5"
|
|
268
|
-
}), t[6] ||= p(" Реєстр користувачів ", -1)]),
|
|
269
|
-
_: 1
|
|
270
|
-
}),
|
|
271
|
-
t[7] ||= f("span", { class: "text-slate-300" }, "/", -1),
|
|
272
|
-
f("span", L, S(r.fullName), 1)
|
|
273
|
-
]), f("div", R, [f("div", z, [f("h1", B, S(r.fullName), 1), r.registryType ? (y(), l(r.UserTypeBadge, {
|
|
274
|
-
key: 0,
|
|
275
|
-
type: r.registryType
|
|
276
|
-
}, null, 8, ["type"])) : r.certificate?.certificate_type_data?.text ? (y(), d("span", V, S(r.certificate.certificate_type_data.text), 1)) : u("", !0)]), f("div", H, [f("button", {
|
|
277
|
-
type: "button",
|
|
278
|
-
class: "inline-flex h-9 w-9 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",
|
|
279
|
-
"aria-label": "Дії",
|
|
280
|
-
"aria-expanded": r.menuOpen,
|
|
281
|
-
onClick: t[0] ||= E((e) => r.menuOpen = !r.menuOpen, ["stop"])
|
|
282
|
-
}, [m(r.AppIcon, {
|
|
283
|
-
name: "more-vertical",
|
|
284
|
-
class: "h-4 w-4"
|
|
285
|
-
})], 8, U), r.menuOpen ? (y(), d("div", W, [
|
|
286
|
-
f("button", {
|
|
287
|
-
type: "button",
|
|
288
|
-
class: "flex w-full items-center gap-2 whitespace-nowrap px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50",
|
|
289
|
-
onClick: r.startEdit
|
|
290
|
-
}, [m(r.AppIcon, {
|
|
291
|
-
name: "pencil",
|
|
292
|
-
class: "h-4 w-4 shrink-0 text-slate-400"
|
|
293
|
-
}), t[8] ||= p(" Редагувати ", -1)]),
|
|
294
|
-
r.showResendRegistration ? (y(), d("button", {
|
|
295
|
-
key: 0,
|
|
296
|
-
type: "button",
|
|
297
|
-
class: "flex w-full items-center gap-2 whitespace-nowrap px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50 disabled:opacity-60",
|
|
298
|
-
disabled: r.resending,
|
|
299
|
-
onClick: r.resendRegistrationInvite
|
|
300
|
-
}, [m(r.AppIcon, {
|
|
301
|
-
name: "send",
|
|
302
|
-
class: "h-4 w-4 shrink-0 text-slate-400"
|
|
303
|
-
}), p(" " + S(r.resending ? "Надсилання…" : "Надіслати лист повторно"), 1)], 8, G)) : u("", !0),
|
|
304
|
-
r.showResetPassword ? (y(), d("button", {
|
|
305
|
-
key: 1,
|
|
306
|
-
type: "button",
|
|
307
|
-
class: "flex w-full items-center gap-2 whitespace-nowrap px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50",
|
|
308
|
-
onClick: r.resetPassword
|
|
309
|
-
}, [m(r.AppIcon, {
|
|
310
|
-
name: "key-round",
|
|
311
|
-
class: "h-4 w-4 shrink-0 text-slate-400"
|
|
312
|
-
}), t[9] ||= p(" Згенерувати новий пароль ", -1)])) : u("", !0),
|
|
313
|
-
f("button", {
|
|
314
|
-
type: "button",
|
|
315
|
-
class: g(["flex w-full items-center gap-2 whitespace-nowrap px-3 py-2.5 text-sm transition-colors", r.accountEnabled ? "text-red-600 hover:bg-red-50" : "text-slate-700 hover:bg-slate-50"]),
|
|
316
|
-
onClick: r.toggleAccountBlock
|
|
317
|
-
}, [m(r.AppIcon, {
|
|
318
|
-
name: r.accountEnabled ? "ban" : "power",
|
|
319
|
-
class: g(["h-4 w-4 shrink-0", r.accountEnabled ? "" : "text-slate-400"])
|
|
320
|
-
}, null, 8, ["name", "class"]), p(" " + S(r.accountEnabled ? "Заблокувати повністю" : "Розблокувати"), 1)], 2)
|
|
321
|
-
])) : u("", !0)])])]), f("div", K, [
|
|
322
|
-
m(r.AppealDetailSection, { title: "Інформація про користувача" }, {
|
|
323
|
-
icon: w(() => [m(r.AppIcon, {
|
|
324
|
-
name: "user",
|
|
325
|
-
class: "h-[18px] w-[18px]"
|
|
326
|
-
})]),
|
|
327
|
-
default: w(() => [r.editing ? (y(), d("dl", q, [
|
|
328
|
-
f("label", J, [t[10] ||= f("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Прізвище", -1), T(f("input", {
|
|
329
|
-
"onUpdate:modelValue": t[1] ||= (e) => r.draft.last_name = e,
|
|
330
|
-
type: "text",
|
|
331
|
-
class: g(r.fieldClass)
|
|
332
|
-
}, null, 512), [[C, r.draft.last_name]])]),
|
|
333
|
-
f("label", Y, [t[11] ||= f("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Імʼя", -1), T(f("input", {
|
|
334
|
-
"onUpdate:modelValue": t[2] ||= (e) => r.draft.first_name = e,
|
|
335
|
-
type: "text",
|
|
336
|
-
class: g(r.fieldClass)
|
|
337
|
-
}, null, 512), [[C, r.draft.first_name]])]),
|
|
338
|
-
f("label", X, [t[12] ||= f("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "По батькові", -1), T(f("input", {
|
|
339
|
-
"onUpdate:modelValue": t[3] ||= (e) => r.draft.middle_name = e,
|
|
340
|
-
type: "text",
|
|
341
|
-
class: g(r.fieldClass)
|
|
342
|
-
}, null, 512), [[C, r.draft.middle_name]])]),
|
|
343
|
-
f("label", Z, [t[13] ||= f("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Електронна пошта спеціаліста", -1), T(f("input", {
|
|
344
|
-
"onUpdate:modelValue": t[4] ||= (e) => r.draft.email = e,
|
|
345
|
-
type: "email",
|
|
346
|
-
class: g(r.fieldClass)
|
|
347
|
-
}, null, 512), [[C, r.draft.email]])]),
|
|
348
|
-
f("label", Q, [t[14] ||= f("span", { class: "mb-1 block text-xs font-medium text-slate-500" }, "Номер телефону спеціаліста", -1), T(f("input", {
|
|
349
|
-
"onUpdate:modelValue": t[5] ||= (e) => r.draft.phone = e,
|
|
350
|
-
type: "text",
|
|
351
|
-
class: g(r.fieldClass)
|
|
352
|
-
}, null, 512), [[C, r.draft.phone]])])
|
|
353
|
-
])) : (y(), d("dl", ce, [
|
|
354
|
-
m(r.AppealDetailField, {
|
|
355
|
-
label: "ПІБ",
|
|
356
|
-
highlight: ""
|
|
357
|
-
}, {
|
|
358
|
-
default: w(() => [p(S(r.fullName), 1)]),
|
|
359
|
-
_: 1
|
|
360
|
-
}),
|
|
361
|
-
m(r.AppealDetailField, { label: "Електронна пошта спеціаліста" }, {
|
|
362
|
-
default: w(() => [p(S(r.surveyor.email || "—"), 1)]),
|
|
363
|
-
_: 1
|
|
364
|
-
}),
|
|
365
|
-
m(r.AppealDetailField, { label: "Номер телефону спеціаліста" }, {
|
|
366
|
-
default: w(() => [p(S(r.surveyor.phone || "—"), 1)]),
|
|
367
|
-
_: 1
|
|
368
|
-
}),
|
|
369
|
-
r.showResendRegistration ? (y(), l(r.AppealDetailField, {
|
|
370
|
-
key: 0,
|
|
371
|
-
label: "Статус реєстрації"
|
|
372
|
-
}, {
|
|
373
|
-
default: w(() => [...t[15] ||= [f("span", { class: "text-amber-700" }, "Очікує завершення", -1)]]),
|
|
374
|
-
_: 1
|
|
375
|
-
})) : u("", !0),
|
|
376
|
-
m(r.AppealDetailField, { label: "Доступ до кабінету" }, {
|
|
377
|
-
default: w(() => [f("span", { class: g(r.accountEnabled ? "text-emerald-700" : "text-red-600") }, S(r.accountEnabled ? "Активний" : "Заблоковано"), 3)]),
|
|
378
|
-
_: 1
|
|
379
|
-
})
|
|
380
|
-
]))]),
|
|
381
|
-
_: 1
|
|
382
|
-
}),
|
|
383
|
-
m(r.AppealDetailSection, { title: "Інформація про сертифікат" }, {
|
|
384
|
-
icon: w(() => [m(r.AppIcon, {
|
|
385
|
-
name: "award",
|
|
386
|
-
class: "h-[18px] w-[18px]"
|
|
387
|
-
})]),
|
|
388
|
-
default: w(() => [f("dl", le, [
|
|
389
|
-
m(r.AppealDetailField, { label: "Дата видачі кваліфікаційного сертифіката" }, {
|
|
390
|
-
default: w(() => [p(S(r.formatDate(r.certificate?.date_certificate) || "—"), 1)]),
|
|
391
|
-
_: 1
|
|
392
|
-
}),
|
|
393
|
-
m(r.AppealDetailField, { label: "Номер кваліфікаційного сертифіката" }, {
|
|
394
|
-
default: w(() => [p(S(r.certificate?.number_certificate || "—"), 1)]),
|
|
395
|
-
_: 1
|
|
396
|
-
}),
|
|
397
|
-
m(r.AppealDetailField, {
|
|
398
|
-
label: "Назва навчального закладу",
|
|
399
|
-
full: ""
|
|
400
|
-
}, {
|
|
401
|
-
default: w(() => [p(S(r.certificate?.name_school || "—"), 1)]),
|
|
402
|
-
_: 1
|
|
403
|
-
}),
|
|
404
|
-
m(r.AppealDetailField, { label: "Реєстр" }, {
|
|
405
|
-
default: w(() => [p(S(r.certificate?.certificate_type_data?.text || "—"), 1)]),
|
|
406
|
-
_: 1
|
|
407
|
-
}),
|
|
408
|
-
m(r.AppealDetailField, { label: "Місце роботи інженера-геодезиста" }, {
|
|
409
|
-
default: w(() => [p(S(r.certificate?.work_place || "—"), 1)]),
|
|
410
|
-
_: 1
|
|
411
|
-
})
|
|
412
|
-
])]),
|
|
413
|
-
_: 1
|
|
414
|
-
}),
|
|
415
|
-
m(r.AppealDetailSection, { title: "Інформація про організацію" }, {
|
|
416
|
-
icon: w(() => [m(r.AppIcon, {
|
|
417
|
-
name: "building-2",
|
|
418
|
-
class: "h-[18px] w-[18px]"
|
|
419
|
-
})]),
|
|
420
|
-
default: w(() => [r.organizations.length === 0 ? (y(), d("p", ue, "Організацію не вказано.")) : (y(), d("div", {
|
|
421
|
-
key: 1,
|
|
422
|
-
class: g(r.organizationsAccordion ? "flex flex-col gap-2" : "")
|
|
423
|
-
}, [(y(!0), d(s, null, x(r.organizations, (e) => (y(), d("div", {
|
|
424
|
-
key: e.org_id,
|
|
425
|
-
class: g(r.organizationsAccordion ? "overflow-hidden rounded-lg border border-slate-200" : "")
|
|
426
|
-
}, [r.organizationsAccordion ? (y(), d("button", {
|
|
427
|
-
key: 0,
|
|
428
|
-
type: "button",
|
|
429
|
-
class: "flex w-full cursor-pointer items-center justify-between gap-3 bg-slate-50/60 px-4 py-3 text-left transition-colors hover:bg-slate-50",
|
|
430
|
-
"aria-expanded": r.organizationOpen(e.org_id),
|
|
431
|
-
onClick: (t) => r.toggleOrganization(e.org_id)
|
|
432
|
-
}, [f("span", fe, [f("span", pe, S(e.name || "—"), 1), r.membershipEnabled(e) ? u("", !0) : (y(), d("span", me, "Вимкнено в організації"))]), m(r.AppIcon, {
|
|
433
|
-
name: "chevron-down",
|
|
434
|
-
class: g(["h-4 w-4 shrink-0 text-slate-400 transition-transform", r.organizationOpen(e.org_id) ? "rotate-180" : ""])
|
|
435
|
-
}, null, 8, ["class"])], 8, de)) : u("", !0), r.organizationOpen(e.org_id) ? (y(), d("dl", {
|
|
436
|
-
key: 1,
|
|
437
|
-
class: g(["grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2", r.organizationsAccordion ? "border-t border-slate-100 px-4 py-4" : ""])
|
|
438
|
-
}, [
|
|
439
|
-
m(r.AppealDetailField, {
|
|
440
|
-
label: "Назва організації",
|
|
441
|
-
highlight: ""
|
|
442
|
-
}, {
|
|
443
|
-
default: w(() => [m(r.RouterLink, {
|
|
444
|
-
to: `/organizations/${e.org_id}`,
|
|
445
|
-
class: "text-brand-600 transition-colors hover:text-brand-800 hover:underline"
|
|
446
|
-
}, {
|
|
447
|
-
default: w(() => [p(S(e.name || "—"), 1)]),
|
|
448
|
-
_: 2
|
|
449
|
-
}, 1032, ["to"])]),
|
|
450
|
-
_: 2
|
|
451
|
-
}, 1024),
|
|
452
|
-
m(r.AppealDetailField, {
|
|
453
|
-
label: "Юридична адреса",
|
|
454
|
-
full: ""
|
|
455
|
-
}, {
|
|
456
|
-
default: w(() => [p(S(e.legal_address || "—"), 1)]),
|
|
457
|
-
_: 2
|
|
458
|
-
}, 1024),
|
|
459
|
-
m(r.AppealDetailField, { label: "Email організації" }, {
|
|
460
|
-
default: w(() => [p(S(e.email || "—"), 1)]),
|
|
461
|
-
_: 2
|
|
462
|
-
}, 1024),
|
|
463
|
-
m(r.AppealDetailField, { label: "Телефон організації" }, {
|
|
464
|
-
default: w(() => [p(S(e.phone || "—"), 1)]),
|
|
465
|
-
_: 2
|
|
466
|
-
}, 1024),
|
|
467
|
-
m(r.AppealDetailField, {
|
|
468
|
-
label: "Доступ до організації",
|
|
469
|
-
full: ""
|
|
470
|
-
}, {
|
|
471
|
-
default: w(() => [f("span", he, [f("span", { class: g(r.membershipEnabled(e) ? "text-emerald-700" : "text-red-600") }, S(r.membershipEnabled(e) ? "Активний" : "Деактивовано"), 3), f("button", {
|
|
472
|
-
type: "button",
|
|
473
|
-
class: g(["inline-flex cursor-pointer items-center gap-1.5 rounded-lg border px-2.5 py-1 text-xs font-medium transition-colors", r.membershipEnabled(e) ? "border-red-200 text-red-600 hover:bg-red-50" : "border-slate-200 text-slate-700 hover:bg-slate-50"]),
|
|
474
|
-
onClick: (t) => r.toggleMembership(e)
|
|
475
|
-
}, [m(r.AppIcon, {
|
|
476
|
-
name: r.membershipEnabled(e) ? "user-x" : "power",
|
|
477
|
-
class: "h-3.5 w-3.5"
|
|
478
|
-
}, null, 8, ["name"]), p(" " + S(r.membershipEnabled(e) ? "Деактивувати" : "Активувати"), 1)], 10, ge)])]),
|
|
479
|
-
_: 2
|
|
480
|
-
}, 1024)
|
|
481
|
-
], 2)) : u("", !0)], 2))), 128))], 2))]),
|
|
482
|
-
_: 1
|
|
483
|
-
}),
|
|
484
|
-
m(r.AppealDetailSection, { title: "Заявки користувача" }, {
|
|
485
|
-
icon: w(() => [m(r.AppIcon, {
|
|
486
|
-
name: "clipboard-list",
|
|
487
|
-
class: "h-[18px] w-[18px]"
|
|
488
|
-
})]),
|
|
489
|
-
default: w(() => [r.applications.length === 0 ? (y(), d("p", _e, "Заявок не знайдено.")) : (y(), d("div", ve, [f("table", ye, [
|
|
490
|
-
t[16] ||= f("colgroup", null, [
|
|
491
|
-
f("col", { class: "w-[20%]" }),
|
|
492
|
-
f("col", { class: "w-[25%]" }),
|
|
493
|
-
f("col", { class: "w-[55%]" })
|
|
494
|
-
], -1),
|
|
495
|
-
t[17] ||= f("thead", { class: "text-xs font-semibold text-slate-500" }, [f("tr", { class: "border-b border-slate-100" }, [
|
|
496
|
-
f("th", { class: "px-1 py-2.5" }, "Номер"),
|
|
497
|
-
f("th", { class: "px-1 py-2.5" }, "Статус"),
|
|
498
|
-
f("th", { class: "px-1 py-2.5" }, "Адреса")
|
|
499
|
-
])], -1),
|
|
500
|
-
f("tbody", be, [(y(!0), d(s, null, x(r.applications, (e) => (y(), d("tr", {
|
|
501
|
-
key: e.app_id,
|
|
502
|
-
class: "transition-colors hover:bg-brand-50/40"
|
|
503
|
-
}, [
|
|
504
|
-
f("td", $, [m(r.RouterLink, {
|
|
505
|
-
to: `/requests/${e.app_id}`,
|
|
506
|
-
class: "font-semibold text-brand-700 hover:text-brand-900 hover:underline"
|
|
507
|
-
}, {
|
|
508
|
-
default: w(() => [p(S(e.number || "—"), 1)]),
|
|
509
|
-
_: 2
|
|
510
|
-
}, 1032, ["to"])]),
|
|
511
|
-
f("td", xe, S(e.status_data?.text || e.status || "—"), 1),
|
|
512
|
-
f("td", Se, S(r.appealAddress(e)), 1)
|
|
513
|
-
]))), 128))])
|
|
514
|
-
])]))]),
|
|
515
|
-
_: 1
|
|
516
|
-
}),
|
|
517
|
-
r.editing ? (y(), d("div", Ce, [f("button", {
|
|
518
|
-
type: "button",
|
|
519
|
-
class: "inline-flex h-10 items-center rounded-lg bg-slate-100 px-4 text-sm font-semibold text-slate-600 transition-colors hover:bg-slate-200",
|
|
520
|
-
disabled: r.saving,
|
|
521
|
-
onClick: r.cancelEdit
|
|
522
|
-
}, " Скасувати ", 8, we), f("button", {
|
|
523
|
-
type: "button",
|
|
524
|
-
class: "inline-flex h-10 items-center rounded-lg bg-brand-600 px-4 text-sm font-semibold text-white transition-colors hover:bg-brand-700 disabled:opacity-60",
|
|
525
|
-
disabled: r.saving,
|
|
526
|
-
onClick: r.saveEdit
|
|
527
|
-
}, S(r.saving ? "Збереження…" : "Зберегти зміни"), 9, Te)])) : u("", !0)
|
|
528
|
-
])])) : (y(), d("div", Ee, [f("p", De, S(r.error || "Користувача не знайдено."), 1), m(r.RouterLink, {
|
|
529
|
-
to: "/users",
|
|
530
|
-
class: "mt-3 inline-block text-sm font-medium text-brand-600 hover:text-brand-700"
|
|
531
|
-
}, {
|
|
532
|
-
default: w(() => [...t[18] ||= [p(" Повернутися до реєстру ", -1)]]),
|
|
533
|
-
_: 1
|
|
534
|
-
})]));
|
|
535
|
-
}
|
|
536
|
-
var ke = /*#__PURE__*/ e(M, [["render", Oe], ["__file", "D:/Softpro/surveyor/admin/src/pages/users/card.vue"]]);
|
|
537
|
-
//#endregion
|
|
538
|
-
export { ke as default };
|