@opengis/surveyor 0.0.9 → 0.0.11

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 (51) hide show
  1. package/README.md +4 -3
  2. package/dist/chunks/{AppIcon-CO70tpMX.js → AppIcon-CCLzEE-_.js} +1 -1
  3. package/dist/chunks/{AppealDetailField-DNRGpnyD.js → AppealDetailField-CI-1qhs3.js} +2 -2
  4. package/dist/chunks/{AppealStatusBadge-BlAaNUSK.js → AppealStatusBadge-CzzI6x8I.js} +2 -2
  5. package/dist/chunks/{AppealStatusBadge-Cu-UzdzA.js → AppealStatusBadge-DYBe9hqP.js} +1 -1
  6. package/dist/chunks/{ApplicationHistorySection-Cwq0-Frd.js → ApplicationHistorySection-CPCU_DXH.js} +4 -4
  7. package/dist/chunks/{BaseModal-SQXvRRNW.js → BaseModal-DnwqlJhc.js} +21 -11
  8. package/dist/chunks/{FormFilePicker-DxPQlxgy.js → FormFilePicker-Dss6pGmO.js} +2 -2
  9. package/dist/chunks/{MapLayerMenu-AUeTqgEp.js → MapLayerMenu-DjYCxEc3.js} +1 -1
  10. package/dist/chunks/{RegistryForm-wG-c8GKf.js → RegistryForm-CEUqFmsF.js} +1 -1
  11. package/dist/chunks/{RegistryFormModal-R_iZYqGE.js → RegistryFormModal-C-Z4MMHi.js} +3 -3
  12. package/dist/chunks/{RegistryToolbar-322DKUXi.js → RegistryToolbar-CI1MRqzw.js} +6 -6
  13. package/dist/chunks/{SurveyorTeleport-CnSF0Ptl.js → SurveyorTeleport-BLEO6we9.js} +1 -1
  14. package/dist/chunks/{UserAccessBadge-DyZDv7Oo.js → UserAccessBadge-D8JfgGfN.js} +1 -1
  15. package/dist/chunks/{UserTypeBadge-LvnMuKGo.js → UserTypeBadge-YIwwoCho.js} +1 -1
  16. package/dist/chunks/{VerifiedBadge-bk0n-rlC.js → VerifiedBadge-B__Vs_ce.js} +2 -2
  17. package/dist/chunks/{card-X9UVFgdR.js → card-BElHsAFl.js} +241 -208
  18. package/dist/chunks/{card-DWpAv92l.js → card-CU2THiBT.js} +4 -4
  19. package/dist/chunks/{card-6z-m7UkM.js → card-CUDo4kUH.js} +10 -10
  20. package/dist/chunks/{card-Dlp8_KhV.js → card-DL7yHB1C.js} +5 -5
  21. package/dist/chunks/{card-CWqi1K-x.js → card-UG1mWhcg.js} +4 -4
  22. package/dist/chunks/{card-C3y-j2TA.js → card-sDIYR6YI.js} +6 -6
  23. package/dist/chunks/certificates-BnseQylH.js +209 -0
  24. package/dist/chunks/certificates-DKi9CSfc.js +236 -0
  25. package/dist/chunks/{create-DR8tXNYj.js → create-DVZv77Uw.js} +9 -9
  26. package/dist/chunks/{forgot-DoG6vXhq.js → forgot-BVzXMKGA.js} +2 -2
  27. package/dist/chunks/{login-BWGylcSU.js → login-BCib_dtl.js} +2 -2
  28. package/dist/chunks/{map-DvwFkxAS.js → map-CNX1_COE.js} +940 -831
  29. package/dist/chunks/{map-layers-sT-gTiD_.js → map-layers-CCJ7G7ZK.js} +5 -5
  30. package/dist/chunks/{organizations-ByVE2f0c.js → organizations-BuMFRKjw.js} +6 -6
  31. package/dist/chunks/{profile-CkwMFh82.js → profile-BI_RIHN1.js} +3 -3
  32. package/dist/chunks/{registration-3GLgq-ae.js → registration-6nn7GgDS.js} +2 -2
  33. package/dist/chunks/{requests-BTpLXrNj.js → requests-DQRmDemb.js} +4 -4
  34. package/dist/chunks/{requests-rWq8ok3C.js → requests-Dh5jxF06.js} +5 -5
  35. package/dist/chunks/{reset-CP9LsLkC.js → reset-D2uXDfB6.js} +2 -2
  36. package/dist/chunks/{useEntityPath-C5Owtidc.js → useEntityPath-n7hCq8zh.js} +1 -1
  37. package/dist/chunks/{users-U1P6xCP4.js → users-LbXn1F2y.js} +6 -6
  38. package/dist/index.css +1 -1
  39. package/dist/index.js +40 -40
  40. package/package.json +1 -1
  41. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -41
  42. package/server/modules/surveyor/services/createApplication.ts +2 -3
  43. package/server/modules/surveyor/services/registerSurveyor.ts +3 -4
  44. package/server/modules/surveyor/services/requestPasswordReset.ts +1 -0
  45. package/server/modules/surveyor/services/resetSurveyorPassword.ts +1 -0
  46. package/server/modules/surveyor/utils/certificateStatus.ts +15 -0
  47. package/server/modules/surveyor/utils/mail.ts +49 -20
  48. package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -79
  49. package/server/plugins/convertVector.ts +1 -1
  50. package/server/resources/surveyor-admin/certificates.ts +27 -1
  51. package/dist/chunks/certificates-Cwch72-o.js +0 -425
