Skip to content

Commit

Permalink
Fix bug with password reset screen not popping up
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegoodwin committed Apr 12, 2021
1 parent de0ba81 commit 9c6a3d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DataStores/patientStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class PatientStore extends UserStore {
loaded: false
}

@observable hasForcedPasswordChange = false;
@observable photoSchedule = {};
@observable educationStatus = [];

Expand Down Expand Up @@ -112,6 +113,7 @@ export class PatientStore extends UserStore {
this.patientInformation.daysInTreatment = json.daysInTreatment;
this.patientInformation.currentStreak = json.currentStreak;
this.educationStore.educationStatus = json.educationStatus;
this.hasForcedPasswordChange = json.hasForcedPasswordChange;
this.patientInformation.loaded = true;

localStorage.setItem("cachedProfile", JSON.stringify({
Expand Down Expand Up @@ -417,7 +419,7 @@ export class PatientStore extends UserStore {
}

@action exitForcedPasswordChange = () => {
this.forcePasswordChange = false;
this.hasForcedPasswordChange = false;
}

@action logoutPatient() {
Expand Down
1 change: 1 addition & 0 deletions src/Patient/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const PatientHome = observer((props) => {
}
}, [uiStore.offline, dailyReportStore.numberOfflineReports])


if (patientStore.hasForcedPasswordChange) {
return <ForcePasswordChange />
}
Expand Down

0 comments on commit 9c6a3d8

Please sign in to comment.