@photonhealth/elements 0.23.4 → 0.23.5
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.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/dist/test-utils/createTestClient.d.ts +5 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -57681,7 +57681,11 @@ class PhotonClientStore {
|
|
|
57681
57681
|
isAuthenticated: authenticated
|
|
57682
57682
|
});
|
|
57683
57683
|
const user = await this.sdk.authentication.getUser();
|
|
57684
|
-
const
|
|
57684
|
+
const isUserLoggedIntoAnOrganization = !!user?.org_id;
|
|
57685
|
+
const isOrganizationIdSelectedInPhotonClient = !!this.sdk?.organization;
|
|
57686
|
+
if (!isOrganizationIdSelectedInPhotonClient && isUserLoggedIntoAnOrganization) {
|
|
57687
|
+
this.sdk.setOrganization(user.org_id);
|
|
57688
|
+
}
|
|
57685
57689
|
let permissions = [];
|
|
57686
57690
|
if (this.autoLogin || authenticated) {
|
|
57687
57691
|
try {
|
|
@@ -57692,7 +57696,8 @@ class PhotonClientStore {
|
|
|
57692
57696
|
permissions = [];
|
|
57693
57697
|
}
|
|
57694
57698
|
}
|
|
57695
|
-
const
|
|
57699
|
+
const selectedOrganizationId = this.sdk?.organization;
|
|
57700
|
+
const isInOrg = authenticated && isOrganizationIdSelectedInPhotonClient && isUserLoggedIntoAnOrganization && selectedOrganizationId === user.org_id;
|
|
57696
57701
|
this.setStore("authentication", {
|
|
57697
57702
|
...this.store.authentication,
|
|
57698
57703
|
user,
|
|
@@ -58780,7 +58785,7 @@ function checkHasPermission(subset, superset) {
|
|
|
58780
58785
|
return subset.every((permission) => superset.includes(permission));
|
|
58781
58786
|
}
|
|
58782
58787
|
|
|
58783
|
-
const version$1 = "0.23.
|
|
58788
|
+
const version$1 = "0.23.5";
|
|
58784
58789
|
const pkg = {
|
|
58785
58790
|
version: version$1};
|
|
58786
58791
|
|
|
@@ -73928,6 +73933,7 @@ const DraftPrescriptionForm = (props) => {
|
|
|
73928
73933
|
return props.store.dispenseQuantity?.value ?? void 0;
|
|
73929
73934
|
},
|
|
73930
73935
|
min: 0,
|
|
73936
|
+
onWheel: (e) => e.preventDefault(),
|
|
73931
73937
|
onInput: (e) => {
|
|
73932
73938
|
props.actions.updateFormValue({
|
|
73933
73939
|
key: "dispenseQuantity",
|
|
@@ -74045,6 +74051,7 @@ const DraftPrescriptionForm = (props) => {
|
|
|
74045
74051
|
return props.store.daysSupply?.value ?? void 0;
|
|
74046
74052
|
},
|
|
74047
74053
|
min: 0,
|
|
74054
|
+
onWheel: (e) => e.preventDefault(),
|
|
74048
74055
|
onInput: (e) => {
|
|
74049
74056
|
props.actions.updateFormValue({
|
|
74050
74057
|
key: "daysSupply",
|
|
@@ -74078,6 +74085,7 @@ const DraftPrescriptionForm = (props) => {
|
|
|
74078
74085
|
},
|
|
74079
74086
|
min: 0,
|
|
74080
74087
|
max: 11,
|
|
74088
|
+
onWheel: (e) => e.preventDefault(),
|
|
74081
74089
|
onInput: (e) => {
|
|
74082
74090
|
props.actions.updateFormValue({
|
|
74083
74091
|
key: "refills",
|