@dsivd/prestations-ng 18.1.0-beta.2 → 18.1.0-beta.3

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.
@@ -1722,19 +1722,17 @@ class FoehnFormComponent {
1722
1722
  }
1723
1723
  this.ngFormComponent.form.markAsUntouched();
1724
1724
  this.ngFormComponent.form.markAsPristine();
1725
- this.registerNgModelService.setHasInteractions(false);
1726
1725
  }
1727
1726
  ngOnDestroy() {
1728
1727
  this.registerNgModelServiceSubscription?.unsubscribe();
1729
1728
  this.formValueChangesSubscription?.unsubscribe();
1730
- this.registerNgModelService.setHasInteractions(false);
1731
1729
  }
1732
1730
  ngAfterViewInit() {
1733
1731
  this.updateRegisteredNgModels();
1734
1732
  // eslint-disable-next-line rxjs-angular/prefer-async-pipe
1735
1733
  this.childrenInputComponents.changes.subscribe(() => this.updateRegisteredNgModels());
1736
- // eslint-disable-next-line rxjs-angular/prefer-async-pipe
1737
1734
  this.formValueChangesSubscription =
1735
+ // eslint-disable-next-line rxjs-angular/prefer-async-pipe
1738
1736
  this.ngFormComponent.form.valueChanges.subscribe(() => {
1739
1737
  if (this.ngFormComponent.form.dirty) {
1740
1738
  this.registerNgModelService.setHasInteractions(true);
@@ -3667,8 +3665,9 @@ class AbstractPageComponent {
3667
3665
  return EMPTY;
3668
3666
  }))
3669
3667
  .subscribe(() => {
3670
- this._registerNgModelService.setHasInteractions(false);
3671
3668
  if (!this._gesdemService.lastResponse.errors.length) {
3669
+ // Do not show warning alert on closing tab or navigator when form has been transmitted
3670
+ this._registerNgModelService.setHasInteractions(false);
3672
3671
  this._gesdemEventService.formTransmittedSubject.next(this._gesdemService.lastResponse);
3673
3672
  this._navigation.next();
3674
3673
  }
@@ -3706,11 +3705,7 @@ class AbstractPageComponent {
3706
3705
  }
3707
3706
  onFormSent(goToNextPage) {
3708
3707
  // Some pages don't have a form.
3709
- if (!this.foehnFormComponent) {
3710
- this._registerNgModelService.setHasInteractions(false);
3711
- }
3712
- else {
3713
- // NB: Reset the form sets hasInteractions to false
3708
+ if (this.foehnFormComponent) {
3714
3709
  this.foehnFormComponent.reset();
3715
3710
  }
3716
3711
  this._navigation.current().then(() => {