@dsivd/prestations-ng 15.1.3 → 15.1.4-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.
@@ -1477,7 +1477,15 @@ const DEFAULT_DICTIONARY = {
1477
1477
  'foehn-agenda-navigation.next-week': 'Semaine suivante',
1478
1478
  'foehn-agenda-navigation.next-week-sr-only': 'Semaine suivante : {nextWeek}',
1479
1479
  'foehn-agenda-navigation.nav.aria-label': 'Changer de semaine',
1480
- 'foehn-agenda-navigation.date-picker-button.screen-reader.selected-date': 'Semaine du {selectedDate} sélectionnée'
1480
+ 'foehn-agenda-navigation.date-picker-button.screen-reader.selected-date': 'Semaine du {selectedDate} sélectionnée',
1481
+ 'gesdem-error.text.has-reference': 'Vous pouvez essayer de reprendre votre demande en cliquant sur le lien ci-dessous',
1482
+ 'gesdem-error.link.has-reference': 'Reprendre ma demande',
1483
+ 'gesdem-error.text.has-no-reference': 'Vous pouvez recommencer une demande en cliquant sur le lien ci-dessous',
1484
+ 'gesdem-error.link.has-no-reference': 'Recommencer',
1485
+ 'gesdem-error.text.pending-payment': '<p>Un problème est survenu lors de la transmission de votre demande.</p>' +
1486
+ '<p><strong>Merci de ne pas refaire une nouvelle demande tout de suite.</strong></p>' +
1487
+ "<p>Sans confirmation de la transmission de votre demande dans un délai d'un jour, nous vous prions de contacter le support " +
1488
+ 'en mentionnant la référence <strong>{reference}.</strong></p>'
1481
1489
  };
1482
1490
 
1483
1491
  const DICTIONARY_BASE_URL = 'api/dictionary';
@@ -3322,10 +3330,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
3322
3330
  }] } });
3323
3331
 
