@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.
Files changed (138) hide show
  1. package/README.md +46 -3
  2. package/README.npm.md +51 -0
  3. package/dist/chunks/AppIcon-C-4QykTP.js +85 -0
  4. package/dist/chunks/AppealDetailField-DNRGpnyD.js +58 -0
  5. package/dist/chunks/AppealStatusBadge-CefimzY3.js +132 -0
  6. package/dist/chunks/AppealStatusBadge-Cu-UzdzA.js +171 -0
  7. package/dist/chunks/ApplicationHistorySection-PwToBfej.js +769 -0
  8. package/dist/chunks/BaseModal-DrTTkLmR.js +85 -0
  9. package/dist/chunks/FormFilePicker-CKVdZJU9.js +76 -0
  10. package/dist/chunks/MapLayerMenu-AUeTqgEp.js +145 -0
  11. package/dist/chunks/RegistryForm-pvIcFR-V.js +99 -0
  12. package/dist/chunks/RegistryFormModal-BjGu7Upv.js +85 -0
  13. package/dist/chunks/RegistryToolbar-CiUgsjpU.js +452 -0
  14. package/dist/chunks/UserAccessBadge-DyZDv7Oo.js +44 -0
  15. package/dist/chunks/UserTypeBadge-LvnMuKGo.js +188 -0
  16. package/dist/chunks/VerifiedBadge-B6droMOf.js +34 -0
  17. package/dist/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
  18. package/dist/chunks/account-types-Br7gx_D_.js +35 -0
  19. package/dist/chunks/account_types-DLL1w122.js +25 -0
  20. package/dist/chunks/appealMapLayers-CQMK3rrz.js +115 -0
  21. package/dist/chunks/application_status-BhNGiY2I.js +45 -0
  22. package/dist/chunks/applications-CsCsndMV.js +132 -0
  23. package/dist/chunks/buildSchema-nkA4Y0YG.js +37 -0
  24. package/dist/chunks/card--DHsMNBd.js +330 -0
  25. package/dist/chunks/card-9LaB42Ol.js +538 -0
  26. package/dist/chunks/card-BZn5CDw9.js +739 -0
  27. package/dist/chunks/card-CNqXSyqX.js +297 -0
  28. package/dist/chunks/card-CgGOgGyd.js +973 -0
  29. package/dist/chunks/card-DCyBFoDZ.js +607 -0
  30. package/dist/chunks/certificates-DueBDDvc.js +424 -0
  31. package/dist/chunks/create-l28e-bWl.js +1033 -0
  32. package/dist/chunks/filterQuery-B9XNx1f1.js +99 -0
  33. package/dist/chunks/form-CdGS1nVO.js +315 -0
  34. package/dist/chunks/form-QTkkzwbC.js +89 -0
  35. package/dist/chunks/geometry-DyhIVRcw.js +67 -0
  36. package/dist/chunks/map-BW3iOhQg.js +2763 -0
  37. package/dist/chunks/map-layers-qxWjos2V.js +400 -0
  38. package/dist/chunks/mapLayersApi-CWoQ2be-.js +251 -0
  39. package/dist/chunks/organizations-BtuMZ5s_.js +14 -0
  40. package/dist/chunks/organizations-CZOINYMq.js +476 -0
  41. package/dist/chunks/profile-CuxlkEev.js +243 -0
  42. package/dist/chunks/profile-DxZHxGum.js +164 -0
  43. package/dist/chunks/requests-Bt8fEdRc.js +530 -0
  44. package/dist/chunks/requests-DQJIhz00.js +232 -0
  45. package/dist/chunks/resendSurveyorRegistration-DopjOHaM.js +27 -0
  46. package/dist/chunks/resources-Cl_EvaIy.js +129 -0
  47. package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
  48. package/dist/chunks/surveyorAccount-BceNQypZ.js +78 -0
  49. package/dist/chunks/users-DlaogjC_.js +291 -0
  50. package/dist/chunks/work_types-Hwme-FEX.js +34 -0
  51. package/dist/index.css +3 -0
  52. package/dist/index.js +259 -0
  53. package/migrations/20260924120000_surveyor_schema.sql +450 -0
  54. package/migrations/20261008170000_address_lookup.sql +20 -0
  55. package/migrations/20261016120000_map_layers.sql +156 -0
  56. package/migrations/20261016150000_password_reset.sql +15 -0
  57. package/migrations/20261016170000_address_lookup_format.sql +37 -0
  58. package/migrations/20261016180000_settlement_lookup.sql +16 -0
  59. package/migrations/20261019170000_actor_lookup.sql +15 -0
  60. package/package.json +75 -4
  61. package/plugin.js +10 -0
  62. package/server/app.ts +50 -0
  63. package/server/dictionaries/index.ts +17 -0
  64. package/server/dictionaries/surveyor/account_types.ts +12 -0
  65. package/server/dictionaries/surveyor/application_status.ts +16 -0
  66. package/server/dictionaries/surveyor/map_layer_components.ts +11 -0
  67. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -0
  68. package/server/dictionaries/surveyor/map_layer_types.ts +11 -0
  69. package/server/dictionaries/surveyor/work_types.ts +15 -0
  70. package/server/dictionaries/surveyor/yes_no.ts +11 -0
  71. package/server/embed.ts +49 -0
  72. package/server/fastify.d.ts +12 -0
  73. package/server/index.ts +23 -0
  74. package/server/modules/surveyor/route.ts +410 -0
  75. package/server/modules/surveyor/schema.ts +439 -0
  76. package/server/modules/surveyor/services/applicationTile.ts +53 -0
  77. package/server/modules/surveyor/services/cancelApplication.ts +74 -0
  78. package/server/modules/surveyor/services/changeSurveyorPassword.ts +52 -0
  79. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -0
  80. package/server/modules/surveyor/services/completeApplication.ts +46 -0
  81. package/server/modules/surveyor/services/completeSurveyorRegistration.ts +48 -0
  82. package/server/modules/surveyor/services/createApplication.ts +169 -0
  83. package/server/modules/surveyor/services/geometryExport.ts +34 -0
  84. package/server/modules/surveyor/services/geometryImport.ts +66 -0
  85. package/server/modules/surveyor/services/getSurveyorUser.ts +56 -0
  86. package/server/modules/surveyor/services/identifyApplications.ts +82 -0
  87. package/server/modules/surveyor/services/issueSourceData.ts +55 -0
  88. package/server/modules/surveyor/services/loginSurveyor.ts +67 -0
  89. package/server/modules/surveyor/services/mapLayers.ts +61 -0
  90. package/server/modules/surveyor/services/rasterExport.ts +15 -0
  91. package/server/modules/surveyor/services/registerSurveyor.ts +161 -0
  92. package/server/modules/surveyor/services/requestPasswordReset.ts +49 -0
  93. package/server/modules/surveyor/services/resendRegistration.ts +42 -0
  94. package/server/modules/surveyor/services/resetSurveyorPassword.ts +53 -0
  95. package/server/modules/surveyor/services/searchApplications.ts +63 -0
  96. package/server/modules/surveyor/services/submitSurvey.ts +70 -0
  97. package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +52 -0
  98. package/server/modules/surveyor/services/updateSurveyorStatus.ts +53 -0
  99. package/server/modules/surveyor/services/vectorExport.ts +86 -0
  100. package/server/modules/surveyor/services/verifyApplication.ts +59 -0
  101. package/server/modules/surveyor/utils/accessibleApplication.ts +37 -0
  102. package/server/modules/surveyor/utils/application.ts +68 -0
  103. package/server/modules/surveyor/utils/export.ts +39 -0
  104. package/server/modules/surveyor/utils/firstBoundary.ts +48 -0
  105. package/server/modules/surveyor/utils/mail.ts +161 -0
  106. package/server/modules/surveyor/utils/permissions.ts +29 -0
  107. package/server/modules/surveyor/utils/registration.ts +33 -0
  108. package/server/modules/surveyor/utils/shared.ts +305 -0
  109. package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -0
  110. package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -0
  111. package/server/modules/surveyor/utils/templates/ds.surveyor_registration.pt.hbs +80 -0
  112. package/server/modules/surveyor/utils/templates/ds.surveyor_send_mail.pt.hbs +79 -0
  113. package/server/modules/surveyor/utils/vectorLayer.ts +41 -0
  114. package/server/plugins/convertVector.ts +74 -0
  115. package/server/plugins/proto/convertVector.proto +21 -0
  116. package/server/plugins/swagger.ts +54 -0
  117. package/server/plugins/vite.dev.ts +52 -0
  118. package/server/plugins/vite.prod.ts +55 -0
  119. package/server/resources/helpers/actor_lookup.ts +5 -0
  120. package/server/resources/helpers/address_lookup.ts +8 -0
  121. package/server/resources/helpers/settlement_lookup.ts +7 -0
  122. package/server/resources/helpers/user_lookup.ts +5 -0
  123. package/server/resources/index.ts +30 -0
  124. package/server/resources/surveyor-admin/application_comments.ts +24 -0
  125. package/server/resources/surveyor-admin/application_status_history.ts +46 -0
  126. package/server/resources/surveyor-admin/applications.ts +125 -0
  127. package/server/resources/surveyor-admin/certificates.ts +87 -0
  128. package/server/resources/surveyor-admin/map_layers.ts +69 -0
  129. package/server/resources/surveyor-admin/organization_surveyors.ts +32 -0
  130. package/server/resources/surveyor-admin/organizations.ts +61 -0
  131. package/server/resources/surveyor-admin/surveyors.ts +71 -0
  132. package/server/resources/surveyor-user/application_status_history.ts +52 -0
  133. package/server/resources/surveyor-user/applications.ts +131 -0
  134. package/server/resources/surveyor-user/certificates.ts +67 -0
  135. package/server/resources/surveyor-user/organizations.ts +40 -0
  136. package/server/resources/surveyor-user/surveyors.ts +69 -0
  137. package/server/tsconfig.json +3 -0
  138. package/surveyor-types.d.ts +30 -0