@@ -1,79 +1,79 @@
1
- <!DOCTYPE html>
2
- <html lang="uk">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Пароль змінено</title>
8
- <style>
9
- body {
10
- font-family: Arial, sans-serif;
11
- color: #333;
12
- background-color: #f4f4f4;
13
- padding: 20px;
14
- }
15
-
16
- .email-container {
17
- max-width: 600px;
18
- margin: 0 auto;
19
- background-color: #ffffff;
20
- padding: 20px;
21
- border-radius: 5px;
22
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
23
- }
24
-
25
- h1 {
26
- font-size: 20px;
27
- color: #000;
28
- margin-bottom: 20px;
29
- }
30
-
31
- p {
32
- line-height: 1.6;
33
- margin: 10px 0;
34
- }
35
-
36
- .credentials {
37
- font-weight: bold;
38
- margin-top: 10px;
39
- }
40
-
41
- a {
42
- color: #007bff;
43
- text-decoration: none;
44
- }
45
-
46
- a:hover {
47
- text-decoration: underline;
48
- }
49
-
50
- .footer {
51
- font-size: 12px;
52
- color: #777;
53
- margin-top: 20px;
54
- text-align: center;
55
- }
56
- </style>
57
- </head>
58
-
59
- <body>
60
- <div class="email-container">
61
- <h1>Адміністратор порталу змінив Вам пароль до
62
- <a target="_blank" href="{{protocol}}://{{host}}">кабінету геодезиста</a>
63
- </h1>
64
- <p class="credentials">
65
- Логін: <strong>{{login}}</strong><br>
66
- Пароль: <strong>{{password}}</strong>
67
- </p>
68
- <p>
69
- Ви можете увійти на сайт, натиснувши на цьому посиланні або скопіювавши його в адресний рядок вашого
70
- браузера:<br>
71
- <a target="_blank" href="{{protocol}}://{{host}}">{{protocol}}://{{host}}</a>
72
- </p>
73
- <div class="footer">
74
- Це автоматично створений лист, будь ласка, не відповідайте на нього.
75
- </div>
76
- </div>
77
- </body>
78
-
79
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="uk">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Пароль змінено</title>
8
+ <style>
9
+ body {
10
+ font-family: Arial, sans-serif;
11
+ color: #333;
12
+ background-color: #f4f4f4;
13
+ padding: 20px;
14
+ }
15
+
16
+ .email-container {
17
+ max-width: 600px;
18
+ margin: 0 auto;
19
+ background-color: #ffffff;
20
+ padding: 20px;
21
+ border-radius: 5px;
22
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
23
+ }
24
+
25
+ h1 {
26
+ font-size: 20px;
27
+ color: #000;
28
+ margin-bottom: 20px;
29
+ }
30
+
31
+ p {
32
+ line-height: 1.6;
33
+ margin: 10px 0;
34
+ }
35
+
36
+ .credentials {
37
+ font-weight: bold;
38
+ margin-top: 10px;
39
+ }
40
+
41
+ a {
42
+ color: #007bff;
43
+ text-decoration: none;
44
+ }
45
+
46
+ a:hover {
47
+ text-decoration: underline;
48
+ }
49
+
50
+ .footer {
51
+ font-size: 12px;
52
+ color: #777;
53
+ margin-top: 20px;
54
+ text-align: center;
55
+ }
56
+ </style>
57
+ </head>
58
+
59
+ <body>
60
+ <div class="email-container">
61
+ <h1>Адміністратор порталу змінив Вам пароль до
62
+ <a target="_blank" href="{{protocol}}://{{host}}">кабінету геодезиста</a>
63
+ </h1>
64
+ <p class="credentials">
65
+ Логін: <strong>{{login}}</strong><br>
66
+ Пароль: <strong>{{password}}</strong>
67
+ </p>
68
+ <p>
69
+ Ви можете увійти на сайт, натиснувши на цьому посиланні або скопіювавши його в адресний рядок вашого
70
+ браузера:<br>
71
+ <a target="_blank" href="{{protocol}}://{{host}}">{{protocol}}://{{host}}</a>
72
+ </p>
73
+ <div class="footer">
74
+ Це автоматично створений лист, будь ласка, не відповідайте на нього.
75
+ </div>
76
+ </div>
77
+ </body>
78
+
79
+ </html>
@@ -28,7 +28,7 @@ const protocol = grpc.loadPackageDefinition(definition) as unknown as {
28
28
  };
