@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,8 +1,8 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
2
+ import { n as t, t as n } from "./useEntityPath-n7hCq8zh.js";
3
3
  import { a as r, o as i } from "./resources-2e8RFqWR.js";
4
- import { t as a } from "./UserTypeBadge-LvnMuKGo.js";
5
- import { n as o, t as s } from "./AppealDetailField-DNRGpnyD.js";
4
+ import { t as a } from "./UserTypeBadge-YIwwoCho.js";
5
+ import { n as o, t as s } from "./AppealDetailField-CI-1qhs3.js";
6
6
  import { a as ee, i as te, n as ne, r as c, t as re } from "./surveyorAccount-C7UiiIYg.js";
7
7
  import { n as l, t as ie } from "./resendSurveyorRegistration-BHTTVIw1.js";
8
8
  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, onMounted as ae, onUnmounted as oe, openBlock as b, ref as x, renderList as S, toDisplayString as C, vModelText as w, watch as T, withCtx as E, withDirectives as D, withModifiers as O } from "vue";
@@ -534,6 +534,6 @@ function ke(e, t, n, r, i, a) {
534
534
  _: 1
535
535
  }, 8, ["to"])]));
536
536
  }
537
- var Ae = /*#__PURE__*/ e(M, [["render", ke], ["__file", "C:/softpro/surveyor/admin/src/pages/users/card.vue"]]);
537
+ var Ae = /*#__PURE__*/ e(M, [["render", ke], ["__file", "D:/Softpro/surveyor/admin/src/pages/users/card.vue"]]);
538
538
  //#endregion
539
539
  export { Ae as default };
@@ -1,11 +1,11 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
2
+ import { n as t, t as n } from "./useEntityPath-n7hCq8zh.js";
3
3
  import { a as r, c as i, l as a, o, s } from "./resources-2e8RFqWR.js";
4
- import { n as c, t as l } from "./AppealDetailField-DNRGpnyD.js";
5
- import { t as u } from "./BaseModal-SQXvRRNW.js";
6
- import { t as d } from "./AppealStatusBadge-Cu-UzdzA.js";
4
+ import { n as c, t as l } from "./AppealDetailField-CI-1qhs3.js";
5
+ import { t as u } from "./BaseModal-DnwqlJhc.js";
6
+ import { t as d } from "./AppealStatusBadge-DYBe9hqP.js";
7
7
  import { r as f } from "./geometry-DyhIVRcw.js";
8
- import { a as p, i as m, n as h, r as g, t as _ } from "./ApplicationHistorySection-Cwq0-Frd.js";
8
+ import { a as p, i as m, n as h, r as g, t as _ } from "./ApplicationHistorySection-CPCU_DXH.js";
9
9
  import { Fragment as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createTextVNode as w, createVNode as T, defineComponent as E, mergeModels as D, normalizeClass as O, openBlock as k, ref as A, renderList as j, toDisplayString as M, useModel as N, vModelRadio as P, vModelSelect as F, vModelText as I, watch as L, withCtx as R, withDirectives as z } from "vue";
10
10
  import { RouterLink as B, useRoute as V } from "vue-router";
11
11
  //#region admin/src/pages/requests/components/AppealDetailBoolean.vue?vue&type=script&setup=true&lang.ts
@@ -45,7 +45,7 @@ function te(e, t, n, r, i, a) {
45
45
  class: "h-4 w-4"
46
46
  }), t[1] ||= w(" Ні ", -1)]))])]);
47
47
  }