3324
3332
  class GesdemErrorComponent {
3325
- constructor(activatedRoute, navigation, gesdemService, foehnPageService, supportAlertService) {
3333
+ constructor(activatedRoute, navigation, gesdemService, gesdemEventService, foehnPageService, supportAlertService) {
3326
3334
  this.activatedRoute = activatedRoute;
3327
3335
  this.navigation = navigation;
3328
3336
  this.gesdemService = gesdemService;
3337
+ this.gesdemEventService = gesdemEventService;
3329
3338
  this.foehnPageService = foehnPageService;
3330
3339
  this.supportAlertService = supportAlertService;
3331
3340
  this.setPageTitle = true;
@@ -3333,9 +3342,22 @@ class GesdemErrorComponent {
3333
3342
  const route = FoehnNavigationService.getRootRouteRecursive(activatedRoute.snapshot);
3334
3343
  navigation.initRoute(route);
3335
3344
  this.link = this.getBasePath();
3345
+ this.reference = this.activatedRoute.snapshot.params.reference;
3346
+ if (!this.reference?.length) {
3347
+ this.isPendingPayment = of(false);
3348
+ }
3349
+ else {
3350
+ this.isPendingPayment = this.gesdemService
3351
+ .retrieve(this.reference)
3352
+ .pipe(map(() => ActionStatut[this.gesdemService.lastResponse.meta
3353
+ .statut]), tap(statut => {
3354
+ if (GesdemStatutUtils.isFinal(statut)) {
3355
+ this.navigation.last();
3356
+ }
3357
+ }), map(statut => statut === ActionStatut.PENDING_PAYMENT), catchError(() => of(false)));
3358
+ }
3336
3359
  }
3337
3360
  ngOnInit() {
3338
- this.reference = this.activatedRoute.snapshot.params.reference;
3339
3361
  if (this.reference) {
3340
3362
  const firstPage = this.getFirstPage();
3341
3363
  if (this.gesdemService.prefix) {
@@ -3366,12 +3388,12 @@ class GesdemErrorComponent {
3366
3388
  return '/';
3367
3389
  }
3368
3390
  }
3369
- GesdemErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GesdemErrorComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: FoehnNavigationService }, { token: GesdemHandlerService }, { token: FoehnPageService }, { token: SupportAlertService }], target: i0.ɵɵFactoryTarget.Component });
3370
- GesdemErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: GesdemErrorComponent, selector: "gesdem-error", inputs: { setPageTitle: "setPageTitle" }, ngImport: i0, template: "<div class=\"vd-card mb-3\" *ngIf=\"!hasSessionExpired\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-xs-8\">\n <div class=\"card-body\">\n <p class=\"card-text vd-card-text\">\n {{\n !!reference\n ? 'Vous pouvez essayer de reprendre votre demande en cliquant sur le lien ci-dessous'\n : 'Vous pouvez recommencer une demande en cliquant sur le lien ci-dessous'\n }}\n </p>\n <ul class=\"vd-list-links\">\n <li>\n <a [href]=\"link\">\n {{\n !!reference\n ? 'Reprendre ma demande'\n : 'Recommencer'\n }}\n </a>\n </li>\n </ul>\n <foehn-debug-summary></foehn-debug-summary>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<gesdem-action-recovery-login\n *ngIf=\"hasSessionExpired\"\n [reference]=\"reference\"\n [redirectTarget]=\"link\"\n></gesdem-action-recovery-login>\n", components: [{ type: FoehnDebugSummaryComponent, selector: "foehn-debug-summary" }, { type: GesdemActionRecoveryLoginComponent, selector: "gesdem-action-recovery-login", inputs: ["reference", "redirectTarget"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3391
+ GesdemErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GesdemErrorComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: FoehnNavigationService }, { token: GesdemHandlerService }, { token: GesdemEventService }, { token: FoehnPageService }, { token: SupportAlertService }], target: i0.ɵɵFactoryTarget.Component });
3392
+ GesdemErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: GesdemErrorComponent, selector: "gesdem-error", inputs: { setPageTitle: "setPageTitle" }, ngImport: i0, template: "<div class=\"vd-card mb-3\" *ngIf=\"!hasSessionExpired\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-xs-8\">\n <div class=\"card-body\">\n <ng-container *ngIf=\"(isPendingPayment | async) === true\">\n <p\n class=\"card-text vd-card-text alert alert-danger\"\n [innerHTML]=\"\n 'gesdem-error.text.pending-payment'\n | fromDictionary: { reference: reference }\n \"\n ></p>\n </ng-container>\n <ng-container *ngIf=\"(isPendingPayment | async) === false\">\n <p class=\"card-text vd-card-text\">\n {{\n (!!reference\n ? 'gesdem-error.text.has-reference'\n : 'gesdem-error.text.has-no-reference'\n ) | fromDictionary\n }}\n </p>\n <ul class=\"vd-list-links\">\n <li>\n <a [href]=\"link\">\n {{\n (!!reference\n ? 'gesdem-error.link.has-reference'\n : 'gesdem-error.link.has-no-reference'\n ) | fromDictionary\n }}\n </a>\n </li>\n </ul>\n </ng-container>\n\n <foehn-debug-summary></foehn-debug-summary>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<gesdem-action-recovery-login\n *ngIf=\"hasSessionExpired\"\n [reference]=\"reference\"\n [redirectTarget]=\"link\"\n></gesdem-action-recovery-login>\n", components: [{ type: FoehnDebugSummaryComponent, selector: "foehn-debug-summary" }, { type: GesdemActionRecoveryLoginComponent, selector: "gesdem-action-recovery-login", inputs: ["reference", "redirectTarget"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe, "fromDictionary": SdkDictionaryPipe } });
3371
3393
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GesdemErrorComponent, decorators: [{
3372
3394
  type: Component,
3373
- args: [{ selector: 'gesdem-error', template: "<div class=\"vd-card mb-3\" *ngIf=\"!hasSessionExpired\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-xs-8\">\n <div class=\"card-body\">\n <p class=\"card-text vd-card-text\">\n {{\n !!reference\n ? 'Vous pouvez essayer de reprendre votre demande en cliquant sur le lien ci-dessous'\n : 'Vous pouvez recommencer une demande en cliquant sur le lien ci-dessous'\n }}\n </p>\n <ul class=\"vd-list-links\">\n <li>\n <a [href]=\"link\">\n {{\n !!reference\n ? 'Reprendre ma demande'\n : 'Recommencer'\n }}\n </a>\n </li>\n </ul>\n <foehn-debug-summary></foehn-debug-summary>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<gesdem-action-recovery-login\n *ngIf=\"hasSessionExpired\"\n [reference]=\"reference\"\n [redirectTarget]=\"link\"\n></gesdem-action-recovery-login>\n" }]
3374
- }], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: FoehnNavigationService }, { type: GesdemHandlerService }, { type: FoehnPageService }, { type: SupportAlertService }]; }, propDecorators: { setPageTitle: [{
3395
+ args: [{ selector: 'gesdem-error', template: "<div class=\"vd-card mb-3\" *ngIf=\"!hasSessionExpired\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-xs-8\">\n <div class=\"card-body\">\n <ng-container *ngIf=\"(isPendingPayment | async) === true\">\n <p\n class=\"card-text vd-card-text alert alert-danger\"\n [innerHTML]=\"\n 'gesdem-error.text.pending-payment'\n | fromDictionary: { reference: reference }\n \"\n ></p>\n </ng-container>\n <ng-container *ngIf=\"(isPendingPayment | async) === false\">\n <p class=\"card-text vd-card-text\">\n {{\n (!!reference\n ? 'gesdem-error.text.has-reference'\n : 'gesdem-error.text.has-no-reference'\n ) | fromDictionary\n }}\n </p>\n <ul class=\"vd-list-links\">\n <li>\n <a [href]=\"link\">\n {{\n (!!reference\n ? 'gesdem-error.link.has-reference'\n : 'gesdem-error.link.has-no-reference'\n ) | fromDictionary\n }}\n </a>\n </li>\n </ul>\n </ng-container>\n\n <foehn-debug-summary></foehn-debug-summary>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<gesdem-action-recovery-login\n *ngIf=\"hasSessionExpired\"\n [reference]=\"reference\"\n [redirectTarget]=\"link\"\n></gesdem-action-recovery-login>\n" }]
3396
+ }], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: FoehnNavigationService }, { type: GesdemHandlerService }, { type: GesdemEventService }, { type: FoehnPageService }, { type: SupportAlertService }]; }, propDecorators: { setPageTitle: [{
3375
3397
  type: Input
3376
3398
  }] } });