29
29
 
30
30
  export async function convertVector(input: ConvertInput): Promise<unknown> {
31
- const address = process.env.MAPNIK_SERVER?.trim();
31
+ const address = process.env.MAPNIK_SERVER?.trim() || process.env?.['mapnik.server'];
32
32
  if (!address) {
33
33
  throw new FCoreError("VECTOR_CONVERTER_UNAVAILABLE", "Не налаштовано MAPNIK_SERVER", 503);
34
34
  }
@@ -1,6 +1,7 @@
1
1
  import type { ResourceContract } from "@opengis/fcore";
2
2
  import accountTypes from "../../dictionaries/surveyor/account_types.js";
3
3
  import { userLookup } from "../helpers/user_lookup.js";
4
+ import { certificateStatusSql } from "../../modules/surveyor/utils/certificateStatus.js";
4
5
 
5
6
  const accountTypeCodes = accountTypes.items.map(({ code }) => code);
6
7
 
@@ -13,7 +14,18 @@ export default {
13
14
  table: "surveyor.certificates",
14
15
  key: "certificate_id",
15
16
  display: ["surveyor_name", "number_certificate"],
16
- displayFields: ["number_certificate", "surveyor_phone", "surveyor_email"],
17
+ // Форма додавання користувача бере з /list статус сертифіката та наявний обліковий запис.
18
+ displayFields: [
19
+ "number_certificate",
20
+ "surveyor_phone",
21
+ "surveyor_email",
22
+ `${certificateStatusSql("t")} AS certificate_status`,
23
+ "account_id",
24
+ "account_name",
25
+ "account_email",
26
+ "account_phone",
27
+ "account_registered_at",
28
+ ],
17
29
  access: "admin",
18
30
  operations: ["read"],
19
31
  searchable: ["surveyor_name", "last_name", "first_name", "number_certificate"],
@@ -77,6 +89,20 @@ export default {
77
89
  isvalid: { type: "boolean", write: false, filterable: true },
78
90
  qualification_level: { type: "string", write: false },
79
91
  },
92
+ // Колонки мають префікс account_, щоб не конфліктувати з полями сертифіката.
93
+ // scope "item" не додає join до основного списку сертифікатів.
94
+ joins: [{
95
+ scope: "item",
96
+ sql: `LEFT JOIN LATERAL (
97
+ SELECT s.surveyor_id AS account_id,
98
+ concat_ws(' ', s.last_name, s.first_name, s.middle_name) AS account_name,
99
+ s.email AS account_email,
100
+ s.phone AS account_phone,
101
+ s.registered_at AS account_registered_at
102
+ FROM surveyor.surveyors s
103
+ WHERE s.certificate_id = t.certificate_id
104
+ ) AS account ON true`,
105
+ }],
80
106
  relations: {
81
107
  surveyors: {
82
108
  resource: "surveyors",
@@ -1,425 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { n, t as r } from "./useEntityPath-C5Owtidc.js";
4
- import { i, o as a, t as o } from "./resources-2e8RFqWR.js";
5
- import { t as s } from "./VerifiedBadge-bk0n-rlC.js";
6
- import { n as c } from "./account-types-Br7gx_D_.js";
7
- import { n as l } from "./filterQuery-CvfZrkTC.js";
8
- import { a as u, i as d, n as f, r as p, t as m } from "./RegistryToolbar-322DKUXi.js";
9
- import { t as h } from "./RegistryFormModal-R_iZYqGE.js";
10
- import { Fragment as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, normalizeClass as T, openBlock as E, ref as D, renderList as O, toDisplayString as k, vModelText as A, withCtx as j, withDirectives as M } from "vue";
11
- import { RouterLink as N } from "vue-router";
12
- //#region admin/src/static/registry/certificates/resource.ts
13
- var P = "certificates", F = {
14
- resource: P,
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
- }, I = {
44
- resource: P,
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 L(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 R(e) {
70
- let t = L(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 z = {
86
- resource: P,
87
- emptyValues: () => ({
88
- certificate_type: c,
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 ?? c),
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 = R(t);
113
- return e ? a(P, e, n) : o(P, 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
- }, B = {
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
- }, V = /* @__PURE__ */ e({
196
- VALIDITY_STATUS: () => B,
197
- filter: () => I,
198
- form: () => z,
199
- resource: () => P,
200
- table: () => F
201
- }), H = /*@__PURE__*/ w({
202
- __name: "index",
203
- setup(e, { expose: t }) {
204
- t();
205
- let a = F.columns, { query: o, filterValues: c, page: g, pageSize: v, listFilters: y, bindListLoader: b, refreshList: x } = u({
206
- arrayFilterKeys: ["verified"],
207
- buildFilters: l
208
- }), { detailPath: S } = r(), C = D(!1), w = D(a.map((e) => e.key)), T = D([]), E = D(0), O = D(!1), k = D(""), A = D(!1);
209
- function j(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 M(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 I = 0, L = _(() => O.value ? "Завантаження…" : k.value ? k.value : "Сертифікатів за заданими фільтрами не знайдено.");
222
- async function R() {
223
- let e = ++I;
224
- O.value = !0, k.value = "";
225
- try {
226
- let t = await i(P, {
227
- page: g.value,
228
- limit: v.value,
229
- sort: F.sort,
230
- search: o.value.trim() || void 0,
231
- filters: y.value
232
- });
233
- if (e !== I) return;
234
- T.value = t.rows ?? [], E.value = Number(t.total) || 0;
235
- } catch (t) {
236
- if (e !== I) return;
237
- T.value = [], E.value = 0, k.value = t instanceof Error ? t.message : "Не вдалося завантажити сертифікати";
238
- } finally {
239
- e === I && (O.value = !1);
240
- }
241
- }
242
- b(() => {
243
- R();
244
- });
245
- function z(e) {
246
- c.value = e;
247
- }
248
- function B(e) {
249
- w.value = w.value.includes(e) ? w.value.length > 1 ? w.value.filter((t) => t !== e) : w.value : [...w.value, e];
250
- }
251
- function H() {
252
- g.value === 1 ? x(() => {
253
- R();
254
- }) : g.value = 1;
255
- }
256
- let U = {
257
- columns: a,
258
- query: o,
259
- filterValues: c,
260
- page: g,
261
- pageSize: v,
262
- listFilters: y,
263
- bindListLoader: b,
264
- refreshList: x,
265
- detailPath: S,
266
- columnsOpen: C,
267
- visibleColumns: w,
268
- rows: T,
269
- total: E,
270
- loading: O,
271
- error: k,
272
- showAddModal: A,
273
- personName: j,
274
- formatDate: M,
275
- get requestId() {
276
- return I;
277
- },
278
- set requestId(e) {
279
- I = e;
280
- },
281
- emptyText: L,
282
- loadRows: R,
283
- onFilterValuesUpdate: z,
284
- toggleColumn: B,
285
- onCertificateSaved: H,
286
- AppIcon: n,
287
- get RouterLink() {
288
- return N;
289
- },
290
- PageHeader: d,
291
- VerifiedBadge: s,
292
- RegistryTable: p,
293
- TablePagination: f,
294
- RegistryFormModal: h,
295
- RegistryToolbar: m,
296
- get config() {
297
- return V;
298
- }
299
- };
300
- return Object.defineProperty(U, "__isScriptSetup", {
301
- enumerable: !1,
302
- value: !0
303
- }), U;
304
- }
305
- }), U = { class: "px-4" }, W = { class: "relative block" }, G = {
306
- type: "button",
307
- 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",
308
- "aria-label": "Експорт",
309
- title: "Експорт"
310
- }, K = { class: "relative" }, q = {
311
- key: 0,
312
- class: "absolute right-0 top-12 z-20 w-64 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
313
- }, J = ["checked", "onChange"], Y = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, X = { class: "font-semibold text-slate-600" }, Z = {
314
- key: 1,
315
- class: "break-words font-medium text-slate-700"
316
- }, Q = {
317
- key: 3,
318
- class: "text-slate-400"
319
- }, $ = {
320
- key: 4,
321
- class: "whitespace-nowrap text-slate-600"
322
- };
323
- function ee(e, t, n, r, i, a) {
324
- return E(), b("div", null, [
325
- C(r.PageHeader, {
326
- title: "Реєстр сертифікатів",
327
- subtitle: "Кваліфікаційні сертифікати геодезичного кабінету"
328
- }),
329
- x("section", U, [
330
- C(r.RegistryToolbar, {
331
- "filter-config": r.config.filter,
332
- "filter-values": r.filterValues,
333
- "onUpdate:filterValues": r.onFilterValuesUpdate
334
- }, {
335
- search: j(() => [x("label", W, [C(r.AppIcon, {
336
- name: "search",
337
- class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
338
- }), M(x("input", {
339
- "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
340
- type: "search",
341
- placeholder: "Пошук (ПІБ, номер сертифіката)…",
342
- 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"
343
- }, null, 512), [[A, r.query]])])]),
344
- actions: j(() => [x("button", G, [C(r.AppIcon, {
345
- name: "download",
346
- class: "h-4 w-4"
347
- })]), x("div", K, [x("button", {
348
- type: "button",
349
- 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",
350
- "aria-label": "Налаштувати колонки",
351
- onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
352
- }, [C(r.AppIcon, {
353
- name: "columns-3",
354
- class: "h-4 w-4"
355
- })]), r.columnsOpen ? (E(), b("div", q, [t[5] ||= x("p", { class: "px-2 py-1 text-xs font-semibold uppercase tracking-wide text-slate-400" }, "Показати колонки", -1), (E(!0), b(g, null, O(r.columns, (e) => (E(), b("label", {
356
- key: e.key,
357
- class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
358
- }, [x("input", {
359
- type: "checkbox",
360
- checked: r.visibleColumns.includes(e.key),
361
- class: "h-4 w-4 accent-brand-600",
362
- onChange: (t) => r.toggleColumn(e.key)
363
- }, null, 40, J), S(" " + k(e.label), 1)]))), 128))])) : y("", !0)])]),
364
- _: 1
365
- }, 8, ["filter-config", "filter-values"]),
366
- x("div", Y, [x("span", null, [t[6] ||= S("Знайдено сертифікатів: ", -1), x("strong", X, k(r.total), 1)])]),
367
- C(r.RegistryTable, {
368
- class: "mt-3",
369
- rows: r.rows,
370
- columns: r.columns,
371
- "visible-keys": r.visibleColumns,
372
- "row-key": "certificate_id",
373
- "min-width": "1100px",
374
- "empty-text": r.emptyText
375
- }, {
376
- cell: j(({ row: e, column: t }) => [t === "fullName" ? (E(), v(r.RouterLink, {
377
- key: 0,
378
- to: r.detailPath(e.certificate_id),
379
- class: "block w-full max-w-full break-words text-left font-semibold text-brand-700 hover:text-brand-900 hover:underline"
380
- }, {
381
- default: j(() => [S(k(r.personName(e)), 1)]),
382
- _: 2
383
- }, 1032, ["to"])) : t === "certificate" ? (E(), b("span", Z, k(e.number_certificate || "—"), 1)) : t === "verified" && typeof e.isvalid == "boolean" ? (E(), v(r.VerifiedBadge, {
384
- key: 2,
385
- verified: e.isvalid
386
- }, null, 8, ["verified"])) : t === "verified" ? (E(), b("span", Q, "—")) : t === "qualificationUpgrade" ? (E(), b("span", $, k(r.formatDate(e.last_qualification_date) || "—"), 1)) : t === "suspendedAt" ? (E(), b("span", {
387
- key: 5,
388
- class: T(["whitespace-nowrap", e.certificate_suspension ? "font-medium text-danger-700" : "text-slate-400"])
389
- }, k(r.formatDate(e.certificate_suspension) || "—"), 3)) : t === "terminatedAt" ? (E(), b("span", {
390
- key: 6,
391
- class: T(["whitespace-nowrap", e.certificate_stopping ? "font-medium text-danger-700" : "text-slate-400"])
392
- }, k(e.certificate_stopping || "—"), 3)) : y("", !0)]),
393
- _: 1
394
- }, 8, [
395
- "rows",
396
- "columns",
397
- "visible-keys",
398
- "empty-text"
399
- ]),
400
- r.total > 0 ? (E(), v(r.TablePagination, {
401
- key: 0,
402
- page: r.page,
403
- "onUpdate:page": t[2] ||= (e) => r.page = e,
404
- "page-size": r.pageSize,
405
- "onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
406
- total: r.total
407
- }, null, 8, [
408
- "page",
409
- "page-size",
410
- "total"
411
- ])) : y("", !0)
412
- ]),
413
- C(r.RegistryFormModal, {
414
- modelValue: r.showAddModal,
415
- "onUpdate:modelValue": t[4] ||= (e) => r.showAddModal = e,
416
- title: "Новий сертифікат",
417
- config: r.config.form,
418
- width: "max-w-3xl",
419
- onSaved: r.onCertificateSaved
420
- }, null, 8, ["modelValue", "config"])
421
- ]);
422
- }
423
- var te = /*#__PURE__*/ t(H, [["render", ee], ["__file", "C:/softpro/surveyor/admin/src/pages/certificates/index.vue"]]);
424
- //#endregion
425
- export { te as default };