48
- var ne = /*#__PURE__*/ e(H, [["render", te], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/AppealDetailBoolean.vue"]]), re = /*@__PURE__*/ E({
48
+ var ne = /*#__PURE__*/ e(H, [["render", te], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/components/AppealDetailBoolean.vue"]]), re = /*@__PURE__*/ E({
49
49
  __name: "FormFilePicker",
50
50
  props: {
51
51
  fileName: {
@@ -114,7 +114,7 @@ function oe(e, t, n, r, i, a) {
114
114
  onChange: r.onInputChange
115
115
  }, null, 40, ae)]);
116
116
  }
117
- var se = /*#__PURE__*/ e(re, [["render", oe], ["__file", "C:/softpro/surveyor/admin/src/components/ui/FormFilePicker.vue"]]), Z = "applications";
117
+ var se = /*#__PURE__*/ e(re, [["render", oe], ["__file", "D:/Softpro/surveyor/admin/src/components/ui/FormFilePicker.vue"]]), Z = "applications";
118
118
  async function Q(e, t) {
119
119
  let n = new FormData();
120
120
  n.append("file", t, t.name);
@@ -482,7 +482,7 @@ function Pe(e, t, n, r, i, a) {
482
482
  }, 8, ["modelValue"])
483
483
  ], 64);
484
484
  }
