Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Handle cases where the user confirmed the mail after the browser stopped checking it. In this case the `/details` url returns an error. Without this additional check, the user is stuck for ever with the waiting screen.

Henriette Dinger650b57fd3d78
diff --git a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts
index 8309c424c91..b81a9de6b88 100644
--- a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts
+++ b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts
@@ -91,7 +91,8 @@ export class EEActiveTrialComponent implements OnInit {
this.eeTrialService.retryConfirmation();
})
.catch((error:HttpErrorResponse) => {
- this.eeTrialService.cancelled = true;
+ // Check whether the mail has been confirmed by now
+ this.eeTrialService.getToken();
});
}
diff --git a/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts b/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts
index c22f5302bc1..92f1f754bc2 100644
--- a/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts
+++ b/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts
@@ -66,8 +66,13 @@ export class EETrialWaitingComponent {
this.notificationsService.addSuccess(this.text.resend_success);
this.eeTrialService.retryConfirmation();
})
- .catch((error:HttpErrorResponse) => {
- this.notificationsService.addError(this.text.resend_warning);
+ .catch(() => {
+ if (this.eeTrialService.trialLink) {
+ // Check whether the mail has been confirmed by now
+ this.eeTrialService.getToken();
+ } else {
+ this.notificationsService.addError(this.text.resend_warning);
+ }
});
}
}
diff --git a/frontend/src/app/components/enterprise/enterprise-trial.service.ts b/frontend/src/app/components/enterprise/enterprise-trial.service.ts
index b475da4db72..b4ff19a8a51 100644
--- a/frontend/src/app/components/enterprise/enterprise-trial.service.ts
+++ b/frontend/src/app/components/enterprise/enterprise-trial.service.ts
@@ -55,7 +55,7 @@ export class EnterpriseTrialService {
}
// get a token from the trial link if user confirmed mail
- private getToken() {
+ public getToken() {
// 2) GET /public/v1/trials/:id
this.http
.get<any>(this.trialLink)