@dsivd/prestations-ng 15.1.4 → 15.2.0-beta1

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.
@@ -587,6 +587,14 @@ class GesdemHandlerService {
587
587
  url = `${url}/validated/${reference}`;
588
588
  return this.http.get(url).pipe(tap(this.emitResponse.bind(this)), map(() => true), catchError((response) => this.handleGesdemError(reference, response)));
589
589
  }
590
+ retrieveActionStatut(reference) {
591
+ let url = 'api';
592
+ if (this.prefix) {
593
+ url = `api/${this.prefix}`;
594
+ }
595
+ url = `${url}/${reference}/action-statut`;
596
+ return this.http.get(url).pipe(map(status => status), catchError((response) => this.handleGesdemError(reference, response)));
597
+ }
590
598
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
591
599
  postToUrl(form, url) {
592
600
  if (this._lastResponse && this._lastResponse.meta.reference) {
@@ -3352,9 +3360,8 @@ class GesdemErrorComponent {
3352
3360
  }
3353
3361
  else {
3354
3362
  this.isPendingPayment = this.gesdemService
3355
- .retrieve(this.reference)
3356
- .pipe(map(() => ActionStatut[this.gesdemService.lastResponse.meta
3357
- .statut]), tap(statut => {
3363
+ .retrieveActionStatut(this.reference)
3364
+ .pipe(tap(statut => {
3358
3365
  if (GesdemStatutUtils.isFinal(statut)) {
3359
3366
  this.navigation.last();
3360
3367
  }
@@ -11253,6 +11260,7 @@ class EPaymentService {
11253
11260
  responseType: 'text'
11254
11261
  })
11255
11262
  .pipe(catchError(() => {
11263
+ this.growlService.addWithType(GrowlType.DANGER, 'Une erreur de transmission est survenue. Merci de réessayer plus tard.');
11256
11264
  this.cancelPendingPayment(ref, baseUrl);
11257
11265
  throw new Error();
11258
11266
  }));