@bahmni/appointments-app 0.0.1-dev.228 → 0.0.1-dev.229

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 { t as W, u as K, r as Q, a as J, M as X, N as Z, o as ee, s as te, l as ae } from "./index-Brcr7LKs.js";
2
+ import { t as K, u as Q, r as W, a as J, M as X, N as Z, o as ee, s as te, b as ae } from "./index-DgXd_LG2.js";
3
3
  import { useState as l, 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", le = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
@@ -37,7 +37,7 @@ const _e = [
37
37
  null
38
38
  ), [R, I] = l(
39
39
  /* @__PURE__ */ new Set()
40
- ), E = W(), { t: n } = K(), { addNotification: L } = Q(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), U = h((e) => {
40
+ ), E = K(), { t: n } = Q(), { addNotification: L } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), U = h((e) => {
41
41
  M(e), w(!0);
42
42
  }, []), F = h(() => {
43
43
  w(!1), M(null), I(/* @__PURE__ */ new Set());
@@ -1,6 +1,6 @@
1
1
  import { jsx as o, jsxs as W, Fragment as X } from "react/jsx-runtime";
2
- import { u as Z, t as ee, m as re, b as ae, a as c, k as te, V as U, N as se, M as oe, o as C, G as ne, J as de, s as ie, P as ue, c as me, d as le, e as ce, i as fe, f as ye } from "./index-Brcr7LKs.js";
3
- import { useState as S, useMemo as d, useCallback as f } from "react";
2
+ import { u as Z, t as ee, m as re, c as ae, a as c, k as te, V as U, N as se, M as oe, o as S, G as ne, J as de, s as ie, P as ue, d as me, i as le, e as ce, f as fe, n as ye } from "./index-DgXd_LG2.js";
3
+ import { useState as q, useMemo as d, useCallback as f } from "react";
4
4
  const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
5
5
  formsTableBody: be,
6
6
  customAccordianItem: Ne
@@ -9,9 +9,9 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
9
9
  )?.valueString : void 0, Ae = ({
10
10
  episodeOfCareUuids: u,
11
11
  encounterUuids: n,
12
- config: q
12
+ config: C
13
13
  }) => {
14
- const { t: s } = Z(), m = ee(), [l, A] = S(!1), [t, I] = S(null), { numberOfVisits: k, hideThumbnail: V = !1 } = q ?? {}, M = re(
14
+ const { t: s } = Z(), m = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: k, hideThumbnail: V = !1 } = C ?? {}, M = re(
15
15
  u,
16
16
  n
17
17
  ), H = ae(), {
@@ -123,7 +123,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
123
123
  );
124
124
  return /* @__PURE__ */ W(X, { children: [
125
125
  /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T || B || L.length === 0 || M ? /* @__PURE__ */ o(
126
- C,
126
+ S,
127
127
  {
128
128
  headers: F,
129
129
  ariaLabel: s("FORMS_HEADING"),
@@ -145,7 +145,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
145
145
  testId: `accordian-title-${a}`,
146
146
  open: r === 0,
147
147
  children: /* @__PURE__ */ o(
148
- C,
148
+ S,
149
149
  {
150
150
  headers: F,
151
151
  ariaLabel: s("FORMS_HEADING"),
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Cj3ebMT7.js";
2
- import { Y as d, Z as f, _ as e } from "./index-Brcr7LKs.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CeVAFQXP.js";
2
+ import { X as d, Y as f, Z as e } from "./index-DgXd_LG2.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-Cj3ebMT7.js";
2
- import { Y as v, Z as C, _ as e } from "./index-Brcr7LKs.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-CeVAFQXP.js";
2
+ import { X as v, Y as C, Z as e } from "./index-DgXd_LG2.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,6 +1,6 @@
1
- import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { t as V, r as K, u as S, g as j, h as w, a as x, k as G, p as M, j as Q, n as H, q as z, o as P, v as Y, I as U, w as J, x as W, y as X, E as Z, T as ee, z as ae, A as te } from "./index-Brcr7LKs.js";
3
- import { useRef as se, useEffect as $, useMemo as T } from "react";
1
+ import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
+ import { t as B, r as K, u as N, g as j, h as w, a as x, k as G, j as M, p as Q, l as H, q as z, o as P, v as Y, $ as U, w as J, x as W, y as X, E as Z, T as ee, z as ae, A as te } from "./index-DgXd_LG2.js";
3
+ import { useRef as se, useEffect as _, useMemo as T } from "react";
4
4
  const A = (a, n, d, l, b, r) => {
5
5
  const t = J(a, n, b), s = t.value, i = W(s);
6
6
  let o = s;
@@ -58,9 +58,9 @@ const A = (a, n, d, l, b, r) => {
58
58
  title: n = "",
59
59
  hideThumbnail: d
60
60
  }) => {
61
- const { t: l } = S(), b = (r, t, s) => {
61
+ const { t: l } = N(), b = (r, t, s) => {
62
62
  const i = Y(r.encounterDetails, l);
63
- return /* @__PURE__ */ N(
63
+ return /* @__PURE__ */ S(
64
64
  U,
65
65
  {
66
66
  title: i,
@@ -112,20 +112,20 @@ const A = (a, n, d, l, b, r) => {
112
112
  conceptNames: d = [],
113
113
  conceptUuid: l = [],
114
114
  hideThumbnail: b = !1
115
- } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = K(), { t: i } = S(), o = j({
115
+ } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = K(), { t: i } = N(), o = j({
116
116
  queries: d.map((e) => ({
117
117
  queryKey: de(e),
118
118
  queryFn: () => w(e),
119
119
  enabled: !!e
120
120
  }))
121
121
  });
122
- $(() => {
122
+ _(() => {
123
123
  o.forEach((e, h) => {
124
124
  if (e.isError && !r.current.has(h)) {
125
- const B = d[h];
125
+ const V = d[h];
126
126
  s({
127
127
  title: i("ERROR_DEFAULT_TITLE"),
128
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
128
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
129
129
  type: "error"
130
130
  }), r.current.add(h);
131
131
  } else e.isError || r.current.delete(h);
@@ -148,7 +148,7 @@ const A = (a, n, d, l, b, r) => {
148
148
  ) && f();
149
149
  },
150
150
  [t, f]
151
- ), $(() => {
151
+ ), _(() => {
152
152
  R && s({
153
153
  title: i("ERROR_DEFAULT_TITLE"),
154
154
  message: i("ERROR_FETCHING_OBSERVATIONS"),
@@ -163,8 +163,8 @@ const A = (a, n, d, l, b, r) => {
163
163
  { key: "name", header: "name" },
164
164
  { key: "value", header: "value" },
165
165
  { key: "form", header: "form" }
166
- ], O = D || !y, _ = R && y, q = (!c || c.entry?.length === 0 || m.length === 0) && y, L = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, k = q ? i("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
167
- return /* @__PURE__ */ N(
166
+ ], $ = D || !y, O = R && y, q = (!c || c.entry?.length === 0 || m.length === 0) && y, L = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, k = q ? i("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !$ && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
167
+ return /* @__PURE__ */ S(
168
168
  "div",
169
169
  {
170
170
  id: "observations",
@@ -195,7 +195,7 @@ const A = (a, n, d, l, b, r) => {
195
195
  headers: F,
196
196
  rows: [],
197
197
  ariaLabel: i("OBSERVATIONS"),
198
- loading: O,
198
+ loading: $,
199
199
  errorStateMessage: L,
200
200
  emptyStateMessage: k,
201
201
  dataTestId: "observations-table"
@@ -1,4 +1,4 @@
1
- import { $ as we, a0 as z, a1 as xt, a2 as B, Z as q, _ 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 G, 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 Gr, 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-Brcr7LKs.js";
1
+ import { _ as we, a0 as z, a1 as xt, a2 as B, Y as q, Z 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 G, 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 Gr, 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-DgXd_LG2.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { B as V, C as O, u as I, D as h, F as P, b as B, r as G, H as U, K as A, a as x, L as q, O as F, W as $, Q as k, R as H, S as K, U as Q, X as W } from "./index-Brcr7LKs.js";
3
- import { useState as C, useMemo as _ } from "react";
2
+ import { B as V, C as O, u as C, D as h, F as P, c as B, r as G, H as U, I as L, a as x, K as q, L as F, W as $, O as k, Q as H, R as K, S as Q, U as W } from "./index-DgXd_LG2.js";
3
+ import { useState as I, useMemo as _ } from "react";
4
4
  const j = V(
5
5
  O,
6
6
  "useAppointmentsConfig",
@@ -11,7 +11,7 @@ const j = V(
11
11
  onConfirm: t,
12
12
  onCancel: s
13
13
  }) => {
14
- const { t: i } = I();
14
+ const { t: i } = C();
15
15
  return /* @__PURE__ */ n(
16
16
  h,
17
17
  {
@@ -35,9 +35,9 @@ const j = V(
35
35
  "speciality",
36
36
  "durationMins",
37
37
  "description"
38
- ], Y = "app:appointments:manageServices", z = "app:appointments:adminTab", X = "_page_10v94_1", J = "_noPrivilegeContainer_10v94_1", Z = "_table_10v94_18", d = {
39
- page: X,
40
- noPrivilegeContainer: J,
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
41
  table: Z
42
42
  };
43
43
  function ee(e) {
@@ -74,24 +74,24 @@ function ae(e, a) {
74
74
  }));
75
75
  }
76
76
  const re = () => {
77
- const { t: e } = I(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = j(), [E, c] = C(null), [v, S] = C(!1), l = i?.serviceTableFields ?? [
77
+ const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = j(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
78
78
  ...p
79
- ], u = A(s, z), M = A(
79
+ ], u = L(s, z), M = L(
80
80
  s,
81
81
  Y
82
82
  ), m = _(
83
83
  () => ee(l),
84
84
  [l]
85
- ), { data: L, isLoading: b, isError: D } = x({
85
+ ), { data: A, isLoading: D, isError: R } = x({
86
86
  queryKey: ["allAppointmentServices"],
87
87
  queryFn: W,
88
88
  enabled: u
89
- }), R = _(
89
+ }), b = _(
90
90
  () => te(l, e),
91
91
  [l]
92
92
  ), g = _(
93
- () => ae(L ?? [], m),
94
- [L, m]
93
+ () => ae(A ?? [], m),
94
+ [A, m]
95
95
  ), N = async () => {
96
96
  S(!0);
97
97
  try {
@@ -143,11 +143,11 @@ const re = () => {
143
143
  {
144
144
  id: "all-services",
145
145
  title: e("ADMIN_ALL_SERVICES_TITLE"),
146
- headers: R,
146
+ headers: b,
147
147
  rows: g,
148
148
  ariaLabel: "all-services-table",
149
- loading: b,
150
- errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
149
+ loading: D,
150
+ errorStateMessage: R ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
151
151
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
152
152
  renderCell: T,
153
153
  className: d.table