485
- var Fe = /*#__PURE__*/ e(me, [["render", Pe], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/ApplicationWorkflowActions.vue"]]), Ie = "w-full rounded-lg border border-slate-200 px-3 py-2 text-sm shadow-sm focus:border-brand-300 focus:outline-none focus:ring-2 focus:ring-brand-100", Le = "w-full appearance-none rounded-lg border border-slate-200 bg-white py-2 pl-3 pr-9 text-sm shadow-sm focus:border-brand-300 focus:outline-none focus:ring-2 focus:ring-brand-100 disabled:bg-slate-50 disabled:text-slate-400", Re = /*@__PURE__*/ E({
485
+ var Fe = /*#__PURE__*/ e(me, [["render", Pe], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/components/ApplicationWorkflowActions.vue"]]), Ie = "w-full rounded-lg border border-slate-200 px-3 py-2 text-sm shadow-sm focus:border-brand-300 focus:outline-none focus:ring-2 focus:ring-brand-100", Le = "w-full appearance-none rounded-lg border border-slate-200 bg-white py-2 pl-3 pr-9 text-sm shadow-sm focus:border-brand-300 focus:outline-none focus:ring-2 focus:ring-brand-100 disabled:bg-slate-50 disabled:text-slate-400", Re = /*@__PURE__*/ E({
486
486
  __name: "ApplicationVectorExportModal",
487
487
  props: /*@__PURE__*/ D({ applicationId: {
488
488
  type: String,
@@ -657,7 +657,7 @@ function $e(e, t, n, r, i, a) {
657
657
  _: 1
658
658
  }, 8, ["modelValue"]);
659
659
  }
660
- var et = /*#__PURE__*/ e(Re, [["render", $e], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/ApplicationVectorExportModal.vue"]]), tt = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg bg-brand-50 px-2.5 py-1.5 text-xs font-medium text-brand-600 transition-colors hover:bg-brand-100", nt = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg border border-brand-300/50 bg-white px-2.5 py-1.5 text-xs font-medium text-brand-600 shadow-sm transition-colors hover:border-brand-400 hover:bg-brand-50/40 disabled:opacity-50", rt = /*@__PURE__*/ E({
660
+ var et = /*#__PURE__*/ e(Re, [["render", $e], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/components/ApplicationVectorExportModal.vue"]]), tt = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg bg-brand-50 px-2.5 py-1.5 text-xs font-medium text-brand-600 transition-colors hover:bg-brand-100", nt = "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg border border-brand-300/50 bg-white px-2.5 py-1.5 text-xs font-medium text-brand-600 shadow-sm transition-colors hover:border-brand-400 hover:bg-brand-50/40 disabled:opacity-50", rt = /*@__PURE__*/ E({
661
661
  __name: "card",
662
662
  setup(e, { expose: a }) {
663
663
  a();
@@ -1185,6 +1185,6 @@ function Vt(e, t, n, r, i, a) {
1185
1185
  _: 1
1186
1186
  }, 8, ["to"])]));
1187
1187
  }
1188
- var Ht = /*#__PURE__*/ e(rt, [["render", Vt], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/card.vue"]]);
1188
+ var Ht = /*#__PURE__*/ e(rt, [["render", Vt], ["__file", "D:/Softpro/surveyor/admin/src/pages/requests/card.vue"]]);
1189
1189
  //#endregion
1190
1190
  export { Ht as default };
@@ -1,11 +1,11 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { a as t, t as n } from "./surveyor-CDkI2Dcp.js";
3
3
  import { i as r, r as i } from "./profile-aXlo4qqA.js";
4
- import { t as a } from "./AppIcon-CO70tpMX.js";
4
+ import { t as a } from "./AppIcon-CCLzEE-_.js";
5
5
  import { r as o } from "./geometry-DyhIVRcw.js";
6
- import { a as s, i as c, n as ee, r as te, t as ne } from "./ApplicationHistorySection-Cwq0-Frd.js";
7
- import { t as re } from "./FormFilePicker-DxPQlxgy.js";
8
- import { n as l, t as ie } from "./AppealStatusBadge-BlAaNUSK.js";
6
+ import { a as s, i as c, n as ee, r as te, t as ne } from "./ApplicationHistorySection-CPCU_DXH.js";
7
+ import { t as re } from "./FormFilePicker-Dss6pGmO.js";
8
+ import { n as l, t as ie } from "./AppealStatusBadge-CzzI6x8I.js";
9
9
  import { a as ae, n as u, t as d } from "./applications-D6pHAQaK.js";
10
10
  import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, normalizeClass as x, openBlock as S, ref as C, renderList as w, toDisplayString as T, vModelText as E, watch as oe, withCtx as D, withDirectives as O } from "vue";
11
11
  import { RouterLink as se, useRoute as ce } from "vue-router";
@@ -604,6 +604,6 @@ function rt(e, t, n, r, i, a) {
604
604
  _: 1
605
605
  })]));
606
606
  }
607
- var it = /*#__PURE__*/ e(j, [["render", rt], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/card.vue"]]);
607
+ var it = /*#__PURE__*/ e(j, [["render", rt], ["__file", "D:/Softpro/surveyor/cabinet/src/pages/requests/card.vue"]]);
608
608
  //#endregion
609
609
  export { it as default };
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
2
+ import { n as t, t as n } from "./useEntityPath-n7hCq8zh.js";
3
3
  import { r } from "./resources-2e8RFqWR.js";
4
- import { n as i, t as a } from "./AppealDetailField-DNRGpnyD.js";
5
- import { t as o } from "./RegistryForm-wG-c8GKf.js";
4
+ import { n as i, t as a } from "./AppealDetailField-CI-1qhs3.js";
5
+ import { t as o } from "./RegistryForm-CEUqFmsF.js";
6
6
  import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./form-Bh6i5n1U.js";
7
7
  import { l as ee } from "./appealMapLayers-CQMK3rrz.js";
8
8
  import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as C, normalizeStyle as w, openBlock as T, ref as E, renderList as D, toDisplayString as O, watch as k, withCtx as A } from "vue";
@@ -326,6 +326,6 @@ function se(e, t, n, r, i, a) {
326
326
  _: 1
327
327
  }, 8, ["to"])]));
328
328
  }
329
- var ce = /*#__PURE__*/ e(F, [["render", se], ["__file", "C:/softpro/surveyor/admin/src/pages/map-layers/card.vue"]]);
329
+ var ce = /*#__PURE__*/ e(F, [["render", se], ["__file", "D:/Softpro/surveyor/admin/src/pages/map-layers/card.vue"]]);
330
330
  //#endregion
331
331
  export { ce as default };
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { n as t, t as n } from "./useEntityPath-C5Owtidc.js";
2
+ import { n as t, t as n } from "./useEntityPath-n7hCq8zh.js";
3
3
  import { a as r, i } from "./resources-2e8RFqWR.js";
