@opengis/surveyor 0.0.1 → 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.
- package/CHANGELOG.md +42 -0
- package/README.md +175 -33
- package/dist/chunks/BaseModal-SQXvRRNW.js +90 -0
- package/dist/chunks/{RegistryForm-pvIcFR-V.js → RegistryForm-wG-c8GKf.js} +1 -1
- package/dist/chunks/{RegistryFormModal-BjGu7Upv.js → RegistryFormModal-R_iZYqGE.js} +2 -2
- package/dist/chunks/{RegistryToolbar-CiUgsjpU.js → RegistryToolbar-322DKUXi.js} +3 -3
- package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +23 -0
- package/dist/chunks/{VerifiedBadge-B6droMOf.js → VerifiedBadge-bk0n-rlC.js} +1 -1
- package/dist/chunks/{buildSchema-nkA4Y0YG.js → buildSchema-CccjX9TJ.js} +1 -1
- package/dist/chunks/card-B_SfARf7.js +1190 -0
- package/dist/chunks/card-C3y-j2TA.js +298 -0
- package/dist/chunks/{card--DHsMNBd.js → card-CWqi1K-x.js} +107 -106
- package/dist/chunks/card-DWpAv92l.js +539 -0
- package/dist/chunks/{card-BZn5CDw9.js → card-X9UVFgdR.js} +254 -248
- package/dist/chunks/{certificates-DueBDDvc.js → certificates-Cwch72-o.js} +131 -130
- package/dist/chunks/{create-l28e-bWl.js → create-DTP9x2uS.js} +278 -265
- package/dist/chunks/dom-BSjFG3O0.js +7 -0
- package/dist/chunks/{filterQuery-B9XNx1f1.js → filterQuery-CvfZrkTC.js} +1 -1
- package/dist/chunks/{form-CdGS1nVO.js → form-Bh6i5n1U.js} +1 -1
- package/dist/chunks/{form-QTkkzwbC.js → form-DDjELqZ9.js} +1 -1
- package/dist/chunks/{map-layers-qxWjos2V.js → map-layers-sT-gTiD_.js} +130 -125
- package/dist/chunks/{map-BW3iOhQg.js → map-qXQe_qam.js} +643 -630
- package/dist/chunks/{organizations-CZOINYMq.js → organizations-ByVE2f0c.js} +129 -124
- package/dist/chunks/requests-BTpLXrNj.js +233 -0
- package/dist/chunks/{resendSurveyorRegistration-DopjOHaM.js → resendSurveyorRegistration-BHTTVIw1.js} +1 -1
- package/dist/chunks/{resources-Cl_EvaIy.js → resources-2e8RFqWR.js} +1 -1
- package/dist/chunks/{surveyorAccount-BceNQypZ.js → surveyorAccount-C7UiiIYg.js} +1 -1
- package/dist/chunks/useEntityPath-C5Owtidc.js +98 -0
- package/dist/chunks/{users-DlaogjC_.js → users-U1P6xCP4.js} +106 -100
- package/dist/index.css +1 -1
- package/dist/index.js +215 -98
- package/package.json +83 -77
- package/plugin.d.ts +15 -0
- package/plugin.js +8 -10
- package/server/app.ts +2 -1
- package/server/resources/surveyor-admin/application_comments.ts +3 -3
- package/server/suggests/index.ts +17 -0
- package/surveyor-types.d.ts +5 -0
- package/README.npm.md +0 -51
- package/dist/chunks/AppIcon-C-4QykTP.js +0 -85
- package/dist/chunks/BaseModal-DrTTkLmR.js +0 -85
- package/dist/chunks/card-9LaB42Ol.js +0 -538
- package/dist/chunks/card-CNqXSyqX.js +0 -297
- package/dist/chunks/card-CgGOgGyd.js +0 -973
- package/dist/chunks/requests-DQJIhz00.js +0 -232
- package/server/embed.ts +0 -49
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
-
import { t } from "./AppIcon-C-4QykTP.js";
|
|
3
|
-
import { i as n } from "./resources-Cl_EvaIy.js";
|
|
4
|
-
import { t as r } from "./filterQuery-B9XNx1f1.js";
|
|
5
|
-
import { a as i, i as a, n as o, r as s, t as c } from "./RegistryToolbar-CiUgsjpU.js";
|
|
6
|
-
import { n as l, r as u, s as d, t as f } from "./AppealStatusBadge-Cu-UzdzA.js";
|
|
7
|
-
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as b, defineComponent as x, openBlock as S, ref as C, renderList as w, toDisplayString as T, vModelText as E, withCtx as D, withDirectives as O } from "vue";
|
|
8
|
-
import { RouterLink as k } from "vue-router";
|
|
9
|
-
//#region admin/src/pages/requests/index.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var A = /*@__PURE__*/ x({
|
|
11
|
-
__name: "index",
|
|
12
|
-
setup(e, { expose: p }) {
|
|
13
|
-
p();
|
|
14
|
-
let h = u.columns, g = h.flatMap((e) => e.sort ? [e.sort] : []), { query: _, filterValues: v, page: y, pageSize: b, sort: x, listFilters: S, bindListLoader: w } = i({
|
|
15
|
-
arrayFilterKeys: ["status", "year"],
|
|
16
|
-
defaultSort: u.sort,
|
|
17
|
-
sortFields: g,
|
|
18
|
-
buildFilters: r
|
|
19
|
-
}), T = C(!1), E = C([
|
|
20
|
-
"number",
|
|
21
|
-
"organization",
|
|
22
|
-
"address",
|
|
23
|
-
"status",
|
|
24
|
-
"workType",
|
|
25
|
-
"createdAt"
|
|
26
|
-
]), D = C([]), O = C(0), A = C(!1), j = C("");
|
|
27
|
-
function M(e) {
|
|
28
|
-
if (!e) return "—";
|
|
29
|
-
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
30
|
-
return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
|
|
31
|
-
}
|
|
32
|
-
function N(e) {
|
|
33
|
-
return e.address_id_data?.text || e.location || "—";
|
|
34
|
-
}
|
|
35
|
-
let P = 0, F = m(() => A.value ? "Завантаження…" : j.value ? j.value : "За заданими фільтрами звернень не знайдено.");
|
|
36
|
-
async function I() {
|
|
37
|
-
let e = ++P;
|
|
38
|
-
A.value = !0, j.value = "";
|
|
39
|
-
try {
|
|
40
|
-
let t = await n(d, {
|
|
41
|
-
page: y.value,
|
|
42
|
-
limit: b.value,
|
|
43
|
-
sort: x.value,
|
|
44
|
-
search: _.value.trim() || void 0,
|
|
45
|
-
filters: S.value
|
|
46
|
-
});
|
|
47
|
-
if (e !== P) return;
|
|
48
|
-
D.value = t.rows ?? [], O.value = Number(t.total) || 0;
|
|
49
|
-
} catch (t) {
|
|
50
|
-
if (e !== P) return;
|
|
51
|
-
D.value = [], O.value = 0, j.value = t instanceof Error ? t.message : "Не вдалося завантажити звернення";
|
|
52
|
-
} finally {
|
|
53
|
-
e === P && (A.value = !1);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
w(() => {
|
|
57
|
-
I();
|
|
58
|
-
});
|
|
59
|
-
function L(e) {
|
|
60
|
-
v.value = e;
|
|
61
|
-
}
|
|
62
|
-
function R(e) {
|
|
63
|
-
x.value !== e && (y.value !== 1 && (y.value = 1), x.value = e);
|
|
64
|
-
}
|
|
65
|
-
function z(e) {
|
|
66
|
-
E.value = E.value.includes(e) ? E.value.length > 1 ? E.value.filter((t) => t !== e) : E.value : E.value.length < 7 ? [...E.value, e] : E.value;
|
|
67
|
-
}
|
|
68
|
-
let B = {
|
|
69
|
-
columns: h,
|
|
70
|
-
sortableFields: g,
|
|
71
|
-
query: _,
|
|
72
|
-
filterValues: v,
|
|
73
|
-
page: y,
|
|
74
|
-
pageSize: b,
|
|
75
|
-
sort: x,
|
|
76
|
-
listFilters: S,
|
|
77
|
-
bindListLoader: w,
|
|
78
|
-
columnsOpen: T,
|
|
79
|
-
visibleColumns: E,
|
|
80
|
-
rows: D,
|
|
81
|
-
total: O,
|
|
82
|
-
loading: A,
|
|
83
|
-
error: j,
|
|
84
|
-
formatDate: M,
|
|
85
|
-
addressLabel: N,
|
|
86
|
-
get requestId() {
|
|
87
|
-
return P;
|
|
88
|
-
},
|
|
89
|
-
set requestId(e) {
|
|
90
|
-
P = e;
|
|
91
|
-
},
|
|
92
|
-
emptyText: F,
|
|
93
|
-
loadRows: I,
|
|
94
|
-
onFilterValuesUpdate: L,
|
|
95
|
-
onSort: R,
|
|
96
|
-
toggleColumn: z,
|
|
97
|
-
AppIcon: t,
|
|
98
|
-
get RouterLink() {
|
|
99
|
-
return k;
|
|
100
|
-
},
|
|
101
|
-
AppealStatusBadge: f,
|
|
102
|
-
PageHeader: a,
|
|
103
|
-
RegistryTable: s,
|
|
104
|
-
TablePagination: o,
|
|
105
|
-
RegistryToolbar: c,
|
|
106
|
-
get config() {
|
|
107
|
-
return l;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
return Object.defineProperty(B, "__isScriptSetup", {
|
|
111
|
-
enumerable: !1,
|
|
112
|
-
value: !0
|
|
113
|
-
}), B;
|
|
114
|
-
}
|
|
115
|
-
}), j = { class: "px-4" }, M = { class: "relative block" }, N = {
|
|
116
|
-
type: "button",
|
|
117
|
-
class: "inline-flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 transition-colors hover:border-brand-300 hover:text-brand-700",
|
|
118
|
-
"aria-label": "Експорт"
|
|
119
|
-
}, P = { class: "relative" }, F = {
|
|
120
|
-
key: 0,
|
|
121
|
-
class: "absolute right-0 top-12 z-20 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
|
|
122
|
-
}, I = ["checked", "onChange"], L = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, R = { class: "font-semibold text-slate-600" }, z = {
|
|
123
|
-
key: 1,
|
|
124
|
-
class: "min-w-0"
|
|
125
|
-
}, B = { class: "break-words font-semibold text-slate-700" }, V = { class: "break-words text-xs text-slate-400" }, H = {
|
|
126
|
-
key: 2,
|
|
127
|
-
class: "text-slate-600"
|
|
128
|
-
}, U = {
|
|
129
|
-
key: 4,
|
|
130
|
-
class: "text-slate-600"
|
|
131
|
-
}, W = {
|
|
132
|
-
key: 5,
|
|
133
|
-
class: "whitespace-nowrap text-slate-600"
|
|
134
|
-
}, G = {
|
|
135
|
-
key: 6,
|
|
136
|
-
class: "text-slate-600"
|
|
137
|
-
};
|
|
138
|
-
function K(e, t, n, r, i, a) {
|
|
139
|
-
return S(), _("div", null, [b(r.PageHeader, {
|
|
140
|
-
title: "Звернення на видачу та прийом матеріалів",
|
|
141
|
-
subtitle: "Реєстр звернень геодезичного кабінету"
|
|
142
|
-
}), v("section", j, [
|
|
143
|
-
b(r.RegistryToolbar, {
|
|
144
|
-
nowrap: "",
|
|
145
|
-
"search-min": "min-w-[160px]",
|
|
146
|
-
"filter-config": r.config.filter,
|
|
147
|
-
"filter-values": r.filterValues,
|
|
148
|
-
"onUpdate:filterValues": r.onFilterValuesUpdate
|
|
149
|
-
}, {
|
|
150
|
-
search: D(() => [v("label", M, [b(r.AppIcon, {
|
|
151
|
-
name: "search",
|
|
152
|
-
class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
|
|
153
|
-
}), O(v("input", {
|
|
154
|
-
"onUpdate:modelValue": t[0] ||= (e) => r.query = e,
|
|
155
|
-
type: "search",
|
|
156
|
-
placeholder: "Пошук…",
|
|
157
|
-
class: "h-10 w-full rounded-lg border border-slate-200 bg-white pl-9 pr-3 text-sm text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:border-brand-400 focus:ring-1 focus:ring-brand-400"
|
|
158
|
-
}, null, 512), [[E, r.query]])])]),
|
|
159
|
-
actions: D(() => [v("button", N, [b(r.AppIcon, {
|
|
160
|
-
name: "download",
|
|
161
|
-
class: "h-4 w-4"
|
|
162
|
-
})]), v("div", P, [v("button", {
|
|
163
|
-
type: "button",
|
|
164
|
-
class: "inline-flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 transition-colors hover:border-brand-300 hover:text-brand-700",
|
|
165
|
-
onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
|
|
166
|
-
}, [b(r.AppIcon, {
|
|
167
|
-
name: "columns-3",
|
|
168
|
-
class: "h-4 w-4"
|
|
169
|
-
})]), r.columnsOpen ? (S(), _("div", F, [
|
|
170
|
-
t[4] ||= v("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Налаштувати колонки", -1),
|
|
171
|
-
(S(!0), _(p, null, w(r.columns, (e) => (S(), _("label", {
|
|
172
|
-
key: e.key,
|
|
173
|
-
class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
|
|
174
|
-
}, [v("input", {
|
|
175
|
-
type: "checkbox",
|
|
176
|
-
checked: r.visibleColumns.includes(e.key),
|
|
177
|
-
class: "h-4 w-4 accent-brand-600",
|
|
178
|
-
onChange: (t) => r.toggleColumn(e.key)
|
|
179
|
-
}, null, 40, I), y(" " + T(e.label), 1)]))), 128)),
|
|
180
|
-
t[5] ||= v("p", { class: "px-2 pt-1 text-[11px] text-slate-400" }, "До 7 колонок одночасно", -1)
|
|
181
|
-
])) : g("", !0)])]),
|
|
182
|
-
_: 1
|
|
183
|
-
}, 8, ["filter-config", "filter-values"]),
|
|
184
|
-
v("div", L, [v("span", null, [t[6] ||= y("Знайдено звернень: ", -1), v("strong", R, T(r.total), 1)])]),
|
|
185
|
-
b(r.RegistryTable, {
|
|
186
|
-
class: "mt-3",
|
|
187
|
-
rows: r.rows,
|
|
188
|
-
columns: r.columns,
|
|
189
|
-
"visible-keys": r.visibleColumns,
|
|
190
|
-
"row-key": "app_id",
|
|
191
|
-
sort: r.sort,
|
|
192
|
-
"empty-text": r.emptyText,
|
|
193
|
-
onSort: r.onSort
|
|
194
|
-
}, {
|
|
195
|
-
cell: D(({ row: e, column: t }) => [t === "number" ? (S(), h(r.RouterLink, {
|
|
196
|
-
key: 0,
|
|
197
|
-
to: `/requests/${e.app_id}`,
|
|
198
|
-
class: "font-semibold text-brand-700 underline-offset-4 transition-colors hover:text-brand-900 hover:underline"
|
|
199
|
-
}, {
|
|
200
|
-
default: D(() => [y(T(e.number || "—"), 1)]),
|
|
201
|
-
_: 2
|
|
202
|
-
}, 1032, ["to"])) : t === "organization" ? (S(), _("div", z, [v("p", B, T(e.org_id_data?.text || "—"), 1), v("p", V, T(e.surveyor_id_data?.text || "—"), 1)])) : t === "address" ? (S(), _("span", H, T(r.addressLabel(e)), 1)) : t === "status" ? (S(), h(r.AppealStatusBadge, {
|
|
203
|
-
key: 3,
|
|
204
|
-
status: e.status || "",
|
|
205
|
-
label: e.status_data?.text || void 0,
|
|
206
|
-
size: "sm"
|
|
207
|
-
}, null, 8, ["status", "label"])) : t === "workType" ? (S(), _("span", U, T(e.work_type_data?.text || "—"), 1)) : t === "createdAt" ? (S(), _("span", W, T(r.formatDate(e.created_at)), 1)) : t === "checkedBy" ? (S(), _("span", G, T(e.verified_by_data?.text || "—"), 1)) : g("", !0)]),
|
|
208
|
-
_: 1
|
|
209
|
-
}, 8, [
|
|
210
|
-
"rows",
|
|
211
|
-
"columns",
|
|
212
|
-
"visible-keys",
|
|
213
|
-
"sort",
|
|
214
|
-
"empty-text"
|
|
215
|
-
]),
|
|
216
|
-
r.total > 0 ? (S(), h(r.TablePagination, {
|
|
217
|
-
key: 0,
|
|
218
|
-
page: r.page,
|
|
219
|
-
"onUpdate:page": t[2] ||= (e) => r.page = e,
|
|
220
|
-
"page-size": r.pageSize,
|
|
221
|
-
"onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
|
|
222
|
-
total: r.total
|
|
223
|
-
}, null, 8, [
|
|
224
|
-
"page",
|
|
225
|
-
"page-size",
|
|
226
|
-
"total"
|
|
227
|
-
])) : g("", !0)
|
|
228
|
-
])]);
|
|
229
|
-
}
|
|
230
|
-
var q = /*#__PURE__*/ e(A, [["render", K], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/index.vue"]]);
|
|
231
|
-
//#endregion
|
|
232
|
-
export { q as default };
|
package/server/embed.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance } from 'fastify'
|
|
2
|
-
import { createFCore, type AppContext } from '@opengis/fcore'
|
|
3
|
-
import fcoreFastify from '@opengis/fcore/fastify'
|
|
4
|
-
|
|
5
|
-
import dictionaries from './dictionaries/index.js'
|
|
6
|
-
import resources from './resources/index.js'
|
|
7
|
-
import { createSurveyorRoutes } from './modules/surveyor/route.js'
|
|
8
|
-
import { afterSurveyorUser } from './modules/surveyor/utils/permissions.js'
|
|
9
|
-
|
|
10
|
-
export interface RegisterSurveyorBackendOptions {
|
|
11
|
-
fcore?: Record<string, unknown>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare module 'fastify' {
|
|
15
|
-
interface FastifyInstance {
|
|
16
|
-
surveyorCtx?: AppContext
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Registers Surveyor fcore resources and business routes on an existing Fastify app.
|
|
22
|
-
* Does not mount admin/cabinet Vite static assets.
|
|
23
|
-
*/
|
|
24
|
-
export async function registerSurveyorBackend(
|
|
25
|
-
app: FastifyInstance,
|
|
26
|
-
opts: RegisterSurveyorBackendOptions = {},
|
|
27
|
-
): Promise<AppContext> {
|
|
28
|
-
if (app.surveyorCtx) {
|
|
29
|
-
return app.surveyorCtx
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const ctx = await createFCore({
|
|
33
|
-
resources,
|
|
34
|
-
dictionaries,
|
|
35
|
-
hooks: { afterUser: afterSurveyorUser },
|
|
36
|
-
...opts.fcore,
|
|
37
|
-
}) as AppContext
|
|
38
|
-
|
|
39
|
-
await fcoreFastify(ctx)(app as any, {})
|
|
40
|
-
await createSurveyorRoutes(ctx)(app as any, {})
|
|
41
|
-
|
|
42
|
-
app.surveyorCtx = ctx
|
|
43
|
-
|
|
44
|
-
app.addHook('onClose', async () => {
|
|
45
|
-
await ctx.close()
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
return ctx
|
|
49
|
-
}
|