@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,297 +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, i as r } from "./resources-2e8RFqWR.js";
|
|
4
|
-
import { t as i } from "./VerifiedBadge-Bba8WnuB.js";
|
|
5
|
-
import { t as a } from "./UserTypeBadge-YIwwoCho.js";
|
|
6
|
-
import { t as o } from "./UserAccessBadge-D8JfgGfN.js";
|
|
7
|
-
import { n as s, t as c } from "./AppealDetailField-CI-1qhs3.js";
|
|
8
|
-
import { a as l } from "./surveyorAccount-C7UiiIYg.js";
|
|
9
|
-
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, watch as w, withCtx as T } from "vue";
|
|
10
|
-
import { RouterLink as E, useRoute as D } from "vue-router";
|
|
11
|
-
//#region admin/src/pages/certificates/card.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var O = /*@__PURE__*/ v({
|
|
13
|
-
__name: "card",
|
|
14
|
-
setup(e, { expose: u }) {
|
|
15
|
-
u();
|
|
16
|
-
let f = D(), p = x(null), m = x([]), h = x(!1), g = x(""), _ = d(() => {
|
|
17
|
-
let e = p.value;
|
|
18
|
-
return e ? e.surveyor_name || [
|
|
19
|
-
e.last_name,
|
|
20
|
-
e.first_name,
|
|
21
|
-
e.middle_name
|
|
22
|
-
].filter(Boolean).join(" ") || e.number_certificate || "Сертифікат" : "";
|
|
23
|
-
}), v = d(() => String(p.value?.certificate_type ?? "")), y = d(() => {
|
|
24
|
-
let e = p.value;
|
|
25
|
-
return e ? e.membership ? e.membership : e.is_membership === !0 ? "Так" : e.is_membership === !1 ? "Ні" : "—" : "—";
|
|
26
|
-
});
|
|
27
|
-
function b(e) {
|
|
28
|
-
return [
|
|
29
|
-
e.last_name,
|
|
30
|
-
e.first_name,
|
|
31
|
-
e.middle_name
|
|
32
|
-
].filter(Boolean).join(" ") || "—";
|
|
33
|
-
}
|
|
34
|
-
function S(e) {
|
|
35
|
-
if (!e) return "";
|
|
36
|
-
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
37
|
-
return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
|
|
38
|
-
}
|
|
39
|
-
async function C(e) {
|
|
40
|
-
h.value = !0, g.value = "", p.value = null, m.value = [];
|
|
41
|
-
try {
|
|
42
|
-
let [t, i] = await Promise.all([n(`/api/resource/certificates/${encodeURIComponent(e)}`), r("surveyors", {
|
|
43
|
-
page: 1,
|
|
44
|
-
limit: 100,
|
|
45
|
-
filters: { certificate_id: e }
|
|
46
|
-
}).catch(() => ({ rows: [] }))]);
|
|
47
|
-
p.value = t, m.value = i.rows ?? [];
|
|
48
|
-
} catch (e) {
|
|
49
|
-
p.value = null, m.value = [], g.value = e instanceof Error ? e.message : "Не вдалося завантажити сертифікат";
|
|
50
|
-
} finally {
|
|
51
|
-
h.value = !1;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
w(() => String(f.params.id), (e) => {
|
|
55
|
-
e && C(e);
|
|
56
|
-
}, { immediate: !0 });
|
|
57
|
-
let T = {
|
|
58
|
-
route: f,
|
|
59
|
-
certificate: p,
|
|
60
|
-
surveyors: m,
|
|
61
|
-
loading: h,
|
|
62
|
-
error: g,
|
|
63
|
-
fullName: _,
|
|
64
|
-
registryType: v,
|
|
65
|
-
membershipText: y,
|
|
66
|
-
personName: b,
|
|
67
|
-
formatDate: S,
|
|
68
|
-
loadCertificate: C,
|
|
69
|
-
AppIcon: t,
|
|
70
|
-
get RouterLink() {
|
|
71
|
-
return E;
|
|
72
|
-
},
|
|
73
|
-
VerifiedBadge: i,
|
|
74
|
-
UserTypeBadge: a,
|
|
75
|
-
UserAccessBadge: o,
|
|
76
|
-
AppealDetailSection: s,
|
|
77
|
-
AppealDetailField: c,
|
|
78
|
-
get surveyorEnabled() {
|
|
79
|
-
return l;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
return Object.defineProperty(T, "__isScriptSetup", {
|
|
83
|
-
enumerable: !1,
|
|
84
|
-
value: !0
|
|
85
|
-
}), T;
|
|
86
|
-
}
|
|
87
|
-
}), k = {
|
|
88
|
-
key: 0,
|
|
89
|
-
class: "px-4 py-16 text-center text-sm text-slate-400"
|
|
90
|
-
}, A = {
|
|
91
|
-
key: 1,
|
|
92
|
-
class: "pl-0"
|
|
93
|
-
}, j = { class: "mb-6" }, M = { class: "mb-4 flex items-center gap-1.5 text-sm" }, N = { class: "font-medium text-slate-700" }, P = { class: "flex min-w-0 flex-wrap items-center gap-3" }, F = { class: "text-xl font-bold tracking-tight text-slate-900" }, ee = {
|
|
94
|
-
key: 1,
|
|
95
|
-
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"
|
|
96
|
-
}, I = { class: "flex flex-col gap-5" }, L = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, R = {
|
|
97
|
-
key: 1,
|
|
98
|
-
class: "text-[14px] font-medium text-slate-700"
|
|
99
|
-
}, z = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, B = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, V = {
|
|
100
|
-
key: 0,
|
|
101
|
-
class: "py-6 text-center text-sm text-slate-400"
|
|
102
|
-
}, H = {
|
|
103
|
-
key: 1,
|
|
104
|
-
class: "overflow-x-auto"
|
|
105
|
-
}, U = { class: "min-w-full table-fixed text-left text-[13px]" }, W = { class: "divide-y divide-slate-100" }, G = { class: "px-1 py-3" }, K = {
|
|
106
|
-
key: 0,
|
|
107
|
-
class: "mt-1 text-xs text-slate-400"
|
|
108
|
-
}, q = { class: "break-all px-1 py-3 text-slate-600" }, J = { class: "whitespace-nowrap px-1 py-3 text-slate-600" }, Y = { class: "px-1 py-3" }, X = {
|
|
109
|
-
key: 2,
|
|
110
|
-
class: "rounded-xl border border-slate-200 bg-white px-6 py-16 text-center shadow-card"
|
|
111
|
-
}, Z = { class: "text-sm text-slate-500" };
|
|
112
|
-
function Q(e, t, n, r, i, a) {
|
|
113
|
-
return r.loading ? (b(), m("div", k, " Завантаження… ")) : r.certificate ? (b(), m("div", A, [h("header", j, [h("nav", M, [
|
|
114
|
-
_(r.RouterLink, {
|
|
115
|
-
to: "/certificates",
|
|
116
|
-
class: "flex items-center gap-1 text-slate-400 transition-colors hover:text-brand-600"
|
|
117
|
-
}, {
|
|
118
|
-
default: T(() => [_(r.AppIcon, {
|
|
119
|
-
name: "home",
|
|
120
|
-
class: "h-3.5 w-3.5"
|
|
121
|
-
}), t[0] ||= g(" Реєстр сертифікатів ", -1)]),
|
|
122
|
-
_: 1
|
|
123
|
-
}),
|
|
124
|
-
t[1] ||= h("span", { class: "text-slate-300" }, "/", -1),
|
|
125
|
-
h("span", N, C(r.fullName), 1)
|
|
126
|
-
]), h("div", P, [h("h1", F, C(r.fullName), 1), r.registryType ? (b(), f(r.UserTypeBadge, {
|
|
127
|
-
key: 0,
|
|
128
|
-
type: r.registryType
|
|
129
|
-
}, null, 8, ["type"])) : r.certificate.certificate_type_data?.text ? (b(), m("span", ee, C(r.certificate.certificate_type_data.text), 1)) : p("", !0)])]), h("div", I, [
|
|
130
|
-
_(r.AppealDetailSection, { title: "Інформація про сертифікат" }, {
|
|
131
|
-
icon: T(() => [_(r.AppIcon, {
|
|
132
|
-
name: "award",
|
|
133
|
-
class: "h-[18px] w-[18px]"
|
|
134
|
-
})]),
|
|
135
|
-
default: T(() => [h("dl", L, [
|
|
136
|
-
_(r.AppealDetailField, {
|
|
137
|
-
label: "Номер кваліфікаційного сертифіката",
|
|
138
|
-
highlight: ""
|
|
139
|
-
}, {
|
|
140
|
-
default: T(() => [g(C(r.certificate.number_certificate || "—"), 1)]),
|
|
141
|
-
_: 1
|
|
142
|
-
}),
|
|
143
|
-
_(r.AppealDetailField, { label: "Дата видачі кваліфікаційного сертифіката" }, {
|
|
144
|
-
default: T(() => [g(C(r.formatDate(r.certificate.date_certificate) || "—"), 1)]),
|
|
145
|
-
_: 1
|
|
146
|
-
}),
|
|
147
|
-
_(r.AppealDetailField, { label: "Реєстр" }, {
|
|
148
|
-
default: T(() => [g(C(r.certificate.certificate_type_data?.text || "—"), 1)]),
|
|
149
|
-
_: 1
|
|
150
|
-
}),
|
|
151
|
-
h("div", null, [t[2] ||= h("dt", { class: "mb-1 text-xs font-medium text-slate-500" }, "Верифікація", -1), h("dd", null, [typeof r.certificate.isvalid == "boolean" ? (b(), f(r.VerifiedBadge, {
|
|
152
|
-
key: 0,
|
|
153
|
-
verified: r.certificate.isvalid
|
|
154
|
-
}, null, 8, ["verified"])) : (b(), m("span", R, "—"))])]),
|
|
155
|
-
_(r.AppealDetailField, {
|
|
156
|
-
label: "Назва навчального закладу",
|
|
157
|
-
full: ""
|
|
158
|
-
}, {
|
|
159
|
-
default: T(() => [g(C(r.certificate.name_school || "—"), 1)]),
|
|
160
|
-
_: 1
|
|
161
|
-
}),
|
|
162
|
-
_(r.AppealDetailField, { label: "Місце роботи інженера-геодезиста" }, {
|
|
163
|
-
default: T(() => [g(C(r.certificate.work_place || "—"), 1)]),
|
|
164
|
-
_: 1
|
|
165
|
-
}),
|
|
166
|
-
_(r.AppealDetailField, { label: "Місце провадження господарської діяльності" }, {
|
|
167
|
-
default: T(() => [g(C(r.certificate.economic_activity || "—"), 1)]),
|
|
168
|
-
_: 1
|
|
169
|
-
}),
|
|
170
|
-
_(r.AppealDetailField, {
|
|
171
|
-
label: "Членство",
|
|
172
|
-
full: ""
|
|
173
|
-
}, {
|
|
174
|
-
default: T(() => [g(C(r.membershipText), 1)]),
|
|
175
|
-
_: 1
|
|
176
|
-
})
|
|
177
|
-
])]),
|
|
178
|
-
_: 1
|
|
179
|
-
}),
|
|
180
|
-
_(r.AppealDetailSection, { title: "Геодезист" }, {
|
|
181
|
-
icon: T(() => [_(r.AppIcon, {
|
|
182
|
-
name: "user",
|
|
183
|
-
class: "h-[18px] w-[18px]"
|
|
184
|
-
})]),
|
|
185
|
-
default: T(() => [h("dl", z, [
|
|
186
|
-
_(r.AppealDetailField, {
|
|
187
|
-
label: "ПІБ",
|
|
188
|
-
highlight: ""
|
|
189
|
-
}, {
|
|
190
|
-
default: T(() => [g(C(r.fullName), 1)]),
|
|
191
|
-
_: 1
|
|
192
|
-
}),
|
|
193
|
-
_(r.AppealDetailField, { label: "Email геодезиста" }, {
|
|
194
|
-
default: T(() => [g(C(r.certificate.surveyor_email || "—"), 1)]),
|
|
195
|
-
_: 1
|
|
196
|
-
}),
|
|
197
|
-
_(r.AppealDetailField, { label: "Номер телефону геодезиста" }, {
|
|
198
|
-
default: T(() => [g(C(r.certificate.surveyor_phone || "—"), 1)]),
|
|
199
|
-
_: 1
|
|
200
|
-
})
|
|
201
|
-
])]),
|
|
202
|
-
_: 1
|
|
203
|
-
}),
|
|
204
|
-
_(r.AppealDetailSection, { title: "Кваліфікація та обмеження" }, {
|
|
205
|
-
icon: T(() => [_(r.AppIcon, {
|
|
206
|
-
name: "calendar-days",
|
|
207
|
-
class: "h-[18px] w-[18px]"
|
|
208
|
-
})]),
|
|
209
|
-
default: T(() => [h("dl", B, [
|
|
210
|
-
_(r.AppealDetailField, { label: "Підвищення кваліфікації" }, {
|
|
211
|
-
default: T(() => [g(C(r.formatDate(r.certificate.last_qualification_date) || "—"), 1)]),
|
|
212
|
-
_: 1
|
|
213
|
-
}),
|
|
214
|
-
_(r.AppealDetailField, { label: "Кваліфікаційний рівень" }, {
|
|
215
|
-
default: T(() => [g(C(r.certificate.qualification_level || "—"), 1)]),
|
|
216
|
-
_: 1
|
|
217
|
-
}),
|
|
218
|
-
_(r.AppealDetailField, { label: "Дата протоколу" }, {
|
|
219
|
-
default: T(() => [g(C(r.formatDate(r.certificate.date_protocol) || "—"), 1)]),
|
|
220
|
-
_: 1
|
|
221
|
-
}),
|
|
222
|
-
_(r.AppealDetailField, { label: "Номер протоколу" }, {
|
|
223
|
-
default: T(() => [g(C(r.certificate.number_protocol || "—"), 1)]),
|
|
224
|
-
_: 1
|
|
225
|
-
}),
|
|
226
|
-
_(r.AppealDetailField, {
|
|
227
|
-
label: "Інформація про підвищення кваліфікації",
|
|
228
|
-
full: ""
|
|
229
|
-
}, {
|
|
230
|
-
default: T(() => [g(C(r.certificate.certificate_increase || "—"), 1)]),
|
|
231
|
-
_: 1
|
|
232
|
-
}),
|
|
233
|
-
_(r.AppealDetailField, {
|
|
234
|
-
label: "Підстава для поновлення",
|
|
235
|
-
full: ""
|
|
236
|
-
}, {
|
|
237
|
-
default: T(() => [g(C(r.certificate.certificate_renewal || "—"), 1)]),
|
|
238
|
-
_: 1
|
|
239
|
-
}),
|
|
240
|
-
_(r.AppealDetailField, { label: "Дата призупинення" }, {
|
|
241
|
-
default: T(() => [h("span", { class: y(r.certificate.certificate_suspension ? "text-danger-700" : "") }, C(r.formatDate(r.certificate.certificate_suspension) || "—"), 3)]),
|
|
242
|
-
_: 1
|
|
243
|
-
}),
|
|
244
|
-
_(r.AppealDetailField, { label: "Дата припинення" }, {
|
|
245
|
-
default: T(() => [h("span", { class: y(r.certificate.certificate_stopping ? "text-danger-700" : "") }, C(r.certificate.certificate_stopping || "—"), 3)]),
|
|
246
|
-
_: 1
|
|
247
|
-
})
|
|
248
|
-
])]),
|
|
249
|
-
_: 1
|
|
250
|
-
}),
|
|
251
|
-
_(r.AppealDetailSection, { title: "Користувачі" }, {
|
|
252
|
-
icon: T(() => [_(r.AppIcon, {
|
|
253
|
-
name: "users",
|
|
254
|
-
class: "h-[18px] w-[18px]"
|
|
255
|
-
})]),
|
|
256
|
-
default: T(() => [r.surveyors.length === 0 ? (b(), m("p", V, " Користувачів за цим сертифікатом не знайдено. ")) : (b(), m("div", H, [h("table", U, [
|
|
257
|
-
t[3] ||= h("colgroup", null, [
|
|
258
|
-
h("col", { class: "w-[32%]" }),
|
|
259
|
-
h("col", { class: "w-[28%]" }),
|
|
260
|
-
h("col", { class: "w-[22%]" }),
|
|
261
|
-
h("col", { class: "w-[18%]" })
|
|
262
|
-
], -1),
|
|
263
|
-
t[4] ||= h("thead", { class: "text-xs font-semibold text-slate-500" }, [h("tr", { class: "border-b border-slate-100" }, [
|
|
264
|
-
h("th", { class: "px-1 py-2.5" }, "ПІБ"),
|
|
265
|
-
h("th", { class: "px-1 py-2.5" }, "Email"),
|
|
266
|
-
h("th", { class: "px-1 py-2.5" }, "Телефон"),
|
|
267
|
-
h("th", { class: "px-1 py-2.5" }, "Доступ")
|
|
268
|
-
])], -1),
|
|
269
|
-
h("tbody", W, [(b(!0), m(u, null, S(r.surveyors, (e) => (b(), m("tr", {
|
|
270
|
-
key: e.surveyor_id,
|
|
271
|
-
class: "transition-colors hover:bg-brand-50/40"
|
|
272
|
-
}, [
|
|
273
|
-
h("td", G, [_(r.RouterLink, {
|
|
274
|
-
to: `/users/${e.surveyor_id}`,
|
|
275
|
-
class: "font-semibold text-brand-700 hover:text-brand-900 hover:underline"
|
|
276
|
-
}, {
|
|
277
|
-
default: T(() => [g(C(r.personName(e)), 1)]),
|
|
278
|
-
_: 2
|
|
279
|
-
}, 1032, ["to"]), e.registered_at ? p("", !0) : (b(), m("p", K, "Реєстрацію не завершено"))]),
|
|
280
|
-
h("td", q, C(e.email || "—"), 1),
|
|
281
|
-
h("td", J, C(e.phone || "—"), 1),
|
|
282
|
-
h("td", Y, [_(r.UserAccessBadge, { "account-blocked": !r.surveyorEnabled(e) }, null, 8, ["account-blocked"])])
|
|
283
|
-
]))), 128))])
|
|
284
|
-
])]))]),
|
|
285
|
-
_: 1
|
|
286
|
-
})
|
|
287
|
-
])])) : (b(), m("div", X, [h("p", Z, C(r.error || "Сертифікат не знайдено."), 1), _(r.RouterLink, {
|
|
288
|
-
to: "/certificates",
|
|
289
|
-
class: "mt-3 inline-block text-sm font-medium text-brand-600 hover:text-brand-700"
|
|
290
|
-
}, {
|
|
291
|
-
default: T(() => [...t[5] ||= [g(" Повернутися до реєстру ", -1)]]),
|
|
292
|
-
_: 1
|
|
293
|
-
})]));
|
|
294
|
-
}
|
|
295
|
-
var $ = /*#__PURE__*/ e(O, [["render", Q], ["__file", "D:/Softpro/surveyor/admin/src/pages/certificates/card.vue"]]);
|
|
296
|
-
//#endregion
|
|
297
|
-
export { $ as default };
|
|
@@ -1,232 +0,0 @@
|
|
|
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 { t as r } from "./filterQuery-CvfZrkTC.js";
|
|
5
|
-
import { a as i, i as a, n as o, r as s, t as c } from "./RegistryToolbar-BV4mYVAc.js";
|
|
6
|
-
import { n as l, r as u, s as d, t as f } from "./AppealStatusBadge-DYBe9hqP.js";
|
|
7
|
-
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as b, defineComponent as x, openBlock as S, ref as C, renderList as w, toDisplayString as T, vModelText as E, withCtx as D, withDirectives as O } from "vue";
|
|
8
|
-
import { RouterLink as k } from "vue-router";
|
|
9
|
-
//#region admin/src/pages/requests/index.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var A = /*@__PURE__*/ x({
|
|
11
|
-
__name: "index",
|
|
12
|
-
setup(e, { expose: p }) {
|
|
13
|
-
p();
|
|
14
|
-
let h = u.columns, g = h.flatMap((e) => e.sort ? [e.sort] : []), { query: _, filterValues: v, page: y, pageSize: b, sort: x, listFilters: S, bindListLoader: w } = i({
|
|
15
|
-
arrayFilterKeys: ["status", "year"],
|
|
16
|
-
defaultSort: u.sort,
|
|
17
|
-
sortFields: g,
|
|
18
|
-
buildFilters: r
|
|
19
|
-
}), T = C(!1), E = C([
|
|
20
|
-
"number",
|
|
21
|
-
"organization",
|
|
22
|
-
"address",
|
|
23
|
-
"status",
|
|
24
|
-
"workType",
|
|
25
|
-
"createdAt"
|
|
26
|
-
]), D = C([]), O = C(0), A = C(!1), j = C("");
|
|
27
|
-
function M(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 N(e) {
|
|
33
|
-
return e.address_id_data?.text || e.location || "—";
|
|
34
|
-
}
|
|
35
|
-
let P = 0, F = m(() => A.value ? "Завантаження…" : j.value ? j.value : "За заданими фільтрами звернень не знайдено.");
|
|
36
|
-
async function I() {
|
|
37
|
-
let e = ++P;
|
|
38
|
-
A.value = !0, j.value = "";
|
|
39
|
-
try {
|
|
40
|
-
let t = await n(d, {
|
|
41
|
-
page: y.value,
|
|
42
|
-
limit: b.value,
|
|
43
|
-
sort: x.value,
|
|
44
|
-
search: _.value.trim() || void 0,
|
|
45
|
-
filters: S.value
|
|
46
|
-
});
|
|
47
|
-
if (e !== P) return;
|
|
48
|
-
D.value = t.rows ?? [], O.value = Number(t.total) || 0;
|
|
49
|
-
} catch (t) {
|
|
50
|
-
if (e !== P) return;
|
|
51
|
-
D.value = [], O.value = 0, j.value = t instanceof Error ? t.message : "Не вдалося завантажити звернення";
|
|
52
|
-
} finally {
|
|
53
|
-
e === P && (A.value = !1);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
w(() => {
|
|
57
|
-
I();
|
|
58
|
-
});
|
|
59
|
-
function L(e) {
|
|
60
|
-
v.value = e;
|
|
61
|
-
}
|
|
62
|
-
function R(e) {
|
|
63
|
-
x.value !== e && (y.value !== 1 && (y.value = 1), x.value = e);
|
|
64
|
-
}
|
|
65
|
-
function z(e) {
|
|
66
|
-
E.value = E.value.includes(e) ? E.value.length > 1 ? E.value.filter((t) => t !== e) : E.value : E.value.length < 7 ? [...E.value, e] : E.value;
|
|
67
|
-
}
|
|
68
|
-
let B = {
|
|
69
|
-
columns: h,
|
|
70
|
-
sortableFields: g,
|
|
71
|
-
query: _,
|
|
72
|
-
filterValues: v,
|
|
73
|
-
page: y,
|
|
74
|
-
pageSize: b,
|
|
75
|
-
sort: x,
|
|
76
|
-
listFilters: S,
|
|
77
|
-
bindListLoader: w,
|
|
78
|
-
columnsOpen: T,
|
|
79
|
-
visibleColumns: E,
|
|
80
|
-
rows: D,
|
|
81
|
-
total: O,
|
|
82
|
-
loading: A,
|
|
83
|
-
error: j,
|
|
84
|
-
formatDate: M,
|
|
85
|
-
addressLabel: N,
|
|
86
|
-
get requestId() {
|
|
87
|
-
return P;
|
|
88
|
-
},
|
|
89
|
-
set requestId(e) {
|
|
90
|
-
P = e;
|
|
91
|
-
},
|
|
92
|
-
emptyText: F,
|
|
93
|
-
loadRows: I,
|
|
94
|
-
onFilterValuesUpdate: L,
|
|
95
|
-
onSort: R,
|
|
96
|
-
toggleColumn: z,
|
|
97
|
-
AppIcon: t,
|
|
98
|
-
get RouterLink() {
|
|
99
|
-
return k;
|
|
100
|
-
},
|
|
101
|
-
AppealStatusBadge: f,
|
|
102
|
-
PageHeader: a,
|
|
103
|
-
RegistryTable: s,
|
|
104
|
-
TablePagination: o,
|
|
105
|
-
RegistryToolbar: c,
|
|
106
|
-
get config() {
|
|
107
|
-
return l;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
return Object.defineProperty(B, "__isScriptSetup", {
|
|
111
|
-
enumerable: !1,
|
|
112
|
-
value: !0
|
|
113
|
-
}), B;
|
|
114
|
-
}
|
|
115
|
-
}), j = { class: "px-4" }, M = { class: "relative block" }, N = {
|
|
116
|
-
type: "button",
|
|
117
|
-
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",
|
|
118
|
-
"aria-label": "Експорт"
|
|
119
|
-
}, P = { class: "relative" }, F = {
|
|
120
|
-
key: 0,
|
|
121
|
-
class: "absolute right-0 top-12 z-20 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
|
|
122
|
-
}, I = ["checked", "onChange"], L = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, R = { class: "font-semibold text-slate-600" }, z = {
|
|
123
|
-
key: 1,
|
|
124
|
-
class: "min-w-0"
|
|
125
|
-
}, B = { class: "break-words font-semibold text-slate-700" }, V = { class: "break-words text-xs text-slate-400" }, H = {
|
|
126
|
-
key: 2,
|
|
127
|
-
class: "text-slate-600"
|
|
128
|
-
}, U = {
|
|
129
|
-
key: 4,
|
|
130
|
-
class: "text-slate-600"
|
|
131
|
-
}, W = {
|
|
132
|
-
key: 5,
|
|
133
|
-
class: "whitespace-nowrap text-slate-600"
|
|
134
|
-
}, G = {
|
|
135
|
-
key: 6,
|
|
136
|
-
class: "text-slate-600"
|
|
137
|
-
};
|
|
138
|
-
function K(e, t, n, r, i, a) {
|
|
139
|
-
return S(), _("div", null, [b(r.PageHeader, {
|
|
140
|
-
title: "Звернення на видачу та прийом матеріалів",
|
|
141
|
-
subtitle: "Реєстр звернень геодезичного кабінету"
|
|
142
|
-
}), v("section", j, [
|
|
143
|
-
b(r.RegistryToolbar, {
|
|
144
|
-
nowrap: "",
|
|
145
|
-
"search-min": "min-w-[160px]",
|
|
146
|
-
"filter-config": r.config.filter,
|
|
147
|
-
"filter-values": r.filterValues,
|
|
148
|
-
"onUpdate:filterValues": r.onFilterValuesUpdate
|
|
149
|
-
}, {
|
|
150
|
-
search: D(() => [v("label", M, [b(r.AppIcon, {
|
|
151
|
-
name: "search",
|
|
152
|
-
class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
|
|
153
|
-
}), O(v("input", {
|
|
154
|
-
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
155
|
-
type: "search",
|
|
156
|
-
placeholder: "Пошук…",
|
|
157
|
-
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"
|
|
158
|
-
}, null, 512), [[E, r.query]])])]),
|
|
159
|
-
actions: D(() => [v("button", N, [b(r.AppIcon, {
|
|
160
|
-
name: "download",
|
|
161
|
-
class: "h-4 w-4"
|
|
162
|
-
})]), v("div", P, [v("button", {
|
|
163
|
-
type: "button",
|
|
164
|
-
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",
|
|
165
|
-
onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
|
|
166
|
-
}, [b(r.AppIcon, {
|
|
167
|
-
name: "columns-3",
|
|
168
|
-
class: "h-4 w-4"
|
|
169
|
-
})]), r.columnsOpen ? (S(), _("div", F, [
|
|
170
|
-
t[4] ||= v("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Налаштувати колонки", -1),
|
|
171
|
-
(S(!0), _(p, null, w(r.columns, (e) => (S(), _("label", {
|
|
172
|
-
key: e.key,
|
|
173
|
-
class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
|
|
174
|
-
}, [v("input", {
|
|
175
|
-
type: "checkbox",
|
|
176
|
-
checked: r.visibleColumns.includes(e.key),
|
|
177
|
-
class: "h-4 w-4 accent-brand-600",
|
|
178
|
-
onChange: (t) => r.toggleColumn(e.key)
|
|
179
|
-
}, null, 40, I), y(" " + T(e.label), 1)]))), 128)),
|
|
180
|
-
t[5] ||= v("p", { class: "px-2 pt-1 text-[11px] text-slate-400" }, "До 7 колонок одночасно", -1)
|
|
181
|
-
])) : g("", !0)])]),
|
|
182
|
-
_: 1
|
|
183
|
-
}, 8, ["filter-config", "filter-values"]),
|
|
184
|
-
v("div", L, [v("span", null, [t[6] ||= y("Знайдено звернень: ", -1), v("strong", R, T(r.total), 1)])]),
|
|
185
|
-
b(r.RegistryTable, {
|
|
186
|
-
class: "mt-3",
|
|
187
|
-
rows: r.rows,
|
|
188
|
-
columns: r.columns,
|
|
189
|
-
"visible-keys": r.visibleColumns,
|
|
190
|
-
"row-key": "app_id",
|
|
191
|
-
sort: r.sort,
|
|
192
|
-
"empty-text": r.emptyText,
|
|
193
|
-
onSort: r.onSort
|
|
194
|
-
}, {
|
|
195
|
-
cell: D(({ row: e, column: t }) => [t === "number" ? (S(), h(r.RouterLink, {
|
|
196
|
-
key: 0,
|
|
197
|
-
to: `/requests/${e.app_id}`,
|
|
198
|
-
class: "font-semibold text-brand-700 underline-offset-4 transition-colors hover:text-brand-900 hover:underline"
|
|
199
|
-
}, {
|
|
200
|
-
default: D(() => [y(T(e.number || "—"), 1)]),
|
|
201
|
-
_: 2
|
|
202
|
-
}, 1032, ["to"])) : t === "organization" ? (S(), _("div", z, [v("p", B, T(e.org_id_data?.text || "—"), 1), v("p", V, T(e.surveyor_id_data?.text || "—"), 1)])) : t === "address" ? (S(), _("span", H, T(r.addressLabel(e)), 1)) : t === "status" ? (S(), h(r.AppealStatusBadge, {
|
|
203
|
-
key: 3,
|
|
204
|
-
status: e.status || "",
|
|
205
|
-
label: e.status_data?.text || void 0,
|
|
206
|
-
size: "sm"
|
|
207
|
-
}, null, 8, ["status", "label"])) : t === "workType" ? (S(), _("span", U, T(e.work_type_data?.text || "—"), 1)) : t === "createdAt" ? (S(), _("span", W, T(r.formatDate(e.created_at)), 1)) : t === "checkedBy" ? (S(), _("span", G, T(e.verified_by_data?.text || "—"), 1)) : g("", !0)]),
|
|
208
|
-
_: 1
|
|
209
|
-
}, 8, [
|
|
210
|
-
"rows",
|
|
211
|
-
"columns",
|
|
212
|
-
"visible-keys",
|
|
213
|
-
"sort",
|
|
214
|
-
"empty-text"
|
|
215
|
-
]),
|
|
216
|
-
r.total > 0 ? (S(), h(r.TablePagination, {
|
|
217
|
-
key: 0,
|
|
218
|
-
page: r.page,
|
|
219
|
-
"onUpdate:page": t[2] ||= (e) => r.page = e,
|
|
220
|
-
"page-size": r.pageSize,
|
|
221
|
-
"onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
|
|
222
|
-
total: r.total
|
|
223
|
-
}, null, 8, [
|
|
224
|
-
"page",
|
|
225
|
-
"page-size",
|
|
226
|
-
"total"
|
|
227
|
-
])) : g("", !0)
|
|
228
|
-
])]);
|
|
229
|
-
}
|
|
230
|
-
var q = /*#__PURE__*/ e(A, [["render", K], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/index.vue"]]);
|
|
231
|
-
//#endregion
|
|
232
|
-
export { q as default };
|