4
- import { t as a } from "./VerifiedBadge-bk0n-rlC.js";
5
- import { t as o } from "./UserTypeBadge-LvnMuKGo.js";
6
- import { t as s } from "./UserAccessBadge-DyZDv7Oo.js";
7
- import { n as c, t as l } from "./AppealDetailField-DNRGpnyD.js";
4
+ import { t as a } from "./VerifiedBadge-B__Vs_ce.js";
5
+ import { t as o } from "./UserTypeBadge-YIwwoCho.js";
6
+ import { t as s } from "./UserAccessBadge-D8JfgGfN.js";
7
+ import { n as c, t as l } from "./AppealDetailField-CI-1qhs3.js";
8
8
  import { a as u } from "./surveyorAccount-C7UiiIYg.js";
9
9
  import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, normalizeClass as b, openBlock as x, ref as S, renderList as C, toDisplayString as w, watch as T, withCtx as E } from "vue";
10
10
  import { RouterLink as D, useRoute as O } from "vue-router";
@@ -293,6 +293,6 @@ function $(e, t, n, r, i, a) {
293
293
  _: 1
294
294
  }, 8, ["to"])]));
295
295
  }
296
- var te = /*#__PURE__*/ e(k, [["render", $], ["__file", "C:/softpro/surveyor/admin/src/pages/certificates/card.vue"]]);
296
+ var te = /*#__PURE__*/ e(k, [["render", $], ["__file", "D:/Softpro/surveyor/admin/src/pages/certificates/card.vue"]]);
297
297
  //#endregion
298
298
  export { te as default };
