@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
package/README.md CHANGED
@@ -1,3 +1,46 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # Surveyor Engineering
2
+
3
+ **Surveyor** — кабінет інженера-геодезиста для реєстрації та супроводу заявок на топографо-геодезичні роботи, ведення організацій, профілів геодезистів і кваліфікаційних сертифікатів.
4
+
5
+ Система забезпечує єдиний електронний процес від реєстрації геодезиста і подання заявки до перевірки результатів знімання та завершення заявки після внесення даних у ЄЦТО.
6
+
7
+ [Admin UI](https://geodesist-portal-req-m67d.bolt.host/)
8
+
9
+ ## Користувачі
10
+
11
+ - **Сертифікований геодезист —** подає заявки від організації, отримує вихідні матеріали, завантажує результати знімання, отримує матеріали на доопрацювання та працює із заявками своєї організації.
12
+ - **Адміністратор —** реєструє геодезистів, опрацьовує заявки, формує та видає вихідні матеріали, перевіряє результати знімання, повертає їх на доопрацювання або завершує процес.
13
+
14
+ ## Основні можливості
15
+
16
+ - **Організації —** ведення реєстру організацій та прив'язка до них сертифікованих геодезистів.
17
+ - **Сертифіковані геодезисти —** реєстрація користувача з вибором сертифіката з реєстру сертифікованих спеціалістів.
18
+ - **Активація облікового запису —** надсилання геодезисту посилання електронною поштою та самостійне встановлення пароля.
19
+ - **Заявки —** створення заявки із зазначенням організації, виду робіт, території знімання та інших необхідних даних.
20
+ - **Карта —** визначення геометрії території знімання безпосередньо на карті.
21
+ - **Контроль площі —** площа однієї заявки не повинна перевищувати 10 га; активна площа заявок організації — 100 га.
22
+ - **Контроль перетинів —** заявка, що перетинається з активною заявкою, автоматично переводиться в статус `reserve`.
23
+ - **Вихідні дані —** адміністратор готує та видає вихідні матеріали для виконання знімання.
24
+ - **Експорт геоданих —** формування доступних векторних та растрових матеріалів для заявки.
25
+ - **Подання знімання —** геодезист завантажує виконані матеріали після видачі вихідних даних.
26
+ - **Перевірка —** адміністратор приймає матеріали або повертає їх на доопрацювання.
27
+ - **Завершення —** після успішної перевірки заявка завершується внесенням у ЄЦТО.
28
+ - **Історія —** збереження історії зміни статусів і ключових дій над заявкою.
29
+
30
+ ## Поставка
31
+
32
+ ```text
33
+ Surveyor
34
+ ├── Embedded npm package
35
+ └── Standalone
36
+ ```
37
+
38
+ Продукт може використовуватися як **Embedded npm package** у складі існуючої платформи або як окремий **Standalone** application з однаковими domain contracts та API.
39
+
40
+ ## Technology
41
+
42
+ - **Frontend -** Vue 3.
43
+ - **Backend -** Node.js / TypeScript / Fastify.
44
+ - **Database -** PostgreSQL + PostGIS.
45
+ - **API -** Universal Resource CRUD + Business Services.
46
+ - **Deployment -** Embedded npm package / Standalone.
package/README.npm.md ADDED
@@ -0,0 +1,51 @@
1
+ # @opengis/surveyor
2
+
3
+ Embedded Surveyor UI (admin registries, map, geodesist cabinet) and Fastify backend plugin.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i @opengis/surveyor
9
+ ```
10
+
11
+ Peers: `vue`, `vue-router`, `lucide-vue-next`, `@opengis/core`, `@opengis/form`, `@opengis/filter`.
12
+
13
+ Screen components load their pages via `defineAsyncComponent` (separate chunks under `dist/chunks/`), similar to `@opengis/gis`.
14
+
15
+ ## Host frontend
16
+
17
+ ```js
18
+ import '@opengis/core/dist/index.css'
19
+ import '@opengis/form/dist/index.css'
20
+ import '@opengis/surveyor/style.css'
21
+ import v3Core from '@opengis/core'
22
+ import { createSurveyorPlugin } from '@opengis/surveyor'
23
+
24
+ app.use(v3Core)
25
+ app.use(createSurveyorPlugin())
26
+ ```
27
+
28
+ ### Routes (example)
29
+
30
+ ```js
31
+ export default [
32
+ { path: '/srv-map', component: () => import('@opengis/surveyor').then((m) => m.Map) },
33
+ { path: '/srv-requests/:number?', component: () => import('@opengis/surveyor').then((m) => m.Requests) },
34
+ { path: '/srv-organisations/:id?', component: () => import('@opengis/surveyor').then((m) => m.Organisations) },
35
+ { path: '/srv-certificates/:id?', component: () => import('@opengis/surveyor').then((m) => m.Certificates) },
36
+ { path: '/srv-users/:id?', component: () => import('@opengis/surveyor').then((m) => m.Users) },
37
+ { path: '/srv-map-layers/:id?', component: () => import('@opengis/surveyor').then((m) => m.MapLayers) },
38
+ { path: '/surveyor-cabinet/requests/:segment?', component: () => import('@opengis/surveyor').then((m) => m.CabinetRequests) },
39
+ { path: '/surveyor-cabinet/profile', component: () => import('@opengis/surveyor').then((m) => m.CabinetProfile) },
40
+ ]
41
+ ```
42
+
43
+ Internal links in pages still use standalone paths (`/organizations`, `/requests`, …). For custom prefixes, mount host routes at the same paths or extend path injection in a future release.
44
+
45
+ ## Host backend (Bun)
46
+
47
+ ```js
48
+ await fastify.register(import('@opengis/surveyor/plugin.js'), {})
49
+ ```
50
+
51
+ Run migrations from this package (`migrations/`) via your fcore migrate workflow.
@@ -0,0 +1,85 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { computed as t, createBlock as n, defineComponent as r, openBlock as i, resolveDynamicComponent as a } from "vue";
3
+ import { ArrowDown as o, ArrowRight as s, ArrowUp as c, ArrowUpDown as l, Award as u, Ban as d, Building2 as f, CalendarDays as p, Check as m, ChevronDown as h, ChevronLeft as g, ChevronRight as _, ChevronsLeft as v, ChevronsRight as y, CircleCheck as b, CircleX as x, ClipboardList as S, Columns3 as C, Download as w, ExternalLink as T, Eye as E, FileCheck2 as D, FileText as O, Filter as k, History as A, Home as ee, KeyRound as j, Layers as M, LogOut as N, Map as P, MapPinned as F, MessageSquare as I, MoreVertical as L, Pencil as R, Plus as z, Power as B, Search as V, Send as H, Settings as U, ShieldCheck as W, Trash2 as G, Upload as K, User as q, UserX as J, Users as Y, UsersRound as X } from "lucide-vue-next";
4
+ //#region admin/src/components/ui/AppIcon.vue?vue&type=script&setup=true&lang.ts
5
+ var Z = /*@__PURE__*/ r({
6
+ __name: "AppIcon",
7
+ props: {
8
+ name: {
9
+ type: null,
10
+ required: !0
11
+ },
12
+ strokeWidth: {
13
+ type: [Number, String],
14
+ required: !1,
15
+ default: 2
16
+ }
17
+ },
18
+ setup(e, { expose: n }) {
19
+ n();
20
+ let r = {
21
+ "arrow-down": o,
22
+ "arrow-right": s,
23
+ "arrow-up": c,
24
+ "arrow-up-down": l,
25
+ award: u,
26
+ ban: d,
27
+ "building-2": f,
28
+ "calendar-days": p,
29
+ check: m,
30
+ "chevron-down": h,
31
+ "chevron-left": g,
32
+ "chevron-right": _,
33
+ "chevrons-left": v,
34
+ "chevrons-right": y,
35
+ "circle-check": b,
36
+ "circle-x": x,
37
+ "clipboard-list": S,
38
+ "columns-3": C,
39
+ download: w,
40
+ "external-link": T,
41
+ eye: E,
42
+ "file-check-2": D,
43
+ "file-text": O,
44
+ filter: k,
45
+ history: A,
46
+ home: ee,
47
+ "key-round": j,
48
+ layers: M,
49
+ "log-out": N,
50
+ map: P,
51
+ "map-pinned": F,
52
+ "message-square": I,
53
+ "more-vertical": L,
54
+ pencil: R,
55
+ plus: z,
56
+ power: B,
57
+ search: V,
58
+ send: H,
59
+ settings: U,
60
+ "shield-check": W,
61
+ "trash-2": G,
62
+ upload: K,
63
+ user: q,
64
+ "user-x": J,
65
+ users: Y,
66
+ "users-round": X
67
+ }, i = e, a = {
68
+ icons: r,
69
+ props: i,
70
+ icon: t(() => r[i.name])
71
+ };
72
+ return Object.defineProperty(a, "__isScriptSetup", {
73
+ enumerable: !1,
74
+ value: !0
75
+ }), a;
76
+ }
77
+ });
78
+ //#endregion
79
+ //#region admin/src/components/ui/AppIcon.vue
80
+ function Q(e, t, r, o, s, c) {
81
+ return i(), n(a(o.icon), { "stroke-width": r.strokeWidth }, null, 8, ["stroke-width"]);
82
+ }
83
+ var $ = /*#__PURE__*/ e(Z, [["render", Q], ["__file", "C:/softpro/surveyor/admin/src/components/ui/AppIcon.vue"]]);
84
+ //#endregion
85
+ export { $ as t };
@@ -0,0 +1,58 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, toDisplayString as c } from "vue";
3
+ //#region admin/src/pages/requests/components/AppealDetailSection.vue?vue&type=script&setup=true&lang.ts
4
+ var l = /*@__PURE__*/ i({
5
+ __name: "AppealDetailSection",
6
+ props: {
7
+ title: {
8
+ type: String,
9
+ required: !0
10
+ },
11
+ danger: {
12
+ type: Boolean,
13
+ required: !1
14
+ }
15
+ },
16
+ setup(e, { expose: t }) {
17
+ t();
18
+ let n = {};
19
+ return Object.defineProperty(n, "__isScriptSetup", {
20
+ enumerable: !1,
21
+ value: !0
22
+ }), n;
23
+ }
24
+ }), u = { class: "flex items-center justify-between gap-2.5 border-b border-slate-100 px-5 py-3.5" }, d = { class: "flex items-center gap-2.5" }, f = { class: "text-brand-600" }, p = { class: "text-[15px] font-semibold text-slate-800" }, m = { key: 0 }, h = { class: "px-5 py-4" };
25
+ function g(e, i, l, g, _, v) {
26
+ return o(), n("section", { class: a(["rounded-xl border bg-white shadow-card", l.danger ? "border-danger-200" : "border-slate-200"]) }, [r("header", u, [r("div", d, [r("span", f, [s(e.$slots, "icon")]), r("h2", p, c(l.title), 1)]), e.$slots.actions ? (o(), n("div", m, [s(e.$slots, "actions")])) : t("", !0)]), r("div", h, [s(e.$slots, "default")])], 2);
27
+ }
28
+ var _ = /*#__PURE__*/ e(l, [["render", g], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/AppealDetailSection.vue"]]), v = /*@__PURE__*/ i({
29
+ __name: "AppealDetailField",
30
+ props: {
31
+ label: {
32
+ type: String,
33
+ required: !0
34
+ },
35
+ highlight: {
36
+ type: Boolean,
37
+ required: !1
38
+ },
39
+ full: {
40
+ type: Boolean,
41
+ required: !1
42
+ }
43
+ },
44
+ setup(e, { expose: t }) {
45
+ t();
46
+ let n = {};
47
+ return Object.defineProperty(n, "__isScriptSetup", {
48
+ enumerable: !1,
49
+ value: !0
50
+ }), n;
51
+ }
52
+ }), y = { class: "mb-1 text-xs font-medium text-slate-500" };
53
+ function b(e, t, i, l, u, d) {
54
+ return o(), n("div", { class: a(["min-w-0", i.full ? "col-span-full" : ""]) }, [r("dt", y, c(i.label), 1), r("dd", { class: a(["break-words text-[14px] text-slate-700", i.highlight ? "font-semibold text-slate-800" : "font-medium"]) }, [s(e.$slots, "default")], 2)], 2);
55
+ }
56
+ var x = /*#__PURE__*/ e(v, [["render", b], ["__file", "C:/softpro/surveyor/admin/src/pages/requests/components/AppealDetailField.vue"]]);
57
+ //#endregion
58
+ export { _ as n, x as t };
@@ -0,0 +1,132 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { t } from "./account_types-DLL1w122.js";
3
+ import { t as n } from "./application_status-BhNGiY2I.js";
4
+ import { o as r } from "./profile-DxZHxGum.js";
5
+ import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, toDisplayString as p } from "vue";
6
+ //#region cabinet/src/lib/application-status.ts
7
+ var m = {
8
+ awaitingData: {
9
+ classes: "bg-amber-50 text-amber-700 border-amber-200",
10
+ dot: "bg-amber-500"
11
+ },
12
+ dataIssued: {
13
+ classes: "bg-sky-50 text-sky-700 border-sky-200",
14
+ dot: "bg-sky-500"
15
+ },
16
+ reserve: {
17
+ classes: "bg-gray-100 text-gray-600 border-gray-200",
18
+ dot: "bg-gray-400"
19
+ },
20
+ underReview: {
21
+ classes: "bg-blue-50 text-blue-700 border-blue-200",
22
+ dot: "bg-blue-500"
23
+ },
24
+ verified: {
25
+ classes: "bg-emerald-50 text-emerald-700 border-emerald-200",
26
+ dot: "bg-emerald-500"
27
+ },
28
+ completed: {
29
+ classes: "bg-teal-50 text-teal-700 border-teal-200",
30
+ dot: "bg-teal-500"
31
+ },
32
+ cancelled: {
33
+ classes: "bg-red-50 text-red-700 border-red-200",
34
+ dot: "bg-red-500"
35
+ }
36
+ }, h = {
37
+ classes: "bg-gray-100 text-gray-600 border-gray-200",
38
+ dot: "bg-gray-400"
39
+ }, g = Object.fromEntries(n.items.map((e) => [e.code, {
40
+ label: e.name,
41
+ ...m[e.code] ?? h
42
+ }]));
43
+ Object.fromEntries(n.items.map((e) => [e.code, e.name]));
44
+ var _ = [{
45
+ key: "all",
46
+ label: "Всі"
47
+ }, ...n.items.map((e) => ({
48
+ key: e.code,
49
+ label: e.name
50
+ }))], v = {
51
+ 1: {
52
+ dot: "bg-emerald-500",
53
+ text: "text-emerald-700",
54
+ bg: "bg-emerald-50",
55
+ border: "border-emerald-200"
56
+ },
57
+ 2: {
58
+ dot: "bg-violet-500",
59
+ text: "text-violet-700",
60
+ bg: "bg-violet-50",
61
+ border: "border-violet-200"
62
+ },
63
+ 3: {
64
+ dot: "bg-indigo-500",
65
+ text: "text-indigo-700",
66
+ bg: "bg-indigo-50",
67
+ border: "border-indigo-200"
68
+ }
69
+ }, y = {
70
+ dot: "bg-gray-400",
71
+ text: "text-gray-600",
72
+ bg: "bg-gray-50",
73
+ border: "border-gray-200"
74
+ };
75
+ Object.fromEntries(t.items.map((e) => [e.code, {
76
+ label: e.name,
77
+ ...v[e.code] ?? y
78
+ }])), t.items[0]?.code;
79
+ //#endregion
80
+ //#region cabinet/src/components/ui/AppealStatusBadge.vue?vue&type=script&setup=true&lang.ts
81
+ var b = /*@__PURE__*/ u({
82
+ __name: "AppealStatusBadge",
83
+ props: {
84
+ status: {
85
+ type: String,
86
+ required: !0
87
+ },
88
+ size: {
89
+ type: String,
90
+ required: !1,
91
+ default: "md"
92
+ },
93
+ chevron: {
94
+ type: Boolean,
95
+ required: !1,
96
+ default: !1
97
+ }
98
+ },
99
+ setup(e, { expose: t }) {
100
+ t();
101
+ let n = e, a = {
102
+ props: n,
103
+ config: i(() => g[n.status] ?? {
104
+ label: n.status || "—",
105
+ classes: "bg-gray-100 text-gray-600 border-gray-200",
106
+ dot: "bg-gray-400"
107
+ }),
108
+ pad: i(() => n.size === "sm" ? "px-2 py-0.5 text-xs" : "px-2.5 py-1 text-xs"),
109
+ AppIcon: r
110
+ };
111
+ return Object.defineProperty(a, "__isScriptSetup", {
112
+ enumerable: !1,
113
+ value: !0
114
+ }), a;
115
+ }
116
+ });
117
+ //#endregion
118
+ //#region cabinet/src/components/ui/AppealStatusBadge.vue
119
+ function x(e, t, n, r, i, u) {
120
+ return f(), s("span", { class: d(["inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border font-medium", [r.config.classes, r.pad]]) }, [
121
+ c("span", { class: d(["h-1.5 w-1.5 shrink-0 rounded-full", r.config.dot]) }, null, 2),
122
+ l(" " + p(r.config.label) + " ", 1),
123
+ n.chevron ? (f(), a(r.AppIcon, {
124
+ key: 0,
125
+ name: "chevron-down",
126
+ class: "h-2.5 w-2.5 shrink-0 opacity-60"
127
+ })) : o("", !0)
128
+ ], 2);
129
+ }
130
+ var S = /*#__PURE__*/ e(b, [["render", x], ["__file", "C:/softpro/surveyor/cabinet/src/components/ui/AppealStatusBadge.vue"]]);
131
+ //#endregion
132
+ export { g as n, _ as r, S as t };
@@ -0,0 +1,171 @@
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 "./application_status-BhNGiY2I.js";
4
+ import { computed as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, toDisplayString as u } from "vue";
5
+ //#region admin/src/static/registry/requests/resource.ts
6
+ var d = "applications", f = {
7
+ awaitingData: {
8
+ classes: "bg-slate-100 text-slate-600 border-slate-200",
9
+ dot: "bg-slate-400"
10
+ },
11
+ dataIssued: {
12
+ classes: "bg-warning-50 text-warning-700 border-warning-200",
13
+ dot: "bg-warning-500"
14
+ },
15
+ reserve: {
16
+ classes: "bg-rose-50 text-rose-800 border-rose-200",
17
+ dot: "bg-rose-700"
18
+ },
19
+ underReview: {
20
+ classes: "bg-accent-50 text-accent-700 border-accent-200",
21
+ dot: "bg-accent-500"
22
+ },
23
+ verified: {
24
+ classes: "bg-brand-50 text-brand-700 border-brand-200",
25
+ dot: "bg-brand-500"
26
+ },
27
+ completed: {
28
+ classes: "bg-success-50 text-success-700 border-success-200",
29
+ dot: "bg-success-500"
30
+ },
31
+ cancelled: {
32
+ classes: "bg-danger-50 text-danger-700 border-danger-200",
33
+ dot: "bg-danger-500"
34
+ }
35
+ }, p = {
36
+ classes: "bg-slate-100 text-slate-600 border-slate-200",
37
+ dot: "bg-slate-400"
38
+ }, m = {
39
+ awaitingData: "brand",
40
+ dataIssued: "success",
41
+ reserve: "slate",
42
+ underReview: "warning",
43
+ verified: "brand",
44
+ completed: "accent",
45
+ cancelled: "danger"
46
+ }, h = n.items.map((e) => e.code), g = Object.fromEntries(n.items.map((e) => [e.code, {
47
+ label: e.name,
48
+ ...f[e.code] ?? p
49
+ }])), _ = Object.fromEntries(n.items.map((e) => [e.code, e.name])), v = Object.fromEntries(n.items.map((e) => [e.code, e.color ?? "#64748b"])), y = Object.fromEntries(n.items.map((e) => [e.code, e.name]));
50
+ n.items.map((e) => ({
51
+ status: e.code,
52
+ label: e.name,
53
+ tone: m[e.code] ?? "slate"
54
+ }));
55
+ //#endregion
56
+ //#region admin/src/static/registry/requests/table.ts
57
+ var b = {
58
+ resource: d,
59
+ pageSize: 10,
60
+ sort: "-created_at",
61
+ columns: [
62
+ {
63
+ key: "number",
64
+ label: "Номер",
65
+ sort: "number"
66
+ },
67
+ {
68
+ key: "organization",
69
+ label: "Організація/особа"
70
+ },
71
+ {
72
+ key: "address",
73
+ label: "Адреса"
74
+ },
75
+ {
76
+ key: "status",
77
+ label: "Статус"
78
+ },
79
+ {
80
+ key: "workType",
81
+ label: "Вид робіт"
82
+ },
83
+ {
84
+ key: "createdAt",
85
+ label: "Дата подачі",
86
+ sort: "created_at"
87
+ },
88
+ {
89
+ key: "checkedBy",
90
+ label: "Перевірив"
91
+ }
92
+ ]
93
+ }, x = {
94
+ resource: d,
95
+ view: "inline",
96
+ fields: {
97
+ status: {
98
+ component: "select",
99
+ label: "Статус",
100
+ placeholder: "Статус",
101
+ width: 180,
102
+ api: "/api/suggest/applications/status"
103
+ },
104
+ year: {
105
+ component: "select",
106
+ label: "Рік",
107
+ placeholder: "Рік",
108
+ width: 120,
109
+ options: [{
110
+ id: "2026",
111
+ text: "2026"
112
+ }]
113
+ }
114
+ }
115
+ }, S = /* @__PURE__ */ e({
116
+ APPEAL_STATUS: () => g,
117
+ APPEAL_STATUS_SHORT: () => _,
118
+ APPLICATION_STATUS_CODES: () => h,
119
+ MAP_STATUS_COLORS: () => v,
120
+ MAP_STATUS_LABELS: () => y,
121
+ filter: () => x,
122
+ resource: () => d,
123
+ table: () => b
124
+ }), C = /*@__PURE__*/ s({
125
+ __name: "AppealStatusBadge",
126
+ props: {
127
+ status: {
128
+ type: String,
129
+ required: !0
130
+ },
131
+ label: {
132
+ type: String,
133
+ required: !1
134
+ },
135
+ size: {
136
+ type: String,
137
+ required: !1,
138
+ default: "md"
139
+ }
140
+ },
141
+ setup(e, { expose: t }) {
142
+ t();
143
+ let n = e, i = {
144
+ props: n,
145
+ config: r(() => {
146
+ let e = g[n.status], t = {
147
+ label: n.label || n.status || "—",
148
+ classes: "bg-slate-100 text-slate-600 border-slate-200",
149
+ dot: "bg-slate-400"
150
+ };
151
+ return e ? n.label ? {
152
+ ...e,
153
+ label: n.label
154
+ } : e : t;
155
+ }),
156
+ pad: r(() => n.size === "sm" ? "px-2 py-0.5 text-xs" : "px-2.5 py-1 text-[13px]")
157
+ };
158
+ return Object.defineProperty(i, "__isScriptSetup", {
159
+ enumerable: !1,
160
+ value: !0
161
+ }), i;
162
+ }
163
+ });
164
+ //#endregion
165
+ //#region admin/src/components/ui/AppealStatusBadge.vue
166
+ function w(e, t, n, r, s, d) {
167
+ return l(), i("span", { class: c(["inline-flex items-center gap-1.5 rounded-full border font-medium", [r.config.classes, r.pad]]) }, [a("span", { class: c(["h-1.5 w-1.5 rounded-full", r.config.dot]) }, null, 2), o(" " + u(r.config.label), 1)], 2);
168
+ }
169
+ var T = /*#__PURE__*/ t(C, [["render", w], ["__file", "C:/softpro/surveyor/admin/src/components/ui/AppealStatusBadge.vue"]]);
170
+ //#endregion
171
+ export { v as a, h as i, S as n, y as o, b as r, d as s, T as t };