@opengis/surveyor 0.0.0-stage → 0.0.1
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/README.md +46 -3
- package/README.npm.md +51 -0
- package/dist/chunks/AppIcon-C-4QykTP.js +85 -0
- package/dist/chunks/AppealDetailField-DNRGpnyD.js +58 -0
- package/dist/chunks/AppealStatusBadge-CefimzY3.js +132 -0
- package/dist/chunks/AppealStatusBadge-Cu-UzdzA.js +171 -0
- package/dist/chunks/ApplicationHistorySection-PwToBfej.js +769 -0
- package/dist/chunks/BaseModal-DrTTkLmR.js +85 -0
- package/dist/chunks/FormFilePicker-CKVdZJU9.js +76 -0
- package/dist/chunks/MapLayerMenu-AUeTqgEp.js +145 -0
- package/dist/chunks/RegistryForm-pvIcFR-V.js +99 -0
- package/dist/chunks/RegistryFormModal-BjGu7Upv.js +85 -0
- package/dist/chunks/RegistryToolbar-CiUgsjpU.js +452 -0
- package/dist/chunks/UserAccessBadge-DyZDv7Oo.js +44 -0
- package/dist/chunks/UserTypeBadge-LvnMuKGo.js +188 -0
- package/dist/chunks/VerifiedBadge-B6droMOf.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-CsCsndMV.js +132 -0
- package/dist/chunks/buildSchema-nkA4Y0YG.js +37 -0
- package/dist/chunks/card--DHsMNBd.js +330 -0
- package/dist/chunks/card-9LaB42Ol.js +538 -0
- package/dist/chunks/card-BZn5CDw9.js +739 -0
- package/dist/chunks/card-CNqXSyqX.js +297 -0
- package/dist/chunks/card-CgGOgGyd.js +973 -0
- package/dist/chunks/card-DCyBFoDZ.js +607 -0
- package/dist/chunks/certificates-DueBDDvc.js +424 -0
- package/dist/chunks/create-l28e-bWl.js +1033 -0
- package/dist/chunks/filterQuery-B9XNx1f1.js +99 -0
- package/dist/chunks/form-CdGS1nVO.js +315 -0
- package/dist/chunks/form-QTkkzwbC.js +89 -0
- package/dist/chunks/geometry-DyhIVRcw.js +67 -0
- package/dist/chunks/map-BW3iOhQg.js +2763 -0
- package/dist/chunks/map-layers-qxWjos2V.js +400 -0
- package/dist/chunks/mapLayersApi-CWoQ2be-.js +251 -0
- package/dist/chunks/organizations-BtuMZ5s_.js +14 -0
- package/dist/chunks/organizations-CZOINYMq.js +476 -0
- package/dist/chunks/profile-CuxlkEev.js +243 -0
- package/dist/chunks/profile-DxZHxGum.js +164 -0
- package/dist/chunks/requests-Bt8fEdRc.js +530 -0
- package/dist/chunks/requests-DQJIhz00.js +232 -0
- package/dist/chunks/resendSurveyorRegistration-DopjOHaM.js +27 -0
- package/dist/chunks/resources-Cl_EvaIy.js +129 -0
- package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/chunks/surveyorAccount-BceNQypZ.js +78 -0
- package/dist/chunks/users-DlaogjC_.js +291 -0
- package/dist/chunks/work_types-Hwme-FEX.js +34 -0
- package/dist/index.css +3 -0
- package/dist/index.js +259 -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 +75 -4
- package/plugin.js +10 -0
- package/server/app.ts +50 -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/embed.ts +49 -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/tsconfig.json +3 -0
- package/surveyor-types.d.ts +30 -0
|
@@ -0,0 +1,1033 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { c as t, t as n, u as r } from "./appealMapLayers-CQMK3rrz.js";
|
|
3
|
+
import { a as i, d as a, i as o, l as s, r as c, s as l, t as u, u as d } from "./mapLayersApi-CWoQ2be-.js";
|
|
4
|
+
import { i as f, n as p } from "./geometry-DyhIVRcw.js";
|
|
5
|
+
import { t as m } from "./work_types-Hwme-FEX.js";
|
|
6
|
+
import { t as h } from "./MapLayerMenu-AUeTqgEp.js";
|
|
7
|
+
import { a as g, o as _, r as v } from "./profile-DxZHxGum.js";
|
|
8
|
+
import { t as y } from "./FormFilePicker-CKVdZJU9.js";
|
|
9
|
+
import { i as b, r as x, s as S } from "./applications-CsCsndMV.js";
|
|
10
|
+
import { i as C, t as w } from "./organizations-BtuMZ5s_.js";
|
|
11
|
+
import { Fragment as T, Teleport as E, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createTextVNode as M, createVNode as N, defineComponent as P, nextTick as F, normalizeClass as I, normalizeStyle as L, onBeforeUnmount as R, onMounted as z, onUnmounted as B, openBlock as V, ref as H, renderList as U, shallowRef as W, toDisplayString as G, vModelText as K, watch as q, withCtx as ee, withDirectives as J, withModifiers as Y } from "vue";
|
|
12
|
+
import { RouterLink as te, useRouter as ne } from "vue-router";
|
|
13
|
+
//#region cabinet/src/pages/requests/components/FormSearchSelect.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
+
var re = /*@__PURE__*/ P({
|
|
15
|
+
__name: "FormSearchSelect",
|
|
16
|
+
props: {
|
|
17
|
+
label: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: !0
|
|
20
|
+
},
|
|
21
|
+
options: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: !0
|
|
24
|
+
},
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: !0
|
|
28
|
+
},
|
|
29
|
+
required: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
required: !1,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
placeholder: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: !1,
|
|
37
|
+
default: "Обрати"
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: !1,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
openAbove: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
required: !1,
|
|
47
|
+
default: !1
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: ["update:modelValue"],
|
|
51
|
+
setup(e, { expose: t, emit: n }) {
|
|
52
|
+
t();
|
|
53
|
+
let r = e, i = n, a = H(!1), o = H(""), s = H(null), c = H(null), l = H(null), u = H(null), d = D(() => r.options.filter((e) => e.toLowerCase().includes(o.value.trim().toLowerCase()))), f = D(() => u.value ? r.openAbove ? {
|
|
54
|
+
left: `${u.value.left}px`,
|
|
55
|
+
width: `${u.value.width}px`,
|
|
56
|
+
bottom: `${window.innerHeight - u.value.top + 4}px`
|
|
57
|
+
} : {
|
|
58
|
+
left: `${u.value.left}px`,
|
|
59
|
+
width: `${u.value.width}px`,
|
|
60
|
+
top: `${u.value.bottom + 4}px`
|
|
61
|
+
} : { visibility: "hidden" });
|
|
62
|
+
function p() {
|
|
63
|
+
u.value = s.value?.getBoundingClientRect() ?? null;
|
|
64
|
+
}
|
|
65
|
+
function m() {
|
|
66
|
+
window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
|
|
67
|
+
}
|
|
68
|
+
function h() {
|
|
69
|
+
window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
|
|
70
|
+
}
|
|
71
|
+
function g() {
|
|
72
|
+
r.disabled || (a.value = !a.value);
|
|
73
|
+
}
|
|
74
|
+
function v(e) {
|
|
75
|
+
i("update:modelValue", e), a.value = !1;
|
|
76
|
+
}
|
|
77
|
+
function y(e) {
|
|
78
|
+
let t = e.target;
|
|
79
|
+
s.value?.contains(t) || c.value?.contains(t) || (a.value = !1);
|
|
80
|
+
}
|
|
81
|
+
q(a, async (e) => {
|
|
82
|
+
h(), e && (o.value = "", p(), m(), await F(), l.value?.focus());
|
|
83
|
+
}), z(() => document.addEventListener("mousedown", y)), R(() => {
|
|
84
|
+
document.removeEventListener("mousedown", y), h();
|
|
85
|
+
});
|
|
86
|
+
let b = {
|
|
87
|
+
props: r,
|
|
88
|
+
emit: i,
|
|
89
|
+
open: a,
|
|
90
|
+
query: o,
|
|
91
|
+
rootRef: s,
|
|
92
|
+
panelRef: c,
|
|
93
|
+
inputRef: l,
|
|
94
|
+
triggerRect: u,
|
|
95
|
+
filtered: d,
|
|
96
|
+
dropdownStyle: f,
|
|
97
|
+
refreshRect: p,
|
|
98
|
+
bindPositionListeners: m,
|
|
99
|
+
unbindPositionListeners: h,
|
|
100
|
+
toggle: g,
|
|
101
|
+
select: v,
|
|
102
|
+
onDocumentClick: y,
|
|
103
|
+
AppIcon: _
|
|
104
|
+
};
|
|
105
|
+
return Object.defineProperty(b, "__isScriptSetup", {
|
|
106
|
+
enumerable: !1,
|
|
107
|
+
value: !0
|
|
108
|
+
}), b;
|
|
109
|
+
}
|
|
110
|
+
}), ie = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, ae = {
|
|
111
|
+
key: 0,
|
|
112
|
+
class: "text-red-400"
|
|
113
|
+
}, oe = {
|
|
114
|
+
ref: "rootRef",
|
|
115
|
+
class: "relative"
|
|
116
|
+
}, se = ["disabled"], ce = { class: "border-b border-gray-100 p-2" }, le = { class: "relative" }, ue = { class: "max-h-48 overflow-y-auto" }, de = {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "px-3 py-3 text-center text-xs text-gray-400"
|
|
119
|
+
}, fe = ["onClick"];
|
|
120
|
+
function pe(e, t, n, r, i, a) {
|
|
121
|
+
return V(), A("div", null, [j("label", ie, [M(G(n.label) + " ", 1), n.required ? (V(), A("span", ae, "*")) : k("", !0)]), j("div", oe, [j("button", {
|
|
122
|
+
type: "button",
|
|
123
|
+
disabled: n.disabled,
|
|
124
|
+
class: I(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
|
|
125
|
+
onClick: r.toggle
|
|
126
|
+
}, [j("span", { class: I(n.modelValue ? "text-gray-900" : "text-gray-400") }, G(n.modelValue || n.placeholder), 3), N(r.AppIcon, {
|
|
127
|
+
name: "chevron-down",
|
|
128
|
+
class: I(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
|
|
129
|
+
}, null, 8, ["class"])], 10, se), (V(), O(E, { to: "body" }, [r.open ? (V(), A("div", {
|
|
130
|
+
key: 0,
|
|
131
|
+
ref: "panelRef",
|
|
132
|
+
class: "fixed z-[100] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg",
|
|
133
|
+
style: L(r.dropdownStyle),
|
|
134
|
+
onMousedown: t[1] ||= Y(() => {}, ["stop"])
|
|
135
|
+
}, [j("div", ce, [j("div", le, [N(r.AppIcon, {
|
|
136
|
+
name: "search",
|
|
137
|
+
class: "absolute left-2.5 top-1/2 h-[13px] w-[13px] -translate-y-1/2 text-gray-400"
|
|
138
|
+
}), J(j("input", {
|
|
139
|
+
ref: "inputRef",
|
|
140
|
+
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
141
|
+
type: "text",
|
|
142
|
+
placeholder: "Пошук...",
|
|
143
|
+
class: "w-full rounded-lg border border-gray-200 py-1.5 pl-8 pr-3 text-xs outline-none focus:border-[#2663EB]"
|
|
144
|
+
}, null, 512), [[K, r.query]])])]), j("div", ue, [r.filtered.length === 0 ? (V(), A("p", de, "Нічого не знайдено")) : k("", !0), (V(!0), A(T, null, U(r.filtered, (e) => (V(), A("button", {
|
|
145
|
+
key: e,
|
|
146
|
+
type: "button",
|
|
147
|
+
class: I(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
|
|
148
|
+
onClick: (t) => r.select(e)
|
|
149
|
+
}, G(e), 11, fe))), 128))])], 36)) : k("", !0)]))], 512)]);
|
|
150
|
+
}
|
|
151
|
+
var me = /*#__PURE__*/ e(re, [["render", pe], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/FormSearchSelect.vue"]]), he = /*@__PURE__*/ P({
|
|
152
|
+
__name: "FormSuggestSelect",
|
|
153
|
+
props: {
|
|
154
|
+
label: {
|
|
155
|
+
type: String,
|
|
156
|
+
required: !0
|
|
157
|
+
},
|
|
158
|
+
modelValue: {
|
|
159
|
+
type: String,
|
|
160
|
+
required: !0
|
|
161
|
+
},
|
|
162
|
+
displayValue: {
|
|
163
|
+
type: String,
|
|
164
|
+
required: !0
|
|
165
|
+
},
|
|
166
|
+
required: {
|
|
167
|
+
type: Boolean,
|
|
168
|
+
required: !1,
|
|
169
|
+
default: !1
|
|
170
|
+
},
|
|
171
|
+
placeholder: {
|
|
172
|
+
type: String,
|
|
173
|
+
required: !1,
|
|
174
|
+
default: "Обрати"
|
|
175
|
+
},
|
|
176
|
+
disabled: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
required: !1,
|
|
179
|
+
default: !1
|
|
180
|
+
},
|
|
181
|
+
loading: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
required: !1,
|
|
184
|
+
default: !1
|
|
185
|
+
},
|
|
186
|
+
options: {
|
|
187
|
+
type: Array,
|
|
188
|
+
required: !0
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
emits: [
|
|
192
|
+
"update:modelValue",
|
|
193
|
+
"update:displayValue",
|
|
194
|
+
"search",
|
|
195
|
+
"select"
|
|
196
|
+
],
|
|
197
|
+
setup(e, { expose: t, emit: n }) {
|
|
198
|
+
t();
|
|
199
|
+
let r = e, i = n, a = H(!1), o = H(""), s = H(null), c = H(null), l = H(null), u = H(null), d = D(() => {
|
|
200
|
+
let e = o.value.trim().toLowerCase();
|
|
201
|
+
return e ? r.options.filter((t) => t.text.toLowerCase().includes(e)) : r.options;
|
|
202
|
+
}), f = D(() => u.value ? {
|
|
203
|
+
left: `${u.value.left}px`,
|
|
204
|
+
width: `${u.value.width}px`,
|
|
205
|
+
top: `${u.value.bottom + 4}px`
|
|
206
|
+
} : { visibility: "hidden" });
|
|
207
|
+
function p() {
|
|
208
|
+
u.value = s.value?.getBoundingClientRect() ?? null;
|
|
209
|
+
}
|
|
210
|
+
function m() {
|
|
211
|
+
window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
|
|
212
|
+
}
|
|
213
|
+
function h() {
|
|
214
|
+
window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
|
|
215
|
+
}
|
|
216
|
+
function g() {
|
|
217
|
+
r.disabled || (a.value = !a.value);
|
|
218
|
+
}
|
|
219
|
+
function v(e) {
|
|
220
|
+
i("update:modelValue", e.id), i("update:displayValue", e.text), i("select", e), a.value = !1;
|
|
221
|
+
}
|
|
222
|
+
function y(e) {
|
|
223
|
+
let t = e.target;
|
|
224
|
+
s.value?.contains(t) || c.value?.contains(t) || (a.value = !1);
|
|
225
|
+
}
|
|
226
|
+
let b;
|
|
227
|
+
q(o, (e) => {
|
|
228
|
+
a.value && (clearTimeout(b), b = setTimeout(() => i("search", e.trim()), 280));
|
|
229
|
+
}), q(a, async (e) => {
|
|
230
|
+
h(), e && (o.value = "", p(), m(), i("search", ""), await F(), l.value?.focus());
|
|
231
|
+
}), z(() => document.addEventListener("mousedown", y)), R(() => {
|
|
232
|
+
document.removeEventListener("mousedown", y), h(), clearTimeout(b);
|
|
233
|
+
});
|
|
234
|
+
let x = {
|
|
235
|
+
props: r,
|
|
236
|
+
emit: i,
|
|
237
|
+
open: a,
|
|
238
|
+
query: o,
|
|
239
|
+
rootRef: s,
|
|
240
|
+
panelRef: c,
|
|
241
|
+
inputRef: l,
|
|
242
|
+
triggerRect: u,
|
|
243
|
+
filtered: d,
|
|
244
|
+
dropdownStyle: f,
|
|
245
|
+
refreshRect: p,
|
|
246
|
+
bindPositionListeners: m,
|
|
247
|
+
unbindPositionListeners: h,
|
|
248
|
+
toggle: g,
|
|
249
|
+
select: v,
|
|
250
|
+
onDocumentClick: y,
|
|
251
|
+
get searchTimer() {
|
|
252
|
+
return b;
|
|
253
|
+
},
|
|
254
|
+
set searchTimer(e) {
|
|
255
|
+
b = e;
|
|
256
|
+
},
|
|
257
|
+
AppIcon: _
|
|
258
|
+
};
|
|
259
|
+
return Object.defineProperty(x, "__isScriptSetup", {
|
|
260
|
+
enumerable: !1,
|
|
261
|
+
value: !0
|
|
262
|
+
}), x;
|
|
263
|
+
}
|
|
264
|
+
}), ge = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, _e = {
|
|
265
|
+
key: 0,
|
|
266
|
+
class: "text-red-400"
|
|
267
|
+
}, ve = {
|
|
268
|
+
ref: "rootRef",
|
|
269
|
+
class: "relative"
|
|
270
|
+
}, ye = ["disabled"], be = { class: "border-b border-gray-100 p-2" }, xe = { class: "relative" }, Se = { class: "max-h-48 overflow-y-auto" }, Ce = {
|
|
271
|
+
key: 0,
|
|
272
|
+
class: "px-3 py-3 text-center text-xs text-gray-400"
|
|
273
|
+
}, we = {
|
|
274
|
+
key: 1,
|
|
275
|
+
class: "px-3 py-3 text-center text-xs text-gray-400"
|
|
276
|
+
}, Te = ["onClick"];
|
|
277
|
+
function Ee(e, t, n, r, i, a) {
|
|
278
|
+
return V(), A("div", null, [j("label", ge, [M(G(n.label) + " ", 1), n.required ? (V(), A("span", _e, "*")) : k("", !0)]), j("div", ve, [j("button", {
|
|
279
|
+
type: "button",
|
|
280
|
+
disabled: n.disabled,
|
|
281
|
+
class: I(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
|
|
282
|
+
onClick: r.toggle
|
|
283
|
+
}, [j("span", { class: I(n.displayValue ? "text-gray-900" : "text-gray-400") }, G(n.displayValue || n.placeholder), 3), N(r.AppIcon, {
|
|
284
|
+
name: "chevron-down",
|
|
285
|
+
class: I(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
|
|
286
|
+
}, null, 8, ["class"])], 10, ye), (V(), O(E, { to: "body" }, [r.open ? (V(), A("div", {
|
|
287
|
+
key: 0,
|
|
288
|
+
ref: "panelRef",
|
|
289
|
+
class: "fixed z-[100] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg",
|
|
290
|
+
style: L(r.dropdownStyle),
|
|
291
|
+
onMousedown: t[1] ||= Y(() => {}, ["stop"])
|
|
292
|
+
}, [j("div", be, [j("div", xe, [N(r.AppIcon, {
|
|
293
|
+
name: "search",
|
|
294
|
+
class: "absolute left-2.5 top-1/2 h-[13px] w-[13px] -translate-y-1/2 text-gray-400"
|
|
295
|
+
}), J(j("input", {
|
|
296
|
+
ref: "inputRef",
|
|
297
|
+
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
298
|
+
type: "text",
|
|
299
|
+
placeholder: "Пошук...",
|
|
300
|
+
class: "w-full rounded-lg border border-gray-200 py-1.5 pl-8 pr-3 text-xs outline-none focus:border-[#2663EB]"
|
|
301
|
+
}, null, 512), [[K, r.query]])])]), j("div", Se, [n.loading && r.filtered.length === 0 ? (V(), A("p", Ce, "Завантаження…")) : r.filtered.length === 0 ? (V(), A("p", we, "Нічого не знайдено")) : k("", !0), (V(!0), A(T, null, U(r.filtered, (e) => (V(), A("button", {
|
|
302
|
+
key: e.id,
|
|
303
|
+
type: "button",
|
|
304
|
+
class: I(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e.id ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
|
|
305
|
+
onClick: (t) => r.select(e)
|
|
306
|
+
}, G(e.text), 11, Te))), 128))])], 36)) : k("", !0)]))], 512)]);
|
|
307
|
+
}
|
|
308
|
+
var De = /*#__PURE__*/ e(he, [["render", Ee], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/FormSuggestSelect.vue"]]), X = "draft-polygon", Z = "draft-polygon-fill", Oe = "draft-polygon-line", Q = "draft-vertices", ke = "draft-vertices-layer", $ = 17, Ae = /*@__PURE__*/ P({
|
|
309
|
+
__name: "ApplicationCreateMap",
|
|
310
|
+
props: {
|
|
311
|
+
points: {
|
|
312
|
+
type: Array,
|
|
313
|
+
required: !0
|
|
314
|
+
},
|
|
315
|
+
addressPoint: {
|
|
316
|
+
type: [Array, null],
|
|
317
|
+
required: !1
|
|
318
|
+
},
|
|
319
|
+
geometry: {
|
|
320
|
+
type: [Object, null],
|
|
321
|
+
required: !1
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
emits: ["update:points", "import"],
|
|
325
|
+
setup(e, { expose: m, emit: g }) {
|
|
326
|
+
m();
|
|
327
|
+
let _ = e, v = g, y = H(null), b = W(null), x = W(null), S = H(""), C = null, w = H(n), T = H([]), E = H(t), D = H([]);
|
|
328
|
+
function O(e) {
|
|
329
|
+
return w.value.find((t) => t.id === e) ?? w.value[0] ?? n[0];
|
|
330
|
+
}
|
|
331
|
+
async function k() {
|
|
332
|
+
let e = await u("application-form");
|
|
333
|
+
w.value = e.baseLayers, E.value = e.defaultBaseId, T.value = e.overlays.filter((e) => e.kind !== "applications"), D.value = T.value.filter((e) => e.defaultVisible).map((e) => e.id);
|
|
334
|
+
}
|
|
335
|
+
function A(e) {
|
|
336
|
+
let t = D.value;
|
|
337
|
+
D.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
338
|
+
}
|
|
339
|
+
function j() {
|
|
340
|
+
let e = _.geometry;
|
|
341
|
+
if (e) return {
|
|
342
|
+
type: "FeatureCollection",
|
|
343
|
+
features: [{
|
|
344
|
+
type: "Feature",
|
|
345
|
+
geometry: e,
|
|
346
|
+
properties: {}
|
|
347
|
+
}]
|
|
348
|
+
};
|
|
349
|
+
let t = _.points.map(([e, t]) => [e, t]), n = [];
|
|
350
|
+
return t.length >= 2 && n.push({
|
|
351
|
+
type: "Feature",
|
|
352
|
+
geometry: {
|
|
353
|
+
type: "LineString",
|
|
354
|
+
coordinates: t
|
|
355
|
+
},
|
|
356
|
+
properties: {}
|
|
357
|
+
}), t.length >= 3 && n.push({
|
|
358
|
+
type: "Feature",
|
|
359
|
+
geometry: {
|
|
360
|
+
type: "Polygon",
|
|
361
|
+
coordinates: [[...t, t[0]]]
|
|
362
|
+
},
|
|
363
|
+
properties: {}
|
|
364
|
+
}), {
|
|
365
|
+
type: "FeatureCollection",
|
|
366
|
+
features: n
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
function M() {
|
|
370
|
+
return {
|
|
371
|
+
type: "FeatureCollection",
|
|
372
|
+
features: (_.geometry ? [] : _.points).map(([e, t]) => ({
|
|
373
|
+
type: "Feature",
|
|
374
|
+
geometry: {
|
|
375
|
+
type: "Point",
|
|
376
|
+
coordinates: [e, t]
|
|
377
|
+
},
|
|
378
|
+
properties: {}
|
|
379
|
+
}))
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
function N(e) {
|
|
383
|
+
e.getSource(X)?.setData(j()), e.getSource(Q)?.setData(M());
|
|
384
|
+
}
|
|
385
|
+
function P(e) {
|
|
386
|
+
e.getSource(X) || (e.addSource(X, {
|
|
387
|
+
type: "geojson",
|
|
388
|
+
data: j()
|
|
389
|
+
}), e.addLayer({
|
|
390
|
+
id: Z,
|
|
391
|
+
type: "fill",
|
|
392
|
+
source: X,
|
|
393
|
+
filter: [
|
|
394
|
+
"==",
|
|
395
|
+
["geometry-type"],
|
|
396
|
+
"Polygon"
|
|
397
|
+
],
|
|
398
|
+
paint: {
|
|
399
|
+
"fill-color": "#2663EB",
|
|
400
|
+
"fill-opacity": .2
|
|
401
|
+
}
|
|
402
|
+
}), e.addLayer({
|
|
403
|
+
id: Oe,
|
|
404
|
+
type: "line",
|
|
405
|
+
source: X,
|
|
406
|
+
paint: {
|
|
407
|
+
"line-color": "#2663EB",
|
|
408
|
+
"line-width": 2
|
|
409
|
+
}
|
|
410
|
+
})), e.getSource(Q) || (e.addSource(Q, {
|
|
411
|
+
type: "geojson",
|
|
412
|
+
data: M()
|
|
413
|
+
}), e.addLayer({
|
|
414
|
+
id: ke,
|
|
415
|
+
type: "circle",
|
|
416
|
+
source: Q,
|
|
417
|
+
paint: {
|
|
418
|
+
"circle-radius": 5,
|
|
419
|
+
"circle-color": "#ffffff",
|
|
420
|
+
"circle-stroke-color": "#2663EB",
|
|
421
|
+
"circle-stroke-width": 2
|
|
422
|
+
}
|
|
423
|
+
})), N(e);
|
|
424
|
+
}
|
|
425
|
+
function F(e) {
|
|
426
|
+
let t = [e.lngLat.lng, e.lngLat.lat];
|
|
427
|
+
v("update:points", _.geometry ? [t] : [..._.points, t]);
|
|
428
|
+
}
|
|
429
|
+
function I(e) {
|
|
430
|
+
let t = document.createElement("div");
|
|
431
|
+
t.className = "maplibregl-ctrl maplibregl-ctrl-group";
|
|
432
|
+
let n = document.createElement("button");
|
|
433
|
+
return n.type = "button", n.title = "Імпортувати геометрію", n.setAttribute("aria-label", "Імпортувати геометрію"), n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "center", n.style.color = "#334155", n.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 3v12\"/><path d=\"m17 8-5-5-5 5\"/><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/></svg>", n.addEventListener("click", (t) => {
|
|
434
|
+
t.preventDefault(), t.stopPropagation(), e();
|
|
435
|
+
}), t.appendChild(n), {
|
|
436
|
+
onAdd() {
|
|
437
|
+
return t;
|
|
438
|
+
},
|
|
439
|
+
onRemove() {
|
|
440
|
+
t.remove();
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function L(e) {
|
|
445
|
+
let t = f(_.geometry);
|
|
446
|
+
if (!t) return !1;
|
|
447
|
+
let [[n, r], [i, a]] = p(t);
|
|
448
|
+
if (![
|
|
449
|
+
n,
|
|
450
|
+
r,
|
|
451
|
+
i,
|
|
452
|
+
a
|
|
453
|
+
].every(Number.isFinite)) return !1;
|
|
454
|
+
e.resize();
|
|
455
|
+
let o = e.getCanvas();
|
|
456
|
+
if (o.clientWidth < 2 || o.clientHeight < 2) return !1;
|
|
457
|
+
let s = [Math.min(n, i), Math.min(r, a)], c = [Math.max(n, i), Math.max(r, a)];
|
|
458
|
+
return c[0] - s[0] < 1e-8 && c[1] - s[1] < 1e-8 ? (e.flyTo({
|
|
459
|
+
center: s,
|
|
460
|
+
zoom: $,
|
|
461
|
+
essential: !0,
|
|
462
|
+
duration: 600
|
|
463
|
+
}), !0) : (e.fitBounds([s, c], {
|
|
464
|
+
padding: 48,
|
|
465
|
+
duration: 600,
|
|
466
|
+
maxZoom: $,
|
|
467
|
+
essential: !0
|
|
468
|
+
}), !0);
|
|
469
|
+
}
|
|
470
|
+
function R(e) {
|
|
471
|
+
if (!G && b.value === e && _.geometry) {
|
|
472
|
+
if (!e.getSource(X)) {
|
|
473
|
+
e.once("load", () => R(e));
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
N(e), L(e) || requestAnimationFrame(() => L(e));
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
function V() {
|
|
480
|
+
let e = document.createElement("div");
|
|
481
|
+
return e.setAttribute("aria-hidden", "true"), e.style.width = "28px", e.style.height = "36px", e.style.pointerEvents = "none", e.innerHTML = "<svg width=\"28\" height=\"36\" viewBox=\"0 0 28 36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14 0C6.27 0 0 6.27 0 14c0 10.5 14 22 14 22s14-11.5 14-22C28 6.27 21.73 0 14 0z\" fill=\"#EF4444\"/><circle cx=\"14\" cy=\"14\" r=\"5\" fill=\"#fff\"/></svg>", e;
|
|
482
|
+
}
|
|
483
|
+
function U(e) {
|
|
484
|
+
let t = _.addressPoint;
|
|
485
|
+
if (!t || !C) {
|
|
486
|
+
x.value?.remove(), x.value = null;
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
x.value ? x.value.setLngLat(t) : x.value = new C.Marker({
|
|
490
|
+
element: V(),
|
|
491
|
+
anchor: "bottom"
|
|
492
|
+
}).setLngLat(t).addTo(e), e.flyTo({
|
|
493
|
+
center: t,
|
|
494
|
+
zoom: Math.max(e.getZoom(), $),
|
|
495
|
+
essential: !0
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
let G = !1;
|
|
499
|
+
z(async () => {
|
|
500
|
+
let e;
|
|
501
|
+
try {
|
|
502
|
+
let [t] = await Promise.all([a(), k()]);
|
|
503
|
+
e = t;
|
|
504
|
+
} catch (e) {
|
|
505
|
+
console.error(e), S.value = s;
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
if (G || !y.value) return;
|
|
509
|
+
C = e;
|
|
510
|
+
let t = new e.Map({
|
|
511
|
+
container: y.value,
|
|
512
|
+
style: r(O(E.value)),
|
|
513
|
+
center: [24.0297, 49.8397],
|
|
514
|
+
zoom: 13,
|
|
515
|
+
attributionControl: !1,
|
|
516
|
+
locale: d
|
|
517
|
+
});
|
|
518
|
+
t.addControl(new e.NavigationControl({ showCompass: !1 }), "top-left"), t.addControl(I(() => v("import")), "top-left"), t.on("load", () => {
|
|
519
|
+
P(t), l(t, T.value, D.value, Z), U(t);
|
|
520
|
+
}), t.on("click", (e) => F(e)), b.value = t;
|
|
521
|
+
}), B(() => {
|
|
522
|
+
G = !0, x.value?.remove(), x.value = null, b.value?.remove(), b.value = null;
|
|
523
|
+
}), q(() => [_.points, _.geometry], () => {
|
|
524
|
+
let e = b.value;
|
|
525
|
+
e?.getSource(X) && N(e);
|
|
526
|
+
}, { deep: !0 }), q(() => _.geometry, () => {
|
|
527
|
+
let e = b.value;
|
|
528
|
+
e && _.geometry && R(e);
|
|
529
|
+
}, { flush: "post" }), q(E, () => {
|
|
530
|
+
let e = b.value;
|
|
531
|
+
if (!e) return;
|
|
532
|
+
let t = () => i(e, O(E.value), o(e, T.value, [Z]));
|
|
533
|
+
e.isStyleLoaded() ? t() : e.once("load", t);
|
|
534
|
+
}), q(D, () => {
|
|
535
|
+
let e = b.value;
|
|
536
|
+
e?.isStyleLoaded() && c(e, T.value, D.value);
|
|
537
|
+
}), q(() => _.addressPoint, () => {
|
|
538
|
+
let e = b.value;
|
|
539
|
+
e?.isStyleLoaded() && U(e);
|
|
540
|
+
});
|
|
541
|
+
let K = {
|
|
542
|
+
props: _,
|
|
543
|
+
emit: v,
|
|
544
|
+
DRAFT_SOURCE: X,
|
|
545
|
+
DRAFT_FILL: Z,
|
|
546
|
+
DRAFT_LINE: Oe,
|
|
547
|
+
VERTEX_SOURCE: Q,
|
|
548
|
+
VERTEX_LAYER: ke,
|
|
549
|
+
ADDRESS_ZOOM: $,
|
|
550
|
+
mapHost: y,
|
|
551
|
+
mapRef: b,
|
|
552
|
+
addressMarker: x,
|
|
553
|
+
mapLoadError: S,
|
|
554
|
+
get maplibre() {
|
|
555
|
+
return C;
|
|
556
|
+
},
|
|
557
|
+
set maplibre(e) {
|
|
558
|
+
C = e;
|
|
559
|
+
},
|
|
560
|
+
baseLayers: w,
|
|
561
|
+
overlayLayers: T,
|
|
562
|
+
activeBaseId: E,
|
|
563
|
+
activeOverlayIds: D,
|
|
564
|
+
baseLayer: O,
|
|
565
|
+
loadLayerSettings: k,
|
|
566
|
+
toggleOverlay: A,
|
|
567
|
+
draftGeoJson: j,
|
|
568
|
+
verticesGeoJson: M,
|
|
569
|
+
refreshSources: N,
|
|
570
|
+
ensureLayers: P,
|
|
571
|
+
onMapClick: F,
|
|
572
|
+
importGeometryControl: I,
|
|
573
|
+
focusImportedGeometry: L,
|
|
574
|
+
showImportedGeometry: R,
|
|
575
|
+
addressMarkerElement: V,
|
|
576
|
+
syncAddressPoint: U,
|
|
577
|
+
get disposed() {
|
|
578
|
+
return G;
|
|
579
|
+
},
|
|
580
|
+
set disposed(e) {
|
|
581
|
+
G = e;
|
|
582
|
+
},
|
|
583
|
+
MapLayerMenu: h
|
|
584
|
+
};
|
|
585
|
+
return Object.defineProperty(K, "__isScriptSetup", {
|
|
586
|
+
enumerable: !1,
|
|
587
|
+
value: !0
|
|
588
|
+
}), K;
|
|
589
|
+
}
|
|
590
|
+
}), je = { class: "relative h-full w-full overflow-hidden rounded-xl" }, Me = {
|
|
591
|
+
ref: "mapHost",
|
|
592
|
+
class: "h-full w-full"
|
|
593
|
+
}, Ne = {
|
|
594
|
+
key: 1,
|
|
595
|
+
class: "absolute inset-0 z-[20] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
596
|
+
}, Pe = { class: "absolute bottom-3 left-3 z-[10] max-w-[calc(100%-1.5rem)] rounded-lg border border-gray-100 bg-white/90 px-2.5 py-1.5 text-xs text-gray-500 shadow backdrop-blur-sm" };
|
|
597
|
+
function Fe(e, t, n, r, i, a) {
|
|
598
|
+
return V(), A("div", je, [
|
|
599
|
+
j("div", Me, null, 512),
|
|
600
|
+
r.mapLoadError ? k("", !0) : (V(), O(r.MapLayerMenu, {
|
|
601
|
+
key: 0,
|
|
602
|
+
placement: "end",
|
|
603
|
+
"base-id": r.activeBaseId,
|
|
604
|
+
"active-overlay-ids": r.activeOverlayIds,
|
|
605
|
+
"base-layers": r.baseLayers,
|
|
606
|
+
overlays: r.overlayLayers,
|
|
607
|
+
onSelectBase: t[0] ||= (e) => r.activeBaseId = e,
|
|
608
|
+
onToggleOverlay: r.toggleOverlay
|
|
609
|
+
}, null, 8, [
|
|
610
|
+
"base-id",
|
|
611
|
+
"active-overlay-ids",
|
|
612
|
+
"base-layers",
|
|
613
|
+
"overlays"
|
|
614
|
+
])),
|
|
615
|
+
r.mapLoadError ? (V(), A("p", Ne, G(r.mapLoadError), 1)) : k("", !0),
|
|
616
|
+
j("div", Pe, G(n.geometry ? "Геометрію імпортовано. Клікніть на карті, щоб намалювати контур наново" : "Клікніть на карті, щоб окреслити контур (мінімум 3 точки)"), 1)
|
|
617
|
+
]);
|
|
618
|
+
}
|
|
619
|
+
var Ie = /*#__PURE__*/ e(Ae, [["render", Fe], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/ApplicationCreateMap.vue"]]), Le = /*@__PURE__*/ P({
|
|
620
|
+
__name: "GeometryImportDialog",
|
|
621
|
+
emits: ["close", "imported"],
|
|
622
|
+
setup(e, { expose: t, emit: n }) {
|
|
623
|
+
t();
|
|
624
|
+
let r = n, i = H(null), a = H(!1), o = H("");
|
|
625
|
+
function s(e) {
|
|
626
|
+
i.value = e, o.value = "";
|
|
627
|
+
}
|
|
628
|
+
async function c() {
|
|
629
|
+
if (i.value && !a.value) {
|
|
630
|
+
o.value = "", a.value = !0;
|
|
631
|
+
try {
|
|
632
|
+
let e = await S(i.value);
|
|
633
|
+
r("imported", e);
|
|
634
|
+
} catch (e) {
|
|
635
|
+
o.value = e instanceof Error ? e.message : "Не вдалося імпортувати геометрію";
|
|
636
|
+
} finally {
|
|
637
|
+
a.value = !1;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
let l = {
|
|
642
|
+
emit: r,
|
|
643
|
+
file: i,
|
|
644
|
+
importing: a,
|
|
645
|
+
error: o,
|
|
646
|
+
onFileChange: s,
|
|
647
|
+
submit: c,
|
|
648
|
+
AppIcon: _,
|
|
649
|
+
FormFilePicker: y
|
|
650
|
+
};
|
|
651
|
+
return Object.defineProperty(l, "__isScriptSetup", {
|
|
652
|
+
enumerable: !1,
|
|
653
|
+
value: !0
|
|
654
|
+
}), l;
|
|
655
|
+
}
|
|
656
|
+
}), Re = {
|
|
657
|
+
class: "w-full max-w-md overflow-hidden rounded-2xl bg-white shadow-2xl",
|
|
658
|
+
role: "dialog",
|
|
659
|
+
"aria-labelledby": "geometry-import-title"
|
|
660
|
+
}, ze = { class: "flex items-center justify-between border-b border-gray-100 px-6 py-5" }, Be = { class: "flex items-center gap-3" }, Ve = { class: "flex h-9 w-9 items-center justify-center rounded-xl bg-[#EFF4FE]" }, He = {
|
|
661
|
+
key: 0,
|
|
662
|
+
class: "rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700"
|
|
663
|
+
}, Ue = { class: "flex items-center justify-end gap-2" }, We = ["disabled"];
|
|
664
|
+
function Ge(e, t, n, r, i, a) {
|
|
665
|
+
return V(), O(E, { to: "body" }, [j("div", {
|
|
666
|
+
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm",
|
|
667
|
+
onMousedown: t[2] ||= Y((e) => r.emit("close"), ["self"])
|
|
668
|
+
}, [j("div", Re, [j("div", ze, [j("div", Be, [j("div", Ve, [N(r.AppIcon, {
|
|
669
|
+
name: "upload",
|
|
670
|
+
class: "h-[17px] w-[17px] text-[#2663EB]"
|
|
671
|
+
})]), t[3] ||= j("div", null, [j("h2", {
|
|
672
|
+
id: "geometry-import-title",
|
|
673
|
+
class: "text-base font-semibold text-gray-900"
|
|
674
|
+
}, "Імпорт геометрії"), j("p", { class: "mt-0.5 text-xs text-gray-500" }, "ZIP (Shapefile) або GeoJSON")], -1)]), j("button", {
|
|
675
|
+
type: "button",
|
|
676
|
+
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
|
|
677
|
+
"aria-label": "Закрити",
|
|
678
|
+
onClick: t[0] ||= (e) => r.emit("close")
|
|
679
|
+
}, [N(r.AppIcon, {
|
|
680
|
+
name: "x",
|
|
681
|
+
class: "h-[17px] w-[17px]"
|
|
682
|
+
})])]), j("form", {
|
|
683
|
+
class: "space-y-4 px-6 py-5",
|
|
684
|
+
onSubmit: Y(r.submit, ["prevent"])
|
|
685
|
+
}, [
|
|
686
|
+
N(r.FormFilePicker, {
|
|
687
|
+
"file-name": r.file?.name,
|
|
688
|
+
accept: ".zip,.geojson,.json,application/geo+json,application/zip",
|
|
689
|
+
"button-label": "Завантажити файл",
|
|
690
|
+
onChange: r.onFileChange
|
|
691
|
+
}, null, 8, ["file-name"]),
|
|
692
|
+
r.error ? (V(), A("p", He, G(r.error), 1)) : k("", !0),
|
|
693
|
+
j("div", Ue, [j("button", {
|
|
694
|
+
type: "button",
|
|
695
|
+
class: "rounded-xl bg-gray-100 px-4 py-2.5 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",
|
|
696
|
+
onClick: t[1] ||= (e) => r.emit("close")
|
|
697
|
+
}, " Скасувати "), j("button", {
|
|
698
|
+
type: "submit",
|
|
699
|
+
class: "rounded-xl bg-[#2663EB] px-4 py-2.5 text-sm font-medium text-white transition-all hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40",
|
|
700
|
+
disabled: !r.file || r.importing
|
|
701
|
+
}, G(r.importing ? "Імпортування…" : "Імпортувати"), 9, We)])
|
|
702
|
+
], 32)])], 32)]);
|
|
703
|
+
}
|
|
704
|
+
var Ke = /*#__PURE__*/ e(Le, [["render", Ge], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/GeometryImportDialog.vue"]]), qe = "public_applications", Je = qe;
|
|
705
|
+
async function Ye(e, t, n) {
|
|
706
|
+
let r = new URLSearchParams();
|
|
707
|
+
if (r.set("limit", String(n?.limit ?? 20)), n?.search && r.set("search", n.search), n?.filter) for (let [e, t] of Object.entries(n.filter)) r.set(`filter[${e}]`, String(t));
|
|
708
|
+
let i = await fetch(v(`/api/suggest/${encodeURIComponent(e)}/${encodeURIComponent(t)}?${r}`), { credentials: "include" });
|
|
709
|
+
if (!i.ok) throw Error(g(await i.text(), i.status));
|
|
710
|
+
return (await i.json()).data ?? [];
|
|
711
|
+
}
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region cabinet/src/pages/requests/create.vue?vue&type=script&setup=true&lang.ts
|
|
714
|
+
var Xe = /*@__PURE__*/ P({
|
|
715
|
+
__name: "create",
|
|
716
|
+
setup(e, { expose: t }) {
|
|
717
|
+
t();
|
|
718
|
+
let n = ne(), r = H(""), i = H(""), a = H(""), o = H(""), s = H([]), c = H([]), l = H(!1), u = H(!1), d = H(!1), f = H(""), p = H(""), h = H(""), g = H(""), v = H(""), y = H(""), S = H([]), T = H(null), E = H(!1), O = H(null), k = H(!1), A = H(""), j = D(() => C.value.find((e) => e.id === w.value)?.name ?? ""), M = m.items.map((e) => e.name);
|
|
719
|
+
q(r, () => {
|
|
720
|
+
a.value = "", o.value = "", c.value = [], O.value = null;
|
|
721
|
+
}), q(h, (e) => {
|
|
722
|
+
p.value = m.items.find((t) => t.name === e)?.code ?? "";
|
|
723
|
+
}), q(S, (e) => {
|
|
724
|
+
e.length > 0 && (T.value = null);
|
|
725
|
+
});
|
|
726
|
+
let N = D(() => {
|
|
727
|
+
let e = !!r.value, t = d.value ? f.value.trim().length > 0 : !!a.value, n = !!T.value || S.value.length >= 3;
|
|
728
|
+
return !!(p.value && e && t && n);
|
|
729
|
+
});
|
|
730
|
+
function P(e) {
|
|
731
|
+
T.value = e, S.value = [], E.value = !1;
|
|
732
|
+
}
|
|
733
|
+
async function F(e) {
|
|
734
|
+
l.value = !0;
|
|
735
|
+
try {
|
|
736
|
+
s.value = await Ye(qe, "settlement_id", {
|
|
737
|
+
search: e,
|
|
738
|
+
filter: { level: 5 }
|
|
739
|
+
});
|
|
740
|
+
} catch {
|
|
741
|
+
s.value = [];
|
|
742
|
+
} finally {
|
|
743
|
+
l.value = !1;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
async function I(e) {
|
|
747
|
+
if (!r.value) {
|
|
748
|
+
c.value = [];
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
u.value = !0;
|
|
752
|
+
try {
|
|
753
|
+
c.value = await Ye(Je, "address_id", {
|
|
754
|
+
search: e,
|
|
755
|
+
filter: { settlement_id: r.value }
|
|
756
|
+
});
|
|
757
|
+
} catch {
|
|
758
|
+
c.value = [];
|
|
759
|
+
} finally {
|
|
760
|
+
u.value = !1;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function L(e) {
|
|
764
|
+
if (!e) return null;
|
|
765
|
+
let t = e.coordinates, n = e.type === "Point" ? t : e.type === "MultiPoint" && Array.isArray(t) ? t[0] : null;
|
|
766
|
+
if (!Array.isArray(n) || n.length < 2) return null;
|
|
767
|
+
let r = Number(n[0]), i = Number(n[1]);
|
|
768
|
+
return !Number.isFinite(r) || !Number.isFinite(i) ? null : [r, i];
|
|
769
|
+
}
|
|
770
|
+
function R(e) {
|
|
771
|
+
O.value = L(e.geom);
|
|
772
|
+
}
|
|
773
|
+
function z() {
|
|
774
|
+
d.value = !d.value, a.value = "", o.value = "", c.value = [], f.value = "", O.value = null;
|
|
775
|
+
}
|
|
776
|
+
async function B() {
|
|
777
|
+
if (A.value = "", !w.value) {
|
|
778
|
+
A.value = "Оберіть організацію в шапці кабінету";
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
if (!N.value) {
|
|
782
|
+
A.value = "Заповніть обовʼязкові поля та окресліть територію на карті або імпортуйте геометрію";
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
let e = T.value ?? x(S.value);
|
|
786
|
+
if (!e) {
|
|
787
|
+
A.value = "Некоректний контур території";
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
let t = [g.value.trim(), y.value.trim() ? `Примітки: ${y.value.trim()}` : ""].filter(Boolean).join("\n\n");
|
|
791
|
+
k.value = !0;
|
|
792
|
+
try {
|
|
793
|
+
let i = await b({
|
|
794
|
+
organization_id: w.value,
|
|
795
|
+
work_type: p.value,
|
|
796
|
+
settlement_id: r.value,
|
|
797
|
+
is_found_address_id: !d.value,
|
|
798
|
+
...d.value ? { location: f.value.trim() } : { address_id: a.value },
|
|
799
|
+
description: t || void 0,
|
|
800
|
+
execution_basis: v.value.trim() || void 0,
|
|
801
|
+
geom: e
|
|
802
|
+
});
|
|
803
|
+
await n.push({
|
|
804
|
+
name: "requests",
|
|
805
|
+
query: {
|
|
806
|
+
submitted: i.number,
|
|
807
|
+
status: i.status
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
} catch (e) {
|
|
811
|
+
A.value = e instanceof Error ? e.message : "Не вдалося відправити звернення";
|
|
812
|
+
} finally {
|
|
813
|
+
k.value = !1;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
let V = {
|
|
817
|
+
router: n,
|
|
818
|
+
settlementId: r,
|
|
819
|
+
settlementLabel: i,
|
|
820
|
+
addressId: a,
|
|
821
|
+
addressLabel: o,
|
|
822
|
+
settlementOptions: s,
|
|
823
|
+
addressOptions: c,
|
|
824
|
+
settlementLoading: l,
|
|
825
|
+
addressLoading: u,
|
|
826
|
+
manualAddress: d,
|
|
827
|
+
manualValue: f,
|
|
828
|
+
workTypeCode: p,
|
|
829
|
+
workTypeLabel: h,
|
|
830
|
+
description: g,
|
|
831
|
+
basis: v,
|
|
832
|
+
notes: y,
|
|
833
|
+
mapPoints: S,
|
|
834
|
+
importedGeom: T,
|
|
835
|
+
importOpen: E,
|
|
836
|
+
addressPoint: O,
|
|
837
|
+
submitting: k,
|
|
838
|
+
error: A,
|
|
839
|
+
orgName: j,
|
|
840
|
+
workTypeOptions: M,
|
|
841
|
+
canSubmit: N,
|
|
842
|
+
onGeometryImported: P,
|
|
843
|
+
loadSettlements: F,
|
|
844
|
+
loadAddresses: I,
|
|
845
|
+
pointFromGeom: L,
|
|
846
|
+
onAddressSelect: R,
|
|
847
|
+
toggleManualAddress: z,
|
|
848
|
+
submit: B,
|
|
849
|
+
get RouterLink() {
|
|
850
|
+
return te;
|
|
851
|
+
},
|
|
852
|
+
AppIcon: _,
|
|
853
|
+
FormSearchSelect: me,
|
|
854
|
+
FormSuggestSelect: De,
|
|
855
|
+
ApplicationCreateMap: Ie,
|
|
856
|
+
GeometryImportDialog: Ke
|
|
857
|
+
};
|
|
858
|
+
return Object.defineProperty(V, "__isScriptSetup", {
|
|
859
|
+
enumerable: !1,
|
|
860
|
+
value: !0
|
|
861
|
+
}), V;
|
|
862
|
+
}
|
|
863
|
+
}), Ze = { class: "min-h-[calc(100vh-3.5rem)] bg-gray-50" }, Qe = { class: "border-b border-gray-200 bg-white py-4" }, $e = { class: "mx-auto max-w-[1400px] px-6" }, et = { class: "mb-3 flex items-center gap-1.5 text-xs text-gray-400" }, tt = { class: "flex items-start justify-between gap-4" }, nt = {
|
|
864
|
+
key: 0,
|
|
865
|
+
class: "flex shrink-0 items-center gap-2 rounded-lg border border-[#2663EB]/20 bg-[#EFF4FE] px-3 py-1.5"
|
|
866
|
+
}, rt = { class: "max-w-[200px] truncate text-xs font-medium text-[#2663EB]" }, it = { class: "grid grid-cols-1 gap-5 xl:grid-cols-[1fr_480px]" }, at = { class: "space-y-4" }, ot = { class: "relative z-20 rounded-2xl border border-gray-200 bg-white" }, st = { class: "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, ct = { class: "space-y-4 p-5" }, lt = { class: "block text-xs font-medium text-gray-700" }, ut = ["value"], dt = { class: "flex min-w-0 items-center gap-3" }, ft = { class: "min-w-0" }, pt = { key: 0 }, mt = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, ht = { class: "space-y-4 p-5" }, gt = { class: "space-y-4" }, _t = { class: "overflow-hidden rounded-2xl border border-gray-200 bg-white" }, vt = { class: "flex items-center gap-2 border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, yt = { class: "h-[420px]" }, bt = { class: "rounded-2xl border border-gray-200 bg-white p-5" }, xt = { class: "mb-4 flex items-center gap-2 text-xs text-gray-400" }, St = {
|
|
867
|
+
key: 0,
|
|
868
|
+
class: "mb-3 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700"
|
|
869
|
+
}, Ct = { class: "flex items-center gap-3" }, wt = ["disabled"];
|
|
870
|
+
function Tt(e, t, n, r, i, a) {
|
|
871
|
+
return V(), A("div", Ze, [
|
|
872
|
+
j("div", Qe, [j("div", $e, [j("nav", et, [
|
|
873
|
+
N(r.RouterLink, {
|
|
874
|
+
to: "/requests",
|
|
875
|
+
class: "flex items-center gap-1 transition-colors hover:text-gray-700"
|
|
876
|
+
}, {
|
|
877
|
+
default: ee(() => [N(r.AppIcon, {
|
|
878
|
+
name: "home",
|
|
879
|
+
class: "h-3 w-3"
|
|
880
|
+
}), t[12] ||= j("span", null, "Звернення", -1)]),
|
|
881
|
+
_: 1
|
|
882
|
+
}),
|
|
883
|
+
N(r.AppIcon, {
|
|
884
|
+
name: "chevron-right",
|
|
885
|
+
class: "h-3 w-3"
|
|
886
|
+
}),
|
|
887
|
+
t[13] ||= j("span", { class: "font-medium text-gray-700" }, "Нове звернення", -1)
|
|
888
|
+
]), j("div", tt, [t[14] ||= j("div", null, [j("h1", { class: "text-lg font-semibold text-gray-900" }, "Нове звернення"), j("p", { class: "mt-0.5 text-sm text-gray-500" }, "Заповніть дані для створення заявки")], -1), r.orgName ? (V(), A("div", nt, [N(r.AppIcon, {
|
|
889
|
+
name: "building-2",
|
|
890
|
+
class: "h-3.5 w-3.5 text-[#2663EB]"
|
|
891
|
+
}), j("span", rt, G(r.orgName), 1)])) : k("", !0)])])]),
|
|
892
|
+
j("form", {
|
|
893
|
+
class: "mx-auto max-w-[1400px] px-6 py-5",
|
|
894
|
+
onSubmit: Y(r.submit, ["prevent"])
|
|
895
|
+
}, [j("div", it, [j("div", at, [j("div", ot, [j("div", st, [N(r.AppIcon, {
|
|
896
|
+
name: "map-pin",
|
|
897
|
+
class: "h-3.5 w-3.5 text-gray-400"
|
|
898
|
+
}), t[15] ||= j("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Адреса об'єкта", -1)]), j("div", ct, [
|
|
899
|
+
N(r.FormSuggestSelect, {
|
|
900
|
+
modelValue: r.settlementId,
|
|
901
|
+
"onUpdate:modelValue": t[0] ||= (e) => r.settlementId = e,
|
|
902
|
+
"display-value": r.settlementLabel,
|
|
903
|
+
"onUpdate:displayValue": t[1] ||= (e) => r.settlementLabel = e,
|
|
904
|
+
label: "Населений пункт",
|
|
905
|
+
required: "",
|
|
906
|
+
options: r.settlementOptions,
|
|
907
|
+
loading: r.settlementLoading,
|
|
908
|
+
placeholder: "Обрати",
|
|
909
|
+
onSearch: r.loadSettlements
|
|
910
|
+
}, null, 8, [
|
|
911
|
+
"modelValue",
|
|
912
|
+
"display-value",
|
|
913
|
+
"options",
|
|
914
|
+
"loading"
|
|
915
|
+
]),
|
|
916
|
+
j("label", lt, [
|
|
917
|
+
t[16] ||= M(" Код населеного пункту (КАТОТТГ) ", -1),
|
|
918
|
+
t[17] ||= j("span", { class: "text-red-400" }, "*", -1),
|
|
919
|
+
j("input", {
|
|
920
|
+
value: r.settlementId,
|
|
921
|
+
type: "text",
|
|
922
|
+
readonly: "",
|
|
923
|
+
tabindex: "-1",
|
|
924
|
+
class: "mt-1.5 w-full cursor-default rounded-xl border border-gray-200 bg-gray-50 px-3.5 py-2.5 text-sm text-gray-700 outline-none placeholder:text-gray-400",
|
|
925
|
+
placeholder: "Заповнюється після вибору населеного пункту"
|
|
926
|
+
}, null, 8, ut)
|
|
927
|
+
]),
|
|
928
|
+
j("button", {
|
|
929
|
+
type: "button",
|
|
930
|
+
class: I(["flex w-full cursor-pointer select-none items-center justify-between gap-3 rounded-xl border px-4 py-3 text-left transition-all", r.manualAddress ? "border-[#2663EB]/30 bg-[#EFF4FE]" : "border-gray-200 bg-white hover:border-gray-300"]),
|
|
931
|
+
onClick: r.toggleManualAddress
|
|
932
|
+
}, [j("div", dt, [j("div", { class: I(["flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-200"]) }, [N(r.AppIcon, {
|
|
933
|
+
name: "map-pin",
|
|
934
|
+
class: I(["h-3.5 w-3.5", r.manualAddress ? "text-white" : "text-gray-500"])
|
|
935
|
+
}, null, 8, ["class"])], 2), j("div", ft, [j("p", { class: I(["text-xs font-semibold", r.manualAddress ? "text-[#2663EB]" : "text-gray-700"]) }, "Адресу не знайдено", 2), t[18] ||= j("p", { class: "truncate text-xs leading-snug text-gray-400" }, "Вказати адресу вручну у полі «Місцезнаходження»", -1)])]), j("div", { class: I(["relative h-5 w-9 shrink-0 rounded-full transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-300"]) }, [j("span", { class: I(["absolute top-0.5 h-4 w-4 rounded-full bg-white shadow transition-all", r.manualAddress ? "left-[18px]" : "left-0.5"]) }, null, 2)], 2)], 2),
|
|
936
|
+
r.manualAddress ? (V(), A("div", pt, [t[19] ||= j("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [M(" Місцезнаходження "), j("span", { class: "text-red-400" }, "*")], -1), J(j("input", {
|
|
937
|
+
"onUpdate:modelValue": t[2] ||= (e) => r.manualValue = e,
|
|
938
|
+
type: "text",
|
|
939
|
+
placeholder: "Введіть адресу вручну...",
|
|
940
|
+
class: "w-full rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
941
|
+
}, null, 512), [[K, r.manualValue]])])) : (V(), O(r.FormSuggestSelect, {
|
|
942
|
+
key: 1,
|
|
943
|
+
modelValue: r.addressId,
|
|
944
|
+
"onUpdate:modelValue": t[3] ||= (e) => r.addressId = e,
|
|
945
|
+
"display-value": r.addressLabel,
|
|
946
|
+
"onUpdate:displayValue": t[4] ||= (e) => r.addressLabel = e,
|
|
947
|
+
label: "Адреса",
|
|
948
|
+
required: "",
|
|
949
|
+
options: r.addressOptions,
|
|
950
|
+
loading: r.addressLoading,
|
|
951
|
+
disabled: !r.settlementId,
|
|
952
|
+
placeholder: r.settlementId ? "Обрати" : "Спочатку оберіть населений пункт",
|
|
953
|
+
onSearch: r.loadAddresses,
|
|
954
|
+
onSelect: r.onAddressSelect
|
|
955
|
+
}, null, 8, [
|
|
956
|
+
"modelValue",
|
|
957
|
+
"display-value",
|
|
958
|
+
"options",
|
|
959
|
+
"loading",
|
|
960
|
+
"disabled",
|
|
961
|
+
"placeholder"
|
|
962
|
+
]))
|
|
963
|
+
])]), j("div", mt, [t[23] ||= j("div", { class: "border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, [j("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Деталі заявки")], -1), j("div", ht, [
|
|
964
|
+
N(r.FormSearchSelect, {
|
|
965
|
+
modelValue: r.workTypeLabel,
|
|
966
|
+
"onUpdate:modelValue": t[5] ||= (e) => r.workTypeLabel = e,
|
|
967
|
+
label: "Вид робіт",
|
|
968
|
+
required: "",
|
|
969
|
+
options: r.workTypeOptions
|
|
970
|
+
}, null, 8, ["modelValue", "options"]),
|
|
971
|
+
j("div", null, [t[20] ||= j("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Опис запиту", -1), J(j("textarea", {
|
|
972
|
+
"onUpdate:modelValue": t[6] ||= (e) => r.description = e,
|
|
973
|
+
rows: "3",
|
|
974
|
+
placeholder: "Опишіть запит...",
|
|
975
|
+
class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
976
|
+
}, null, 512), [[K, r.description]])]),
|
|
977
|
+
j("div", null, [t[21] ||= j("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [M(" Підстава виконання робіт "), j("span", { class: "ml-1 font-normal text-gray-400" }, "(у складі якої документації розробляється, які вихідні дані)")], -1), J(j("textarea", {
|
|
978
|
+
"onUpdate:modelValue": t[7] ||= (e) => r.basis = e,
|
|
979
|
+
rows: "3",
|
|
980
|
+
placeholder: "Вкажіть підставу...",
|
|
981
|
+
class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
982
|
+
}, null, 512), [[K, r.basis]])]),
|
|
983
|
+
j("div", null, [t[22] ||= j("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Примітки", -1), J(j("textarea", {
|
|
984
|
+
"onUpdate:modelValue": t[8] ||= (e) => r.notes = e,
|
|
985
|
+
rows: "2",
|
|
986
|
+
placeholder: "Додаткові примітки...",
|
|
987
|
+
class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
|
|
988
|
+
}, null, 512), [[K, r.notes]])])
|
|
989
|
+
])])]), j("div", gt, [j("div", _t, [j("div", vt, [N(r.AppIcon, {
|
|
990
|
+
name: "map-pin",
|
|
991
|
+
class: "h-3.5 w-3.5 text-gray-400"
|
|
992
|
+
}), t[24] ||= j("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, [M(" Карта "), j("span", { class: "text-red-400" }, "*")], -1)]), j("div", yt, [N(r.ApplicationCreateMap, {
|
|
993
|
+
points: r.mapPoints,
|
|
994
|
+
"onUpdate:points": t[9] ||= (e) => r.mapPoints = e,
|
|
995
|
+
geometry: r.importedGeom,
|
|
996
|
+
"address-point": r.addressPoint,
|
|
997
|
+
onImport: t[10] ||= (e) => r.importOpen = !0
|
|
998
|
+
}, null, 8, [
|
|
999
|
+
"points",
|
|
1000
|
+
"geometry",
|
|
1001
|
+
"address-point"
|
|
1002
|
+
])])]), j("div", bt, [
|
|
1003
|
+
j("div", xt, [N(r.AppIcon, {
|
|
1004
|
+
name: "alert-circle",
|
|
1005
|
+
class: "h-[13px] w-[13px]"
|
|
1006
|
+
}), t[25] ||= j("span", null, [
|
|
1007
|
+
M("Поля із "),
|
|
1008
|
+
j("span", { class: "font-medium text-red-400" }, "*"),
|
|
1009
|
+
M(" обов'язкові")
|
|
1010
|
+
], -1)]),
|
|
1011
|
+
r.error ? (V(), A("p", St, G(r.error), 1)) : k("", !0),
|
|
1012
|
+
j("div", Ct, [N(r.RouterLink, {
|
|
1013
|
+
to: "/requests",
|
|
1014
|
+
class: "flex-1 rounded-xl bg-gray-100 px-4 py-2.5 text-center text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200"
|
|
1015
|
+
}, {
|
|
1016
|
+
default: ee(() => [...t[26] ||= [M(" Скасувати ", -1)]]),
|
|
1017
|
+
_: 1
|
|
1018
|
+
}), j("button", {
|
|
1019
|
+
type: "submit",
|
|
1020
|
+
class: "flex-1 rounded-xl bg-[#2663EB] px-4 py-2.5 text-sm font-medium text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40",
|
|
1021
|
+
disabled: !r.canSubmit || r.submitting
|
|
1022
|
+
}, G(r.submitting ? "Відправлення…" : "Відправити"), 9, wt)])
|
|
1023
|
+
])])])], 32),
|
|
1024
|
+
r.importOpen ? (V(), O(r.GeometryImportDialog, {
|
|
1025
|
+
key: 0,
|
|
1026
|
+
onClose: t[11] ||= (e) => r.importOpen = !1,
|
|
1027
|
+
onImported: r.onGeometryImported
|
|
1028
|
+
})) : k("", !0)
|
|
1029
|
+
]);
|
|
1030
|
+
}
|
|
1031
|
+
var Et = /*#__PURE__*/ e(Xe, [["render", Tt], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/create.vue"]]);
|
|
1032
|
+
//#endregion
|
|
1033
|
+
export { Et as default };
|