@@ -0,0 +1,209 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { o as t, t as n } from "./resources-2e8RFqWR.js";
3
+ import { n as r } from "./account-types-Br7gx_D_.js";
4
+ //#region admin/src/static/registry/certificates/resource.ts
5
+ var i = "certificates", a = {
6
+ resource: i,
7
+ pageSize: 10,
8
+ sort: "-created_at",
9
+ columns: [
10
+ {
11
+ key: "fullName",
12
+ label: "Прізвище, ім'я та по батькові геодезиста"
13
+ },
14
+ {
15
+ key: "certificate",
16
+ label: "Номер кваліфікаційного сертифіката"
17
+ },
18
+ {
19
+ key: "verified",
20
+ label: "Верифікація"
21
+ },
22
+ {
23
+ key: "qualificationUpgrade",
24
+ label: "Підвищення кваліфікації"
25
+ },
26
+ {
27
+ key: "suspendedAt",
28
+ label: "Дата призупинення"
29
+ },
30
+ {
31
+ key: "terminatedAt",
32
+ label: "Дата припинення"
33
+ }
34
+ ]
35
+ }, o = {
36
+ resource: i,
37
+ view: "inline",
38
+ fields: { verified: {
39
+ component: "select",
40
+ label: "Верифікація",
41
+ placeholder: "Верифікація",
42
+ width: 160,
43
+ options: [{
44
+ id: "verified",
45
+ text: "Верифіковані"
46
+ }, {
47
+ id: "unverified",
48
+ text: "Не верифіковані"
49
+ }]
50
+ } }
51
+ };
52
+ //#endregion
53
+ //#region admin/src/static/registry/certificates/form.ts
54
+ function s(e) {
55
+ return [
56
+ e.last_name,
57
+ e.first_name,
58
+ e.middle_name
59
+ ].map((e) => String(e ?? "").trim()).filter(Boolean).join(" ");
60
+ }
61
+ function c(e) {
62
+ let t = s(e);
63
+ return {
64
+ certificate_type: String(e.certificate_type ?? "").trim(),
65
+ last_name: String(e.last_name ?? "").trim(),
66
+ first_name: String(e.first_name ?? "").trim(),
67
+ middle_name: String(e.middle_name ?? "").trim() || null,
68
+ surveyor_name: t || null,
69
+ number_certificate: String(e.number_certificate ?? "").trim(),
70
+ date_certificate: e.date_certificate || null,
71
+ name_school: String(e.name_school ?? "").trim() || null,
72
+ surveyor_email: String(e.surveyor_email ?? "").trim() || null,
73
+ surveyor_phone: String(e.surveyor_phone ?? "").trim() || null,
74
+ isvalid: e.isvalid == null ? null : !!e.isvalid
75
+ };
76
+ }
77
+ var l = {
78
+ resource: i,
79
+ emptyValues: () => ({
80
+ certificate_type: r,
81
+ last_name: "",
82
+ first_name: "",
83
+ middle_name: "",
84
+ number_certificate: "",
85
+ date_certificate: "",
86
+ name_school: "",
87
+ surveyor_email: "",
88
+ surveyor_phone: "",
89
+ isvalid: !0
90
+ }),
91
+ recordToValues: (e) => ({
92
+ certificate_type: String(e.certificate_type ?? r),
93
+ last_name: String(e.last_name ?? ""),
94
+ first_name: String(e.first_name ?? ""),
95
+ middle_name: String(e.middle_name ?? ""),
96
+ number_certificate: String(e.number_certificate ?? ""),
97
+ date_certificate: e.date_certificate ?? "",
98
+ name_school: String(e.name_school ?? ""),
99
+ surveyor_email: String(e.surveyor_email ?? ""),
100
+ surveyor_phone: String(e.surveyor_phone ?? ""),
101
+ isvalid: e.isvalid == null || !!e.isvalid
102
+ }),
103
+ save: async (e, r) => {
104
+ let a = c(r);
105
+ return e ? t(i, e, a) : n(i, a);
106
+ },
107
+ fields: {
108
+ certificate_type: {
109
+ component: "select",
110
+ label: "Реєстр",
111
+ col: 12,
112
+ api: "/api/suggest/certificates/certificate_type",
113
+ validators: ["required"]
114
+ },
115
+ last_name: {
116
+ component: "text",
117
+ label: "Прізвище",
118
+ col: 4,
119
+ validators: ["required"]
120
+ },
121
+ first_name: {
122
+ component: "text",
123
+ label: "Ім'я",
124
+ col: 4,
125
+ validators: ["required"]
126
+ },
127
+ middle_name: {
128
+ component: "text",
129
+ label: "По батькові",
130
+ col: 4
131
+ },
132
+ number_certificate: {
133
+ component: "text",
134
+ label: "Номер кваліфікаційного сертифіката",
135
+ col: 6,
136
+ validators: ["required"]
137
+ },
138
+ date_certificate: {
139
+ component: "date",
140
+ label: "Дата видачі",
141
+ col: 6
142
+ },
143
+ name_school: {
144
+ component: "text",
145
+ label: "Назва навчального закладу",
146
+ col: 12
147
+ },
148
+ surveyor_email: {
149
+ component: "email",
150
+ label: "Email геодезиста",
151
+ col: 6
152
+ },
153
+ surveyor_phone: {
154
+ component: "text",
155
+ label: "Телефон геодезиста",
156
+ col: 6
157
+ },
158
+ isvalid: {
159
+ component: "switcher",
160
+ label: "Дійсний сертифікат",
161
+ col: 12,
162
+ view: "checkbox"
163
+ }
164
+ }
165
+ }, u = {
166
+ valid: {
167
+ label: "Дійсний",
168
+ dot: "bg-emerald-500",
169
+ text: "text-emerald-700",
170
+ bg: "bg-emerald-50",
171
+ border: "border-emerald-200"
172
+ },
173
+ suspended: {
174
+ label: "Призупинений",
175
+ dot: "bg-amber-500",
176
+ text: "text-amber-700",
177
+ bg: "bg-amber-50",
178
+ border: "border-amber-200"
179
+ },
180
+ stopped: {
181
+ label: "Припинений",
182
+ dot: "bg-red-500",
183
+ text: "text-red-700",
184
+ bg: "bg-red-50",
185
+ border: "border-red-200"
186
+ },
187
+ invalid: {
188
+ label: "Недійсний",
189
+ dot: "bg-red-500",
190
+ text: "text-red-700",
191
+ bg: "bg-red-50",
192
+ border: "border-red-200"
193
+ },
194
+ no_data: {
195
+ label: "Відсутні дані",
196
+ dot: "bg-slate-400",
197
+ text: "text-slate-600",
198
+ bg: "bg-slate-100",
199
+ border: "border-slate-200"
200
+ }
201
+ }, d = /* @__PURE__ */ e({
202
+ VALIDITY_STATUS: () => u,
203
+ filter: () => o,
204
+ form: () => l,
205
+ resource: () => i,
206
+ table: () => a
207
+ });
208
+ //#endregion
209
+ export { i, u as n, a as r, d as t };
@@ -0,0 +1,236 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { n as t, t as n } from "./useEntityPath-n7hCq8zh.js";
3
+ import { i as r } from "./resources-2e8RFqWR.js";
4
+ import { t as i } from "./VerifiedBadge-B__Vs_ce.js";
5
+ import { n as a } from "./filterQuery-CvfZrkTC.js";
6
+ import { a as o, i as s, n as c, r as l, t as u } from "./RegistryToolbar-CI1MRqzw.js";
7
+ import { t as d } from "./RegistryFormModal-C-Z4MMHi.js";
8
+ import { i as f, r as p, t as m } from "./certificates-BnseQylH.js";
9
+ 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";
10
+ import { RouterLink as M } from "vue-router";
11
+ //#region admin/src/pages/certificates/index.vue?vue&type=script&setup=true&lang.ts
12
+ var N = /*@__PURE__*/ C({
13
+ __name: "index",
14
+ setup(e, { expose: h }) {
15
+ h();
16
+ let _ = p.columns, { query: v, filterValues: y, page: b, pageSize: x, listFilters: S, bindListLoader: C, refreshList: w } = o({
17
+ arrayFilterKeys: ["verified"],
18
+ buildFilters: a
19
+ }), { detailPath: T } = n(), D = E(!1), O = E(_.map((e) => e.key)), k = E([]), A = E(0), j = E(!1), N = E(""), P = E(!1);
20
+ function F(e) {
21
+ return e.surveyor_name || [
22
+ e.last_name,
23
+ e.first_name,
24
+ e.middle_name
25
+ ].filter(Boolean).join(" ") || "—";
26
+ }
27
+ function I(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
+ let L = 0, R = g(() => j.value ? "Завантаження…" : N.value ? N.value : "Сертифікатів за заданими фільтрами не знайдено.");
33
+ async function z() {
34
+ let e = ++L;
35
+ j.value = !0, N.value = "";
36
+ try {
37
+ let t = await r(f, {
38
+ page: b.value,
39
+ limit: x.value,
40
+ sort: p.sort,
41
+ search: v.value.trim() || void 0,
42
+ filters: S.value
43
+ });
44
+ if (e !== L) return;
45
+ k.value = t.rows ?? [], A.value = Number(t.total) || 0;
46
+ } catch (t) {
47
+ if (e !== L) return;
48
+ k.value = [], A.value = 0, N.value = t instanceof Error ? t.message : "Не вдалося завантажити сертифікати";
49
+ } finally {
50
+ e === L && (j.value = !1);
51
+ }
52
+ }
53
+ C(() => {
54
+ z();
55
+ });
56
+ function B(e) {
57
+ y.value = e;
58
+ }
59
+ function V(e) {
60
+ O.value = O.value.includes(e) ? O.value.length > 1 ? O.value.filter((t) => t !== e) : O.value : [...O.value, e];
61
+ }
62
+ function H() {
63
+ b.value === 1 ? w(() => {
64
+ z();
65
+ }) : b.value = 1;
66
+ }
67
+ let U = {
68
+ columns: _,
69
+ query: v,
70
+ filterValues: y,
71
+ page: b,
72
+ pageSize: x,
73
+ listFilters: S,
74
+ bindListLoader: C,
75
+ refreshList: w,
76
+ detailPath: T,
77
+ columnsOpen: D,
78
+ visibleColumns: O,
79
+ rows: k,
80
+ total: A,
81
+ loading: j,
82
+ error: N,
83
+ showAddModal: P,
84
+ personName: F,
85
+ formatDate: I,
86
+ get requestId() {
87
+ return L;
88
+ },
89
+ set requestId(e) {
90
+ L = e;
91
+ },
92
+ emptyText: R,
93
+ loadRows: z,
94
+ onFilterValuesUpdate: B,
95
+ toggleColumn: V,
96
+ onCertificateSaved: H,
97
+ AppIcon: t,
98
+ get RouterLink() {
99
+ return M;
100
+ },
101
+ PageHeader: s,
102
+ VerifiedBadge: i,
103
+ RegistryTable: l,
104
+ TablePagination: c,
105
+ RegistryFormModal: d,
106
+ RegistryToolbar: u,
107
+ get config() {
108
+ return m;
109
+ }
110
+ };
111
+ return Object.defineProperty(U, "__isScriptSetup", {
112
+ enumerable: !1,
113
+ value: !0
114
+ }), U;
115
+ }
116
+ }), P = { class: "px-4" }, F = { class: "relative block" }, I = {
117
+ type: "button",
118
+ 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",
119
+ "aria-label": "Експорт",
120
+ title: "Експорт"
121
+ }, L = { class: "relative" }, R = {
122
+ key: 0,
123
+ class: "absolute right-0 top-12 z-20 w-64 rounded-lg border border-slate-200 bg-white p-2 shadow-card-hover"
124
+ }, z = ["checked", "onChange"], B = { class: "mt-3 flex items-center justify-between border-t border-slate-100 pt-3 text-xs text-slate-400" }, V = { class: "font-semibold text-slate-600" }, H = {
125
+ key: 1,
126
+ class: "break-words font-medium text-slate-700"
127
+ }, U = {
128
+ key: 3,
129
+ class: "text-slate-400"
130
+ }, W = {
131
+ key: 4,
132
+ class: "whitespace-nowrap text-slate-600"
133
+ };
134
+ function G(e, t, n, r, i, a) {
135
+ return T(), y("div", null, [
136
+ S(r.PageHeader, {
137
+ title: "Реєстр сертифікатів",
138
+ subtitle: "Кваліфікаційні сертифікати геодезичного кабінету"
139
+ }),
140
+ b("section", P, [
141
+ S(r.RegistryToolbar, {
142
+ "filter-config": r.config.filter,
143
+ "filter-values": r.filterValues,
144
+ "onUpdate:filterValues": r.onFilterValuesUpdate
145
+ }, {
146
+ search: A(() => [b("label", F, [S(r.AppIcon, {
147
+ name: "search",
148
+ class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
149
+ }), j(b("input", {
150
+ "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
151
+ type: "search",
152
+ placeholder: "Пошук (ПІБ, номер сертифіката)…",
153
+ 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"
154
+ }, null, 512), [[k, r.query]])])]),
155
+ actions: A(() => [b("button", I, [S(r.AppIcon, {
156
+ name: "download",
157
+ class: "h-4 w-4"
158
+ })]), b("div", L, [b("button", {
159
+ type: "button",
160
+ 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",
161
+ "aria-label": "Налаштувати колонки",
162
+ onClick: t[1] ||= (e) => r.columnsOpen = !r.columnsOpen
163
+ }, [S(r.AppIcon, {
164
+ name: "columns-3",
165
+ class: "h-4 w-4"
166
+ })]), r.columnsOpen ? (T(), y("div", R, [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", {
167
+ key: e.key,
168
+ class: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-slate-600 hover:bg-slate-50"
169
+ }, [b("input", {
170
+ type: "checkbox",
171
+ checked: r.visibleColumns.includes(e.key),
172
+ class: "h-4 w-4 accent-brand-600",
173
+ onChange: (t) => r.toggleColumn(e.key)
174
+ }, null, 40, z), x(" " + O(e.label), 1)]))), 128))])) : v("", !0)])]),
175
+ _: 1
176
+ }, 8, ["filter-config", "filter-values"]),
177
+ b("div", B, [b("span", null, [t[6] ||= x("Знайдено сертифікатів: ", -1), b("strong", V, O(r.total), 1)])]),
178
+ S(r.RegistryTable, {
179
+ class: "mt-3",
180
+ rows: r.rows,
181
+ columns: r.columns,
182
+ "visible-keys": r.visibleColumns,
183
+ "row-key": "certificate_id",
184
+ "min-width": "1100px",
185
+ "empty-text": r.emptyText
186
+ }, {
187
+ cell: A(({ row: e, column: t }) => [t === "fullName" ? (T(), _(r.RouterLink, {
188
+ key: 0,
189
+ to: r.detailPath(e.certificate_id),
190
+ class: "block w-full max-w-full break-words text-left font-semibold text-brand-700 hover:text-brand-900 hover:underline"
191
+ }, {
192
+ default: A(() => [x(O(r.personName(e)), 1)]),
193
+ _: 2
194
+ }, 1032, ["to"])) : t === "certificate" ? (T(), y("span", H, O(e.number_certificate || "—"), 1)) : t === "verified" && typeof e.isvalid == "boolean" ? (T(), _(r.VerifiedBadge, {
195
+ key: 2,
196
+ verified: e.isvalid
197
+ }, null, 8, ["verified"])) : t === "verified" ? (T(), y("span", U, "—")) : t === "qualificationUpgrade" ? (T(), y("span", W, O(r.formatDate(e.last_qualification_date) || "—"), 1)) : t === "suspendedAt" ? (T(), y("span", {
198
+ key: 5,
199
+ class: w(["whitespace-nowrap", e.certificate_suspension ? "font-medium text-danger-700" : "text-slate-400"])
200
+ }, O(r.formatDate(e.certificate_suspension) || "—"), 3)) : t === "terminatedAt" ? (T(), y("span", {
201
+ key: 6,
202
+ class: w(["whitespace-nowrap", e.certificate_stopping ? "font-medium text-danger-700" : "text-slate-400"])
203
+ }, O(e.certificate_stopping || "—"), 3)) : v("", !0)]),
204
+ _: 1
205
+ }, 8, [
206
+ "rows",
207
+ "columns",
208
+ "visible-keys",
209
+ "empty-text"
210
+ ]),
211
+ r.total > 0 ? (T(), _(r.TablePagination, {
212
+ key: 0,
213
+ page: r.page,
214
+ "onUpdate:page": t[2] ||= (e) => r.page = e,
215
+ "page-size": r.pageSize,
216
+ "onUpdate:pageSize": t[3] ||= (e) => r.pageSize = e,
217
+ total: r.total
218
+ }, null, 8, [
219
+ "page",
220
+ "page-size",
221
+ "total"
222
+ ])) : v("", !0)
223
+ ]),
224
+ S(r.RegistryFormModal, {
225
+ modelValue: r.showAddModal,
226
+ "onUpdate:modelValue": t[4] ||= (e) => r.showAddModal = e,
227
+ title: "Новий сертифікат",
228
+ config: r.config.form,
229
+ width: "max-w-3xl",
230
+ onSaved: r.onCertificateSaved
231
+ }, null, 8, ["modelValue", "config"])
232
+ ]);
233
+ }
234
+ var K = /*#__PURE__*/ e(N, [["render", G], ["__file", "D:/Softpro/surveyor/admin/src/pages/certificates/index.vue"]]);
235
+ //#endregion
236
+ export { K as default };