@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,530 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { o as t } from "./profile-DxZHxGum.js";
|
|
3
|
+
import { n, r, t as i } from "./AppealStatusBadge-CefimzY3.js";
|
|
4
|
+
import { o as a } from "./applications-CsCsndMV.js";
|
|
5
|
+
import { i as o, n as s, r as c, t as l } from "./organizations-BtuMZ5s_.js";
|
|
6
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, reactive as x, ref as S, renderList as C, toDisplayString as w, vModelText as T, watch as E, withCtx as D, withDirectives as O, withModifiers as k } from "vue";
|
|
7
|
+
import { RouterLink as ee, useRoute as te } from "vue-router";
|
|
8
|
+
//#region cabinet/src/components/table/TablePagination.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var A = /*@__PURE__*/ v({
|
|
10
|
+
__name: "TablePagination",
|
|
11
|
+
props: {
|
|
12
|
+
page: {
|
|
13
|
+
type: Number,
|
|
14
|
+
required: !0
|
|
15
|
+
},
|
|
16
|
+
pageSize: {
|
|
17
|
+
type: Number,
|
|
18
|
+
required: !0
|
|
19
|
+
},
|
|
20
|
+
total: {
|
|
21
|
+
type: Number,
|
|
22
|
+
required: !0
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:page", "update:pageSize"],
|
|
26
|
+
setup(e, { expose: n, emit: r }) {
|
|
27
|
+
n();
|
|
28
|
+
let i = e, a = r, o = [
|
|
29
|
+
10,
|
|
30
|
+
25,
|
|
31
|
+
50
|
|
32
|
+
], s = d(() => Math.max(1, Math.ceil(i.total / i.pageSize))), c = d(() => i.total === 0 ? 0 : (i.page - 1) * i.pageSize + 1), l = d(() => Math.min(i.page * i.pageSize, i.total)), u = d(() => {
|
|
33
|
+
let e = s.value, t = Math.min(i.page, e), n = Array.from({ length: e }, (e, t) => t + 1).filter((n) => n === 1 || n === e || Math.abs(n - t) <= 1), r = [];
|
|
34
|
+
return n.forEach((e, t) => {
|
|
35
|
+
let i = n[t - 1];
|
|
36
|
+
t > 0 && i !== void 0 && e - i > 1 && r.push("..."), r.push(e);
|
|
37
|
+
}), r;
|
|
38
|
+
});
|
|
39
|
+
function f(e) {
|
|
40
|
+
a("update:page", Math.max(1, Math.min(e, s.value)));
|
|
41
|
+
}
|
|
42
|
+
let p = {
|
|
43
|
+
props: i,
|
|
44
|
+
emit: a,
|
|
45
|
+
pageSizes: o,
|
|
46
|
+
totalPages: s,
|
|
47
|
+
from: c,
|
|
48
|
+
to: l,
|
|
49
|
+
pages: u,
|
|
50
|
+
goTo: f,
|
|
51
|
+
AppIcon: t
|
|
52
|
+
};
|
|
53
|
+
return Object.defineProperty(p, "__isScriptSetup", {
|
|
54
|
+
enumerable: !1,
|
|
55
|
+
value: !0
|
|
56
|
+
}), p;
|
|
57
|
+
}
|
|
58
|
+
}), j = { class: "mt-4 flex flex-wrap items-center justify-between gap-4 border-t border-gray-200 py-3" }, M = { class: "flex items-center gap-2 text-sm text-gray-500" }, N = ["value"], P = ["value"], F = { class: "flex items-center gap-1" }, I = { class: "mr-2 text-sm text-gray-500" }, L = ["disabled"], R = ["disabled"], z = {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: "px-1 text-sm text-gray-400"
|
|
61
|
+
}, B = ["onClick"], V = ["disabled"], H = ["disabled"];
|
|
62
|
+
function U(e, t, n, r, i, a) {
|
|
63
|
+
return b(), m("div", j, [h("label", M, [t[5] ||= h("span", null, "Рядків на сторінці:", -1), h("select", {
|
|
64
|
+
value: n.pageSize,
|
|
65
|
+
class: "rounded-lg border border-gray-200 bg-white px-2 py-1 text-sm text-gray-700 outline-none focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/20",
|
|
66
|
+
onChange: t[0] ||= (e) => r.emit("update:pageSize", Number(e.target.value))
|
|
67
|
+
}, [(b(), m(u, null, C(r.pageSizes, (e) => h("option", {
|
|
68
|
+
key: e,
|
|
69
|
+
value: e
|
|
70
|
+
}, w(e), 9, P)), 64))], 40, N)]), h("div", F, [
|
|
71
|
+
h("span", I, w(r.from) + "–" + w(r.to) + " з " + w(n.total), 1),
|
|
72
|
+
h("button", {
|
|
73
|
+
type: "button",
|
|
74
|
+
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
75
|
+
disabled: n.page <= 1,
|
|
76
|
+
"aria-label": "Перша сторінка",
|
|
77
|
+
onClick: t[1] ||= (e) => r.goTo(1)
|
|
78
|
+
}, [_(r.AppIcon, {
|
|
79
|
+
name: "chevrons-left",
|
|
80
|
+
class: "h-[15px] w-[15px]"
|
|
81
|
+
})], 8, L),
|
|
82
|
+
h("button", {
|
|
83
|
+
type: "button",
|
|
84
|
+
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
85
|
+
disabled: n.page <= 1,
|
|
86
|
+
"aria-label": "Попередня сторінка",
|
|
87
|
+
onClick: t[2] ||= (e) => r.goTo(n.page - 1)
|
|
88
|
+
}, [_(r.AppIcon, {
|
|
89
|
+
name: "chevron-left",
|
|
90
|
+
class: "h-[15px] w-[15px]"
|
|
91
|
+
})], 8, R),
|
|
92
|
+
(b(!0), m(u, null, C(r.pages, (e, t) => (b(), m(u, { key: `${e}-${t}` }, [e === "..." ? (b(), m("span", z, "…")) : (b(), m("button", {
|
|
93
|
+
key: 1,
|
|
94
|
+
type: "button",
|
|
95
|
+
class: y(["h-8 min-w-[32px] rounded-lg px-2 text-sm font-medium transition-colors", n.page === e ? "bg-[#2663EB] text-white" : "text-gray-600 hover:bg-gray-100"]),
|
|
96
|
+
onClick: (t) => r.goTo(e)
|
|
97
|
+
}, w(e), 11, B))], 64))), 128)),
|
|
98
|
+
h("button", {
|
|
99
|
+
type: "button",
|
|
100
|
+
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
101
|
+
disabled: n.page >= r.totalPages,
|
|
102
|
+
"aria-label": "Наступна сторінка",
|
|
103
|
+
onClick: t[3] ||= (e) => r.goTo(n.page + 1)
|
|
104
|
+
}, [_(r.AppIcon, {
|
|
105
|
+
name: "chevron-right",
|
|
106
|
+
class: "h-[15px] w-[15px]"
|
|
107
|
+
})], 8, V),
|
|
108
|
+
h("button", {
|
|
109
|
+
type: "button",
|
|
110
|
+
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-30",
|
|
111
|
+
disabled: n.page >= r.totalPages,
|
|
112
|
+
"aria-label": "Остання сторінка",
|
|
113
|
+
onClick: t[4] ||= (e) => r.goTo(r.totalPages)
|
|
114
|
+
}, [_(r.AppIcon, {
|
|
115
|
+
name: "chevrons-right",
|
|
116
|
+
class: "h-[15px] w-[15px]"
|
|
117
|
+
})], 8, H)
|
|
118
|
+
])]);
|
|
119
|
+
}
|
|
120
|
+
var ne = /*#__PURE__*/ e(A, [["render", U], ["__file", "C:/softpro/surveyor/cabinet/src/components/table/TablePagination.vue"]]), W = /*@__PURE__*/ v({
|
|
121
|
+
__name: "RequestFilters",
|
|
122
|
+
props: { filters: {
|
|
123
|
+
type: Object,
|
|
124
|
+
required: !0
|
|
125
|
+
} },
|
|
126
|
+
emits: ["apply", "close"],
|
|
127
|
+
setup(e, { expose: n, emit: r }) {
|
|
128
|
+
n();
|
|
129
|
+
let i = e, a = r, o = x({ ...i.filters }), s = [
|
|
130
|
+
["year", "Рік подачі заявки"],
|
|
131
|
+
["number", "Номер звернення"],
|
|
132
|
+
["address", "Адреса"],
|
|
133
|
+
["location", "Місцезнаходження"]
|
|
134
|
+
], c = [
|
|
135
|
+
["receiptDate", "Дата прийому заявки"],
|
|
136
|
+
["dataReceiptDate", "Дата прийому даних"],
|
|
137
|
+
["dataIssueDate", "Дата видачі даних"],
|
|
138
|
+
["cancelDate", "Дата скасування"],
|
|
139
|
+
["ectsoDate", "Дата внесення в ЄЦТО"]
|
|
140
|
+
];
|
|
141
|
+
function l() {
|
|
142
|
+
return { ...o };
|
|
143
|
+
}
|
|
144
|
+
function u() {
|
|
145
|
+
for (let e of Object.keys(o)) o[e] = "";
|
|
146
|
+
a("apply", l());
|
|
147
|
+
}
|
|
148
|
+
let d = {
|
|
149
|
+
props: i,
|
|
150
|
+
emit: a,
|
|
151
|
+
local: o,
|
|
152
|
+
textFields: s,
|
|
153
|
+
dateFields: c,
|
|
154
|
+
snapshot: l,
|
|
155
|
+
clear: u,
|
|
156
|
+
AppIcon: t
|
|
157
|
+
};
|
|
158
|
+
return Object.defineProperty(d, "__isScriptSetup", {
|
|
159
|
+
enumerable: !1,
|
|
160
|
+
value: !0
|
|
161
|
+
}), d;
|
|
162
|
+
}
|
|
163
|
+
}), G = { class: "flex h-full w-[420px] max-w-full animate-[slide-in_0.2s_ease] flex-col overflow-hidden bg-white shadow-2xl" }, K = { class: "flex items-center justify-between border-b border-gray-100 px-6 py-4" }, q = { class: "flex flex-1 flex-col gap-5 overflow-y-auto px-6 py-5" }, J = { class: "mb-2 block text-sm font-semibold text-gray-800" }, Y = { class: "relative block" }, X = ["onUpdate:modelValue", "placeholder"], Z = { class: "mb-2 block text-sm font-semibold text-gray-800" }, re = ["onUpdate:modelValue"], ie = { class: "flex gap-3 border-t border-gray-100 px-6 py-4" };
|
|
164
|
+
function ae(e, t, n, r, i, a) {
|
|
165
|
+
return b(), m("div", {
|
|
166
|
+
class: "fixed inset-0 z-50 flex justify-end bg-slate-900/25",
|
|
167
|
+
onMousedown: t[2] ||= k((e) => r.emit("close"), ["self"])
|
|
168
|
+
}, [h("div", G, [
|
|
169
|
+
h("div", K, [t[3] ||= h("h2", { class: "text-base font-semibold text-gray-900" }, "Фільтри", -1), h("button", {
|
|
170
|
+
type: "button",
|
|
171
|
+
class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
|
|
172
|
+
"aria-label": "Закрити",
|
|
173
|
+
onClick: t[0] ||= (e) => r.emit("close")
|
|
174
|
+
}, [_(r.AppIcon, {
|
|
175
|
+
name: "x",
|
|
176
|
+
class: "h-[18px] w-[18px]"
|
|
177
|
+
})])]),
|
|
178
|
+
h("div", q, [(b(), m(u, null, C(r.textFields, ([e, t]) => h("label", {
|
|
179
|
+
key: e,
|
|
180
|
+
class: "block"
|
|
181
|
+
}, [h("span", J, w(t), 1), h("span", Y, [O(h("input", {
|
|
182
|
+
"onUpdate:modelValue": (t) => r.local[e] = t,
|
|
183
|
+
type: "text",
|
|
184
|
+
placeholder: t,
|
|
185
|
+
class: "w-full rounded-xl border border-gray-200 px-4 py-3 pr-10 text-sm outline-none transition-colors placeholder:text-gray-400 focus:border-[#2663EB]"
|
|
186
|
+
}, null, 8, X), [[T, r.local[e]]]), _(r.AppIcon, {
|
|
187
|
+
name: "search",
|
|
188
|
+
class: "pointer-events-none absolute right-3 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-gray-300"
|
|
189
|
+
})])])), 64)), (b(), m(u, null, C(r.dateFields, ([e, t]) => h("label", {
|
|
190
|
+
key: e,
|
|
191
|
+
class: "block"
|
|
192
|
+
}, [h("span", Z, w(t), 1), O(h("input", {
|
|
193
|
+
"onUpdate:modelValue": (t) => r.local[e] = t,
|
|
194
|
+
type: "date",
|
|
195
|
+
class: "w-full appearance-none rounded-xl border border-gray-200 px-4 py-3 text-sm text-gray-500 outline-none transition-colors focus:border-[#2663EB]"
|
|
196
|
+
}, null, 8, re), [[T, r.local[e]]])])), 64))]),
|
|
197
|
+
h("div", ie, [h("button", {
|
|
198
|
+
type: "button",
|
|
199
|
+
class: "flex-1 rounded-xl bg-gray-100 py-2.5 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",
|
|
200
|
+
onClick: r.clear
|
|
201
|
+
}, " Очистити "), h("button", {
|
|
202
|
+
type: "button",
|
|
203
|
+
class: "flex-1 rounded-xl bg-[#2663EB] py-2.5 text-sm font-medium text-white transition-colors hover:bg-[#1d4fd8]",
|
|
204
|
+
onClick: t[1] ||= (e) => r.emit("apply", r.snapshot())
|
|
205
|
+
}, " Застосувати ")])
|
|
206
|
+
])], 32);
|
|
207
|
+
}
|
|
208
|
+
var oe = /*#__PURE__*/ e(W, [["render", ae], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/RequestFilters.vue"]]), Q = S(""), se = /*@__PURE__*/ v({
|
|
209
|
+
__name: "index",
|
|
210
|
+
setup(e, { expose: u }) {
|
|
211
|
+
u();
|
|
212
|
+
let f = te(), p = d(() => {
|
|
213
|
+
let e = f.query.submitted;
|
|
214
|
+
return typeof e == "string" && e ? e : "";
|
|
215
|
+
}), m = S("all"), h = S("list"), g = S(1), _ = S(10), v = S(!1), y = S(null);
|
|
216
|
+
function b() {
|
|
217
|
+
return {
|
|
218
|
+
year: "",
|
|
219
|
+
number: "",
|
|
220
|
+
address: "",
|
|
221
|
+
location: "",
|
|
222
|
+
receiptDate: "",
|
|
223
|
+
dataReceiptDate: "",
|
|
224
|
+
dataIssueDate: "",
|
|
225
|
+
cancelDate: "",
|
|
226
|
+
ectsoDate: ""
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
let x = S(b()), C = S([]), w = S(0), T = S(null), D = S(!0), O = S(""), k = d(() => o.value.find((e) => e.id === l.value)?.shortName ?? ""), A = d(() => Object.values(x.value).filter((e) => e.trim()).length), j = d(() => {
|
|
230
|
+
let e = T.value, t = {};
|
|
231
|
+
for (let n of r) {
|
|
232
|
+
let r = n.key === "all" ? e?.count : e?.[n.key], i = Number(r ?? 0);
|
|
233
|
+
t[n.key] = Number.isFinite(i) ? i : 0;
|
|
234
|
+
}
|
|
235
|
+
return t;
|
|
236
|
+
}), M = d(() => C.value.reduce((e, t) => e + t.area, 0));
|
|
237
|
+
function N(e) {
|
|
238
|
+
return e?.text?.trim() ?? "";
|
|
239
|
+
}
|
|
240
|
+
function P(e) {
|
|
241
|
+
let t = e.location?.trim() ?? "";
|
|
242
|
+
return {
|
|
243
|
+
id: e.app_id,
|
|
244
|
+
number: e.number?.trim() || e.app_id,
|
|
245
|
+
organization: N(e.org_id_data) || "—",
|
|
246
|
+
address: N(e.address_id_data) || t || "—",
|
|
247
|
+
location: t,
|
|
248
|
+
status: e.status ?? "",
|
|
249
|
+
workType: N(e.work_type_data) || e.work_type || "—",
|
|
250
|
+
area: Number(e.area) || 0
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function F() {
|
|
254
|
+
return [Q.value.trim(), [
|
|
255
|
+
x.value.number,
|
|
256
|
+
x.value.address,
|
|
257
|
+
x.value.location
|
|
258
|
+
].map((e) => e.trim()).filter(Boolean).join(" ")].filter(Boolean).join(" ").trim() || void 0;
|
|
259
|
+
}
|
|
260
|
+
function I(e) {
|
|
261
|
+
let t = {};
|
|
262
|
+
return l.value && (t.org_id = l.value), e !== "all" && (t.status = e), t;
|
|
263
|
+
}
|
|
264
|
+
let L = 0;
|
|
265
|
+
async function R() {
|
|
266
|
+
let e = ++L;
|
|
267
|
+
D.value = !0, O.value = "";
|
|
268
|
+
try {
|
|
269
|
+
let t = m.value, n = await a({
|
|
270
|
+
page: g.value,
|
|
271
|
+
limit: _.value,
|
|
272
|
+
sort: "-created_at",
|
|
273
|
+
search: F(),
|
|
274
|
+
filters: I(t)
|
|
275
|
+
});
|
|
276
|
+
if (e !== L) return;
|
|
277
|
+
let r = Number(n.total ?? n.summary?.count ?? 0), i = Math.max(1, Math.ceil((Number.isFinite(r) ? r : 0) / _.value) || 1);
|
|
278
|
+
if (g.value > i) {
|
|
279
|
+
g.value = i;
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
C.value = (n.rows ?? []).map(P), w.value = Number.isFinite(r) ? r : 0, t === "all" && (T.value = n.summary ?? null);
|
|
283
|
+
} catch (t) {
|
|
284
|
+
if (e !== L) return;
|
|
285
|
+
C.value = [], w.value = 0, T.value = null, O.value = t instanceof Error ? t.message : "Не вдалося завантажити звернення";
|
|
286
|
+
} finally {
|
|
287
|
+
e === L && (D.value = !1);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function z() {
|
|
291
|
+
(c.value || s.value) && (g.value === 1 ? R() : g.value = 1);
|
|
292
|
+
}
|
|
293
|
+
E([
|
|
294
|
+
c,
|
|
295
|
+
s,
|
|
296
|
+
l,
|
|
297
|
+
() => f.query.submitted
|
|
298
|
+
], () => {
|
|
299
|
+
z();
|
|
300
|
+
}, { immediate: !0 }), E([
|
|
301
|
+
Q,
|
|
302
|
+
x,
|
|
303
|
+
m,
|
|
304
|
+
_
|
|
305
|
+
], () => {
|
|
306
|
+
z();
|
|
307
|
+
}), E(g, () => {
|
|
308
|
+
(c.value || s.value) && R();
|
|
309
|
+
});
|
|
310
|
+
function B() {
|
|
311
|
+
v.value = !0;
|
|
312
|
+
}
|
|
313
|
+
function V(e) {
|
|
314
|
+
x.value = e, v.value = !1;
|
|
315
|
+
}
|
|
316
|
+
function H(e) {
|
|
317
|
+
return `/requests/${encodeURIComponent(e)}`;
|
|
318
|
+
}
|
|
319
|
+
let U = {
|
|
320
|
+
route: f,
|
|
321
|
+
submitSuccess: p,
|
|
322
|
+
activeStatus: m,
|
|
323
|
+
layout: h,
|
|
324
|
+
page: g,
|
|
325
|
+
pageSize: _,
|
|
326
|
+
filtersOpen: v,
|
|
327
|
+
hoveredId: y,
|
|
328
|
+
emptyFilters: b,
|
|
329
|
+
appliedFilters: x,
|
|
330
|
+
appeals: C,
|
|
331
|
+
total: w,
|
|
332
|
+
summary: T,
|
|
333
|
+
loading: D,
|
|
334
|
+
loadError: O,
|
|
335
|
+
orgName: k,
|
|
336
|
+
activeFilterCount: A,
|
|
337
|
+
statusCounts: j,
|
|
338
|
+
totalArea: M,
|
|
339
|
+
lookupText: N,
|
|
340
|
+
mapAppeal: P,
|
|
341
|
+
buildSearch: F,
|
|
342
|
+
listFilters: I,
|
|
343
|
+
get requestId() {
|
|
344
|
+
return L;
|
|
345
|
+
},
|
|
346
|
+
set requestId(e) {
|
|
347
|
+
L = e;
|
|
348
|
+
},
|
|
349
|
+
loadAppeals: R,
|
|
350
|
+
reloadFromFirstPage: z,
|
|
351
|
+
openFilters: B,
|
|
352
|
+
applyFilters: V,
|
|
353
|
+
requestPath: H,
|
|
354
|
+
get RouterLink() {
|
|
355
|
+
return ee;
|
|
356
|
+
},
|
|
357
|
+
AppealStatusBadge: i,
|
|
358
|
+
AppIcon: t,
|
|
359
|
+
TablePagination: ne,
|
|
360
|
+
RequestFilters: oe,
|
|
361
|
+
get APPEAL_STATUS() {
|
|
362
|
+
return n;
|
|
363
|
+
},
|
|
364
|
+
get REQUEST_STATUS_TABS() {
|
|
365
|
+
return r;
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
return Object.defineProperty(U, "__isScriptSetup", {
|
|
369
|
+
enumerable: !1,
|
|
370
|
+
value: !0
|
|
371
|
+
}), U;
|
|
372
|
+
}
|
|
373
|
+
}), ce = { class: "min-h-[calc(100vh-3.5rem)] bg-gray-50" }, le = { class: "border-b border-gray-200 bg-white pt-5 pb-0" }, ue = { class: "mx-auto max-w-[1400px] px-6" }, de = { class: "mb-4" }, fe = { class: "mt-0.5 flex items-center gap-1.5 text-sm text-gray-400" }, pe = { class: "mx-auto max-w-[1400px] px-6" }, me = { class: "flex flex-wrap items-center mb-1" }, he = ["onClick"], ge = { class: "flex items-center gap-2 pb-1 pt-1" }, _e = {
|
|
374
|
+
key: 0,
|
|
375
|
+
class: "absolute -right-1.5 -top-1.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-[#2663EB] px-1 text-[10px] font-bold text-white"
|
|
376
|
+
}, ve = { class: "flex items-center rounded-lg bg-gray-100 p-0.5" }, ye = { class: "mx-auto max-w-[1400px] px-6 py-4" }, be = {
|
|
377
|
+
key: 0,
|
|
378
|
+
class: "mb-4 rounded-lg border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800"
|
|
379
|
+
}, xe = {
|
|
380
|
+
key: 1,
|
|
381
|
+
class: "py-24 text-center"
|
|
382
|
+
}, Se = {
|
|
383
|
+
key: 2,
|
|
384
|
+
class: "py-24 text-center"
|
|
385
|
+
}, Ce = { class: "text-sm text-gray-500" }, we = {
|
|
386
|
+
key: 3,
|
|
387
|
+
class: "py-24 text-center"
|
|
388
|
+
}, Te = { class: "mb-3 flex flex-wrap items-center gap-4 text-sm text-gray-500" }, Ee = { class: "text-gray-900" }, De = { class: "font-semibold text-gray-900" }, Oe = {
|
|
389
|
+
class: "w-full border-separate border-spacing-y-1",
|
|
390
|
+
style: { "table-layout": "fixed" }
|
|
391
|
+
}, ke = ["onMouseenter"], Ae = { class: "h-[52px] px-4 align-middle" }, je = { class: "flex items-center justify-between gap-2" }, Me = { class: "h-[52px] px-4 align-middle" }, Ne = { class: "truncate text-sm font-medium text-gray-900" }, Pe = { class: "h-[52px] px-4 align-middle" }, $ = { class: "truncate text-sm text-gray-500" }, Fe = { class: "h-[52px] px-4 align-middle" }, Ie = { class: "h-[52px] px-4 align-middle" }, Le = { class: "truncate text-sm text-gray-700" }, Re = {
|
|
392
|
+
key: 1,
|
|
393
|
+
class: "grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3"
|
|
394
|
+
}, ze = { class: "p-4" }, Be = { class: "mb-3 flex items-start justify-between gap-2" }, Ve = { class: "mb-1 truncate text-sm font-semibold text-gray-900" }, He = { class: "mb-3 truncate text-xs text-gray-400" }, Ue = { class: "line-clamp-2 text-xs text-gray-500" };
|
|
395
|
+
function We(e, t, n, r, i, a) {
|
|
396
|
+
return b(), m("div", ce, [
|
|
397
|
+
h("div", le, [h("div", ue, [h("div", de, [t[6] ||= h("h1", { class: "text-xl font-semibold text-gray-900" }, "Звернення", -1), h("p", fe, [_(r.AppIcon, {
|
|
398
|
+
name: "building-2",
|
|
399
|
+
class: "h-[13px] w-[13px] text-gray-300"
|
|
400
|
+
}), g(" " + w(r.orgName), 1)])])]), h("div", pe, [h("div", me, [(b(!0), m(u, null, C(r.REQUEST_STATUS_TABS, (e) => (b(), m("button", {
|
|
401
|
+
key: e.key,
|
|
402
|
+
type: "button",
|
|
403
|
+
class: y(["flex items-center gap-1.5 whitespace-nowrap border-b-2 px-2.5 py-2.5 text-sm font-medium transition-colors", r.activeStatus === e.key ? "border-[#2663EB] text-[#2663EB]" : "border-transparent text-gray-500 hover:text-gray-700"]),
|
|
404
|
+
onClick: (t) => r.activeStatus = e.key
|
|
405
|
+
}, [g(w(e.label) + " ", 1), h("span", { class: y(["rounded-full px-1.5 py-0.5 text-xs font-medium", r.activeStatus === e.key ? "bg-[#2663EB] text-white" : "bg-gray-100 text-gray-500"]) }, w(r.statusCounts[e.key] || 0), 3)], 10, he))), 128))]), h("div", ge, [h("button", {
|
|
406
|
+
type: "button",
|
|
407
|
+
class: "relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm text-gray-600 transition-colors hover:border-gray-300",
|
|
408
|
+
onClick: r.openFilters
|
|
409
|
+
}, [
|
|
410
|
+
_(r.AppIcon, {
|
|
411
|
+
name: "sliders-horizontal",
|
|
412
|
+
class: "h-3.5 w-3.5"
|
|
413
|
+
}),
|
|
414
|
+
t[7] ||= g(" Фільтри ", -1),
|
|
415
|
+
r.activeFilterCount > 0 ? (b(), m("span", _e, w(r.activeFilterCount), 1)) : p("", !0)
|
|
416
|
+
]), h("div", ve, [h("button", {
|
|
417
|
+
type: "button",
|
|
418
|
+
class: y(["rounded-md p-1.5 transition-all", r.layout === "list" ? "bg-white text-gray-900 shadow-sm" : "text-gray-400 hover:text-gray-600"]),
|
|
419
|
+
"aria-label": "Список",
|
|
420
|
+
onClick: t[0] ||= (e) => r.layout = "list"
|
|
421
|
+
}, [_(r.AppIcon, {
|
|
422
|
+
name: "list",
|
|
423
|
+
class: "h-[15px] w-[15px]"
|
|
424
|
+
})], 2), h("button", {
|
|
425
|
+
type: "button",
|
|
426
|
+
class: y(["rounded-md p-1.5 transition-all", r.layout === "grid" ? "bg-white text-gray-900 shadow-sm" : "text-gray-400 hover:text-gray-600"]),
|
|
427
|
+
"aria-label": "Картки",
|
|
428
|
+
onClick: t[1] ||= (e) => r.layout = "grid"
|
|
429
|
+
}, [_(r.AppIcon, {
|
|
430
|
+
name: "layout-grid",
|
|
431
|
+
class: "h-[15px] w-[15px]"
|
|
432
|
+
})], 2)])])])]),
|
|
433
|
+
h("div", ye, [r.submitSuccess ? (b(), m("p", be, " Звернення № " + w(r.submitSuccess) + " успішно подано. ", 1)) : p("", !0), r.loading && r.appeals.length === 0 ? (b(), m("div", xe, [...t[8] ||= [h("p", { class: "text-sm text-gray-500" }, "Завантаження…", -1)]])) : r.loadError ? (b(), m("div", Se, [_(r.AppIcon, {
|
|
434
|
+
name: "alert-circle",
|
|
435
|
+
class: "mx-auto mb-3 h-9 w-9 text-gray-300"
|
|
436
|
+
}), h("p", Ce, w(r.loadError), 1)])) : r.appeals.length === 0 ? (b(), m("div", we, [_(r.AppIcon, {
|
|
437
|
+
name: "alert-circle",
|
|
438
|
+
class: "mx-auto mb-3 h-9 w-9 text-gray-300"
|
|
439
|
+
}), t[9] ||= h("p", { class: "text-sm text-gray-500" }, "Звернень не знайдено", -1)])) : (b(), m("div", {
|
|
440
|
+
key: 4,
|
|
441
|
+
class: y(r.loading ? "opacity-60" : "")
|
|
442
|
+
}, [r.layout === "list" ? (b(), m(u, { key: 0 }, [h("div", Te, [h("span", null, [t[10] ||= g(" Об'єктів: ", -1), h("strong", Ee, w(r.appeals.length) + " із " + w(r.total), 1)]), h("span", null, [t[11] ||= g(" Активна площа на сторінці: ", -1), h("span", De, w(r.totalArea.toFixed(1)) + " га", 1)])]), h("table", Oe, [
|
|
443
|
+
t[12] ||= h("colgroup", null, [
|
|
444
|
+
h("col", { style: { width: "18%" } }),
|
|
445
|
+
h("col", { style: { width: "24%" } }),
|
|
446
|
+
h("col", { style: { width: "24%" } }),
|
|
447
|
+
h("col", { style: { width: "18%" } }),
|
|
448
|
+
h("col", { style: { width: "16%" } })
|
|
449
|
+
], -1),
|
|
450
|
+
h("thead", null, [h("tr", null, [(b(), m(u, null, C([
|
|
451
|
+
"№",
|
|
452
|
+
"Організація / особа",
|
|
453
|
+
"Адреса",
|
|
454
|
+
"Статус",
|
|
455
|
+
"Вид робіт"
|
|
456
|
+
], (e) => h("th", {
|
|
457
|
+
key: e,
|
|
458
|
+
class: "px-4 py-2 text-left text-xs font-medium uppercase tracking-wider text-gray-400"
|
|
459
|
+
}, w(e), 1)), 64))])]),
|
|
460
|
+
h("tbody", null, [(b(!0), m(u, null, C(r.appeals, (e) => (b(), m("tr", {
|
|
461
|
+
key: e.id,
|
|
462
|
+
class: "bg-white transition-shadow hover:shadow-sm",
|
|
463
|
+
onMouseenter: (t) => r.hoveredId = e.id,
|
|
464
|
+
onMouseleave: t[2] ||= (e) => r.hoveredId = null
|
|
465
|
+
}, [
|
|
466
|
+
h("td", Ae, [h("div", je, [_(r.RouterLink, {
|
|
467
|
+
to: r.requestPath(e.id),
|
|
468
|
+
class: "whitespace-nowrap text-sm font-medium text-[#2663EB] hover:underline"
|
|
469
|
+
}, {
|
|
470
|
+
default: D(() => [g(" #" + w(e.number), 1)]),
|
|
471
|
+
_: 2
|
|
472
|
+
}, 1032, ["to"]), _(r.RouterLink, {
|
|
473
|
+
to: r.requestPath(e.id),
|
|
474
|
+
class: y(["rounded-lg p-1.5 text-gray-400 transition-all hover:bg-gray-100 hover:text-gray-700", r.hoveredId === e.id ? "opacity-100" : "opacity-0"]),
|
|
475
|
+
title: "Переглянути"
|
|
476
|
+
}, {
|
|
477
|
+
default: D(() => [_(r.AppIcon, {
|
|
478
|
+
name: "eye",
|
|
479
|
+
class: "h-[13px] w-[13px]"
|
|
480
|
+
})]),
|
|
481
|
+
_: 1
|
|
482
|
+
}, 8, ["to", "class"])])]),
|
|
483
|
+
h("td", Me, [h("p", Ne, w(e.organization || "—"), 1)]),
|
|
484
|
+
h("td", Pe, [h("p", $, w(e.address), 1)]),
|
|
485
|
+
h("td", Fe, [_(r.AppealStatusBadge, {
|
|
486
|
+
status: e.status,
|
|
487
|
+
size: "sm"
|
|
488
|
+
}, null, 8, ["status"])]),
|
|
489
|
+
h("td", Ie, [h("p", Le, w(e.workType), 1)])
|
|
490
|
+
], 40, ke))), 128))])
|
|
491
|
+
])], 64)) : (b(), m("div", Re, [(b(!0), m(u, null, C(r.appeals, (e) => (b(), m("article", {
|
|
492
|
+
key: e.id,
|
|
493
|
+
class: "overflow-hidden rounded-2xl border border-gray-200 bg-white transition-all hover:border-gray-300 hover:shadow-md"
|
|
494
|
+
}, [h("div", { class: y(["h-1", r.APPEAL_STATUS[e.status]?.dot ?? "bg-gray-400"]) }, null, 2), h("div", ze, [
|
|
495
|
+
h("div", Be, [_(r.RouterLink, {
|
|
496
|
+
to: r.requestPath(e.id),
|
|
497
|
+
class: "font-mono text-xs font-semibold text-[#2663EB]"
|
|
498
|
+
}, {
|
|
499
|
+
default: D(() => [g(" #" + w(e.number), 1)]),
|
|
500
|
+
_: 2
|
|
501
|
+
}, 1032, ["to"]), _(r.AppealStatusBadge, {
|
|
502
|
+
status: e.status,
|
|
503
|
+
size: "sm",
|
|
504
|
+
chevron: ""
|
|
505
|
+
}, null, 8, ["status"])]),
|
|
506
|
+
h("p", Ve, w(e.organization || "Без організації"), 1),
|
|
507
|
+
h("p", He, w(e.address), 1),
|
|
508
|
+
h("p", Ue, w(e.workType), 1)
|
|
509
|
+
])]))), 128))])), _(r.TablePagination, {
|
|
510
|
+
page: r.page,
|
|
511
|
+
"onUpdate:page": t[3] ||= (e) => r.page = e,
|
|
512
|
+
"page-size": r.pageSize,
|
|
513
|
+
"onUpdate:pageSize": t[4] ||= (e) => r.pageSize = e,
|
|
514
|
+
total: r.total
|
|
515
|
+
}, null, 8, [
|
|
516
|
+
"page",
|
|
517
|
+
"page-size",
|
|
518
|
+
"total"
|
|
519
|
+
])], 2))]),
|
|
520
|
+
r.filtersOpen ? (b(), f(r.RequestFilters, {
|
|
521
|
+
key: 0,
|
|
522
|
+
filters: r.appliedFilters,
|
|
523
|
+
onApply: r.applyFilters,
|
|
524
|
+
onClose: t[5] ||= (e) => r.filtersOpen = !1
|
|
525
|
+
}, null, 8, ["filters"])) : p("", !0)
|
|
526
|
+
]);
|
|
527
|
+
}
|
|
528
|
+
var Ge = /*#__PURE__*/ e(se, [["render", We], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/index.vue"]]);
|
|
529
|
+
//#endregion
|
|
530
|
+
export { Ge as default };
|