@bahmni/appointments-app 0.0.1-dev.265 → 0.0.1-dev.266

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
2
- import { d as K, u as Q, a as W, b as J, c as X, m as Z, e as ee, r as te, F as ae } from "./index-Ck1OwLu_.js";
2
+ import { d as K, u as Q, a as W, b as J, c as X, m as Z, e as ee, r as te, F as ae } from "./index-DtJvSxJc.js";
3
3
  import { useState as m, useCallback as h, useEffect as f, useMemo as T } from "react";
4
4
  const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", me = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
@@ -1,30 +1,30 @@
1
1
  import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
2
- import { u as Z, d as ee, f as re, g as ae, b as c, X as te, R as q, m as oe, c as se, e as U, A as ne, _ as de, r as ie, Y as ue, I as me, j as le, B as ce, P as fe, k as ye } from "./index-Ck1OwLu_.js";
2
+ import { u as Z, d as ee, f as re, g as ae, b as c, X as te, R as v, m as oe, c as se, e as U, A as ne, _ as de, r as ie, Y as ue, I as me, j as le, B as ce, P as fe, k as ye } from "./index-DtJvSxJc.js";
3
3
  import { useState as S, useMemo as d, useCallback as f } from "react";
4
- const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I = {
4
+ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A = {
5
5
  formsTableBody: pe,
6
6
  customAccordianItem: be
7
7
  }, ge = (u) => u ? u.extension?.find(
8
8
  (n) => n.url === me
9
- )?.valueString : void 0, he = ({
9
+ )?.valueString : void 0, Oe = ({
10
10
  episodeOfCareUuids: u,
11
11
  encounterUuids: n,
12
12
  config: C
13
13
  }) => {
14
- const { t: o } = Z(), m = ee(), [l, h] = S(!1), [t, O] = S(null), { numberOfVisits: k, hideThumbnail: j = !1 } = C ?? {}, B = re(
14
+ const { t: o } = Z(), m = ee(), [l, O] = S(!1), [t, h] = S(null), { numberOfVisits: k, hideThumbnail: j = !1 } = C ?? {}, B = re(
15
15
  u,
16
16
  n
17
- ), x = ae(), {
17
+ ), H = ae(), {
18
18
  data: y = [],
19
19
  isLoading: _,
20
- isError: E,
21
- error: H,
22
- refetch: K
20
+ isError: T,
21
+ error: K,
22
+ refetch: x
23
23
  } = c({
24
24
  queryKey: ["forms", m, u],
25
25
  queryFn: () => le(m, void 0, k),
26
26
  enabled: !!m && !B
27
- }), T = d(() => !n || n.length === 0 ? y : y.filter(
27
+ }), E = d(() => !n || n.length === 0 ? y : y.filter(
28
28
  (e) => n.includes(e.encounterUuid)
29
29
  ), [y, n]), { data: R = [] } = c({
30
30
  queryKey: ["observationForms"],
@@ -55,7 +55,7 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
55
55
  });
56
56
  te(
57
57
  (e) => {
58
- e.patientUUID === m && e.updatedConcepts.size > 0 && (K(), x.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
58
+ e.patientUUID === m && e.updatedConcepts.size > 0 && (x(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
59
59
  },
60
60
  [m]
61
61
  );
@@ -64,9 +64,9 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
64
64
  return !r || r.includes(t.formName);
65
65
  }), [g, t?.formName]), Y = d(() => {
66
66
  if (b)
67
- return q(b).message;
67
+ return v(b).message;
68
68
  if (N)
69
- return q(N).message;
69
+ return v(N).message;
70
70
  }, [b, N]), L = d(
71
71
  () => [
72
72
  { key: "recordedOn", header: o("RECORDED_ON") },
@@ -80,16 +80,16 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
80
80
  ],
81
81
  []
82
82
  ), M = d(() => {
83
- const e = T.reduce(
83
+ const e = E.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
86
86
  r[i] ??= [];
87
- const A = a.providers.map((X) => X.providerName).filter(Boolean).join(", ");
87
+ const I = a.providers.map((X) => X.providerName).filter(Boolean).join(", ");
88
88
  return r[i].push({
89
89
  id: a.encounterUuid,
90
90
  formName: a.formName,
91
91
  recordedOn: oe(a.encounterDateTime, o, !0).formattedResult,
92
- recordedBy: A ?? "--",
92
+ recordedBy: I ?? "--",
93
93
  encounterDateTime: a.encounterDateTime,
94
94
  encounterUuid: a.encounterUuid
95
95
  }), r;
@@ -100,39 +100,39 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
100
100
  ([r, a]) => ({
101
101
  formName: r,
102
102
  records: a.sort(
103
- (i, A) => A.encounterDateTime - i.encounterDateTime
103
+ (i, I) => I.encounterDateTime - i.encounterDateTime
104
104
  )
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
- }, [T, o]), v = f((e) => {
108
- O(e), h(!0);
107
+ }, [E, o]), D = f((e) => {
108
+ h(e), O(!0);
109
109
  }, []), G = f(() => {
110
- h(!1), O(null);
111
- }, []), D = f(
110
+ O(!1), h(null);
111
+ }, []), q = f(
112
112
  (e, r) => {
113
113
  switch (r) {
114
114
  case "recordedOn":
115
- return /* @__PURE__ */ s(se, { onClick: () => v(e), children: e.recordedOn });
115
+ return /* @__PURE__ */ s(se, { onClick: () => D(e), children: e.recordedOn });
116
116
  case "recordedBy":
117
117
  return e.recordedBy;
118
118
  default:
119
119
  return null;
120
120
  }
121
121
  },
122
- [v]
122
+ [D]
123
123
  );
124
124
  return /* @__PURE__ */ J(W, { children: [
125
- /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: _ || E || M.length === 0 || B ? /* @__PURE__ */ s(
125
+ /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: _ || T || M.length === 0 || B ? /* @__PURE__ */ s(
126
126
  U,
127
127
  {
128
128
  headers: L,
129
129
  ariaLabel: o("FORMS_HEADING"),
130
130
  rows: [],
131
131
  loading: _,
132
- errorStateMessage: E ? H?.message : void 0,
132
+ errorStateMessage: T ? K?.message : void 0,
133
133
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
134
- renderCell: D,
135
- className: I.formsTableBody,
134
+ renderCell: q,
135
+ className: A.formsTableBody,
136
136
  dataTestId: "forms-table"
137
137
  }
138
138
  ) : /* @__PURE__ */ s(ne, { align: "start", children: M.map((e, r) => {
@@ -141,7 +141,7 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
141
141
  de,
142
142
  {
143
143
  title: a,
144
- className: I.customAccordianItem,
144
+ className: A.customAccordianItem,
145
145
  testId: `accordian-title-${a}`,
146
146
  open: r === 0,
147
147
  children: /* @__PURE__ */ s(
@@ -154,8 +154,8 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
154
154
  errorStateMessage: "",
155
155
  sortable: z,
156
156
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
157
- renderCell: D,
158
- className: I.formsTableBody,
157
+ renderCell: q,
158
+ className: A.formsTableBody,
159
159
  dataTestId: `forms-table-${a}`
160
160
  }
161
161
  )
@@ -192,5 +192,5 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I =
192
192
  ] });
193
193
  };
194
194
  export {
195
- he as default
195
+ Oe as default
196
196
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CcAuIkxI.js";
2
- import { S as d, T as f, U as e } from "./index-Ck1OwLu_.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CIix-ijy.js";
2
+ import { S as d, T as f, U as e } from "./index-DtJvSxJc.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-CcAuIkxI.js";
2
- import { S as v, T as C, U as e } from "./index-Ck1OwLu_.js";
1
+ import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-CIix-ijy.js";
2
+ import { S as v, T as C, U as e } from "./index-DtJvSxJc.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
- import { d as V, a as w, u as S, h as q, $ as G, b as H, X as Q, i as X, G as k, J as M, x as W, e as j, W as J, E as D, K as P, v as Y, l as Z, H as z, D as ee, N as ae, Z as te } from "./index-Ck1OwLu_.js";
2
+ import { d as V, a as w, u as S, h as q, $ as G, b as H, X as Q, i as X, G as k, J as M, x as W, e as j, W as J, E as D, K as P, v as Y, l as Z, H as z, D as ee, N as ae, Z as te } from "./index-DtJvSxJc.js";
3
3
  import { useRef as se, useEffect as O, useMemo as R } from "react";
4
4
  const F = (a, n, d, l, p, r) => {
5
5
  const t = P(a, n, p), s = t.value, i = Y(s);
@@ -1,4 +1,4 @@
1
- import { V as we, a0 as z, a1 as xt, a2 as B, T as q, U as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as U, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Ur, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-Ck1OwLu_.js";
1
+ import { V as we, a0 as z, a1 as xt, a2 as B, T as q, U as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as U, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Ur, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-DtJvSxJc.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { n as V, o as O, u as C, y as h, s as P, g as B, a as G, p as x, q as A, b as q, t as U, w as F, z as $, C as k, L as w, M as H, O as Q, Q as j } from "./index-Ck1OwLu_.js";
2
+ import { n as V, o as O, u as C, y as h, p as P, g as B, a as G, q as x, s as A, b as q, t as U, w as F, z as $, C as k, L as w, M as Q, O as j, Q as H } from "./index-DtJvSxJc.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
4
  const K = V(
5
5
  O,
6
6
  "useAppointmentsConfig",
7
7
  "AppointmentsConfigProvider"
8
- ), W = ({
8
+ ), Y = ({
9
9
  serviceName: e,
10
10
  isDeleting: a,
11
11
  onConfirm: t,
@@ -35,10 +35,10 @@ const K = V(
35
35
  "speciality",
36
36
  "durationMins",
37
37
  "description"
38
- ], Y = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "_page_10v94_1", X = "_noPrivilegeContainer_10v94_1", Z = "_table_10v94_18", d = {
39
- page: J,
40
- noPrivilegeContainer: X,
41
- table: Z
38
+ ], W = "app:appointments:manageServices", z = "app:appointments:adminTab", Z = "_page_10v94_1", J = "_noPrivilegeContainer_10v94_1", X = "_table_10v94_18", d = {
39
+ page: Z,
40
+ noPrivilegeContainer: J,
41
+ table: X
42
42
  };
43
43
  function ee(e) {
44
44
  return e.filter((a) => !p.includes(a));
@@ -78,13 +78,13 @@ const re = () => {
78
78
  ...p
79
79
  ], S = A(s, z), M = A(
80
80
  s,
81
- Y
81
+ W
82
82
  ), m = _(
83
83
  () => ee(l),
84
84
  [l]
85
85
  ), { data: L, isLoading: b, isError: D } = q({
86
86
  queryKey: ["allAppointmentServices"],
87
- queryFn: j,
87
+ queryFn: H,
88
88
  enabled: S
89
89
  }), N = _(
90
90
  () => te(l, e),
@@ -95,7 +95,7 @@ const re = () => {
95
95
  ), g = async () => {
96
96
  u(!0);
97
97
  try {
98
- await Q(E.id), t({
98
+ await j(E.id), t({
99
99
  title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
100
100
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
101
101
  type: "success",
@@ -120,7 +120,7 @@ const re = () => {
120
120
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
121
121
  disabled: !M,
122
122
  onClick: () => c(r),
123
- children: /* @__PURE__ */ n(H, {})
123
+ children: /* @__PURE__ */ n(Q, {})
124
124
  }
125
125
  ) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", y = [
126
126
  { id: "home", label: e("BREADCRUMB_HOME"), href: U },
@@ -154,7 +154,7 @@ const re = () => {
154
154
  }
155
155
  ),
156
156
  E && /* @__PURE__ */ n(
157
- W,
157
+ Y,
158
158
  {
159
159
  serviceName: E.name,
160
160
  isDeleting: v,