@opengis/surveyor 0.0.0-stage → 0.0.2
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/CHANGELOG.md +42 -0
- package/README.md +188 -3
- package/dist/chunks/AppIcon-CIR6y5uE.js +85 -0
- package/dist/chunks/AppealDetailField-CI-1qhs3.js +58 -0
- package/dist/chunks/AppealStatusBadge-CSXnfarR.js +132 -0
- package/dist/chunks/AppealStatusBadge-DYBe9hqP.js +171 -0
- package/dist/chunks/ApplicationHistorySection-C0wwhwA4.js +769 -0
- package/dist/chunks/BaseModal-C7PVYz0m.js +85 -0
- package/dist/chunks/FormFilePicker-C3XQw50i.js +76 -0
- package/dist/chunks/MapLayerMenu-DjYCxEc3.js +145 -0
- package/dist/chunks/RegistryForm-CEUqFmsF.js +99 -0
- package/dist/chunks/RegistryFormModal-DfY4z_7r.js +85 -0
- package/dist/chunks/RegistryToolbar-BV4mYVAc.js +452 -0
- package/dist/chunks/UserAccessBadge-D8JfgGfN.js +44 -0
- package/dist/chunks/UserTypeBadge-YIwwoCho.js +188 -0
- package/dist/chunks/VerifiedBadge-Bba8WnuB.js +34 -0
- package/dist/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/chunks/account-types-Br7gx_D_.js +35 -0
- package/dist/chunks/account_types-DLL1w122.js +25 -0
- package/dist/chunks/appealMapLayers-CQMK3rrz.js +115 -0
- package/dist/chunks/application_status-BhNGiY2I.js +45 -0
- package/dist/chunks/applications-BB9JRcgl.js +132 -0
- package/dist/chunks/buildSchema-CccjX9TJ.js +37 -0
- package/dist/chunks/card-B-ftozcq.js +739 -0
- package/dist/chunks/card-BctFHFZe.js +538 -0
- package/dist/chunks/card-CKD1N0QD.js +330 -0
- package/dist/chunks/card-CiNZxAd5.js +297 -0
- package/dist/chunks/card-DUtDfwMk.js +607 -0
- package/dist/chunks/card-fL26_Gvc.js +1189 -0
- package/dist/chunks/certificates-BSd1i0un.js +424 -0
- package/dist/chunks/create-DxMC_IL1.js +1033 -0
- package/dist/chunks/filterQuery-CvfZrkTC.js +99 -0
- package/dist/chunks/form-Bh6i5n1U.js +315 -0
- package/dist/chunks/form-DDjELqZ9.js +89 -0
- package/dist/chunks/geometry-DyhIVRcw.js +67 -0
- package/dist/chunks/map-Z57iMvFb.js +2763 -0
- package/dist/chunks/map-layers-DnmkOEld.js +400 -0
- package/dist/chunks/mapLayersApi-CWoQ2be-.js +251 -0
- package/dist/chunks/organizations-BO1_JETm.js +476 -0
- package/dist/chunks/organizations-BbYipLwk.js +14 -0
- package/dist/chunks/profile-ByahbF4B.js +164 -0
- package/dist/chunks/profile-Dwwn_4Pr.js +243 -0
- package/dist/chunks/requests-BCin936Z.js +232 -0
- package/dist/chunks/requests-CFv5wwAN.js +530 -0
- package/dist/chunks/resendSurveyorRegistration-BHTTVIw1.js +27 -0
- package/dist/chunks/resources-2e8RFqWR.js +129 -0
- package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/chunks/surveyorAccount-C7UiiIYg.js +78 -0
- package/dist/chunks/users-DtTYsgMb.js +291 -0
- package/dist/chunks/work_types-Hwme-FEX.js +34 -0
- package/dist/index.css +3 -0
- package/dist/index.js +336 -0
- package/migrations/20260924120000_surveyor_schema.sql +450 -0
- package/migrations/20261008170000_address_lookup.sql +20 -0
- package/migrations/20261016120000_map_layers.sql +156 -0
- package/migrations/20261016150000_password_reset.sql +15 -0
- package/migrations/20261016170000_address_lookup_format.sql +37 -0
- package/migrations/20261016180000_settlement_lookup.sql +16 -0
- package/migrations/20261019170000_actor_lookup.sql +15 -0
- package/package.json +86 -6
- package/plugin.d.ts +15 -0
- package/plugin.js +8 -0
- package/server/app.ts +51 -0
- package/server/dictionaries/index.ts +17 -0
- package/server/dictionaries/surveyor/account_types.ts +12 -0
- package/server/dictionaries/surveyor/application_status.ts +16 -0
- package/server/dictionaries/surveyor/map_layer_components.ts +11 -0
- package/server/dictionaries/surveyor/map_layer_groups.ts +10 -0
- package/server/dictionaries/surveyor/map_layer_types.ts +11 -0
- package/server/dictionaries/surveyor/work_types.ts +15 -0
- package/server/dictionaries/surveyor/yes_no.ts +11 -0
- package/server/fastify.d.ts +12 -0
- package/server/index.ts +23 -0
- package/server/modules/surveyor/route.ts +410 -0
- package/server/modules/surveyor/schema.ts +439 -0
- package/server/modules/surveyor/services/applicationTile.ts +53 -0
- package/server/modules/surveyor/services/cancelApplication.ts +74 -0
- package/server/modules/surveyor/services/changeSurveyorPassword.ts +52 -0
- package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -0
- package/server/modules/surveyor/services/completeApplication.ts +46 -0
- package/server/modules/surveyor/services/completeSurveyorRegistration.ts +48 -0
- package/server/modules/surveyor/services/createApplication.ts +169 -0
- package/server/modules/surveyor/services/geometryExport.ts +34 -0
- package/server/modules/surveyor/services/geometryImport.ts +66 -0
- package/server/modules/surveyor/services/getSurveyorUser.ts +56 -0
- package/server/modules/surveyor/services/identifyApplications.ts +82 -0
- package/server/modules/surveyor/services/issueSourceData.ts +55 -0
- package/server/modules/surveyor/services/loginSurveyor.ts +67 -0
- package/server/modules/surveyor/services/mapLayers.ts +61 -0
- package/server/modules/surveyor/services/rasterExport.ts +15 -0
- package/server/modules/surveyor/services/registerSurveyor.ts +161 -0
- package/server/modules/surveyor/services/requestPasswordReset.ts +49 -0
- package/server/modules/surveyor/services/resendRegistration.ts +42 -0
- package/server/modules/surveyor/services/resetSurveyorPassword.ts +53 -0
- package/server/modules/surveyor/services/searchApplications.ts +63 -0
- package/server/modules/surveyor/services/submitSurvey.ts +70 -0
- package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +52 -0
- package/server/modules/surveyor/services/updateSurveyorStatus.ts +53 -0
- package/server/modules/surveyor/services/vectorExport.ts +86 -0
- package/server/modules/surveyor/services/verifyApplication.ts +59 -0
- package/server/modules/surveyor/utils/accessibleApplication.ts +37 -0
- package/server/modules/surveyor/utils/application.ts +68 -0
- package/server/modules/surveyor/utils/export.ts +39 -0
- package/server/modules/surveyor/utils/firstBoundary.ts +48 -0
- package/server/modules/surveyor/utils/mail.ts +161 -0
- package/server/modules/surveyor/utils/permissions.ts +29 -0
- package/server/modules/surveyor/utils/registration.ts +33 -0
- package/server/modules/surveyor/utils/shared.ts +305 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_registration.pt.hbs +80 -0
- package/server/modules/surveyor/utils/templates/ds.surveyor_send_mail.pt.hbs +79 -0
- package/server/modules/surveyor/utils/vectorLayer.ts +41 -0
- package/server/plugins/convertVector.ts +74 -0
- package/server/plugins/proto/convertVector.proto +21 -0
- package/server/plugins/swagger.ts +54 -0
- package/server/plugins/vite.dev.ts +52 -0
- package/server/plugins/vite.prod.ts +55 -0
- package/server/resources/helpers/actor_lookup.ts +5 -0
- package/server/resources/helpers/address_lookup.ts +8 -0
- package/server/resources/helpers/settlement_lookup.ts +7 -0
- package/server/resources/helpers/user_lookup.ts +5 -0
- package/server/resources/index.ts +30 -0
- package/server/resources/surveyor-admin/application_comments.ts +24 -0
- package/server/resources/surveyor-admin/application_status_history.ts +46 -0
- package/server/resources/surveyor-admin/applications.ts +125 -0
- package/server/resources/surveyor-admin/certificates.ts +87 -0
- package/server/resources/surveyor-admin/map_layers.ts +69 -0
- package/server/resources/surveyor-admin/organization_surveyors.ts +32 -0
- package/server/resources/surveyor-admin/organizations.ts +61 -0
- package/server/resources/surveyor-admin/surveyors.ts +71 -0
- package/server/resources/surveyor-user/application_status_history.ts +52 -0
- package/server/resources/surveyor-user/applications.ts +131 -0
- package/server/resources/surveyor-user/certificates.ts +67 -0
- package/server/resources/surveyor-user/organizations.ts +40 -0
- package/server/resources/surveyor-user/surveyors.ts +69 -0
- package/server/suggests/index.ts +17 -0
- package/server/tsconfig.json +3 -0
- package/surveyor-types.d.ts +30 -0
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
+
import { t as n } from "./AppIcon-CIR6y5uE.js";
|
|
4
|
+
import { i as r, n as i } from "./resources-2e8RFqWR.js";
|
|
5
|
+
import { t as a } from "./VerifiedBadge-Bba8WnuB.js";
|
|
6
|
+
import { i as o } from "./filterQuery-CvfZrkTC.js";
|
|
7
|
+
import { a as s, i as c, n as l, r as u, t as d } from "./RegistryToolbar-BV4mYVAc.js";
|
|
8
|
+
import { t as f } from "./RegistryFormModal-DfY4z_7r.js";
|
|
9
|
+
import { n as p, t as m } from "./form-DDjELqZ9.js";
|
|
10
|
+
import { Fragment as h, Teleport as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, normalizeStyle as T, onMounted as E, onUnmounted as D, openBlock as O, ref as k, renderList as A, toDisplayString as j, vModelText as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
|
|
11
|
+
import { RouterLink as I, useRouter as L } from "vue-router";
|
|
12
|
+
import { confirm as ee, notify as R } from "@opengis/core";
|
|
13
|
+
//#region admin/src/static/registry/organizations/table.ts
|
|
14
|
+
var z = {
|
|
15
|
+
resource: p,
|
|
16
|
+
pageSize: 10,
|
|
17
|
+
sort: "-created_at",
|
|
18
|
+
columns: [
|
|
19
|
+
{
|
|
20
|
+
key: "name",
|
|
21
|
+
label: "Назва організації"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "address",
|
|
25
|
+
label: "Юридична адреса"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: "phone",
|
|
29
|
+
label: "Телефон організації"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: "email",
|
|
33
|
+
label: "Email організації"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "registrationFile",
|
|
37
|
+
label: "Скан-копія реєстрації"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "specialists",
|
|
41
|
+
label: "Сертифіковані спеціалісти"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: "verified",
|
|
45
|
+
label: "Верифіковано"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "actions",
|
|
49
|
+
label: "Дії"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}, B = {
|
|
53
|
+
resource: p,
|
|
54
|
+
view: "inline",
|
|
55
|
+
fields: {
|
|
56
|
+
verified: {
|
|
57
|
+
component: "select",
|
|
58
|
+
label: "Верифікація",
|
|
59
|
+
placeholder: "Верифікація",
|
|
60
|
+
width: 160,
|
|
61
|
+
options: [{
|
|
62
|
+
id: "verified",
|
|
63
|
+
text: "Верифіковані"
|
|
64
|
+
}, {
|
|
65
|
+
id: "unverified",
|
|
66
|
+
text: "Не верифіковані"
|
|
67
|
+
}]
|
|
68
|
+
},
|
|
69
|
+
createdAt: {
|
|
70
|
+
component: "date2",
|
|
71
|
+
label: "Дата створення",
|
|
72
|
+
placeholder: "Період",
|
|
73
|
+
width: 280
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, V = /* @__PURE__ */ e({
|
|
77
|
+
filter: () => B,
|
|
78
|
+
form: () => m,
|
|
79
|
+
resource: () => p,
|
|
80
|
+
table: () => z
|
|
81
|
+
}), H = /*@__PURE__*/ w({
|
|
82
|
+
__name: "index",
|
|
83
|
+
setup(e, { expose: t }) {
|
|
84
|
+
t();
|
|
85
|
+
let m = z.columns, { query: h, filterValues: g, page: v, pageSize: y, listFilters: b, bindListLoader: x, refreshList: S } = s({
|
|
86
|
+
arrayFilterKeys: ["verified"],
|
|
87
|
+
buildFilters: o
|
|
88
|
+
}), C = k(!1), w = k(m.map((e) => e.key)), T = k([]), O = k(0), A = k(!1), j = k(""), M = k(!1), N = k(null), P = k({
|
|
89
|
+
top: "0px",
|
|
90
|
+
left: "0px"
|
|
91
|
+
}), F = L();
|
|
92
|
+
function B(e, t) {
|
|
93
|
+
if (N.value === e) {
|
|
94
|
+
N.value = null;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
let n = t.currentTarget.getBoundingClientRect(), r = window.innerHeight - n.bottom < 100 ? n.top - 92 - 4 : n.bottom + 4, i = Math.min(Math.max(8, n.right - 176), window.innerWidth - 176 - 8);
|
|
98
|
+
P.value = {
|
|
99
|
+
top: `${r}px`,
|
|
100
|
+
left: `${i}px`
|
|
101
|
+
}, N.value = e;
|
|
102
|
+
}
|
|
103
|
+
function H(e) {
|
|
104
|
+
N.value = null, F.push({
|
|
105
|
+
name: "organization-detail",
|
|
106
|
+
params: { id: e.org_id },
|
|
107
|
+
query: { edit: "1" }
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function U(e) {
|
|
111
|
+
N.value = null, ee({
|
|
112
|
+
title: "Підтвердження",
|
|
113
|
+
type: "error",
|
|
114
|
+
message: `Видалити організацію «${e.name}»?`,
|
|
115
|
+
confirmButtonText: "Видалити",
|
|
116
|
+
cancelButtonText: "Скасувати",
|
|
117
|
+
onConfirm: async () => {
|
|
118
|
+
try {
|
|
119
|
+
await i(p, e.org_id), T.value.length === 1 && v.value > 1 ? --v.value : await q();
|
|
120
|
+
} catch (e) {
|
|
121
|
+
R({
|
|
122
|
+
type: "error",
|
|
123
|
+
title: "Помилка видалення",
|
|
124
|
+
message: e instanceof Error ? e.message : "Не вдалося видалити організацію"
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function W(e) {
|
|
131
|
+
let t = e.target;
|
|
132
|
+
t instanceof Element && t.closest("[data-row-actions]") || (N.value = null);
|
|
133
|
+
}
|
|
134
|
+
let G = 0, K = _(() => A.value ? "Завантаження…" : j.value ? j.value : "Організацій за заданими фільтрами не знайдено.");
|
|
135
|
+
async function q() {
|
|
136
|
+
let e = ++G;
|
|
137
|
+
A.value = !0, j.value = "";
|
|
138
|
+
try {
|
|
139
|
+
let t = await r(p, {
|
|
140
|
+
page: v.value,
|
|
141
|
+
limit: y.value,
|
|
142
|
+
sort: z.sort,
|
|
143
|
+
search: h.value.trim() || void 0,
|
|
144
|
+
filters: b.value
|
|
145
|
+
});
|
|
146
|
+
if (e !== G) return;
|
|
147
|
+
T.value = t.rows ?? [], O.value = Number(t.total) || 0;
|
|
148
|
+
} catch (t) {
|
|
149
|
+
if (e !== G) return;
|
|
150
|
+
T.value = [], O.value = 0, j.value = t instanceof Error ? t.message : "Не вдалося завантажити організації";
|
|
151
|
+
} finally {
|
|
152
|
+
e === G && (A.value = !1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
x(() => {
|
|
156
|
+
N.value = null, q();
|
|
157
|
+
});
|
|
158
|
+
function J(e) {
|
|
159
|
+
g.value = e;
|
|
160
|
+
}
|
|
161
|
+
E(() => {
|
|
162
|
+
document.addEventListener("click", W), window.addEventListener("resize", W), window.addEventListener("scroll", W, !0);
|
|
163
|
+
}), D(() => {
|
|
164
|
+
document.removeEventListener("click", W), window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
|
|
165
|
+
});
|
|
166
|
+
function Y(e) {
|
|
167
|
+
w.value = w.value.includes(e) ? w.value.length > 1 ? w.value.filter((t) => t !== e) : w.value : [...w.value, e];
|
|
168
|
+
}
|
|
169
|
+
function X() {
|
|
170
|
+
v.value === 1 ? S(() => {
|
|
171
|
+
q();
|
|
172
|
+
}) : v.value = 1;
|
|
173
|
+
}
|
|
174
|
+
function Z(e, t = !1) {
|
|
175
|
+
let n = `/api/file/${encodeURIComponent(e)}`;
|
|
176
|
+
return t ? `${n}?download=true` : n;
|
|
177
|
+
}
|
|
178
|
+
let Q = {
|
|
179
|
+
columns: m,
|
|
180
|
+
query: h,
|
|
181
|
+
filterValues: g,
|
|
182
|
+
page: v,
|
|
183
|
+
pageSize: y,
|
|
184
|
+
listFilters: b,
|
|
185
|
+
bindListLoader: x,
|
|
186
|
+
refreshList: S,
|
|
187
|
+
columnsOpen: C,
|
|
188
|
+
visibleColumns: w,
|
|
189
|
+
rows: T,
|
|
190
|
+
total: O,
|
|
191
|
+
loading: A,
|
|
192
|
+
error: j,
|
|
193
|
+
showAddModal: M,
|
|
194
|
+
actionsOpen: N,
|
|
195
|
+
menuStyle: P,
|
|
196
|
+
router: F,
|
|
197
|
+
toggleActions: B,
|
|
198
|
+
editOrganization: H,
|
|
199
|
+
removeOrganization: U,
|
|
200
|
+
closeActions: W,
|
|
201
|
+
get requestId() {
|
|
202
|
+
return G;
|
|
203
|
+
},
|
|
204
|
+
set requestId(e) {
|
|
205
|
+
G = e;
|
|
206
|
+
},
|
|
207
|
+
emptyText: K,
|
|
208
|
+
loadRows: q,
|
|
209
|
+
onFilterValuesUpdate: J,
|
|
210
|
+
toggleColumn: Y,
|
|
211
|
+
onOrganizationSaved: X,
|
|
212
|
+
fileUrl: Z,
|
|
213
|
+
colWidths: {
|
|
214
|
+
name: "w-[220px]",
|
|
215
|
+
address: "w-[220px]",
|
|
216
|
+
phone: "w-[150px]",
|
|
217
|
+
email: "w-[210px]",
|
|
218
|
+
registrationFile: "w-[150px]",
|
|
219
|
+
specialists: "w-[150px]",
|
|
220
|
+
verified: "w-[120px]",
|
|
221
|
+
actions: "w-[100px]"
|
|
222
|
+
},
|
|
223
|
+
AppIcon: n,
|
|
224
|
+
get RouterLink() {
|
|
225
|
+
return I;
|
|
226
|
+
},
|
|
227
|
+
PageHeader: c,
|
|
228
|
+
VerifiedBadge: a,
|
|
229
|
+
RegistryTable: u,
|
|
230
|
+
TablePagination: l,
|
|
231
|
+
RegistryFormModal: f,
|
|
232
|
+
RegistryToolbar: d,
|
|
233
|
+
get config() {
|
|
234
|
+
return V;
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
return Object.defineProperty(Q, "__isScriptSetup", {
|
|
238
|
+
enumerable: !1,
|
|
239
|
+
value: !0
|
|
240
|
+
}), Q;
|
|
241
|
+
}
|
|
242
|
+
}), U = { class: "px-4" }, W = { class: "relative block" }, G = {
|
|
243
|
+
type: "button",
|
|
244
|
+
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",
|
|
245
|
+
"aria-label": "Експорт",
|
|
246
|
+
title: "Експорт реєстру"
|
|
247
|
+
}, K = { class: "relative" }, q = {
|
|
248
|
+
key: 0,
|
|
249
|
+
class: "absolute right-0 top-12 z-20 w-64 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
|
|
250
|
+
}, J = { class: "flex items-center justify-between px-2 py-1" }, Y = ["checked", "onChange"], X = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, Z = { class: "font-semibold text-slate-600" }, Q = {
|
|
251
|
+
key: 1,
|
|
252
|
+
class: "block w-full max-w-full break-words text-slate-600"
|
|
253
|
+
}, te = {
|
|
254
|
+
key: 2,
|
|
255
|
+
class: "whitespace-nowrap text-slate-600"
|
|
256
|
+
}, ne = {
|
|
257
|
+
key: 3,
|
|
258
|
+
class: "block w-full max-w-full break-all text-slate-600"
|
|
259
|
+
}, re = {
|
|
260
|
+
key: 4,
|
|
261
|
+
class: "flex items-center gap-1"
|
|
262
|
+
}, ie = ["href"], ae = ["href"], oe = {
|
|
263
|
+
key: 1,
|
|
264
|
+
class: "text-slate-400"
|
|
265
|
+
}, $ = {
|
|
266
|
+
key: 5,
|
|
267
|
+
class: "text-slate-400"
|
|
268
|
+
}, se = {
|
|
269
|
+
key: 7,
|
|
270
|
+
class: "text-slate-400"
|
|
271
|
+
}, ce = {
|
|
272
|
+
key: 8,
|
|
273
|
+
class: "flex justify-center"
|
|
274
|
+
}, le = [
|
|
275
|
+
"aria-expanded",
|
|
276
|
+
"aria-label",
|
|
277
|
+
"onClick"
|
|
278
|
+
], ue = ["onClick"], de = ["onClick"];
|
|
279
|
+
function fe(e, t, n, r, i, a) {
|
|
280
|
+
return O(), b("div", null, [
|
|
281
|
+
C(r.PageHeader, {
|
|
282
|
+
title: "Реєстр організацій",
|
|
283
|
+
subtitle: "Організації та сертифіковані спеціалісти геодезичного кабінету"
|
|
284
|
+
}, {
|
|
285
|
+
default: N(() => [x("button", {
|
|
286
|
+
type: "button",
|
|
287
|
+
class: "inline-flex h-10 items-center justify-center gap-2 rounded-lg bg-brand-600 px-4 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-brand-700",
|
|
288
|
+
onClick: t[0] ||= (e) => r.showAddModal = !0
|
|
289
|
+
}, [C(r.AppIcon, {
|
|
290
|
+
name: "plus",
|
|
291
|
+
class: "h-4 w-4"
|
|
292
|
+
}), t[7] ||= S(" Додати ", -1)])]),
|
|
293
|
+
_: 1
|
|
294
|
+
}),
|
|
295
|
+
x("section", U, [
|
|
296
|
+
C(r.RegistryToolbar, {
|
|
297
|
+
"search-min": "min-w-[220px]",
|
|
298
|
+
"filter-config": r.config.filter,
|
|
299
|
+
"filter-values": r.filterValues,
|
|
300
|
+
"onUpdate:filterValues": r.onFilterValuesUpdate
|
|
301
|
+
}, {
|
|
302
|
+
search: N(() => [x("label", W, [C(r.AppIcon, {
|
|
303
|
+
name: "search",
|
|
304
|
+
class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
|
|
305
|
+
}), P(x("input", {
|
|
306
|
+
"onUpdate:modelValue": t[1] ||= (e) => r.query = e,
|
|
307
|
+
type: "search",
|
|
308
|
+
placeholder: "Пошук організації…",
|
|
309
|
+
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"
|
|
310
|
+
}, null, 512), [[M, r.query]])])]),
|
|
311
|
+
actions: N(() => [x("button", G, [C(r.AppIcon, {
|
|
312
|
+
name: "download",
|
|
313
|
+
class: "h-4 w-4"
|
|
314
|
+
})]), x("div", K, [x("button", {
|
|
315
|
+
type: "button",
|
|
316
|
+
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",
|
|
317
|
+
"aria-label": "Налаштувати колонки",
|
|
318
|
+
title: "Налаштувати колонки",
|
|
319
|
+
onClick: t[2] ||= (e) => r.columnsOpen = !r.columnsOpen
|
|
320
|
+
}, [C(r.AppIcon, {
|
|
321
|
+
name: "columns-3",
|
|
322
|
+
class: "h-4 w-4"
|
|
323
|
+
})]), r.columnsOpen ? (O(), b("div", q, [x("div", J, [t[9] ||= x("p", { class: "text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Показати колонки", -1), x("button", {
|
|
324
|
+
type: "button",
|
|
325
|
+
"aria-label": "Закрити",
|
|
326
|
+
class: "text-slate-400 hover:text-slate-700",
|
|
327
|
+
onClick: t[3] ||= (e) => r.columnsOpen = !1
|
|
328
|
+
}, [...t[8] ||= [x("svg", {
|
|
329
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
330
|
+
class: "h-4 w-4",
|
|
331
|
+
fill: "none",
|
|
332
|
+
viewBox: "0 0 24 24",
|
|
333
|
+
stroke: "currentColor"
|
|
334
|
+
}, [x("path", {
|
|
335
|
+
"stroke-linecap": "round",
|
|
336
|
+
"stroke-linejoin": "round",
|
|
337
|
+
"stroke-width": "2",
|
|
338
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
339
|
+
})], -1)]])]), (O(!0), b(h, null, A(r.columns, (e) => (O(), b("label", {
|
|
340
|
+
key: e.key,
|
|
341
|
+
class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
|
|
342
|
+
}, [x("input", {
|
|
343
|
+
type: "checkbox",
|
|
344
|
+
checked: r.visibleColumns.includes(e.key),
|
|
345
|
+
class: "h-4 w-4 accent-brand-600",
|
|
346
|
+
onChange: (t) => r.toggleColumn(e.key)
|
|
347
|
+
}, null, 40, Y), S(" " + j(e.label), 1)]))), 128))])) : y("", !0)])]),
|
|
348
|
+
_: 1
|
|
349
|
+
}, 8, ["filter-config", "filter-values"]),
|
|
350
|
+
x("div", X, [x("span", null, [t[10] ||= S("Знайдено організацій: ", -1), x("strong", Z, j(r.total), 1)])]),
|
|
351
|
+
C(r.RegistryTable, {
|
|
352
|
+
class: "mt-3",
|
|
353
|
+
rows: r.rows,
|
|
354
|
+
columns: r.columns,
|
|
355
|
+
"visible-keys": r.visibleColumns,
|
|
356
|
+
"row-key": "org_id",
|
|
357
|
+
"min-width": "1180px",
|
|
358
|
+
"column-widths": r.colWidths,
|
|
359
|
+
"cell-class": { specialists: "text-right tabular-nums" },
|
|
360
|
+
"empty-text": r.emptyText
|
|
361
|
+
}, {
|
|
362
|
+
cell: N(({ row: e, column: n }) => [n === "name" ? (O(), v(r.RouterLink, {
|
|
363
|
+
key: 0,
|
|
364
|
+
to: `/organizations/${e.org_id}`,
|
|
365
|
+
class: "block w-full max-w-full break-words text-left font-semibold text-brand-700 hover:text-brand-900 hover:underline"
|
|
366
|
+
}, {
|
|
367
|
+
default: N(() => [S(j(e.name), 1)]),
|
|
368
|
+
_: 2
|
|
369
|
+
}, 1032, ["to"])) : n === "address" ? (O(), b("span", Q, j(e.legal_address || "—"), 1)) : n === "phone" ? (O(), b("span", te, j(e.phone || "—"), 1)) : n === "email" ? (O(), b("span", ne, j(e.email || "—"), 1)) : n === "registrationFile" ? (O(), b("div", re, [e.scan_path ? (O(), b(h, { key: 0 }, [x("a", {
|
|
370
|
+
href: r.fileUrl(e.scan_path),
|
|
371
|
+
target: "_blank",
|
|
372
|
+
rel: "noopener",
|
|
373
|
+
class: "rounded-md p-1.5 text-slate-500 transition-colors hover:bg-brand-50 hover:text-brand-700",
|
|
374
|
+
"aria-label": "Переглянути документ",
|
|
375
|
+
title: "Переглянути документ"
|
|
376
|
+
}, [...t[11] ||= [x("svg", {
|
|
377
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
378
|
+
class: "h-4 w-4",
|
|
379
|
+
fill: "none",
|
|
380
|
+
viewBox: "0 0 24 24",
|
|
381
|
+
stroke: "currentColor"
|
|
382
|
+
}, [x("path", {
|
|
383
|
+
"stroke-linecap": "round",
|
|
384
|
+
"stroke-linejoin": "round",
|
|
385
|
+
"stroke-width": "2",
|
|
386
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
387
|
+
}), x("path", {
|
|
388
|
+
"stroke-linecap": "round",
|
|
389
|
+
"stroke-linejoin": "round",
|
|
390
|
+
"stroke-width": "2",
|
|
391
|
+
d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
|
392
|
+
})], -1)]], 8, ie), x("a", {
|
|
393
|
+
href: r.fileUrl(e.scan_path, !0),
|
|
394
|
+
class: "rounded-md p-1.5 text-slate-500 transition-colors hover:bg-brand-50 hover:text-brand-700",
|
|
395
|
+
"aria-label": "Завантажити документ",
|
|
396
|
+
title: "Завантажити документ"
|
|
397
|
+
}, [...t[12] ||= [x("svg", {
|
|
398
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
399
|
+
class: "h-4 w-4",
|
|
400
|
+
fill: "none",
|
|
401
|
+
viewBox: "0 0 24 24",
|
|
402
|
+
stroke: "currentColor"
|
|
403
|
+
}, [x("path", {
|
|
404
|
+
"stroke-linecap": "round",
|
|
405
|
+
"stroke-linejoin": "round",
|
|
406
|
+
"stroke-width": "2",
|
|
407
|
+
d: "M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
408
|
+
})], -1)]], 8, ae)], 64)) : (O(), b("span", oe, "—"))])) : n === "specialists" ? (O(), b("span", $, "—")) : n === "verified" && typeof e.verified == "boolean" ? (O(), v(r.VerifiedBadge, {
|
|
409
|
+
key: 6,
|
|
410
|
+
verified: e.verified
|
|
411
|
+
}, null, 8, ["verified"])) : n === "verified" ? (O(), b("span", se, "—")) : n === "actions" ? (O(), b("div", ce, [x("button", {
|
|
412
|
+
type: "button",
|
|
413
|
+
"data-row-actions": "",
|
|
414
|
+
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",
|
|
415
|
+
"aria-expanded": r.actionsOpen === e.org_id,
|
|
416
|
+
"aria-label": `Дії для ${e.name}`,
|
|
417
|
+
onClick: F((t) => r.toggleActions(e.org_id, t), ["stop"])
|
|
418
|
+
}, [C(r.AppIcon, {
|
|
419
|
+
name: "more-vertical",
|
|
420
|
+
class: "h-4 w-4"
|
|
421
|
+
})], 8, le), (O(), v(g, { to: "body" }, [r.actionsOpen === e.org_id ? (O(), b("div", {
|
|
422
|
+
key: 0,
|
|
423
|
+
"data-row-actions": "",
|
|
424
|
+
class: "fixed z-50 w-44 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 text-left shadow-card-hover",
|
|
425
|
+
style: T(r.menuStyle)
|
|
426
|
+
}, [
|
|
427
|
+
x("button", {
|
|
428
|
+
type: "button",
|
|
429
|
+
class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-slate-700 transition-colors hover:bg-slate-50",
|
|
430
|
+
onClick: (t) => r.editOrganization(e)
|
|
431
|
+
}, [C(r.AppIcon, {
|
|
432
|
+
name: "pencil",
|
|
433
|
+
class: "h-4 w-4 text-slate-400"
|
|
434
|
+
}), t[13] ||= S(" Редагувати ", -1)], 8, ue),
|
|
435
|
+
t[15] ||= x("div", { class: "my-1 border-t border-slate-100" }, null, -1),
|
|
436
|
+
x("button", {
|
|
437
|
+
type: "button",
|
|
438
|
+
class: "flex w-full items-center gap-2 px-3 py-2.5 text-sm text-red-600 transition-colors hover:bg-red-50",
|
|
439
|
+
onClick: (t) => r.removeOrganization(e)
|
|
440
|
+
}, [C(r.AppIcon, {
|
|
441
|
+
name: "trash-2",
|
|
442
|
+
class: "h-4 w-4"
|
|
443
|
+
}), t[14] ||= S(" Видалити ", -1)], 8, de)
|
|
444
|
+
], 4)) : y("", !0)]))])) : y("", !0)]),
|
|
445
|
+
_: 1
|
|
446
|
+
}, 8, [
|
|
447
|
+
"rows",
|
|
448
|
+
"columns",
|
|
449
|
+
"visible-keys",
|
|
450
|
+
"empty-text"
|
|
451
|
+
]),
|
|
452
|
+
r.total > 0 ? (O(), v(r.TablePagination, {
|
|
453
|
+
key: 0,
|
|
454
|
+
page: r.page,
|
|
455
|
+
"onUpdate:page": t[4] ||= (e) => r.page = e,
|
|
456
|
+
"page-size": r.pageSize,
|
|
457
|
+
"onUpdate:pageSize": t[5] ||= (e) => r.pageSize = e,
|
|
458
|
+
total: r.total
|
|
459
|
+
}, null, 8, [
|
|
460
|
+
"page",
|
|
461
|
+
"page-size",
|
|
462
|
+
"total"
|
|
463
|
+
])) : y("", !0)
|
|
464
|
+
]),
|
|
465
|
+
C(r.RegistryFormModal, {
|
|
466
|
+
modelValue: r.showAddModal,
|
|
467
|
+
"onUpdate:modelValue": t[6] ||= (e) => r.showAddModal = e,
|
|
468
|
+
title: "Нова організація",
|
|
469
|
+
config: r.config.form,
|
|
470
|
+
onSaved: r.onOrganizationSaved
|
|
471
|
+
}, null, 8, ["modelValue", "config"])
|
|
472
|
+
]);
|
|
473
|
+
}
|
|
474
|
+
var pe = /*#__PURE__*/ t(H, [["render", fe], ["__file", "D:/Softpro/surveyor/admin/src/pages/organizations/index.vue"]]);
|
|
475
|
+
//#endregion
|
|
476
|
+
export { pe as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./profile-ByahbF4B.js";
|
|
2
|
+
import { ref as e } from "vue";
|
|
3
|
+
//#region cabinet/src/api/organizations.ts
|
|
4
|
+
var t = "surveyor_active_org_id";
|
|
5
|
+
function n() {
|
|
6
|
+
try {
|
|
7
|
+
return localStorage.getItem(t) ?? "";
|
|
8
|
+
} catch {
|
|
9
|
+
return "";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
var r = e([]), i = e(!1), a = e(""), o = e(n());
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as i, a as n, i as r, o as t };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { computed as t, createBlock as n, defineComponent as r, openBlock as i, reactive as a, resolveDynamicComponent as ee } from "vue";
|
|
3
|
+
import { AlertCircle as te, ArrowRight as ne, Award as o, Ban as s, Building2 as c, CalendarDays as l, Check as u, ChevronDown as d, ChevronLeft as f, ChevronRight as p, ChevronsLeft as m, ChevronsRight as h, ChevronsUpDown as g, CircleCheck as _, CircleX as v, ClipboardList as y, Columns3 as b, Download as x, ExternalLink as S, Eye as C, EyeOff as w, FileCheck2 as T, FileText as E, Filter as D, GraduationCap as O, History as k, Home as A, LayoutGrid as j, List as M, Lock as N, LogOut as P, Mail as F, Map as I, MapPin as L, MapPinned as R, Maximize2 as z, MessageSquare as B, Minimize2 as V, MoreVertical as re, PauseCircle as H, Pencil as U, Phone as W, Plus as G, Search as K, Send as q, Settings as J, ShieldAlert as Y, ShieldCheck as X, SlidersHorizontal as ie, Trash2 as ae, Upload as oe, UploadCloud as se, User as ce, Users as le, UsersRound as ue, X as de } from "lucide-vue-next";
|
|
4
|
+
//#region cabinet/src/components/ui/AppIcon.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var fe = /*@__PURE__*/ r({
|
|
6
|
+
__name: "AppIcon",
|
|
7
|
+
props: {
|
|
8
|
+
name: {
|
|
9
|
+
type: null,
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
strokeWidth: {
|
|
13
|
+
type: [Number, String],
|
|
14
|
+
required: !1,
|
|
15
|
+
default: 2
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(e, { expose: n }) {
|
|
19
|
+
n();
|
|
20
|
+
let r = {
|
|
21
|
+
"arrow-right": ne,
|
|
22
|
+
award: o,
|
|
23
|
+
ban: s,
|
|
24
|
+
"building-2": c,
|
|
25
|
+
"calendar-days": l,
|
|
26
|
+
"alert-circle": te,
|
|
27
|
+
check: u,
|
|
28
|
+
"chevron-down": d,
|
|
29
|
+
"chevron-left": f,
|
|
30
|
+
"chevron-right": p,
|
|
31
|
+
"chevrons-left": m,
|
|
32
|
+
"chevrons-right": h,
|
|
33
|
+
"chevrons-up-down": g,
|
|
34
|
+
"circle-check": _,
|
|
35
|
+
"circle-x": v,
|
|
36
|
+
"clipboard-list": y,
|
|
37
|
+
"columns-3": b,
|
|
38
|
+
download: x,
|
|
39
|
+
"external-link": S,
|
|
40
|
+
eye: C,
|
|
41
|
+
"eye-off": w,
|
|
42
|
+
"file-check-2": T,
|
|
43
|
+
"file-text": E,
|
|
44
|
+
filter: D,
|
|
45
|
+
"graduation-cap": O,
|
|
46
|
+
history: k,
|
|
47
|
+
home: A,
|
|
48
|
+
"layout-grid": j,
|
|
49
|
+
list: M,
|
|
50
|
+
lock: N,
|
|
51
|
+
"log-out": P,
|
|
52
|
+
"maximize-2": z,
|
|
53
|
+
"minimize-2": V,
|
|
54
|
+
map: I,
|
|
55
|
+
"map-pin": L,
|
|
56
|
+
"map-pinned": R,
|
|
57
|
+
mail: F,
|
|
58
|
+
"message-square": B,
|
|
59
|
+
"more-vertical": re,
|
|
60
|
+
"pause-circle": H,
|
|
61
|
+
pencil: U,
|
|
62
|
+
phone: W,
|
|
63
|
+
plus: G,
|
|
64
|
+
search: K,
|
|
65
|
+
send: q,
|
|
66
|
+
settings: J,
|
|
67
|
+
"shield-alert": Y,
|
|
68
|
+
"shield-check": X,
|
|
69
|
+
"sliders-horizontal": ie,
|
|
70
|
+
"trash-2": ae,
|
|
71
|
+
upload: oe,
|
|
72
|
+
"upload-cloud": se,
|
|
73
|
+
user: ce,
|
|
74
|
+
users: le,
|
|
75
|
+
"users-round": ue,
|
|
76
|
+
x: de
|
|
77
|
+
}, i = e, a = {
|
|
78
|
+
icons: r,
|
|
79
|
+
props: i,
|
|
80
|
+
icon: t(() => r[i.name])
|
|
81
|
+
};
|
|
82
|
+
return Object.defineProperty(a, "__isScriptSetup", {
|
|
83
|
+
enumerable: !1,
|
|
84
|
+
value: !0
|
|
85
|
+
}), a;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region cabinet/src/components/ui/AppIcon.vue
|
|
90
|
+
function pe(e, t, r, a, te, ne) {
|
|
91
|
+
return i(), n(ee(a.icon), { "stroke-width": r.strokeWidth }, null, 8, ["stroke-width"]);
|
|
92
|
+
}
|
|
93
|
+
var me = /*#__PURE__*/ e(fe, [["render", pe], ["__file", "D:/Softpro/surveyor/cabinet/src/components/ui/AppIcon.vue"]]);
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region cabinet/src/api/surveyor.ts
|
|
96
|
+
function Z(e) {
|
|
97
|
+
return `${"".replace(/\/$/, "")}${e}`;
|
|
98
|
+
}
|
|
99
|
+
function Q(e, t) {
|
|
100
|
+
let n = e || `HTTP ${t}`;
|
|
101
|
+
try {
|
|
102
|
+
let t = JSON.parse(e);
|
|
103
|
+
n = (typeof t.error == "object" ? t.error.message : void 0) || t.message || (typeof t.error == "string" ? t.error : n);
|
|
104
|
+
} catch {}
|
|
105
|
+
return n;
|
|
106
|
+
}
|
|
107
|
+
async function he(e) {
|
|
108
|
+
let t = await fetch(Z(`/api/surveyor/change_password/${encodeURIComponent(e.surveyorId)}`), {
|
|
109
|
+
method: "POST",
|
|
110
|
+
credentials: "include",
|
|
111
|
+
headers: { "Content-Type": "application/json" },
|
|
112
|
+
body: JSON.stringify({
|
|
113
|
+
password: e.password,
|
|
114
|
+
password_confirmation: e.passwordConfirmation
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
if (!t.ok) throw Error(Q(await t.text(), t.status));
|
|
118
|
+
return t.json();
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region cabinet/src/api/profile.ts
|
|
122
|
+
function ge() {
|
|
123
|
+
return {
|
|
124
|
+
certificateDate: "",
|
|
125
|
+
certificateNumber: "",
|
|
126
|
+
certificateVerified: !1,
|
|
127
|
+
institution: "",
|
|
128
|
+
protocolDate: "",
|
|
129
|
+
protocolNumber: "",
|
|
130
|
+
qualificationIncrease: "",
|
|
131
|
+
certificateStopping: "",
|
|
132
|
+
certificateSuspension: ""
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function $() {
|
|
136
|
+
return {
|
|
137
|
+
uid: "",
|
|
138
|
+
login: "",
|
|
139
|
+
surName: "",
|
|
140
|
+
userName: "",
|
|
141
|
+
fatherName: "",
|
|
142
|
+
phone: "",
|
|
143
|
+
email: "",
|
|
144
|
+
enabled: !1,
|
|
145
|
+
type: "geodesist",
|
|
146
|
+
organization: "",
|
|
147
|
+
orgAddress: "",
|
|
148
|
+
orgPhone: "",
|
|
149
|
+
orgEmail: "",
|
|
150
|
+
...ge(),
|
|
151
|
+
registry: "Реєстр геодезистів",
|
|
152
|
+
workplace: ""
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
var _e = a($());
|
|
156
|
+
function ve(e) {
|
|
157
|
+
return [
|
|
158
|
+
e.surName,
|
|
159
|
+
e.userName,
|
|
160
|
+
e.fatherName
|
|
161
|
+
].filter(Boolean).join(" ");
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
export { Q as a, he as i, ve as n, me as o, Z as r, _e as t };
|