@crystaltech/hsms-shared-ui 0.7.14-alpha.0.1 → 0.7.14-alpha.0.3
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.
- package/dist/components/HospitalSelect.d.ts +1 -0
- package/dist/components/banner/Banner.d.ts +1 -1
- package/dist/index.es.js +84 -31
- package/dist/index.js +1 -1
- package/dist/sw.js +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ interface HospitalInfoProps {
|
|
|
17
17
|
logoUrl: string | null;
|
|
18
18
|
bannerUrl: string | null;
|
|
19
19
|
backgroundImageUrl: string | null;
|
|
20
|
-
|
|
20
|
+
bannerWithImg: boolean;
|
|
21
21
|
status: string | null;
|
|
22
22
|
reasonToDelete: string | null;
|
|
23
23
|
reasonToUpdate: string | null;
|
package/dist/index.es.js
CHANGED
|
@@ -28044,7 +28044,7 @@ function dj({
|
|
|
28044
28044
|
hospitalInfo: c
|
|
28045
28045
|
}) {
|
|
28046
28046
|
const d = c || JSON.parse(localStorage.getItem("hospital_info") || "{}") || {};
|
|
28047
|
-
if (d.
|
|
28047
|
+
if (d.bannerWithImg && d.bannerUrl)
|
|
28048
28048
|
return /* @__PURE__ */ b(Pe, { sx: { width: "100%", overflow: "hidden" }, children: /* @__PURE__ */ b(
|
|
28049
28049
|
"img",
|
|
28050
28050
|
{
|
|
@@ -28182,7 +28182,10 @@ function dj({
|
|
|
28182
28182
|
color: "#d32f2f",
|
|
28183
28183
|
// Govt Red or standard dark red for emphasis
|
|
28184
28184
|
mb: a,
|
|
28185
|
-
fontSize: {
|
|
28185
|
+
fontSize: {
|
|
28186
|
+
xs: i - 2,
|
|
28187
|
+
sm: i
|
|
28188
|
+
},
|
|
28186
28189
|
fontWeight: 700,
|
|
28187
28190
|
lineHeight: 1.1,
|
|
28188
28191
|
// Even tighter line height
|
|
@@ -28213,7 +28216,18 @@ function dj({
|
|
|
28213
28216
|
Jt,
|
|
28214
28217
|
{
|
|
28215
28218
|
spacing: 0.5,
|
|
28216
|
-
divider: /* @__PURE__ */ b(
|
|
28219
|
+
divider: /* @__PURE__ */ b(
|
|
28220
|
+
Pe,
|
|
28221
|
+
{
|
|
28222
|
+
component: "span",
|
|
28223
|
+
sx: {
|
|
28224
|
+
mx: 0.5,
|
|
28225
|
+
color: "text.disabled",
|
|
28226
|
+
"@media print": { color: "#000" }
|
|
28227
|
+
},
|
|
28228
|
+
children: "•"
|
|
28229
|
+
}
|
|
28230
|
+
),
|
|
28217
28231
|
sx: {
|
|
28218
28232
|
"@media print": {
|
|
28219
28233
|
marginBottom: "2px !important"
|
|
@@ -28267,15 +28281,43 @@ function dj({
|
|
|
28267
28281
|
}
|
|
28268
28282
|
},
|
|
28269
28283
|
children: [
|
|
28270
|
-
d.email && /* @__PURE__ */ _(
|
|
28271
|
-
|
|
28272
|
-
|
|
28273
|
-
|
|
28274
|
-
|
|
28275
|
-
|
|
28276
|
-
|
|
28277
|
-
|
|
28278
|
-
|
|
28284
|
+
d.email && /* @__PURE__ */ _(
|
|
28285
|
+
Pe,
|
|
28286
|
+
{
|
|
28287
|
+
component: "span",
|
|
28288
|
+
sx: { display: "inline-flex", alignItems: "center" },
|
|
28289
|
+
children: [
|
|
28290
|
+
"Email: ",
|
|
28291
|
+
d.email
|
|
28292
|
+
]
|
|
28293
|
+
}
|
|
28294
|
+
),
|
|
28295
|
+
d.email && d.website && /* @__PURE__ */ b(
|
|
28296
|
+
Pe,
|
|
28297
|
+
{
|
|
28298
|
+
component: "span",
|
|
28299
|
+
sx: {
|
|
28300
|
+
display: { xs: "none", sm: "inline" },
|
|
28301
|
+
color: "text.disabled",
|
|
28302
|
+
"@media print": {
|
|
28303
|
+
display: "inline !important",
|
|
28304
|
+
color: "#000"
|
|
28305
|
+
}
|
|
28306
|
+
},
|
|
28307
|
+
children: "|"
|
|
28308
|
+
}
|
|
28309
|
+
),
|
|
28310
|
+
d.website && /* @__PURE__ */ _(
|
|
28311
|
+
Pe,
|
|
28312
|
+
{
|
|
28313
|
+
component: "span",
|
|
28314
|
+
sx: { display: "inline-flex", alignItems: "center" },
|
|
28315
|
+
children: [
|
|
28316
|
+
"Web: ",
|
|
28317
|
+
d.website
|
|
28318
|
+
]
|
|
28319
|
+
}
|
|
28320
|
+
)
|
|
28279
28321
|
]
|
|
28280
28322
|
}
|
|
28281
28323
|
)
|
|
@@ -28315,7 +28357,15 @@ function dj({
|
|
|
28315
28357
|
}
|
|
28316
28358
|
}
|
|
28317
28359
|
}
|
|
28318
|
-
) : /* @__PURE__ */ b(
|
|
28360
|
+
) : /* @__PURE__ */ b(
|
|
28361
|
+
Pe,
|
|
28362
|
+
{
|
|
28363
|
+
sx: {
|
|
28364
|
+
width: { xs: 60, sm: t },
|
|
28365
|
+
"@media print": { width: "60px !important" }
|
|
28366
|
+
}
|
|
28367
|
+
}
|
|
28368
|
+
)
|
|
28319
28369
|
}
|
|
28320
28370
|
)
|
|
28321
28371
|
]
|
|
@@ -28331,40 +28381,43 @@ const J8 = ({
|
|
|
28331
28381
|
size: r = "small"
|
|
28332
28382
|
}) => {
|
|
28333
28383
|
const [i, a] = Ve(e || null), [s, l] = Ve([]), [c, u] = Ve(!0);
|
|
28334
|
-
|
|
28384
|
+
if (Tt(() => {
|
|
28335
28385
|
(async () => {
|
|
28336
28386
|
try {
|
|
28337
|
-
const
|
|
28338
|
-
if (!(
|
|
28339
|
-
const
|
|
28340
|
-
`${
|
|
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}`
|
|
28341
28391
|
);
|
|
28342
|
-
if (!
|
|
28343
|
-
throw new Error(`HTTP error! status: ${
|
|
28344
|
-
const
|
|
28345
|
-
l((
|
|
28346
|
-
} catch (
|
|
28347
|
-
console.error("Failed to load hospitals:",
|
|
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);
|
|
28348
28398
|
} finally {
|
|
28349
28399
|
u(!1);
|
|
28350
28400
|
}
|
|
28351
28401
|
})();
|
|
28352
28402
|
}, []), Tt(() => {
|
|
28353
28403
|
s.length === 1 && i === null && (a(s[0]), t == null || t(s[0]));
|
|
28354
|
-
}, [s, i, t]), c
|
|
28404
|
+
}, [s, i, t]), c)
|
|
28405
|
+
return /* @__PURE__ */ b(Xf, { fullScreen: !0 });
|
|
28406
|
+
const d = localStorage.getItem("i18nextLng") === "bn";
|
|
28407
|
+
return /* @__PURE__ */ b(
|
|
28355
28408
|
gC,
|
|
28356
28409
|
{
|
|
28357
28410
|
value: i,
|
|
28358
28411
|
options: s,
|
|
28359
|
-
getOptionLabel: (
|
|
28412
|
+
getOptionLabel: (f) => f.hospitalName,
|
|
28360
28413
|
noOptionsText: "No hospitals found",
|
|
28361
|
-
onChange: (
|
|
28362
|
-
a(
|
|
28414
|
+
onChange: (f, p) => {
|
|
28415
|
+
a(p), t == null || t(p);
|
|
28363
28416
|
},
|
|
28364
|
-
renderInput: (
|
|
28417
|
+
renderInput: (f) => /* @__PURE__ */ b(
|
|
28365
28418
|
ms,
|
|
28366
28419
|
{
|
|
28367
|
-
...
|
|
28420
|
+
...f,
|
|
28368
28421
|
label: n,
|
|
28369
28422
|
size: r,
|
|
28370
28423
|
sx: {
|
|
@@ -28375,7 +28428,7 @@ const J8 = ({
|
|
|
28375
28428
|
}
|
|
28376
28429
|
}
|
|
28377
28430
|
),
|
|
28378
|
-
renderOption: (
|
|
28431
|
+
renderOption: (f, p) => /* @__PURE__ */ b("li", { ...f, children: d ? p.hospitalNameBn : p.hospitalName }),
|
|
28379
28432
|
fullWidth: !0
|
|
28380
28433
|
}
|
|
28381
28434
|
);
|