@bahmni/appointments-app 0.0.1-dev.185 → 0.0.1-dev.186

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 (41) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/{DocumentsTable-8I-Vd16r-D7OejRTq.js → DocumentsTable-CI56WUlA-DgIsofr6.js} +1 -1
  3. package/dist/{FormsTable-BolXVuK_-BgiYYu8o.js → FormsTable-Bas9_7G8-B55_H578.js} +31 -31
  4. package/dist/{LNWAZHJI-DtGAaLKa.js → LNWAZHJI-C3APGRP0.js} +2 -2
  5. package/dist/{MWZ6AO7Z-CKJz0pD6.js → MWZ6AO7Z-DH_ENnK3.js} +2 -2
  6. package/dist/{Observations-D6R8bXEi-DqXuo3Nk.js → Observations-Cb_Qgp1l-Bm00ukxz.js} +12 -12
  7. package/dist/{YPM2AS64-CNFAfFEV.js → YPM2AS64-B-YSLnIi.js} +138 -138
  8. package/dist/constants/app.d.ts +1 -0
  9. package/dist/constants/app.d.ts.map +1 -1
  10. package/dist/index-C2XfPd5m.js +94 -0
  11. package/dist/{index-Dxc52lRE.js → index-DkkyqBOR.js} +35061 -33965
  12. package/dist/index.css +1 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/locales/locale_en.json +17 -1
  16. package/dist/locales/locale_es.json +17 -1
  17. package/dist/pages/admin/allServices/__mocks__/mocks.d.ts +3 -0
  18. package/dist/pages/admin/allServices/__mocks__/mocks.d.ts.map +1 -0
  19. package/dist/pages/admin/allServices/constants.d.ts +2 -0
  20. package/dist/pages/admin/allServices/constants.d.ts.map +1 -0
  21. package/dist/pages/admin/allServices/index.d.ts +4 -0
  22. package/dist/pages/admin/allServices/index.d.ts.map +1 -0
  23. package/dist/pages/admin/allServices/model.d.ts +10 -0
  24. package/dist/pages/admin/allServices/model.d.ts.map +1 -0
  25. package/dist/pages/admin/allServices/utils.d.ts +9 -0
  26. package/dist/pages/admin/allServices/utils.d.ts.map +1 -0
  27. package/dist/providers/appointmentsConfig/constants.d.ts +2 -0
  28. package/dist/providers/appointmentsConfig/constants.d.ts.map +1 -0
  29. package/dist/providers/appointmentsConfig/context.d.ts +3 -0
  30. package/dist/providers/appointmentsConfig/context.d.ts.map +1 -0
  31. package/dist/providers/appointmentsConfig/hook.d.ts +3 -0
  32. package/dist/providers/appointmentsConfig/hook.d.ts.map +1 -0
  33. package/dist/providers/appointmentsConfig/index.d.ts +5 -0
  34. package/dist/providers/appointmentsConfig/index.d.ts.map +1 -0
  35. package/dist/providers/appointmentsConfig/models.d.ts +9 -0
  36. package/dist/providers/appointmentsConfig/models.d.ts.map +1 -0
  37. package/dist/providers/appointmentsConfig/provider.d.ts +4 -0
  38. package/dist/providers/appointmentsConfig/provider.d.ts.map +1 -0
  39. package/dist/providers/appointmentsConfig/schema.json.d.ts +19 -0
  40. package/dist/routes/index.d.ts.map +1 -1
  41. package/package.json +1 -1
@@ -1,2 +1,3 @@
1
1
  export declare const BAHMNI_APPOINTMENTS_NAMESPACE = "appointments";
2
+ export declare const APPOINTMENTS_V2_CONFIG_BASE_URL = "/bahmni_config/openmrs/apps/appointments/v2";
2
3
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,iBAAiB,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,iBAAiB,CAAC;AAC5D,eAAO,MAAM,+BAA+B,gDACG,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { $ as C, a0 as E, a1 as S, u as M, a as f, a2 as L, a3 as y, a4 as N, a5 as g, a6 as I } from "./index-DkkyqBOR.js";
3
+ import { useMemo as o } from "react";
4
+ const R = C(
5
+ E,
6
+ "useAppointmentsConfig",
7
+ "AppointmentsConfigProvider"
8
+ ), l = [
9
+ "name",
10
+ "location",
11
+ "speciality",
12
+ "durationMins",
13
+ "description"
14
+ ], h = "_tableContainer_jtyg5_1", D = "_table_jtyg5_1", c = {
15
+ tableContainer: h,
16
+ table: D
17
+ };
18
+ function v(t) {
19
+ return t.filter((a) => !l.includes(a));
20
+ }
21
+ function O(t, a) {
22
+ return [
23
+ ...t.map((e) => ({
24
+ key: e,
25
+ header: a(
26
+ `ADMIN_ALL_SERVICES_COLUMN_${S(e)}`
27
+ )
28
+ })),
29
+ {
30
+ key: "actions",
31
+ header: a("ADMIN_ALL_SERVICES_COLUMN_ACTIONS")
32
+ }
33
+ ];
34
+ }
35
+ function T(t, a) {
36
+ return t.map((e) => ({
37
+ id: e.uuid,
38
+ name: e.name,
39
+ location: e.location?.name ?? null,
40
+ speciality: e.speciality?.name ?? null,
41
+ durationMins: e.durationMins,
42
+ description: e.description,
43
+ attributes: Object.fromEntries(
44
+ a.map((n) => [
45
+ n,
46
+ e.attributes?.find((i) => i.attributeType === n)?.value ?? null
47
+ ])
48
+ )
49
+ }));
50
+ }
51
+ const B = () => {
52
+ const { t } = M(), { appointmentsConfig: a } = R(), e = a?.serviceTableFields ?? [
53
+ ...l
54
+ ], n = o(
55
+ () => v(e),
56
+ [e]
57
+ ), { data: i, isLoading: m, isError: p } = f({
58
+ queryKey: ["allAppointmentServices"],
59
+ queryFn: I
60
+ }), d = o(
61
+ () => O(e, t),
62
+ [e]
63
+ ), _ = o(
64
+ () => T(i ?? [], n),
65
+ [i, n]
66
+ ), b = (u, s) => s === "actions" ? null : l.includes(s) ? u[s] ?? "-" : u.attributes[s] ?? "-", A = [
67
+ { id: "home", label: t("BREADCRUMB_HOME"), href: L },
68
+ { id: "admin", label: t("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
69
+ ];
70
+ return /* @__PURE__ */ r(
71
+ y,
72
+ {
73
+ header: /* @__PURE__ */ r(g, { breadcrumbItems: A }),
74
+ main: /* @__PURE__ */ r("div", { className: c.tableContainer, children: /* @__PURE__ */ r(
75
+ N,
76
+ {
77
+ id: "all-services",
78
+ title: t("ADMIN_ALL_SERVICES_TITLE"),
79
+ headers: d,
80
+ rows: _,
81
+ ariaLabel: "all-services-table",
82
+ loading: m,
83
+ errorStateMessage: p ? t("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
84
+ emptyStateMessage: t("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
85
+ renderCell: b,
86
+ className: c.table
87
+ }
88
+ ) })
89
+ }
90
+ );
91
+ };
92
+ export {
93
+ B as default
94
+ };