3377
3399
 
@@ -10307,12 +10329,14 @@ GesdemErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versio
10307
10329
  GesdemErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GesdemErrorModule, declarations: [GesdemErrorComponent], imports: [CommonModule,
10308
10330
  RouterModule,
10309
10331
  GesdemActionRecoveryModule,
10310
- FoehnDebugSummaryComponentModule], exports: [GesdemErrorComponent] });
10332
+ FoehnDebugSummaryComponentModule,
10333
+ SdkDictionaryModule], exports: [GesdemErrorComponent] });
10311
10334
  GesdemErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GesdemErrorModule, imports: [[
10312
10335
  CommonModule,
10313
10336
  RouterModule,
10314
10337
  GesdemActionRecoveryModule,
10315
- FoehnDebugSummaryComponentModule
10338
+ FoehnDebugSummaryComponentModule,
10339
+ SdkDictionaryModule
10316
10340
  ]] });
10317
10341
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GesdemErrorModule, decorators: [{
10318
10342
  type: NgModule,
@@ -10321,7 +10345,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
10321
10345
  CommonModule,
10322
10346
  RouterModule,
10323
10347
  GesdemActionRecoveryModule,
10324
- FoehnDebugSummaryComponentModule
10348
+ FoehnDebugSummaryComponentModule,
10349
+ SdkDictionaryModule
10325
10350
  ],
10326
10351
  declarations: [GesdemErrorComponent],
10327
10352
  exports: [GesdemErrorComponent]