@crystaltech/hsms-shared-ui 0.7.14-alpha.0.2 → 0.7.14-alpha.0.4

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.
@@ -3,6 +3,7 @@ export interface IHospital {
3
3
  id: string;
4
4
  facilityId: string;
5
5
  hospitalName: string;
6
+ hospitalNameBn: string;
6
7
  address: string;
7
8
  division: string;
8
9
  district: string;
package/dist/index.es.js CHANGED
@@ -28381,40 +28381,43 @@ const J8 = ({
28381
28381
  size: r = "small"
28382
28382
  }) => {
28383
28383
  const [i, a] = Ve(e || null), [s, l] = Ve([]), [c, u] = Ve(!0);
28384
- return Tt(() => {
28384
+ if (Tt(() => {
28385
28385
  (async () => {
28386
28386
  try {
28387
- const f = Zr(), p = localStorage.getItem("organization_info"), g = p ? JSON.parse(p) : null;
28388
- if (!(g != null && g.id)) return;
28389
- const A = await fetch(
28390
- `${f}/api/public/organization/hospitals?orgId=${g.id}`
28387
+ const p = Zr(), g = localStorage.getItem("organization_info"), A = g ? JSON.parse(g) : null;
28388
+ if (!(A != null && A.id)) return;
28389
+ const h = await fetch(
28390
+ `${p}/api/public/organization/hospitals?orgId=${A.id}`
28391
28391
  );
28392
- if (!A.ok)
28393
- throw new Error(`HTTP error! status: ${A.status}`);
28394
- const h = await A.json();
28395
- l((h == null ? void 0 : h.data) || []);
28396
- } catch (f) {
28397
- console.error("Failed to load hospitals:", f);
28392
+ if (!h.ok)
28393
+ throw new Error(`HTTP error! status: ${h.status}`);
28394
+ const m = await h.json();
28395
+ l((m == null ? void 0 : m.data) || []);
28396
+ } catch (p) {
28397
+ console.error("Failed to load hospitals:", p);
28398
28398
  } finally {
28399
28399
  u(!1);
28400
28400
  }
28401
28401
  })();
28402
28402
  }, []), Tt(() => {
28403
28403
  s.length === 1 && i === null && (a(s[0]), t == null || t(s[0]));
28404
- }, [s, i, t]), c ? /* @__PURE__ */ b(Xf, { fullScreen: !0 }) : /* @__PURE__ */ b(
28404
+ }, [s, i, t]), c)
28405
+ return /* @__PURE__ */ b(Xf, { fullScreen: !0 });
28406
+ const d = localStorage.getItem("i18nextLng") === "bn";
28407
+ return /* @__PURE__ */ b(
28405
28408
  gC,
28406
28409
  {
28407
28410
  value: i,
28408
28411
  options: s,
28409
- getOptionLabel: (d) => d.hospitalName,
28412
+ getOptionLabel: (f) => f.hospitalName,
28410
28413
  noOptionsText: "No hospitals found",
28411
- onChange: (d, f) => {
28412
- a(f), t == null || t(f);
28414
+ onChange: (f, p) => {
28415
+ a(p), t == null || t(p);
28413
28416
  },
28414
- renderInput: (d) => /* @__PURE__ */ b(
28417
+ renderInput: (f) => /* @__PURE__ */ b(
28415
28418
  ms,
28416
28419
  {
28417
- ...d,
28420
+ ...f,
28418
28421
  label: n,
28419
28422
  size: r,
28420
28423
  sx: {
@@ -28425,7 +28428,7 @@ const J8 = ({
28425
28428
  }
28426
28429
  }
28427
28430
  ),
28428
- renderOption: (d, f) => /* @__PURE__ */ b("li", { ...d, children: f.hospitalName }),
28431
+ renderOption: (f, p) => /* @__PURE__ */ b("li", { ...f, children: d ? p.hospitalNameBn : p.hospitalName }),
28429
28432
  fullWidth: !0
28430
28433
  }
28431
28434
  );
@@ -29514,9 +29517,9 @@ const IQ = (e) => {
29514
29517
  flexDirection: "column",
29515
29518
  justifyContent: "flex-start",
29516
29519
  paddingBottom: e.spacing(2),
29517
- minHeight: "85vh",
29518
- paddingLeft: e.spacing(3),
29519
- paddingRight: e.spacing(3)
29520
+ minHeight: "85vh"
29521
+ // paddingLeft: theme.spacing(3),
29522
+ // paddingRight: theme.spacing(3),
29520
29523
  })
29521
29524
  ), OQ = Br(Pe)(({ theme: e }) => ({
29522
29525
  backgroundColor: e.palette.background.default,
@@ -30079,7 +30082,7 @@ const IQ = (e) => {
30079
30082
  {
30080
30083
  sx: {
30081
30084
  flexGrow: 1,
30082
- p: { xs: 2, sm: 3, md: 4 },
30085
+ // p: { xs: 2, sm: 3, md: 4 },
30083
30086
  backgroundColor: i.palette.background.default
30084
30087
  },
30085
30088
  children: /* @__PURE__ */ b(PQ, { children: e })