@crystaltech/hsms-shared-ui 0.4.0 → 0.5.0
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/index.es.js +16 -13
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -43699,6 +43699,7 @@ const LW = nt(/* @__PURE__ */ g.jsx("path", {
|
|
|
43699
43699
|
label: n.toUpperCase()
|
|
43700
43700
|
};
|
|
43701
43701
|
}, g5 = () => {
|
|
43702
|
+
var c, u;
|
|
43702
43703
|
const [e, t] = xt(null), n = !!e, r = {
|
|
43703
43704
|
account: {
|
|
43704
43705
|
roles: ["manage-account", "manage-account-links", "view-profile"]
|
|
@@ -43736,13 +43737,15 @@ const LW = nt(/* @__PURE__ */ g.jsx("path", {
|
|
|
43736
43737
|
"hsms-qms-client": {
|
|
43737
43738
|
roles: ["DOCTOR_ADMIN", "DOCTOR_USER"]
|
|
43738
43739
|
}
|
|
43739
|
-
}, i = JSON.parse(localStorage.getItem("user_info") || "{}").resource_access ||
|
|
43740
|
-
|
|
43740
|
+
}, i = JSON.parse(localStorage.getItem("user_info") || "{}").resource_access || (u = (c = JSON.parse(
|
|
43741
|
+
localStorage.getItem("user_info") || "{}"
|
|
43742
|
+
).realm_access) == null ? void 0 : c.roles) != null && u.includes("SUPER_ADMIN") ? r : JSON.parse(localStorage.getItem("user_info") || "{}").resource_access || r, a = (d) => {
|
|
43743
|
+
t(d.currentTarget);
|
|
43741
43744
|
}, s = () => {
|
|
43742
43745
|
t(null);
|
|
43743
|
-
}, l = (
|
|
43744
|
-
const
|
|
43745
|
-
window.location.href = `${
|
|
43746
|
+
}, l = (d) => {
|
|
43747
|
+
const p = window.location.origin;
|
|
43748
|
+
window.location.href = `${p}/hsms/${d.split("-")[1]}/`, s();
|
|
43746
43749
|
};
|
|
43747
43750
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
43748
43751
|
/* @__PURE__ */ g.jsx(op, { sx: { borderRadius: "50%" }, children: /* @__PURE__ */ g.jsx(
|
|
@@ -43789,9 +43792,9 @@ const LW = nt(/* @__PURE__ */ g.jsx("path", {
|
|
|
43789
43792
|
maxHeight: "400px",
|
|
43790
43793
|
overflowY: "auto"
|
|
43791
43794
|
},
|
|
43792
|
-
children: Object.entries(i).filter(([
|
|
43793
|
-
const
|
|
43794
|
-
return /* @__PURE__ */ g.jsx(Mi, { item: !0, xs: 4, children: /* @__PURE__ */ g.jsx(qi, { title:
|
|
43795
|
+
children: Object.entries(i).filter(([d]) => d !== "account").map(([d]) => {
|
|
43796
|
+
const p = h5(d);
|
|
43797
|
+
return /* @__PURE__ */ g.jsx(Mi, { item: !0, xs: 4, children: /* @__PURE__ */ g.jsx(qi, { title: p.label, children: /* @__PURE__ */ g.jsxs(
|
|
43795
43798
|
Fr,
|
|
43796
43799
|
{
|
|
43797
43800
|
elevation: 0,
|
|
@@ -43810,7 +43813,7 @@ const LW = nt(/* @__PURE__ */ g.jsx("path", {
|
|
|
43810
43813
|
backgroundColor: "rgba(0, 0, 0, 0.04)"
|
|
43811
43814
|
}
|
|
43812
43815
|
},
|
|
43813
|
-
onClick: () => l(
|
|
43816
|
+
onClick: () => l(d),
|
|
43814
43817
|
children: [
|
|
43815
43818
|
/* @__PURE__ */ g.jsx(
|
|
43816
43819
|
op,
|
|
@@ -43827,8 +43830,8 @@ const LW = nt(/* @__PURE__ */ g.jsx("path", {
|
|
|
43827
43830
|
children: /* @__PURE__ */ g.jsx(
|
|
43828
43831
|
"img",
|
|
43829
43832
|
{
|
|
43830
|
-
src: typeof
|
|
43831
|
-
alt:
|
|
43833
|
+
src: typeof p.icon == "string" ? p.icon : void 0,
|
|
43834
|
+
alt: p.label,
|
|
43832
43835
|
style: {
|
|
43833
43836
|
width: "40px",
|
|
43834
43837
|
height: "40px",
|
|
@@ -43852,12 +43855,12 @@ const LW = nt(/* @__PURE__ */ g.jsx("path", {
|
|
|
43852
43855
|
textOverflow: "ellipsis",
|
|
43853
43856
|
whiteSpace: "nowrap"
|
|
43854
43857
|
},
|
|
43855
|
-
children:
|
|
43858
|
+
children: p.label
|
|
43856
43859
|
}
|
|
43857
43860
|
)
|
|
43858
43861
|
]
|
|
43859
43862
|
}
|
|
43860
|
-
) }) },
|
|
43863
|
+
) }) }, d);
|
|
43861
43864
|
})
|
|
43862
43865
|
}
|
|
43863
43866
|
)
|