@bahmni/appointments-app 0.0.1-dev.350 → 0.0.1-dev.351

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,8 +1,8 @@
1
1
  import { jsx as a, jsxs as y } from "react/jsx-runtime";
2
- import { t as V, A as O, u as C, w as P, x as h, o as B, M as G, y as L, C as x, D as U, H as q, K as H, N as F, S as W, V as j, W as k, _ as K } from "./index-91D-Kwae.js";
3
- import { useState as I, useMemo as c } from "react";
4
- import { useQueryClient as Q, useQuery as $ } from "@tanstack/react-query";
5
- const w = V(
2
+ import { x as V, z as O, u as C, C as P, I as h, o as B, H as x, J as L, T as G, L as H, M as U, N as q, S as F, V as j, Y as k, Z as K, _ as Q } from "./index-CVN7C8id.js";
3
+ import { useState as I, useMemo as _ } from "react";
4
+ import { useQueryClient as $, useQuery as z } from "@tanstack/react-query";
5
+ const W = V(
6
6
  O,
7
7
  "useAppointmentsConfig",
8
8
  "AppointmentsConfigProvider"
@@ -36,9 +36,9 @@ const w = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
39
- ], Z = "app:appointments:manageServices", z = "app:appointments:adminTab", X = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
- page: X,
41
- noPrivilegeContainer: J,
39
+ ], Z = "app:appointments:manageServices", w = "app:appointments:adminTab", J = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
+ page: J,
41
+ noPrivilegeContainer: X,
42
42
  table: ee
43
43
  };
44
44
  function te(e) {
@@ -75,33 +75,33 @@ function ae(e, i) {
75
75
  }));
76
76
  }
77
77
  const oe = () => {
78
- const { t: e } = C(), i = Q(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = w(), [E, _] = I(null), [M, p] = I(!1), l = n?.serviceTableFields ?? [
78
+ const { t: e } = C(), i = $(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: n } = W(), [E, c] = I(null), [M, p] = I(!1), l = n?.serviceTableFields ?? [
79
79
  ...u
80
- ], S = L(s, z), b = L(
80
+ ], S = L(s, w), b = L(
81
81
  s,
82
82
  Z
83
- ), m = c(
83
+ ), m = _(
84
84
  () => te(l),
85
85
  [l]
86
- ), { data: A, isLoading: v, isError: D } = $({
86
+ ), { data: A, isLoading: v, isError: D } = z({
87
87
  queryKey: ["allAppointmentServices"],
88
- queryFn: x,
88
+ queryFn: G,
89
89
  enabled: S
90
- }), N = c(
90
+ }), N = _(
91
91
  () => ie(l, e),
92
92
  [l]
93
- ), R = c(
93
+ ), R = _(
94
94
  () => ae(A ?? [], m),
95
95
  [A, m]
96
96
  ), g = async () => {
97
97
  p(!0);
98
98
  try {
99
- await K(E.id), t({
99
+ await Q(E.id), t({
100
100
  title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
101
101
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
102
102
  type: "success",
103
103
  timeout: 5e3
104
- }), _(null), i.invalidateQueries({ queryKey: ["allAppointmentServices"] });
104
+ }), c(null), i.invalidateQueries({ queryKey: ["allAppointmentServices"] });
105
105
  } catch {
106
106
  t({
107
107
  title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
@@ -112,7 +112,7 @@ const oe = () => {
112
112
  p(!1);
113
113
  }
114
114
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ a(
115
- j,
115
+ k,
116
116
  {
117
117
  id: `delete-service-${r.id}-btn`,
118
118
  testId: `delete-service-${r.id}-btn-test-id`,
@@ -120,17 +120,17 @@ const oe = () => {
120
120
  kind: "ghost",
121
121
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
122
122
  disabled: !b,
123
- onClick: () => _(r),
124
- children: /* @__PURE__ */ a(k, {})
123
+ onClick: () => c(r),
124
+ children: /* @__PURE__ */ a(K, {})
125
125
  }
126
126
  ) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
127
- { id: "home", label: e("BREADCRUMB_HOME"), href: U },
127
+ { id: "home", label: e("BREADCRUMB_HOME"), href: H },
128
128
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
129
129
  ];
130
130
  return /* @__PURE__ */ a(
131
- q,
131
+ U,
132
132
  {
133
- header: /* @__PURE__ */ a(F, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(W, {}) }),
133
+ header: /* @__PURE__ */ a(F, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(j, {}) }),
134
134
  main: S ? /* @__PURE__ */ y(
135
135
  "div",
136
136
  {
@@ -140,7 +140,7 @@ const oe = () => {
140
140
  className: d.page,
141
141
  children: [
142
142
  /* @__PURE__ */ a(
143
- H,
143
+ q,
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
@@ -160,7 +160,7 @@ const oe = () => {
160
160
  serviceName: E.name,
161
161
  isDeleting: M,
162
162
  onConfirm: g,
163
- onCancel: () => _(null)
163
+ onCancel: () => c(null)
164
164
  }
165
165
  )
166
166
  ]
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b9 as t } from "./index-91D-Kwae.js";
1
+ import { b9 as t } from "./index-CVN7C8id.js";
2
2
  export {
3
3
  t as AppointmentsApp
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/appointments-app",
3
- "version": "0.0.1-dev.350",
3
+ "version": "0.0.1-dev.351",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",