@@ -0,0 +1,424 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
+ import { t as n } from "./AppIcon-C-4QykTP.js";
4
+ import { i as r, o as i, t as a } from "./resources-Cl_EvaIy.js";
5
+ import { t as o } from "./VerifiedBadge-B6droMOf.js";
6
+ import { n as s } from "./account-types-Br7gx_D_.js";
7
+ import { n as c } from "./filterQuery-B9XNx1f1.js";
8
+ import { a as l, i as u, n as d, r as f, t as p } from "./RegistryToolbar-CiUgsjpU.js";
9
+ import { t as m } from "./RegistryFormModal-BjGu7Upv.js";
10
+ import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, defineComponent as C, normalizeClass as w, openBlock as T, ref as E, renderList as D, toDisplayString as O, vModelText as k, withCtx as A, withDirectives as j } from "vue";
11
+ import { RouterLink as M } from "vue-router";
12
+ //#region admin/src/static/registry/certificates/resource.ts
13
+ var N = "certificates", P = {
14
+ resource: N,
15
+ pageSize: 10,
16
+ sort: "-created_at",
17
+ columns: [
18
+ {
19
+ key: "fullName",
20
+ label: "Прізвище, ім'я та по батькові геодезиста"
21
+ },
22
+ {
23
+ key: "certificate",
24
+ label: "Номер кваліфікаційного сертифіката"
25
+ },
26
+ {
27
+ key: "verified",
28
+ label: "Верифікація"
29
+ },
30
+ {
31
+ key: "qualificationUpgrade",
32
+ label: "Підвищення кваліфікації"
33
+ },
34
+ {
35
+ key: "suspendedAt",
36
+ label: "Дата призупинення"
37
+ },
38
+ {
39
+ key: "terminatedAt",
40
+ label: "Дата припинення"
41
+ }
42
+ ]
43
+ }, F = {
44
+ resource: N,
45
+ view: "inline",
46
+ fields: { verified: {
47
+ component: "select",
48
+ label: "Верифікація",
49
+ placeholder: "Верифікація",
50
+ width: 160,
51
+ options: [{
52
+ id: "verified",
53
+ text: "Верифіковані"
54
+ }, {
55
+ id: "unverified",
56
+ text: "Не верифіковані"
57
+ }]
58
+ } }
59
+ };
60
+ //#endregion
61
+ //#region admin/src/static/registry/certificates/form.ts
62
+ function I(e) {
63
+ return [
64
+ e.last_name,
65
+ e.first_name,
66
+ e.middle_name
67
+ ].map((e) => String(e ?? "").trim()).filter(Boolean).join(" ");
68
+ }
69
+ function L(e) {
70
+ let t = I(e);
71
+ return {
72
+ certificate_type: String(e.certificate_type ?? "").trim(),
73
+ last_name: String(e.last_name ?? "").trim(),
74
+ first_name: String(e.first_name ?? "").trim(),
75
+ middle_name: String(e.middle_name ?? "").trim() || null,
76
+ surveyor_name: t || null,
77
+ number_certificate: String(e.number_certificate ?? "").trim(),
78
+ date_certificate: e.date_certificate || null,
79
+ name_school: String(e.name_school ?? "").trim() || null,
80
+ surveyor_email: String(e.surveyor_email ?? "").trim() || null,
81
+ surveyor_phone: String(e.surveyor_phone ?? "").trim() || null,
82
+ isvalid: e.isvalid == null ? null : !!e.isvalid
83
+ };
84
+ }
85
+ var R = {
86
+ resource: N,
87
+ emptyValues: () => ({
88
+ certificate_type: s,
89
+ last_name: "",
90
+ first_name: "",
91
+ middle_name: "",
92
+ number_certificate: "",
93
+ date_certificate: "",
94
+ name_school: "",
95
+ surveyor_email: "",
96
+ surveyor_phone: "",
97
+ isvalid: !0
98
+ }),
99
+ recordToValues: (e) => ({
100
+ certificate_type: String(e.certificate_type ?? s),
101
+ last_name: String(e.last_name ?? ""),
102
+ first_name: String(e.first_name ?? ""),
103
+ middle_name: String(e.middle_name ?? ""),
104
+ number_certificate: String(e.number_certificate ?? ""),
105
+ date_certificate: e.date_certificate ?? "",
106
+ name_school: String(e.name_school ?? ""),
107
+ surveyor_email: String(e.surveyor_email ?? ""),
108
+ surveyor_phone: String(e.surveyor_phone ?? ""),
109
+ isvalid: e.isvalid == null || !!e.isvalid
110
+ }),
111
+ save: async (e, t) => {
112
+ let n = L(t);
113
+ return e ? i(N, e, n) : a(N, n);
114
+ },
115
+ fields: {
116
+ certificate_type: {
117
+ component: "select",
118
+ label: "Реєстр",
119
+ col: 12,
120
+ api: "/api/suggest/certificates/certificate_type",
121
+ validators: ["required"]
122
+ },
123
+ last_name: {
124
+ component: "text",
125
+ label: "Прізвище",
126
+ col: 4,
127
+ validators: ["required"]
128
+ },
129
+ first_name: {
130
+ component: "text",
131
+ label: "Ім'я",
132
+ col: 4,
133
+ validators: ["required"]
134
+ },
135
+ middle_name: {
136
+ component: "text",
137
+ label: "По батькові",
138
+ col: 4
139
+ },
140
+ number_certificate: {
141
+ component: "text",
142
+ label: "Номер кваліфікаційного сертифіката",
143
+ col: 6,
144
+ validators: ["required"]
145
+ },
146
+ date_certificate: {
147
+ component: "date",
148
+ label: "Дата видачі",
149
+ col: 6
150
+ },
151
+ name_school: {
152
+ component: "text",
153
+ label: "Назва навчального закладу",
154
+ col: 12
155
+ },
156
+ surveyor_email: {
157
+ component: "email",
158
+ label: "Email геодезиста",
159
+ col: 6
160
+ },
161
+ surveyor_phone: {
162
+ component: "text",
163
+ label: "Телефон геодезиста",
164
+ col: 6
165
+ },
166
+ isvalid: {
167
+ component: "switcher",
168
+ label: "Дійсний сертифікат",
169
+ col: 12,
170
+ view: "checkbox"
171
+ }
172
+ }
173
+ }, z = {
174
+ valid: {
175
+ label: "Дійсний",
176
+ dot: "bg-emerald-500",
177
+ text: "text-emerald-700",
178
+ bg: "bg-emerald-50",
179
+ border: "border-emerald-200"
180
+ },
181
+ suspended: {
182
+ label: "Призупинений",
183
+ dot: "bg-amber-500",
184
+ text: "text-amber-700",
185
+ bg: "bg-amber-50",
186
+ border: "border-amber-200"
187
+ },
188
+ no_data: {
189
+ label: "Відсутні дані",
190
+ dot: "bg-slate-400",
191
+ text: "text-slate-600",
192
+ bg: "bg-slate-100",
193
+ border: "border-slate-200"
194
+ }
195
+ }, B = /* @__PURE__ */ e({
196
+ VALIDITY_STATUS: () => z,
197
+ filter: () => F,
198
+ form: () => R,
199
+ resource: () => N,
200
+ table: () => P
201
+ }), V = /*@__PURE__*/ C({
202
+ __name: "index",
203
+ setup(e, { expose: t }) {
204
+ t();
205
+ let i = P.columns, { query: a, filterValues: s, page: h, pageSize: _, listFilters: v, bindListLoader: y, refreshList: b } = l({
206
+ arrayFilterKeys: ["verified"],
207
+ buildFilters: c
208
+ }), x = E(!1), S = E(i.map((e) => e.key)), C = E([]), w = E(0), T = E(!1), D = E(""), O = E(!1);
209
+ function k(e) {
210
+ return e.surveyor_name || [
211
+ e.last_name,
212
+ e.first_name,
213
+ e.middle_name
214
+ ].filter(Boolean).join(" ") || "—";
215
+ }
216
+ function A(e) {
217
+ if (!e) return "";
218
+ let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
219
+ return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
220
+ }
221
+ let j = 0, F = g(() => T.value ? "Завантаження…" : D.value ? D.value : "Сертифікатів за заданими фільтрами не знайдено.");
222
+ async function I() {
223
+ let e = ++j;
224
+ T.value = !0, D.value = "";
225
+ try {
226
+ let t = await r(N, {
227
+ page: h.value,
228
+ limit: _.value,
229
+ sort: P.sort,
230
+ search: a.value.trim() || void 0,
231
+ filters: v.value
232
+ });
233
+ if (e !== j) return;
234
+ C.value = t.rows ?? [], w.value = Number(t.total) || 0;
235
+ } catch (t) {
236
+ if (e !== j) return;
237
+ C.value = [], w.value = 0, D.value = t instanceof Error ? t.message : "Не вдалося завантажити сертифікати";
238
+ } finally {
239
+ e === j && (T.value = !1);
240
+ }
241
+ }
242
+ y(() => {
243
+ I();
244
+ });
245
+ function L(e) {
246
+ s.value = e;
247
+ }
248
+ function R(e) {
249
+ S.value = S.value.includes(e) ? S.value.length > 1 ? S.value.filter((t) => t !== e) : S.value : [...S.value, e];
250
+ }
251
+ function z() {
252
+ h.value === 1 ? b(() => {
253
+ I();
254
+ }) : h.value = 1;
255
+ }
256
+ let V = {
257
+ columns: i,
258
+ query: a,
259
+ filterValues: s,
260
+ page: h,
261
+ pageSize: _,
262
+ listFilters: v,
263
+ bindListLoader: y,
264
+ refreshList: b,
265
+ columnsOpen: x,
266
+ visibleColumns: S,
267
+ rows: C,
268
+ total: w,
269
+ loading: T,
270
+ error: D,
271
+ showAddModal: O,
272
+ personName: k,
273
+ formatDate: A,
274
+ get requestId() {
275
+ return j;
276
+ },
277
+ set requestId(e) {
278
+ j = e;
279
+ },
280
+ emptyText: F,
281
+ loadRows: I,
282
+ onFilterValuesUpdate: L,
283
+ toggleColumn: R,
284
+ onCertificateSaved: z,
285
+ AppIcon: n,
286
+ get RouterLink() {
287
+ return M;
288
+ },
289
+ PageHeader: u,
290
+ VerifiedBadge: o,
291
+ RegistryTable: f,
292
+ TablePagination: d,
293
+ RegistryFormModal: m,
294
+ RegistryToolbar: p,
295
+ get config() {
296
+ return B;
297
+ }
298
+ };
299
+ return Object.defineProperty(V, "__isScriptSetup", {
300
+ enumerable: !1,
301
+ value: !0
302
+ }), V;
303
+ }
304
+ }), H = { class: "px-4" }, U = { class: "relative block" }, W = {
305
+ type: "button",
306
+ 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",
307
+ "aria-label": "Експорт",
308
+ title: "Експорт"
309
+ }, G = { class: "relative" }, K = {
310
+ key: 0,
311
+ class: "absolute right-0 top-12 z-20 w-64 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
312
+ }, q = ["checked", "onChange"], J = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, Y = { class: "font-semibold text-slate-600" }, X = {
313
+ key: 1,
314
+ class: "break-words font-medium text-slate-700"
315
+ }, Z = {
316
+ key: 3,
317
+ class: "text-slate-400"
318
+ }, Q = {
319
+ key: 4,
320
+ class: "whitespace-nowrap text-slate-600"
321
+ };
322
+ function $(e, t, n, r, i, a) {
323
+ return T(), y("div", null, [
324
+ S(r.PageHeader, {
325
+ title: "Реєстр сертифікатів",
326
+ subtitle: "Кваліфікаційні сертифікати геодезичного кабінету"
327
+ }),
328
+ b("section", H, [
329
+ S(r.RegistryToolbar, {
330
+ "filter-config": r.config.filter,
331
+ "filter-values": r.filterValues,
332
+ "onUpdate:filterValues": r.onFilterValuesUpdate
333
+ }, {
334
+ search: A(() => [b("label", U, [S(r.AppIcon, {
335
+ name: "search",
336
+ class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
337
+ }), j(b("input", {
338
+ "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
339
+ type: "search",
340
+ placeholder: "Пошук (ПІБ, номер сертифіката)…",
341
+ 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"
342
+ }, null, 512), [[k, r.query]])])]),
343
+ actions: A(() => [b("button", W, [S(r.AppIcon, {
344
+ name: "download",
345
+ class: "h-4 w-4"
346
+ })]), b("div", G, [b("button", {
347
+ type: "button",
348
+ 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",
349
+ "aria-label": "Налаштувати колонки",
350
+ onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
351
+ }, [S(r.AppIcon, {
352
+ name: "columns-3",
353
+ class: "h-4 w-4"
354
+ })]), r.columnsOpen ? (T(), y("div", K, [t[5] ||= b("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Показати колонки", -1), (T(!0), y(h, null, D(r.columns, (e) => (T(), y("label", {
355
+ key: e.key,
356
+ class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
357
+ }, [b("input", {
358
+ type: "checkbox",
359
+ checked: r.visibleColumns.includes(e.key),
360
+ class: "h-4 w-4 accent-brand-600",
361
+ onChange: (t) => r.toggleColumn(e.key)
362
+ }, null, 40, q), x(" " + O(e.label), 1)]))), 128))])) : v("", !0)])]),
363
+ _: 1
364
+ }, 8, ["filter-config", "filter-values"]),
365
+ b("div", J, [b("span", null, [t[6] ||= x("Знайдено сертифікатів: ", -1), b("strong", Y, O(r.total), 1)])]),
366
+ S(r.RegistryTable, {
367
+ class: "mt-3",
368
+ rows: r.rows,
369
+ columns: r.columns,
370
+ "visible-keys": r.visibleColumns,
371
+ "row-key": "certificate_id",
372
+ "min-width": "1100px",
373
+ "empty-text": r.emptyText
374
+ }, {
375
+ cell: A(({ row: e, column: t }) => [t === "fullName" ? (T(), _(r.RouterLink, {
376
+ key: 0,
377
+ to: `/certificates/${e.certificate_id}`,
378
+ class: "block w-full max-w-full break-words text-left font-semibold text-brand-700 hover:text-brand-900 hover:underline"
379
+ }, {
380
+ default: A(() => [x(O(r.personName(e)), 1)]),
381
+ _: 2
382
+ }, 1032, ["to"])) : t === "certificate" ? (T(), y("span", X, O(e.number_certificate || "—"), 1)) : t === "verified" && typeof e.isvalid == "boolean" ? (T(), _(r.VerifiedBadge, {
383
+ key: 2,
384
+ verified: e.isvalid
385
+ }, null, 8, ["verified"])) : t === "verified" ? (T(), y("span", Z, "—")) : t === "qualificationUpgrade" ? (T(), y("span", Q, O(r.formatDate(e.last_qualification_date) || "—"), 1)) : t === "suspendedAt" ? (T(), y("span", {
386
+ key: 5,
387
+ class: w(["whitespace-nowrap", e.certificate_suspension ? "font-medium text-danger-700" : "text-slate-400"])
388
+ }, O(r.formatDate(e.certificate_suspension) || "—"), 3)) : t === "terminatedAt" ? (T(), y("span", {
389
+ key: 6,
390
+ class: w(["whitespace-nowrap", e.certificate_stopping ? "font-medium text-danger-700" : "text-slate-400"])
391
+ }, O(e.certificate_stopping || "—"), 3)) : v("", !0)]),
392
+ _: 1
393
+ }, 8, [
394
+ "rows",
395
+ "columns",
396
+ "visible-keys",
397
+ "empty-text"
398
+ ]),
399
+ r.total > 0 ? (T(), _(r.TablePagination, {
400
+ key: 0,
401
+ page: r.page,
402
+ "onUpdate:page": t[2] ||= (e) => r.page = e,
403
+ "page-size": r.pageSize,
404
+ "onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
405
+ total: r.total
406
+ }, null, 8, [
407
+ "page",
408
+ "page-size",
409
+ "total"
410
+ ])) : v("", !0)
411
+ ]),
412
+ S(r.RegistryFormModal, {
413
+ modelValue: r.showAddModal,
414
+ "onUpdate:modelValue": t[4] ||= (e) => r.showAddModal = e,
415
+ title: "Новий сертифікат",
416
+ config: r.config.form,
417
+ width: "max-w-3xl",
418
+ onSaved: r.onCertificateSaved
419
+ }, null, 8, ["modelValue", "config"])
420
+ ]);
421
+ }
422
+ var ee = /*#__PURE__*/ t(V, [["render", $], ["__file", "C:/softpro/surveyor/admin/src/pages/certificates/index.vue"]]);
423
+ //#endregion
424
+ export { ee as default };