@idsoftsource/initial-process 2.4.4 → 2.4.6

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.
@@ -4563,6 +4563,7 @@ class PreviewComponent {
4563
4563
  // Clear session so a future return to this page starts fresh from T&C
4564
4564
  sessionStorage.removeItem(`ip_init_${this.payloadUserId}`);
4565
4565
  this.store.resetAll();
4566
+ sessionStorage.setItem('ip_navigating_out', 'true');
4566
4567
  window.location.href = this.libConfig.dashboardUrl;
4567
4568
  }
4568
4569
  catch (err) {
@@ -9514,6 +9515,7 @@ class ToolsComponent {
9514
9515
  sessionStorage.removeItem('ip_init');
9515
9516
  setTimeout(() => {
9516
9517
  this.homeLoader = false;
9518
+ sessionStorage.setItem('ip_navigating_out', 'true');
9517
9519
  window.location.href = this.libConfig.dashboardUrl;
9518
9520
  }, 2000);
9519
9521
  },
@@ -34408,6 +34410,10 @@ class InitialProcessComponent {
34408
34410
  this.view = 2;
34409
34411
  }
34410
34412
  selectedUserRole(role) {
34413
+ if (this.selectedRoleValue === 'Provider' && role.value !== 'Provider') {
34414
+ sessionStorage.removeItem('providerId');
34415
+ sessionStorage.removeItem('providerUserMappingId');
34416
+ }
34411
34417
  this.isBusiness = false;
34412
34418
  if (role.value === 'Producer') {
34413
34419
  const findUserRole = this.userRoles.find((a) => a.name === 'Producer');
@@ -34480,7 +34486,7 @@ class InitialProcessComponent {
34480
34486
  }
34481
34487
  return element;
34482
34488
  });
34483
- if (role.value === 'Contractor') {
34489
+ if (role.value === 'Contractor' && !this.contractorSubCategories.length) {
34484
34490
  this.getContractorSubCategories();
34485
34491
  }
34486
34492
  }
@@ -34902,6 +34908,7 @@ class InitialProcessComponent {
34902
34908
  }
34903
34909
  }
34904
34910
  previous() {
34911
+ this.validatePage = 0;
34905
34912
  if (this.view == 4) {
34906
34913
  if (this.isBusiness) {
34907
34914
  this.view = 3;
@@ -35728,6 +35735,9 @@ class InitialProcessComponent {
35728
35735
  sessionStorage.removeItem('ip_active_user');
35729
35736
  }
35730
35737
  onBeforeUnload(event) {
35738
+ // Skip dialog when navigating intentionally to the dashboard
35739
+ if (sessionStorage.getItem('ip_navigating_out') === 'true')
35740
+ return;
35731
35741
  // Warn on any in-progress view; skip view 1 (start) and view 5 (completed)
35732
35742
  if (this.view !== 1 && this.view !== 5) {
35733
35743
  event.preventDefault();