@opengis/surveyor 0.0.2 → 0.0.3

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.
Files changed (45) hide show
  1. package/dist/chunks/{AppealDetailField-CI-1qhs3.js → AppealDetailField-DNRGpnyD.js} +2 -2
  2. package/dist/chunks/{AppealStatusBadge-CSXnfarR.js → AppealStatusBadge-CefimzY3.js} +2 -2
  3. package/dist/chunks/{AppealStatusBadge-DYBe9hqP.js → AppealStatusBadge-Cu-UzdzA.js} +1 -1
  4. package/dist/chunks/{ApplicationHistorySection-C0wwhwA4.js → ApplicationHistorySection-PwToBfej.js} +4 -4
  5. package/dist/chunks/BaseModal-SQXvRRNW.js +90 -0
  6. package/dist/chunks/{FormFilePicker-C3XQw50i.js → FormFilePicker-CKVdZJU9.js} +2 -2
  7. package/dist/chunks/{MapLayerMenu-DjYCxEc3.js → MapLayerMenu-AUeTqgEp.js} +1 -1
  8. package/dist/chunks/{RegistryForm-CEUqFmsF.js → RegistryForm-wG-c8GKf.js} +1 -1
  9. package/dist/chunks/{RegistryFormModal-DfY4z_7r.js → RegistryFormModal-R_iZYqGE.js} +3 -3
  10. package/dist/chunks/{RegistryToolbar-BV4mYVAc.js → RegistryToolbar-322DKUXi.js} +6 -6
  11. package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +23 -0
  12. package/dist/chunks/{UserAccessBadge-D8JfgGfN.js → UserAccessBadge-DyZDv7Oo.js} +1 -1
  13. package/dist/chunks/{UserTypeBadge-YIwwoCho.js → UserTypeBadge-LvnMuKGo.js} +1 -1
  14. package/dist/chunks/{VerifiedBadge-Bba8WnuB.js → VerifiedBadge-bk0n-rlC.js} +2 -2
  15. package/dist/chunks/{applications-BB9JRcgl.js → applications-CsCsndMV.js} +1 -1
  16. package/dist/chunks/{card-fL26_Gvc.js → card-B_SfARf7.js} +358 -357
  17. package/dist/chunks/card-C3y-j2TA.js +298 -0
  18. package/dist/chunks/{card-CKD1N0QD.js → card-CWqi1K-x.js} +107 -106
  19. package/dist/chunks/{card-DUtDfwMk.js → card-DCyBFoDZ.js} +6 -6
  20. package/dist/chunks/card-DWpAv92l.js +539 -0
  21. package/dist/chunks/{card-B-ftozcq.js → card-X9UVFgdR.js} +256 -250
  22. package/dist/chunks/{certificates-BSd1i0un.js → certificates-Cwch72-o.js} +131 -130
  23. package/dist/chunks/{create-DxMC_IL1.js → create-DTP9x2uS.js} +283 -270
  24. package/dist/chunks/dom-BSjFG3O0.js +7 -0
  25. package/dist/chunks/{map-layers-DnmkOEld.js → map-layers-sT-gTiD_.js} +130 -125
  26. package/dist/chunks/{map-Z57iMvFb.js → map-qXQe_qam.js} +645 -632
  27. package/dist/chunks/{organizations-BbYipLwk.js → organizations-BtuMZ5s_.js} +1 -1
  28. package/dist/chunks/{organizations-BO1_JETm.js → organizations-ByVE2f0c.js} +128 -123
  29. package/dist/chunks/{profile-Dwwn_4Pr.js → profile-CuxlkEev.js} +3 -3
  30. package/dist/chunks/{profile-ByahbF4B.js → profile-DxZHxGum.js} +1 -1
  31. package/dist/chunks/requests-BTpLXrNj.js +233 -0
  32. package/dist/chunks/{requests-CFv5wwAN.js → requests-Bt8fEdRc.js} +7 -7
  33. package/dist/chunks/useEntityPath-C5Owtidc.js +98 -0
  34. package/dist/chunks/{users-DtTYsgMb.js → users-U1P6xCP4.js} +105 -99
  35. package/dist/index.css +1 -1
  36. package/dist/index.js +154 -114
  37. package/package.json +2 -5
  38. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -41
  39. package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -79
  40. package/surveyor-types.d.ts +5 -0
  41. package/dist/chunks/AppIcon-CIR6y5uE.js +0 -85
  42. package/dist/chunks/BaseModal-C7PVYz0m.js +0 -85
  43. package/dist/chunks/card-BctFHFZe.js +0 -538
  44. package/dist/chunks/card-CiNZxAd5.js +0 -297
  45. package/dist/chunks/requests-BCin936Z.js +0 -232
