@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.js
CHANGED
|
@@ -57683,7 +57683,11 @@ class PhotonClientStore {
|
|
|
57683
57683
|
isAuthenticated: authenticated
|
|
57684
57684
|
});
|
|
57685
57685
|
const user = await this.sdk.authentication.getUser();
|
|
57686
|
-
const
|
|
57686
|
+
const isUserLoggedIntoAnOrganization = !!user?.org_id;
|
|
57687
|
+
const isOrganizationIdSelectedInPhotonClient = !!this.sdk?.organization;
|
|
57688
|
+
if (!isOrganizationIdSelectedInPhotonClient && isUserLoggedIntoAnOrganization) {
|
|
57689
|
+
this.sdk.setOrganization(user.org_id);
|
|
57690
|
+
}
|
|
57687
57691
|
let permissions = [];
|
|
57688
57692
|
if (this.autoLogin || authenticated) {
|
|
57689
57693
|
try {
|
|
@@ -57694,7 +57698,8 @@ class PhotonClientStore {
|
|
|
57694
57698
|
permissions = [];
|
|
57695
57699
|
}
|
|
57696
57700
|
}
|
|
57697
|
-
const
|
|
57701
|
+
const selectedOrganizationId = this.sdk?.organization;
|
|
57702
|
+
const isInOrg = authenticated && isOrganizationIdSelectedInPhotonClient && isUserLoggedIntoAnOrganization && selectedOrganizationId === user.org_id;
|
|
57698
57703
|
this.setStore("authentication", {
|
|
57699
57704
|
...this.store.authentication,
|
|
57700
57705
|
user,
|
|
@@ -58782,7 +58787,7 @@ function checkHasPermission(subset, superset) {
|
|
|
58782
58787
|
return subset.every((permission) => superset.includes(permission));
|
|
58783
58788
|
}
|
|
58784
58789
|
|
|
58785
|
-
const version$1 = "0.23.
|
|
58790
|
+
const version$1 = "0.23.5";
|
|
58786
58791
|
const pkg = {
|
|
58787
58792
|
version: version$1};
|
|
58788
58793
|
|
|
@@ -73930,6 +73935,7 @@ const DraftPrescriptionForm = (props) => {
|
|
|
73930
73935
|
return props.store.dispenseQuantity?.value ?? void 0;
|
|
73931
73936
|
},
|
|
73932
73937
|
min: 0,
|
|
73938
|
+
onWheel: (e) => e.preventDefault(),
|
|
73933
73939
|
onInput: (e) => {
|
|
73934
73940
|
props.actions.updateFormValue({
|
|
73935
73941
|
key: "dispenseQuantity",
|
|
@@ -74047,6 +74053,7 @@ const DraftPrescriptionForm = (props) => {
|
|
|
74047
74053
|
return props.store.daysSupply?.value ?? void 0;
|
|
74048
74054
|
},
|
|
74049
74055
|
min: 0,
|
|
74056
|
+
onWheel: (e) => e.preventDefault(),
|
|
74050
74057
|
onInput: (e) => {
|
|
74051
74058
|
props.actions.updateFormValue({
|
|
74052
74059
|
key: "daysSupply",
|
|
@@ -74080,6 +74087,7 @@ const DraftPrescriptionForm = (props) => {
|
|
|
74080
74087
|
},
|
|
74081
74088
|
min: 0,
|
|
74082
74089
|
max: 11,
|
|
74090
|
+
onWheel: (e) => e.preventDefault(),
|
|
74083
74091
|
onInput: (e) => {
|
|
74084
74092
|
props.actions.updateFormValue({
|
|
74085
74093
|
key: "refills",
|