@opengis/surveyor 0.0.7 → 0.0.8

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.
@@ -14,7 +14,7 @@ async function i(n = {}) {
14
14
  return i.json();
15
15
  }
16
16
  async function a(n) {
17
- let r = await fetch(t(`/api/resource/public_applications/${encodeURIComponent(n)}?include=history`), { credentials: "include" });
17
+ let r = await fetch(t(`/api/resource/public_applications/${encodeURIComponent(n)}?include=status_history`), { credentials: "include" });
18
18
  if (r.status === 404) return null;
19
19
  if (!r.ok) throw Error(e(await r.text(), r.status));
20
20
  let i = await r.json();
@@ -510,7 +510,7 @@ var Fe = /*#__PURE__*/ e(me, [["render", Pe], ["__file", "C:/softpro/surveyor/ad
510
510
  async function _() {
511
511
  p.value = !0, m.value = [];
512
512
  try {
513
- let e = new URLSearchParams({ q: "" }), t = await fetch(s(`/api/suggest/gis-layers?${e}`), { credentials: "include" });
513
+ let e = new URLSearchParams({ q: "" }), t = await fetch(s(`/api/suggestion/gis-layers?${e}`), { credentials: "include" });
514
514
  if (!t.ok) {
515
515
  let e = await t.text();
516
516
  throw Error(a(e, t.status));
@@ -750,7 +750,7 @@ var et = /*#__PURE__*/ e(Re, [["render", $e], ["__file", "C:/softpro/surveyor/ad
750
750
  async function U(e) {
751
751
  b.value = !0, x.value = "", u.value = null, v.value = "";
752
752
  try {
753
- u.value = await r(`/api/resource/applications/${encodeURIComponent(e)}?include=organization,surveyor,history&limit=100`), await H(I(u.value.surveyor)?.certificate_id);
753
+ u.value = await r(`/api/resource/applications/${encodeURIComponent(e)}?include=organization,surveyor,status_history&limit=100`), await H(I(u.value.surveyor)?.certificate_id);
754
754
  } catch (e) {
755
755
  u.value = null, x.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
756
756
  } finally {
@@ -1142,7 +1142,7 @@ function Vt(e, t, n, r, i, a) {
1142
1142
  "resolve-author": r.resolveNoteAuthor
1143
1143
  }, null, 8, ["application-id", "current-author"])) : x("", !0),
1144
1144
  T(r.ApplicationHistorySection, {
1145
- items: r.application.history,
1145
+ items: r.application.status_history || [],
1146
1146
  variant: "admin"
1147
1147
  }, null, 8, ["items"])
1148
1148
  ]), C("div", It, [C("div", Lt, [r.showMap && r.application ? (k(), b(r.AppealDetailMap, {
@@ -6,7 +6,7 @@ import { r as o } from "./geometry-DyhIVRcw.js";
6
6
  import { a as s, i as c, n as ee, r as te, t as ne } from "./ApplicationHistorySection-Cwq0-Frd.js";
7
7
  import { t as re } from "./FormFilePicker-DxPQlxgy.js";
8
8
  import { n as l, t as ie } from "./AppealStatusBadge-BlAaNUSK.js";
9
- import { a as ae, n as u, t as d } from "./applications-CLhv5l_j.js";
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";
12
12
  //#region cabinet/src/api/application-workflow.ts
@@ -63,7 +63,7 @@ function A(e, t) {
63
63
  return r;
64
64
  }
65
65
  function fe(e, t) {
66
- let n = e.status ?? "", r = [], i = A(e.history, e);
66
+ let n = e.status ?? "", r = [], i = A(e.status_history, e);
67
67
  return t && r.push({
68
68
  id: "geometry",
69
69
  typeLabel: "Межі заявки",
@@ -90,7 +90,7 @@ function fe(e, t) {
90
90
  }), r);
91
91
  }
92
92
  function pe(e) {
93
- return e.status === "dataIssued" ? e.note_4_file_corrected_geodetic_survey?.trim() || A(e.history, e).corrected : void 0;
93
+ return e.status === "dataIssued" ? e.note_4_file_corrected_geodetic_survey?.trim() || A(e.status_history, e).corrected : void 0;
94
94
  }
95
95
  //#endregion
96
96
  //#region cabinet/src/pages/requests/card.vue?vue&type=script&setup=true&lang.ts
@@ -496,7 +496,7 @@ function rt(e, t, n, r, i, a) {
496
496
  "resolve-author": r.resolveNoteAuthor
497
497
  }, null, 8, ["application-id", "current-author"])) : h("", !0),
498
498
  y(r.ApplicationHistorySection, {
499
- items: r.application.history,
499
+ items: r.application?.status_history || [],
500
500
  variant: "cabinet"
501
501
  }, null, 8, ["items"])
502
502
  ]), _("div", be, [
@@ -9,7 +9,7 @@ import { i as v, n as ee } from "./geometry-DyhIVRcw.js";
9
9
  import { t as y } from "./work_types-Hwme-FEX.js";
10
10
  import { t as b } from "./MapLayerMenu-AUeTqgEp.js";
11
11
  import { t as x } from "./FormFilePicker-DxPQlxgy.js";
12
- import { i as te, r as S, s as C } from "./applications-CLhv5l_j.js";
12
+ import { i as te, r as S, s as C } from "./applications-D6pHAQaK.js";
13
13
  import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as A, createVNode as j, defineComponent as M, nextTick as N, normalizeClass as P, normalizeStyle as F, onBeforeUnmount as I, onMounted as ne, onUnmounted as re, openBlock as L, ref as R, renderList as ie, shallowRef as ae, toDisplayString as z, vModelText as B, watch as V, withCtx as H, withDirectives as U, withModifiers as W } from "vue";
14
14
  import { RouterLink as G, useRouter as oe } from "vue-router";
15
15
  //#region cabinet/src/pages/requests/components/FormSearchSelect.vue?vue&type=script&setup=true&lang.ts
@@ -3,7 +3,7 @@ import { n as t, r as n, s as r, t as i } from "./organizations-DbVDoURw.js";
3
3
  import { t as a } from "./AppIcon-CO70tpMX.js";
4
4
  import { t as o } from "./list-search-D5VdmGdV.js";
5
5
  import { n as s, r as c, t as l } from "./AppealStatusBadge-BlAaNUSK.js";
6
- import { o as u } from "./applications-CLhv5l_j.js";
6
+ import { o as u } from "./applications-D6pHAQaK.js";
7
7
  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, reactive as S, ref as C, renderList as w, toDisplayString as T, vModelText as E, watch as D, withCtx as O, withDirectives as k, withModifiers as A } from "vue";
8
8
  import { RouterLink as ee, useRoute as te } from "vue-router";
9
9
  //#region cabinet/src/components/table/TablePagination.vue?vue&type=script&setup=true&lang.ts
package/dist/index.js CHANGED
@@ -140,7 +140,7 @@ var K = /*#__PURE__*/ r(W, [["render", G], ["__file", "C:/softpro/surveyor/src/w
140
140
  t();
141
141
  let n = {
142
142
  Index: S(() => import("./chunks/requests-BTpLXrNj.js")),
143
- Card: S(() => import("./chunks/card-9r6Si3cz.js")),
143
+ Card: S(() => import("./chunks/card-6z-m7UkM.js")),
144
144
  BaseEntityWrapper: K,
145
145
  SurveyorEmbedShell: B
146
146
  };
@@ -279,9 +279,9 @@ var Se = /*#__PURE__*/ r(be, [["render", xe], ["__file", "C:/softpro/surveyor/sr
279
279
  setup(e, { expose: t }) {
280
280
  t();
281
281
  let n = {
282
- Index: S(() => import("./chunks/requests-BM6XqgpC.js")),
283
- Create: S(() => import("./chunks/create-BAsyL76t.js")),
284
- Card: S(() => import("./chunks/card-rXkTqZqA.js")),
282
+ Index: S(() => import("./chunks/requests-rWq8ok3C.js")),
283
+ Create: S(() => import("./chunks/create-CAVC1qXJ.js")),
284
+ Card: S(() => import("./chunks/card-Dlp8_KhV.js")),
285
285
  BaseEntityWrapper: K,
286
286
  SurveyorEmbedShell: B
287
287
  };
@@ -674,7 +674,7 @@ var X = [
674
674
  {
675
675
  path: "requests",
676
676
  name: "requests",
677
- component: () => import("./chunks/requests-BM6XqgpC.js"),
677
+ component: () => import("./chunks/requests-rWq8ok3C.js"),
678
678
  meta: {
679
679
  title: "Звернення",
680
680
  label: "Звернення на видачу та прийом матеріалів",
@@ -684,7 +684,7 @@ var X = [
684
684
  {
685
685
  path: "requests/new",
686
686
  name: "request-create",
687
- component: () => import("./chunks/create-BAsyL76t.js"),
687
+ component: () => import("./chunks/create-CAVC1qXJ.js"),
688
688
  meta: {
689
689
  title: "Нове звернення",
690
690
  section: "requests"
@@ -693,7 +693,7 @@ var X = [
693
693
  {
694
694
  path: "requests/:number",
695
695
  name: "request-detail",
696
- component: () => import("./chunks/card-rXkTqZqA.js"),
696
+ component: () => import("./chunks/card-Dlp8_KhV.js"),
697
697
  meta: {
698
698
  title: "Звернення",
699
699
  section: "requests"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/surveyor",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "description": "Surveyor admin and geodesist cabinet UI for embedded host applications",
@@ -138,6 +138,7 @@ export const surveyorSchemas = {
138
138
  work_type: { type: "string", enum: workTypes.items.map((item) => item.code) },
139
139
  description: { type: "string" },
140
140
  execution_basis: { type: "string" },
141
+ notes: { type: "string" },
141
142
  settlement_id: nonBlank,
142
143
  is_found_address_id: { type: "boolean" },
143
144
  address_id: nonBlank,
@@ -137,10 +137,10 @@ export async function createApplication(
137
137
  `INSERT INTO surveyor.applications (
138
138
  number, org_id, surveyor_id, status, work_type, description,
139
139
  execution_basis, settlement_id, is_found_address_id, address_id,
140
- location, area, geom, created_by
140
+ location, area, geom, created_by, notes
141
141
  ) VALUES (
142
142
  $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12,
143
- ST_SetSRID(ST_GeomFromGeoJSON($13), 4326), $14
143
+ ST_SetSRID(ST_GeomFromGeoJSON($13), 4326), $14, $15
144
144
  ) RETURNING app_id`,
145
145
  [
146
146
  number,
@@ -157,6 +157,7 @@ export async function createApplication(
157
157
  area.toFixed(4),
158
158
  geojson,
159
159
  uid,
160
+ input.notes ?? null,
160
161
  ]
161
162
  );
162
163
  const id = inserted.rows[0]!.app_id;
@@ -5,6 +5,7 @@ export type CreateInput = {
5
5
  work_type: string;
6
6
  description?: string;
7
7
  execution_basis?: string;
8
+ notes?: string;
8
9
  settlement_id: string;
9
10
  is_found_address_id: boolean;
10
11
  address_id?: string;
@@ -116,7 +116,7 @@ export default {
116
116
  't."enabled"',
117
117
  ],
118
118
  },
119
- history: {
119
+ status_history: {
120
120
  resource: "application_status_history",
121
121
  localKey: "app_id",
122
122
  foreignKey: "application_id",
@@ -122,7 +122,7 @@ export default {
122
122
  't."enabled"',
123
123
  ],
124
124
  },
125
- history: {
125
+ status_history: {
126
126
  resource: "public_application_status_history",
127
127
  localKey: "app_id",
128
128
  foreignKey: "application_id",