@@ -0,0 +1,298 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
3
+ import { a as r, i } from "./resources-2e8RFqWR.js";
4
+ import { t as a } from "./VerifiedBadge-bk0n-rlC.js";
5
+ import { t as o } from "./UserTypeBadge-LvnMuKGo.js";
6
+ import { t as s } from "./UserAccessBadge-DyZDv7Oo.js";
7
+ import { n as c, t as l } from "./AppealDetailField-DNRGpnyD.js";
8
+ import { a as u } from "./surveyorAccount-C7UiiIYg.js";
9
+ import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, normalizeClass as b, openBlock as x, ref as S, renderList as C, toDisplayString as w, watch as T, withCtx as E } from "vue";
10
+ import { RouterLink as D, useRoute as O } from "vue-router";
11
+ //#region admin/src/pages/certificates/card.vue?vue&type=script&setup=true&lang.ts
12
+ var k = /*@__PURE__*/ y({
13
+ __name: "card",
14
+ setup(e, { expose: d }) {
15
+ d();
16
+ let p = O(), { listPath: m } = n(), h = S(null), g = S([]), _ = S(!1), v = S(""), y = f(() => {
17
+ let e = h.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
+ }), b = f(() => String(h.value?.certificate_type ?? "")), x = f(() => {
24
+ let e = h.value;
25
+ return e ? e.membership ? e.membership : e.is_membership === !0 ? "Так" : e.is_membership === !1 ? "Ні" : "—" : "—";
26
+ });
27
+ function C(e) {
28
+ return [
29
+ e.last_name,
30
+ e.first_name,
31
+ e.middle_name
32
+ ].filter(Boolean).join(" ") || "—";
33
+ }
34
+ function w(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 E(e) {
40
+ _.value = !0, v.value = "", h.value = null, g.value = [];
41
+ try {
42
+ let [t, n] = await Promise.all([r(`/api/resource/certificates/${encodeURIComponent(e)}`), i("surveyors", {
43
+ page: 1,
44
+ limit: 100,
45
+ filters: { certificate_id: e }
46
+ }).catch(() => ({ rows: [] }))]);
47
+ h.value = t, g.value = n.rows ?? [];
48
+ } catch (e) {
49
+ h.value = null, g.value = [], v.value = e instanceof Error ? e.message : "Не вдалося завантажити сертифікат";
50
+ } finally {
51
+ _.value = !1;
52
+ }
53
+ }
54
+ T(() => String(p.params.id), (e) => {
55
+ e && E(e);
56
+ }, { immediate: !0 });
57
+ let k = {
58
+ route: p,
59
+ listPath: m,
60
+ certificate: h,
61
+ surveyors: g,
62
+ loading: _,
63
+ error: v,
64
+ fullName: y,
65
+ registryType: b,
66
+ membershipText: x,
67
+ personName: C,
68
+ formatDate: w,
69
+ loadCertificate: E,
70
+ AppIcon: t,
71
+ get RouterLink() {
72
+ return D;
73
+ },
74
+ VerifiedBadge: a,
75
+ UserTypeBadge: o,
76
+ UserAccessBadge: s,
77
+ AppealDetailSection: c,
78
+ AppealDetailField: l,
79
+ get surveyorEnabled() {
80
+ return u;
81
+ }
82
+ };
83
+ return Object.defineProperty(k, "__isScriptSetup", {
84
+ enumerable: !1,
85
+ value: !0
86
+ }), k;
87
+ }
88
+ }), A = {
89
+ key: 0,
90
+ class: "px-4 py-16 text-center text-sm text-slate-400"
91
+ }, j = {
92
+ key: 1,
93
+ class: "pl-0"
94
+ }, M = { class: "mb-6" }, N = { class: "mb-4 flex items-center gap-1.5 text-sm" }, P = { class: "font-medium text-slate-700" }, F = { class: "flex min-w-0 flex-wrap items-center gap-3" }, I = { class: "text-xl font-bold tracking-tight text-slate-900" }, ee = {
95
+ key: 1,
96
+ 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"
97
+ }, L = { class: "flex flex-col gap-5" }, R = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, z = {
98
+ key: 1,
99
+ class: "text-[14px] font-medium text-slate-700"
100
+ }, B = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, V = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, H = {
101
+ key: 0,
102
+ class: "py-6 text-center text-sm text-slate-400"
103
+ }, U = {
104
+ key: 1,
105
+ class: "overflow-x-auto"
106
+ }, W = { class: "min-w-full table-fixed text-left text-[13px]" }, G = { class: "divide-y divide-slate-100" }, K = { class: "px-1 py-3" }, q = {
107
+ key: 0,
108
+ class: "mt-1 text-xs text-slate-400"
109
+ }, J = { class: "break-all px-1 py-3 text-slate-600" }, Y = { class: "whitespace-nowrap px-1 py-3 text-slate-600" }, X = { class: "px-1 py-3" }, Z = {
110
+ key: 2,
111
+ class: "rounded-xl border border-slate-200 bg-white px-6 py-16 text-center shadow-card"
112
+ }, Q = { class: "text-sm text-slate-500" };
113
+ function $(e, t, n, r, i, a) {
114
+ return r.loading ? (x(), h("div", A, " Завантаження… ")) : r.certificate ? (x(), h("div", j, [g("header", M, [g("nav", N, [
115
+ v(r.RouterLink, {
116
+ to: r.listPath,
117
+ class: "flex items-center gap-1 text-slate-400 transition-colors hover:text-brand-600"
118
+ }, {
119
+ default: E(() => [v(r.AppIcon, {
120
+ name: "home",
121
+ class: "h-3.5 w-3.5"
122
+ }), t[0] ||= _(" Реєстр сертифікатів ", -1)]),
123
+ _: 1
124
+ }, 8, ["to"]),
125
+ t[1] ||= g("span", { class: "text-slate-300" }, "/", -1),
126
+ g("span", P, w(r.fullName), 1)
127
+ ]), g("div", F, [g("h1", I, w(r.fullName), 1), r.registryType ? (x(), p(r.UserTypeBadge, {
128
+ key: 0,
129
+ type: r.registryType
130
+ }, null, 8, ["type"])) : r.certificate.certificate_type_data?.text ? (x(), h("span", ee, w(r.certificate.certificate_type_data.text), 1)) : m("", !0)])]), g("div", L, [
131
+ v(r.AppealDetailSection, { title: "Інформація про сертифікат" }, {
132
+ icon: E(() => [v(r.AppIcon, {
133
+ name: "award",
134
+ class: "h-[18px] w-[18px]"
135
+ })]),
136
+ default: E(() => [g("dl", R, [
137
+ v(r.AppealDetailField, {
138
+ label: "Номер кваліфікаційного сертифіката",
139
+ highlight: ""
140
+ }, {
141
+ default: E(() => [_(w(r.certificate.number_certificate || "—"), 1)]),
142
+ _: 1
143
+ }),
144
+ v(r.AppealDetailField, { label: "Дата видачі кваліфікаційного сертифіката" }, {
145
+ default: E(() => [_(w(r.formatDate(r.certificate.date_certificate) || "—"), 1)]),
146
+ _: 1
147
+ }),
148
+ v(r.AppealDetailField, { label: "Реєстр" }, {
149
+ default: E(() => [_(w(r.certificate.certificate_type_data?.text || "—"), 1)]),
150
+ _: 1
151
+ }),
152
+ g("div", null, [t[2] ||= g("dt", { class: "mb-1 text-xs font-medium text-slate-500" }, "Верифікація", -1), g("dd", null, [typeof r.certificate.isvalid == "boolean" ? (x(), p(r.VerifiedBadge, {
153
+ key: 0,
154
+ verified: r.certificate.isvalid
155
+ }, null, 8, ["verified"])) : (x(), h("span", z, "—"))])]),
156
+ v(r.AppealDetailField, {
157
+ label: "Назва навчального закладу",
158
+ full: ""
159
+ }, {
160
+ default: E(() => [_(w(r.certificate.name_school || "—"), 1)]),
161
+ _: 1
162
+ }),
163
+ v(r.AppealDetailField, { label: "Місце роботи інженера-геодезиста" }, {
164
+ default: E(() => [_(w(r.certificate.work_place || "—"), 1)]),
165
+ _: 1
166
+ }),
167
+ v(r.AppealDetailField, { label: "Місце провадження господарської діяльності" }, {
168
+ default: E(() => [_(w(r.certificate.economic_activity || "—"), 1)]),
169
+ _: 1
170
+ }),
171
+ v(r.AppealDetailField, {
172
+ label: "Членство",
173
+ full: ""
174
+ }, {
175
+ default: E(() => [_(w(r.membershipText), 1)]),
176
+ _: 1
177
+ })
178
+ ])]),
179
+ _: 1
180
+ }),
181
+ v(r.AppealDetailSection, { title: "Геодезист" }, {
182
+ icon: E(() => [v(r.AppIcon, {
183
+ name: "user",
184
+ class: "h-[18px] w-[18px]"
185
+ })]),
186
+ default: E(() => [g("dl", B, [
187
+ v(r.AppealDetailField, {
188
+ label: "ПІБ",
189
+ highlight: ""
190
+ }, {
191
+ default: E(() => [_(w(r.fullName), 1)]),
192
+ _: 1
193
+ }),
194
+ v(r.AppealDetailField, { label: "Email геодезиста" }, {
195
+ default: E(() => [_(w(r.certificate.surveyor_email || "—"), 1)]),
196
+ _: 1
197
+ }),
198
+ v(r.AppealDetailField, { label: "Номер телефону геодезиста" }, {
199
+ default: E(() => [_(w(r.certificate.surveyor_phone || "—"), 1)]),
200
+ _: 1
201
+ })
202
+ ])]),
203
+ _: 1
204
+ }),
205
+ v(r.AppealDetailSection, { title: "Кваліфікація та обмеження" }, {
206
+ icon: E(() => [v(r.AppIcon, {
207
+ name: "calendar-days",
208
+ class: "h-[18px] w-[18px]"
209
+ })]),
210
+ default: E(() => [g("dl", V, [
211
+ v(r.AppealDetailField, { label: "Підвищення кваліфікації" }, {
212
+ default: E(() => [_(w(r.formatDate(r.certificate.last_qualification_date) || "—"), 1)]),
213
+ _: 1
214
+ }),
215
+ v(r.AppealDetailField, { label: "Кваліфікаційний рівень" }, {
216
+ default: E(() => [_(w(r.certificate.qualification_level || "—"), 1)]),
217
+ _: 1
218
+ }),
219
+ v(r.AppealDetailField, { label: "Дата протоколу" }, {
220
+ default: E(() => [_(w(r.formatDate(r.certificate.date_protocol) || "—"), 1)]),
221
+ _: 1
222
+ }),
223
+ v(r.AppealDetailField, { label: "Номер протоколу" }, {
224
+ default: E(() => [_(w(r.certificate.number_protocol || "—"), 1)]),
225
+ _: 1
226
+ }),
227
+ v(r.AppealDetailField, {
228
+ label: "Інформація про підвищення кваліфікації",
229
+ full: ""
230
+ }, {
231
+ default: E(() => [_(w(r.certificate.certificate_increase || "—"), 1)]),
232
+ _: 1
233
+ }),
234
+ v(r.AppealDetailField, {
235
+ label: "Підстава для поновлення",
236
+ full: ""
237
+ }, {
238
+ default: E(() => [_(w(r.certificate.certificate_renewal || "—"), 1)]),
239
+ _: 1
240
+ }),
241
+ v(r.AppealDetailField, { label: "Дата призупинення" }, {
242
+ default: E(() => [g("span", { class: b(r.certificate.certificate_suspension ? "text-danger-700" : "") }, w(r.formatDate(r.certificate.certificate_suspension) || "—"), 3)]),
243
+ _: 1
244
+ }),
245
+ v(r.AppealDetailField, { label: "Дата припинення" }, {
246
+ default: E(() => [g("span", { class: b(r.certificate.certificate_stopping ? "text-danger-700" : "") }, w(r.certificate.certificate_stopping || "—"), 3)]),
247
+ _: 1
248
+ })
249
+ ])]),
250
+ _: 1
251
+ }),
252
+ v(r.AppealDetailSection, { title: "Користувачі" }, {
253
+ icon: E(() => [v(r.AppIcon, {
254
+ name: "users",
255
+ class: "h-[18px] w-[18px]"
256
+ })]),
257
+ default: E(() => [r.surveyors.length === 0 ? (x(), h("p", H, " Користувачів за цим сертифікатом не знайдено. ")) : (x(), h("div", U, [g("table", W, [
258
+ t[3] ||= g("colgroup", null, [
259
+ g("col", { class: "w-[32%]" }),
260
+ g("col", { class: "w-[28%]" }),
261
+ g("col", { class: "w-[22%]" }),
262
+ g("col", { class: "w-[18%]" })
263
+ ], -1),
264
+ t[4] ||= g("thead", { class: "text-xs font-semibold text-slate-500" }, [g("tr", { class: "border-b border-slate-100" }, [
265
+ g("th", { class: "px-1 py-2.5" }, "ПІБ"),
266
+ g("th", { class: "px-1 py-2.5" }, "Email"),
267
+ g("th", { class: "px-1 py-2.5" }, "Телефон"),
268
+ g("th", { class: "px-1 py-2.5" }, "Доступ")
269
+ ])], -1),
270
+ g("tbody", G, [(x(!0), h(d, null, C(r.surveyors, (e) => (x(), h("tr", {
271
+ key: e.surveyor_id,
272
+ class: "transition-colors hover:bg-brand-50/40"
273
+ }, [
274
+ g("td", K, [v(r.RouterLink, {
275
+ to: `/users/${e.surveyor_id}`,
276
+ class: "font-semibold text-brand-700 hover:text-brand-900 hover:underline"
277
+ }, {
278
+ default: E(() => [_(w(r.personName(e)), 1)]),
279
+ _: 2
280
+ }, 1032, ["to"]), e.registered_at ? m("", !0) : (x(), h("p", q, "Реєстрацію не завершено"))]),
281
+ g("td", J, w(e.email || "—"), 1),
282
+ g("td", Y, w(e.phone || "—"), 1),
283
+ g("td", X, [v(r.UserAccessBadge, { "account-blocked": !r.surveyorEnabled(e) }, null, 8, ["account-blocked"])])
284
+ ]))), 128))])
285
+ ])]))]),
286
+ _: 1
287
+ })
288
+ ])])) : (x(), h("div", Z, [g("p", Q, w(r.error || "Сертифікат не знайдено."), 1), v(r.RouterLink, {
289
+ to: r.listPath,
290
+ class: "mt-3 inline-block text-sm font-medium text-brand-600 hover:text-brand-700"
291
+ }, {
292
+ default: E(() => [...t[5] ||= [_(" Повернутися до реєстру ", -1)]]),
293
+ _: 1
294
+ }, 8, ["to"])]));
295
+ }
296
+ var te = /*#__PURE__*/ e(k, [["render", $], ["__file", "C:/softpro/surveyor/admin/src/pages/certificates/card.vue"]]);
297
+ //#endregion
298
+ export { te as default };
@@ -1,39 +1,39 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./AppIcon-CIR6y5uE.js";
3
- import { r as n } from "./resources-2e8RFqWR.js";
4
- import { n as r, t as i } from "./AppealDetailField-CI-1qhs3.js";
5
- import { t as a } from "./RegistryForm-CEUqFmsF.js";
6
- import { a as o, i as s, n as c, o as l, r as u, s as d, t as f } from "./form-Bh6i5n1U.js";
7
- import { l as p } from "./appealMapLayers-CQMK3rrz.js";
2
+ import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
3
+ import { r } from "./resources-2e8RFqWR.js";
4
+ import { n as i, t as a } from "./AppealDetailField-DNRGpnyD.js";
5
+ import { t as o } from "./RegistryForm-wG-c8GKf.js";
6
+ import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./form-Bh6i5n1U.js";
7
+ import { l as ee } from "./appealMapLayers-CQMK3rrz.js";
8
8
  import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as C, normalizeStyle as w, openBlock as T, ref as E, renderList as D, toDisplayString as O, watch as k, withCtx as A } from "vue";
