@bahmni/appointments-app 0.0.1-dev.301 → 0.0.1-dev.302

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 n, jsxs as y } from "react/jsx-runtime";
2
- import { s as V, A as O, u as C, I as P, $ as h, Y as B, i as G, l as L, E as x, p as U, n as q, r as w, v as $, w as F, C as k, D as Y } from "./index-DXWAUyAO.js";
2
+ import { k as V, l as O, u as C, I as P, $ as h, Y as B, p as x, s as L, E as G, v as U, w as q, B as w, x as $, z as k, C as F, D as Y } from "./index-CdyKXvT4.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
4
  import { useQueryClient as j, useQuery as H } from "@tanstack/react-query";
5
5
  const K = V(
@@ -8,11 +8,11 @@ const K = V(
8
8
  "AppointmentsConfigProvider"
9
9
  ), Q = ({
10
10
  serviceName: e,
11
- isDeleting: i,
11
+ isDeleting: a,
12
12
  onConfirm: t,
13
13
  onCancel: s
14
14
  }) => {
15
- const { t: a } = C();
15
+ const { t: i } = C();
16
16
  return /* @__PURE__ */ n(
17
17
  P,
18
18
  {
@@ -23,11 +23,11 @@ const K = V(
23
23
  danger: !0,
24
24
  onRequestClose: s,
25
25
  onRequestSubmit: t,
26
- primaryButtonText: a("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
27
- secondaryButtonText: a("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
28
- primaryButtonDisabled: i,
29
- modalHeading: a("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
30
- children: a("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
26
+ primaryButtonText: i("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
27
+ secondaryButtonText: i("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
28
+ primaryButtonDisabled: a,
29
+ modalHeading: i("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
30
+ children: i("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
31
31
  }
32
32
  );
33
33
  }, p = [
@@ -36,29 +36,29 @@ const K = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
39
- ], W = "app:appointments:manageServices", Z = "app:appointments:adminTab", z = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
40
- page: z,
39
+ ], W = "app:appointments:manageServices", z = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
40
+ page: Z,
41
41
  noPrivilegeContainer: J,
42
42
  table: X
43
43
  };
44
44
  function ee(e) {
45
- return e.filter((i) => !p.includes(i));
45
+ return e.filter((a) => !p.includes(a));
46
46
  }
47
- function te(e, i) {
47
+ function te(e, a) {
48
48
  return [
49
49
  ...e.map((t) => ({
50
50
  key: t,
51
- header: i(
51
+ header: a(
52
52
  `ADMIN_ALL_SERVICES_COLUMN_${h(t)}`
53
53
  )
54
54
  })),
55
55
  {
56
56
  key: "actions",
57
- header: i("ADMIN_ALL_SERVICES_COLUMN_ACTIONS")
57
+ header: a("ADMIN_ALL_SERVICES_COLUMN_ACTIONS")
58
58
  }
59
59
  ];
60
60
  }
61
- function ie(e, i) {
61
+ function ae(e, a) {
62
62
  return e.map((t) => ({
63
63
  id: t.uuid,
64
64
  name: t.name,
@@ -67,17 +67,17 @@ function ie(e, i) {
67
67
  durationMins: t.durationMins,
68
68
  description: t.description,
69
69
  attributes: Object.fromEntries(
70
- i.map((s) => [
70
+ a.map((s) => [
71
71
  s,
72
- t.attributes?.find((a) => a.attributeType === s)?.value ?? null
72
+ t.attributes?.find((i) => i.attributeType === s)?.value ?? null
73
73
  ])
74
74
  )
75
75
  }));
76
76
  }
77
77
  const le = () => {
78
- const { t: e } = C(), i = j(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: a } = K(), [E, c] = I(null), [M, u] = I(!1), l = a?.serviceTableFields ?? [
78
+ const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: i } = K(), [E, c] = I(null), [M, u] = I(!1), l = i?.serviceTableFields ?? [
79
79
  ...p
80
- ], m = L(s, Z), b = L(
80
+ ], m = L(s, z), b = L(
81
81
  s,
82
82
  W
83
83
  ), S = _(
@@ -85,13 +85,13 @@ const le = () => {
85
85
  [l]
86
86
  ), { data: A, isLoading: v, isError: D } = H({
87
87
  queryKey: ["allAppointmentServices"],
88
- queryFn: x,
88
+ queryFn: G,
89
89
  enabled: m
90
90
  }), R = _(
91
91
  () => te(l, e),
92
92
  [l]
93
93
  ), N = _(
94
- () => ie(A ?? [], S),
94
+ () => ae(A ?? [], S),
95
95
  [A, S]
96
96
  ), g = async () => {
97
97
  u(!0);
@@ -101,7 +101,7 @@ const le = () => {
101
101
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
102
102
  type: "success",
103
103
  timeout: 5e3
104
- }), c(null), i.invalidateQueries({ queryKey: ["allAppointmentServices"] });
104
+ }), c(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
105
105
  } catch {
106
106
  t({
107
107
  title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
@@ -112,7 +112,7 @@ const le = () => {
112
112
  u(!1);
113
113
  }
114
114
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
115
- F,
115
+ k,
116
116
  {
117
117
  id: `delete-service-${r.id}-btn`,
118
118
  testId: `delete-service-${r.id}-btn-test-id`,
@@ -121,7 +121,7 @@ const le = () => {
121
121
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
122
122
  disabled: !b,
123
123
  onClick: () => c(r),
124
- children: /* @__PURE__ */ n(k, {})
124
+ children: /* @__PURE__ */ n(F, {})
125
125
  }
126
126
  ) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
127
127
  { id: "home", label: e("BREADCRUMB_HOME"), href: U },