@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,243 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { i as t, n, o as r, t as i } from "./profile-ByahbF4B.js";
|
|
3
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, vModelDynamic as y, withDirectives as b } from "vue";
|
|
4
|
+
//#region cabinet/src/pages/profile/components/PasswordModal.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var x = 8, ee = /*@__PURE__*/ p({
|
|
6
|
+
__name: "PasswordModal",
|
|
7
|
+
emits: ["close"],
|
|
8
|
+
setup(e, { expose: n, emit: a }) {
|
|
9
|
+
n();
|
|
10
|
+
let s = a, c = g(""), l = g(""), u = g(!1), d = g(!1), f = g(!1), p = g(!1), m = g(""), h = o(() => c.value.length > 0 && l.value.length > 0 && c.value !== l.value), _ = o(() => c.value.length > 0 && c.value.length < x), v = o(() => !f.value && !p.value && c.value.length >= x && c.value === l.value && !!i.uid);
|
|
11
|
+
async function y() {
|
|
12
|
+
if (v.value) {
|
|
13
|
+
m.value = "", f.value = !0;
|
|
14
|
+
try {
|
|
15
|
+
await t({
|
|
16
|
+
surveyorId: i.uid,
|
|
17
|
+
password: c.value,
|
|
18
|
+
passwordConfirmation: l.value
|
|
19
|
+
}), p.value = !0, window.setTimeout(() => s("close"), 1200);
|
|
20
|
+
} catch (e) {
|
|
21
|
+
m.value = e instanceof Error ? e.message : "Не вдалося змінити пароль";
|
|
22
|
+
} finally {
|
|
23
|
+
f.value = !1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let b = {
|
|
28
|
+
emit: s,
|
|
29
|
+
MIN_PASSWORD_LENGTH: x,
|
|
30
|
+
next: c,
|
|
31
|
+
confirm: l,
|
|
32
|
+
showNext: u,
|
|
33
|
+
showConfirm: d,
|
|
34
|
+
submitting: f,
|
|
35
|
+
saved: p,
|
|
36
|
+
error: m,
|
|
37
|
+
mismatch: h,
|
|
38
|
+
weak: _,
|
|
39
|
+
canSave: v,
|
|
40
|
+
save: y,
|
|
41
|
+
AppIcon: r
|
|
42
|
+
};
|
|
43
|
+
return Object.defineProperty(b, "__isScriptSetup", {
|
|
44
|
+
enumerable: !1,
|
|
45
|
+
value: !0
|
|
46
|
+
}), b;
|
|
47
|
+
}
|
|
48
|
+
}), S = { class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm" }, C = { class: "w-full max-w-md overflow-hidden rounded-2xl bg-white shadow-2xl" }, w = { class: "flex items-center justify-between border-b border-gray-100 px-6 py-5" }, T = { class: "flex items-center gap-3" }, E = { class: "flex h-9 w-9 items-center justify-center rounded-xl bg-[#EFF4FE]" }, D = { class: "space-y-4 px-6 py-5" }, O = { class: "relative" }, k = ["type"], A = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "mt-1 text-xs text-red-500"
|
|
51
|
+
}, j = { class: "relative" }, M = ["type"], N = {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "mt-1 text-xs text-red-500"
|
|
54
|
+
}, P = {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "text-sm text-red-500"
|
|
57
|
+
}, F = { class: "flex items-center justify-end gap-3 px-6 pb-6" }, I = ["disabled"];
|
|
58
|
+
function L(e, t, n, r, i, a) {
|
|
59
|
+
return h(), l("div", S, [u("div", C, [
|
|
60
|
+
u("div", w, [u("div", T, [u("div", E, [f(r.AppIcon, {
|
|
61
|
+
name: "lock",
|
|
62
|
+
class: "h-[17px] w-[17px] text-[#2663EB]"
|
|
63
|
+
})]), t[6] ||= u("h2", { class: "text-base font-semibold text-gray-900" }, "Змінити пароль", -1)]), u("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
|
|
66
|
+
"aria-label": "Закрити",
|
|
67
|
+
onClick: t[0] ||= (e) => r.emit("close")
|
|
68
|
+
}, [f(r.AppIcon, {
|
|
69
|
+
name: "x",
|
|
70
|
+
class: "h-[17px] w-[17px]"
|
|
71
|
+
})])]),
|
|
72
|
+
u("div", D, [
|
|
73
|
+
u("div", null, [
|
|
74
|
+
t[7] ||= u("label", { class: "mb-1.5 block text-xs font-medium text-gray-500" }, "Новий пароль", -1),
|
|
75
|
+
u("div", O, [b(u("input", {
|
|
76
|
+
"onUpdate:modelValue": t[1] ||= (e) => r.next = e,
|
|
77
|
+
type: r.showNext ? "text" : "password",
|
|
78
|
+
autocomplete: "new-password",
|
|
79
|
+
class: m(["w-full rounded-lg border py-2.5 pl-3.5 pr-10 text-sm outline-none transition-colors focus:ring-2", r.weak ? "border-red-300 focus:border-red-400 focus:ring-red-100" : "border-gray-200 focus:border-[#2663EB] focus:ring-[#2663EB]/15"])
|
|
80
|
+
}, null, 10, k), [[y, r.next]]), u("button", {
|
|
81
|
+
type: "button",
|
|
82
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 transition-colors hover:text-gray-600",
|
|
83
|
+
onClick: t[2] ||= (e) => r.showNext = !r.showNext
|
|
84
|
+
}, [f(r.AppIcon, {
|
|
85
|
+
name: r.showNext ? "eye-off" : "eye",
|
|
86
|
+
class: "h-[15px] w-[15px]"
|
|
87
|
+
}, null, 8, ["name"])])]),
|
|
88
|
+
r.weak ? (h(), l("p", A, "Мінімум " + v(r.MIN_PASSWORD_LENGTH) + " символів")) : c("", !0)
|
|
89
|
+
]),
|
|
90
|
+
u("div", null, [
|
|
91
|
+
t[8] ||= u("label", { class: "mb-1.5 block text-xs font-medium text-gray-500" }, "Підтвердження нового пароля", -1),
|
|
92
|
+
u("div", j, [b(u("input", {
|
|
93
|
+
"onUpdate:modelValue": t[3] ||= (e) => r.confirm = e,
|
|
94
|
+
type: r.showConfirm ? "text" : "password",
|
|
95
|
+
autocomplete: "new-password",
|
|
96
|
+
class: m(["w-full rounded-lg border py-2.5 pl-3.5 pr-10 text-sm outline-none transition-colors focus:ring-2", r.mismatch ? "border-red-300 focus:border-red-400 focus:ring-red-100" : "border-gray-200 focus:border-[#2663EB] focus:ring-[#2663EB]/15"])
|
|
97
|
+
}, null, 10, M), [[y, r.confirm]]), u("button", {
|
|
98
|
+
type: "button",
|
|
99
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 transition-colors hover:text-gray-600",
|
|
100
|
+
onClick: t[4] ||= (e) => r.showConfirm = !r.showConfirm
|
|
101
|
+
}, [f(r.AppIcon, {
|
|
102
|
+
name: r.showConfirm ? "eye-off" : "eye",
|
|
103
|
+
class: "h-[15px] w-[15px]"
|
|
104
|
+
}, null, 8, ["name"])])]),
|
|
105
|
+
r.mismatch ? (h(), l("p", N, "Паролі не збігаються")) : c("", !0)
|
|
106
|
+
]),
|
|
107
|
+
r.error ? (h(), l("p", P, v(r.error), 1)) : c("", !0)
|
|
108
|
+
]),
|
|
109
|
+
u("div", F, [u("button", {
|
|
110
|
+
type: "button",
|
|
111
|
+
class: "rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",
|
|
112
|
+
onClick: t[5] ||= (e) => r.emit("close")
|
|
113
|
+
}, " Скасувати "), u("button", {
|
|
114
|
+
type: "button",
|
|
115
|
+
class: m(["flex items-center gap-2 rounded-lg px-5 py-2 text-sm font-medium transition-all", r.saved ? "bg-emerald-500 text-white" : r.canSave ? "bg-[#2663EB] text-white hover:bg-[#1d52cc] active:scale-95" : "cursor-not-allowed bg-gray-100 text-gray-400"]),
|
|
116
|
+
disabled: !r.canSave,
|
|
117
|
+
onClick: r.save
|
|
118
|
+
}, [r.saved ? (h(), s(r.AppIcon, {
|
|
119
|
+
key: 0,
|
|
120
|
+
name: "check",
|
|
121
|
+
class: "h-[15px] w-[15px]"
|
|
122
|
+
})) : c("", !0), d(" " + v(r.saved ? "Збережено" : r.submitting ? "Збереження…" : "Зберегти"), 1)], 10, I)])
|
|
123
|
+
])]);
|
|
124
|
+
}
|
|
125
|
+
var R = /*#__PURE__*/ e(ee, [["render", L], ["__file", "D:/Softpro/surveyor/cabinet/src/pages/profile/components/PasswordModal.vue"]]), z = "Не вказано", B = /*@__PURE__*/ p({
|
|
126
|
+
__name: "index",
|
|
127
|
+
setup(e, { expose: t }) {
|
|
128
|
+
t();
|
|
129
|
+
let a = g(!1), s = o(() => n(i)), c = o(() => `${i.surName.trim().charAt(0)}${i.userName.trim().charAt(0)}`.toUpperCase());
|
|
130
|
+
function l(e, t, n) {
|
|
131
|
+
let r = n.trim();
|
|
132
|
+
return {
|
|
133
|
+
icon: e,
|
|
134
|
+
label: t,
|
|
135
|
+
value: r || z,
|
|
136
|
+
muted: !r
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
let u = {
|
|
140
|
+
passwordOpen: a,
|
|
141
|
+
displayName: s,
|
|
142
|
+
initials: c,
|
|
143
|
+
empty: z,
|
|
144
|
+
field: l,
|
|
145
|
+
sections: o(() => [
|
|
146
|
+
{
|
|
147
|
+
title: "Організація",
|
|
148
|
+
fields: [
|
|
149
|
+
{
|
|
150
|
+
icon: "building-2",
|
|
151
|
+
label: "Назва організації",
|
|
152
|
+
value: i.organization
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
icon: "map-pin",
|
|
156
|
+
label: "Юридична адреса",
|
|
157
|
+
value: i.orgAddress
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
icon: "mail",
|
|
161
|
+
label: "Email",
|
|
162
|
+
value: i.orgEmail
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
icon: "phone",
|
|
166
|
+
label: "Телефон",
|
|
167
|
+
value: i.orgPhone
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: "Особисті дані",
|
|
173
|
+
fields: [{
|
|
174
|
+
icon: "user",
|
|
175
|
+
label: "ПІБ",
|
|
176
|
+
value: s.value
|
|
177
|
+
}]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
title: "Кваліфікаційний сертифікат",
|
|
181
|
+
fields: [
|
|
182
|
+
l("award", "Номер кваліфікаційного сертифіката", i.certificateNumber),
|
|
183
|
+
l("calendar-days", "Дата видачі кваліфікаційного сертифіката", i.certificateDate),
|
|
184
|
+
l("graduation-cap", "Назва навчального закладу, на базі якого складався кваліфікаційний іспит та який здійснював підвищення кваліфікації", i.institution),
|
|
185
|
+
l("calendar-days", "Дата протоколу рішення Кваліфікаційної комісії про видачу кваліфікаційного сертифіката", i.protocolDate),
|
|
186
|
+
l("file-text", "Номер протоколу рішення Кваліфікаційної комісії про видачу кваліфікаційного сертифіката", i.protocolNumber),
|
|
187
|
+
l("graduation-cap", "Інформація про підвищення кваліфікації", i.qualificationIncrease),
|
|
188
|
+
l("shield-alert", "Інформація щодо зупинення дії чи позбавлення кваліфікаційного сертифіката", i.certificateStopping),
|
|
189
|
+
l("pause-circle", "Інформація щодо призупинення дії кваліфікаційного сертифіката", i.certificateSuspension)
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
]),
|
|
193
|
+
AppIcon: r,
|
|
194
|
+
get currentProfile() {
|
|
195
|
+
return i;
|
|
196
|
+
},
|
|
197
|
+
PasswordModal: R
|
|
198
|
+
};
|
|
199
|
+
return Object.defineProperty(u, "__isScriptSetup", {
|
|
200
|
+
enumerable: !1,
|
|
201
|
+
value: !0
|
|
202
|
+
}), u;
|
|
203
|
+
}
|
|
204
|
+
}), V = { class: "min-h-[calc(100vh-3.5rem)] bg-gray-50" }, H = { class: "mx-auto max-w-3xl px-4 py-8" }, U = { class: "mb-6 flex items-center justify-between gap-4" }, W = { class: "mb-4 flex items-center gap-4 rounded-2xl border border-gray-200 bg-white p-5" }, G = { class: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-[#2663EB] to-[#1d52cc] text-xl font-semibold text-white shadow-sm" }, K = { class: "text-base font-semibold text-gray-900" }, q = { class: "text-sm text-gray-500" }, J = {
|
|
205
|
+
key: 0,
|
|
206
|
+
class: "mt-1.5 inline-flex items-center gap-1 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-xs font-medium text-emerald-700"
|
|
207
|
+
}, Y = {
|
|
208
|
+
key: 1,
|
|
209
|
+
class: "mt-1.5 inline-flex items-center gap-1 rounded-full border border-gray-200 bg-gray-50 px-2 py-0.5 text-xs font-medium text-gray-500"
|
|
210
|
+
}, X = { class: "space-y-4" }, Z = { class: "border-b border-gray-100 bg-gray-50/60 px-5 py-3.5" }, Q = { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, $ = { class: "divide-y divide-gray-100" }, te = { class: "min-w-0" }, ne = { class: "mb-0.5 text-xs leading-snug text-gray-400" };
|
|
211
|
+
function re(e, t, n, r, i, o) {
|
|
212
|
+
return h(), l("div", V, [u("div", H, [
|
|
213
|
+
u("div", U, [t[3] ||= u("div", null, [u("h1", { class: "text-xl font-semibold text-gray-900" }, "Особиста інформація"), u("p", { class: "mt-0.5 text-sm text-gray-500" }, "Перегляд даних вашого профілю та сертифіката")], -1), u("button", {
|
|
214
|
+
type: "button",
|
|
215
|
+
class: "flex shrink-0 items-center gap-2 rounded-lg bg-[#EFF4FE] px-4 py-2 text-sm font-medium text-[#2663EB] transition-all hover:bg-[#deeafd] active:scale-95",
|
|
216
|
+
onClick: t[0] ||= (e) => r.passwordOpen = !0
|
|
217
|
+
}, [f(r.AppIcon, {
|
|
218
|
+
name: "lock",
|
|
219
|
+
class: "h-[15px] w-[15px]"
|
|
220
|
+
}), t[2] ||= d(" Змінити пароль ", -1)])]),
|
|
221
|
+
u("div", W, [u("div", G, v(r.initials), 1), u("div", null, [
|
|
222
|
+
u("p", K, v(r.displayName), 1),
|
|
223
|
+
u("p", q, v(r.currentProfile.email), 1),
|
|
224
|
+
r.currentProfile.certificateVerified ? (h(), l("span", J, [...t[4] ||= [u("span", { class: "h-1.5 w-1.5 rounded-full bg-emerald-500" }, null, -1), d(" Сертифікат активний ", -1)]])) : (h(), l("span", Y, [...t[5] ||= [u("span", { class: "h-1.5 w-1.5 rounded-full bg-gray-400" }, null, -1), d(" Сертифікат не активний ", -1)]]))
|
|
225
|
+
])]),
|
|
226
|
+
u("div", X, [(h(!0), l(a, null, _(r.sections, (e) => (h(), l("section", {
|
|
227
|
+
key: e.title,
|
|
228
|
+
class: "overflow-hidden rounded-2xl border border-gray-200 bg-white"
|
|
229
|
+
}, [u("div", Z, [u("h2", Q, v(e.title), 1)]), u("div", $, [(h(!0), l(a, null, _(e.fields, (e) => (h(), l("div", {
|
|
230
|
+
key: e.label,
|
|
231
|
+
class: "flex gap-3 px-5 py-4"
|
|
232
|
+
}, [f(r.AppIcon, {
|
|
233
|
+
name: e.icon,
|
|
234
|
+
class: "mt-0.5 h-4 w-4 shrink-0 text-gray-400"
|
|
235
|
+
}, null, 8, ["name"]), u("div", te, [u("p", ne, v(e.label), 1), u("p", { class: m(["break-words text-sm font-medium", e.muted ? "italic text-gray-400" : "text-gray-900"]) }, v(e.value), 3)])]))), 128))])]))), 128))])
|
|
236
|
+
]), r.passwordOpen ? (h(), s(r.PasswordModal, {
|
|
237
|
+
key: 0,
|
|
238
|
+
onClose: t[1] ||= (e) => r.passwordOpen = !1
|
|
239
|
+
})) : c("", !0)]);
|
|
240
|
+
}
|
|
241
|
+
var ie = /*#__PURE__*/ e(B, [["render", re], ["__file", "D:/Softpro/surveyor/cabinet/src/pages/profile/index.vue"]]);
|
|
242
|
+
//#endregion
|
|
243
|
+
export { ie as default };
|
|
@@ -0,0 +1,232 @@
|
|
|
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 };
|