9
- import { RouterLink as ee, useRoute as j, useRouter as M } from "vue-router";
10
- import { notify as N } from "@opengis/core";
9
+ import { RouterLink as j, useRoute as M, useRouter as N } from "vue-router";
10
+ import { notify as P } from "@opengis/core";
11
11
  //#region admin/src/pages/map-layers/card.vue?vue&type=script&setup=true&lang.ts
12
- var P = /*@__PURE__*/ S({
12
+ var F = /*@__PURE__*/ S({
13
13
  __name: "card",
14
14
  setup(e, { expose: m }) {
15
15
  m();
16
- let g = j(), _ = M(), v = E(null), y = E(!1), b = E(""), x = E(null), S = h(() => g.query.edit === "1"), C = h(() => v.value?.layer_group === "base"), w = h(() => v.value ? {
17
- ...v.value,
18
- id: v.value.layer_id
19
- } : null), T = h(() => v.value?.tiles ?? []), D = h(() => {
20
- let e = v.value;
21
- return !e || e.layer_group !== "base" ? "" : p({
16
+ let g = M(), { listPath: _ } = n(), v = N(), y = E(null), b = E(!1), x = E(""), S = E(null), C = h(() => g.query.edit === "1"), w = h(() => y.value?.layer_group === "base"), T = h(() => y.value ? {
17
+ ...y.value,
18
+ id: y.value.layer_id
19
+ } : null), D = h(() => y.value?.tiles ?? []), O = h(() => {
20
+ let e = y.value;
21
+ return !e || e.layer_group !== "base" ? "" : ee({
22
22
  id: e.code,
23
23
  label: e.name,
24
- tiles: T.value,
24
+ tiles: D.value,
25
25
  attribution: e.attribution ?? "",
26
26
  scheme: e.scheme ?? "xyz",
27
27
  ...e.preview ? { preview: e.preview } : {}
28
28
  });
29
- }), O = h(() => {
30
- let e = v.value?.minzoom, t = v.value?.maxzoom;
29
+ }), A = h(() => {
30
+ let e = y.value?.minzoom, t = y.value?.maxzoom;
31
31
  return e == null && t == null ? "Без обмежень" : `${e ?? 0} – ${t ?? "…"}`;
32
- }), A = h(() => `${Math.round(Number(v.value?.opacity ?? 1) * 100)}%`), P = h(() => {
33
- let e = v.value?.legend?.color;
32
+ }), F = h(() => `${Math.round(Number(y.value?.opacity ?? 1) * 100)}%`), I = h(() => {
33
+ let e = y.value?.legend?.color;
34
34
  return typeof e == "string" && e ? e : "";
35
- }), F = h(() => {
36
- let e = v.value?.style;
35
+ }), L = h(() => {
36
+ let e = y.value?.style;
37
37
  if (!e) return [];
38
38
  let t = {
39
39
  fillColor: "Колір заливки",
@@ -46,39 +46,39 @@ var P = /*@__PURE__*/ S({
46
46
  label: t[e] ?? e,
47
47
  value: String(n)
48
48
  }));
49
- }), I = h(() => {
50
- let e = v.value?.components ?? [];
51
- return e.length ? e.map((e) => l(c, e)).join(", ") : "Не використовується";
49
+ }), R = h(() => {
50
+ let e = y.value?.components ?? [];
51
+ return e.length ? e.map((e) => u(l, e)).join(", ") : "Не використовується";
52
52
  });
53
- function L() {
54
- _.replace({ query: {
53
+ function z() {
54
+ v.replace({ query: {
55
55
  ...g.query,
56
56
  edit: "1"
57
57
  } });
58
58
  }
59
- function R() {
59
+ function B() {
60
60
  let e = { ...g.query };
61
- delete e.edit, _.replace({ query: e });
61
+ delete e.edit, v.replace({ query: e });
62
62
  }
63
- async function z(e) {
64
- v.value = await n(d, encodeURIComponent(e));
63
+ async function V(e) {
64
+ y.value = await r(f, encodeURIComponent(e));
65
65
  }
66
- async function B(e) {
67
- y.value = !0, b.value = "", v.value = null;
66
+ async function H(e) {
67
+ b.value = !0, x.value = "", y.value = null;
68
68
  try {
69
- await z(e);
69
+ await V(e);
70
70
  } catch (e) {
71
- b.value = e instanceof Error ? e.message : "Не вдалося завантажити шар";
71
+ x.value = e instanceof Error ? e.message : "Не вдалося завантажити шар";
72
72
  } finally {
73
- y.value = !1;
73
+ b.value = !1;
74
74
  }
75
75
  }
76
- async function V() {
77
- let e = v.value?.layer_id;
78
- if (R(), e) try {
79
- await z(e);
76
+ async function U() {
77
+ let e = y.value?.layer_id;
78
+ if (B(), e) try {
79
+ await V(e);
80
80
  } catch (e) {
81
- N({
81
+ P({
82
82
  type: "error",
83
83
  title: "Помилка",
84
84
  message: e instanceof Error ? e.message : "Не вдалося оновити шар"
@@ -86,90 +86,91 @@ var P = /*@__PURE__*/ S({
86
86
  }
87
87
  }
88
88
  k(() => String(g.params.id), (e) => {
89
- e && B(e);
89
+ e && H(e);
90
90
  }, { immediate: !0 });
91
- let H = {
91
+ let W = {
92
92
  route: g,
93
- router: _,
94
- layer: v,
95
- loading: y,
96
- error: b,
97
- formRef: x,
98
- editing: S,
99
- isBase: C,
100
- editRecord: w,
101
- tiles: T,
102
- preview: D,
103
- zoomText: O,
104
- opacityText: A,
105
- legendColor: P,
106
- styleEntries: F,
107
- componentsText: I,
108
- startEdit: L,
109
- cancelEdit: R,
110
- fetchLayer: z,
111
- loadLayer: B,
112
- onFormSaved: V,
93
+ listPath: _,
94
+ router: v,
95
+ layer: y,
96
+ loading: b,
97
+ error: x,
98
+ formRef: S,
99
+ editing: C,
100
+ isBase: w,
101
+ editRecord: T,
102
+ tiles: D,
103
+ preview: O,
104
+ zoomText: A,
105
+ opacityText: F,
106
+ legendColor: I,
107
+ styleEntries: L,
108
+ componentsText: R,
109
+ startEdit: z,
110
+ cancelEdit: B,
111
+ fetchLayer: V,
112
+ loadLayer: H,
113
+ onFormSaved: U,
113
114
  AppIcon: t,
114
115
  get RouterLink() {
115
- return ee;
116
+ return j;
116
117
  },
117
- RegistryForm: a,
118
- AppealDetailSection: r,
119
- AppealDetailField: i,
118
+ RegistryForm: o,
119
+ AppealDetailSection: i,
120
+ AppealDetailField: a,
120
121
  get mapLayerForm() {
121
- return f;
122
+ return p;
122
123
  },
123
124
  get LAYER_GROUP_OPTIONS() {
124
- return u;
125
+ return d;
125
126
  },
126
127
  get LAYER_TYPE_OPTIONS() {
127
- return s;
128
+ return c;
128
129
  },
129
130
  get TILE_SCHEME_OPTIONS() {
130
- return o;
131
+ return s;
131
132
  },
132
133
  get optionText() {
133
- return l;
134
+ return u;
134
135
  }
135
136
  };
136
- return Object.defineProperty(H, "__isScriptSetup", {
137
+ return Object.defineProperty(W, "__isScriptSetup", {
137
138
  enumerable: !1,
138
139
  value: !0
139
- }), H;
140
+ }), W;
140
141
  }
141
- }), F = {
142
+ }), I = {
142
143
  key: 0,
143
144
  class: "px-4 py-16 text-center text-sm text-slate-400"
144
- }, I = {
145
+ }, L = {
145
146
  key: 1,
146
147
  class: "pl-0"
147
- }, L = { class: "mb-6" }, R = { class: "mb-4 flex items-center gap-1.5 text-sm" }, z = { class: "font-medium text-slate-700" }, B = { class: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between" }, V = { class: "flex items-center gap-3" }, H = { class: "text-xl font-bold tracking-tight text-slate-900" }, U = { class: "flex flex-col gap-5" }, W = {
148
+ }, R = { class: "mb-6" }, z = { class: "mb-4 flex items-center gap-1.5 text-sm" }, B = { class: "font-medium text-slate-700" }, V = { class: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between" }, H = { class: "flex items-center gap-3" }, U = { class: "text-xl font-bold tracking-tight text-slate-900" }, W = { class: "flex flex-col gap-5" }, G = {
148
149
  key: 0,
149
150
  class: "rounded-xl border border-slate-200 bg-white p-5 shadow-card"
150
- }, G = { class: "mt-4 flex justify-end gap-3 border-t border-slate-100 pt-4" }, K = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, q = { class: "text-xs" }, J = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, Y = {
151
+ }, K = { class: "mt-4 flex justify-end gap-3 border-t border-slate-100 pt-4" }, q = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, J = { class: "text-xs" }, Y = { class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2" }, X = {
151
152
  key: 0,
152
153
  class: "space-y-1"
153
- }, X = {
154
+ }, Z = {
154
155
  key: 1,
155
156
  class: "text-amber-700"
156
- }, Z = {
157
+ }, Q = {
157
158
  key: 0,
158
159
  class: "flex items-center gap-4"
159
- }, Q = ["src", "alt"], te = { class: "text-xs text-slate-400" }, $ = {
160
+ }, te = ["src", "alt"], ne = { class: "text-xs text-slate-400" }, $ = {
160
161
  key: 1,
161
162
  class: "grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2"
162
- }, ne = {
163
+ }, re = {
163
164
  key: 0,
164
165
  class: "inline-flex items-center gap-2"
165
- }, re = { key: 1 }, ie = {
166
+ }, ie = { key: 1 }, ae = {
166
167
  key: 2,
167
168
  class: "rounded-xl border border-slate-200 bg-white px-6 py-16 text-center shadow-card"
168
- }, ae = { class: "text-sm text-slate-500" };
169
- function oe(e, t, n, r, i, a) {
170
- return r.loading ? (T(), v("div", F, " Завантаження… ")) : r.layer ? (T(), v("div", I, [y("header", L, [y("nav", R, [
169
+ }, oe = { class: "text-sm text-slate-500" };
170
+ function se(e, t, n, r, i, a) {
171
+ return r.loading ? (T(), v("div", I, " Завантаження… ")) : r.layer ? (T(), v("div", L, [y("header", R, [y("nav", z, [
171
172
  x(r.RouterLink, {
172
- to: "/map-layers",
173
+ to: r.listPath,
173
174
  class: "flex items-center gap-1 text-slate-400 transition-colors hover:text-brand-600"
174
175
  }, {
175
176
  default: A(() => [x(r.AppIcon, {
@@ -177,10 +178,10 @@ function oe(e, t, n, r, i, a) {
177
178
  class: "h-3.5 w-3.5"
178
179
  }), t[1] ||= b(" Шари карти ", -1)]),
179
180
  _: 1
180
- }),
181
+ }, 8, ["to"]),
181
182
  t[2] ||= y("span", { class: "text-slate-300" }, "/", -1),
182
- y("span", z, O(r.layer.name), 1)
183
- ]), y("div", B, [y("div", V, [y("h1", H, O(r.layer.name), 1), y("span", { class: C(["inline-flex rounded-full px-2 py-0.5 text-xs font-medium", r.layer.enabled ? "bg-emerald-50 text-emerald-700" : "bg-slate-100 text-slate-500"]) }, O(r.layer.enabled ? "Увімкнено" : "Вимкнено"), 3)]), r.editing ? _("", !0) : (T(), v("button", {
183
+ y("span", B, O(r.layer.name), 1)
184
+ ]), y("div", V, [y("div", H, [y("h1", U, O(r.layer.name), 1), y("span", { class: C(["inline-flex rounded-full px-2 py-0.5 text-xs font-medium", r.layer.enabled ? "bg-emerald-50 text-emerald-700" : "bg-slate-100 text-slate-500"]) }, O(r.layer.enabled ? "Увімкнено" : "Вимкнено"), 3)]), r.editing ? _("", !0) : (T(), v("button", {
184
185
  key: 0,
185
186
  type: "button",
186
187
  class: "inline-flex h-10 items-center gap-2 rounded-lg border border-slate-200 bg-white px-4 text-sm font-semibold text-slate-700 transition-colors hover:border-brand-300 hover:text-brand-700",
@@ -188,14 +189,14 @@ function oe(e, t, n, r, i, a) {
188
189
  }, [x(r.AppIcon, {
189
190
  name: "pencil",
190
191
  class: "h-4 w-4"
191
- }), t[3] ||= b(" Редагувати ", -1)]))])]), y("div", U, [r.editing ? (T(), v("div", W, [x(r.RegistryForm, {
192
+ }), t[3] ||= b(" Редагувати ", -1)]))])]), y("div", W, [r.editing ? (T(), v("div", G, [x(r.RegistryForm, {
192
193
  ref: "formRef",
193
194
  config: r.mapLayerForm,
194
195
  record: r.editRecord,
195
196
  "hide-actions": "",
196
197
  onSaved: r.onFormSaved,
197
198
  onCancel: r.cancelEdit
198
- }, null, 8, ["config", "record"]), y("div", G, [y("button", {
199
+ }, null, 8, ["config", "record"]), y("div", K, [y("button", {
199
200
  type: "button",
200
201
  class: "inline-flex h-10 items-center rounded-lg bg-slate-100 px-4 text-sm font-semibold text-slate-600 transition-colors hover:bg-slate-200",
201
202
  onClick: r.cancelEdit
@@ -209,9 +210,9 @@ function oe(e, t, n, r, i, a) {
209
210
  name: "layers",
210
211
  class: "h-[18px] w-[18px]"
211
212
  })]),
212
- default: A(() => [y("dl", K, [
213
+ default: A(() => [y("dl", q, [
213
214
  x(r.AppealDetailField, { label: "Код" }, {
214
- default: A(() => [y("code", q, O(r.layer.code), 1)]),
215
+ default: A(() => [y("code", J, O(r.layer.code), 1)]),
215
216
  _: 1
216
217
  }),
217
218
  x(r.AppealDetailField, { label: "Група" }, {
@@ -252,15 +253,15 @@ function oe(e, t, n, r, i, a) {
252
253
  name: "external-link",
253
254
  class: "h-[18px] w-[18px]"
254
255
  })]),
255
- default: A(() => [y("dl", J, [
256
+ default: A(() => [y("dl", Y, [
256
257
  x(r.AppealDetailField, {
257
258
  label: "URL тайлів",
258
259
  full: ""
259
260
  }, {
260
- default: A(() => [r.tiles.length ? (T(), v("ul", Y, [(T(!0), v(m, null, D(r.tiles, (e) => (T(), v("li", {
261
+ default: A(() => [r.tiles.length ? (T(), v("ul", X, [(T(!0), v(m, null, D(r.tiles, (e) => (T(), v("li", {
261
262
  key: e,
262
263
  class: "break-all font-mono text-xs text-slate-600"
263
- }, O(e), 1))), 128))])) : (T(), v("span", X, "Не налаштовано — шар не відображається на карті"))]),
264
+ }, O(e), 1))), 128))])) : (T(), v("span", Z, "Не налаштовано — шар не відображається на карті"))]),
264
265
  _: 1
265
266
  }),
266
267
  x(r.AppealDetailField, { label: "Схема тайлів" }, {
@@ -290,21 +291,21 @@ function oe(e, t, n, r, i, a) {
290
291
  name: "eye",
291
292
  class: "h-[18px] w-[18px]"
292
293
  })]),
293
- default: A(() => [r.isBase ? (T(), v("div", Z, [r.preview ? (T(), v("img", {
294
+ default: A(() => [r.isBase ? (T(), v("div", Q, [r.preview ? (T(), v("img", {
294
295
  key: 0,
295
296
  src: r.preview,
296
297
  alt: r.layer.name,
297
298
  class: "h-24 w-32 shrink-0 rounded-lg border border-slate-200 object-cover"
298
- }, null, 8, Q)) : _("", !0), y("p", te, O(r.layer.preview ? "Задане прев'ю" : "Прев'ю з першого URL тайлів"), 1)])) : (T(), v("dl", $, [
299
+ }, null, 8, te)) : _("", !0), y("p", ne, O(r.layer.preview ? "Задане прев'ю" : "Прев'ю з першого URL тайлів"), 1)])) : (T(), v("dl", $, [
299
300
  x(r.AppealDetailField, { label: "Непрозорість" }, {
300
301
  default: A(() => [b(O(r.opacityText), 1)]),
301
302
  _: 1
302
303
  }),
303
304
  x(r.AppealDetailField, { label: "Легенда" }, {
304
- default: A(() => [r.legendColor ? (T(), v("span", ne, [y("span", {
305
+ default: A(() => [r.legendColor ? (T(), v("span", re, [y("span", {
305
306
  class: "h-3 w-3 rounded-sm border border-slate-200",
306
307
  style: w({ backgroundColor: r.legendColor })
307
- }, null, 4), b(" " + O(r.legendColor), 1)])) : (T(), v("span", re, "—"))]),
308
+ }, null, 4), b(" " + O(r.legendColor), 1)])) : (T(), v("span", ie, "—"))]),
308
309
  _: 1
309
310
  }),
310
311
  (T(!0), v(m, null, D(r.styleEntries, (e) => (T(), g(r.AppealDetailField, {
@@ -317,14 +318,14 @@ function oe(e, t, n, r, i, a) {
317
318
  ]))]),
318
319
  _: 1
319
320
  })
320
- ], 64))])])) : (T(), v("div", ie, [y("p", ae, O(r.error || "Шар не знайдено."), 1), x(r.RouterLink, {
321
- to: "/map-layers",
321
+ ], 64))])])) : (T(), v("div", ae, [y("p", oe, O(r.error || "Шар не знайдено."), 1), x(r.RouterLink, {
322
+ to: r.listPath,
322
323
  class: "mt-3 inline-block text-sm font-medium text-brand-600 hover:text-brand-700"
323
324
  }, {
324
325
  default: A(() => [...t[4] ||= [b(" Повернутися до реєстру ", -1)]]),
325
326
  _: 1
326
- })]));
327
+ }, 8, ["to"])]));
327
328
  }
328
- var se = /*#__PURE__*/ e(P, [["render", oe], ["__file", "D:/Softpro/surveyor/admin/src/pages/map-layers/card.vue"]]);
329
+ var ce = /*#__PURE__*/ e(F, [["render", se], ["__file", "C:/softpro/surveyor/admin/src/pages/map-layers/card.vue"]]);
329
330
  //#endregion
330
- export { se as default };
331
+ export { ce as default };