@idsoftsource/initial-process 3.1.6 → 3.1.8

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.
@@ -3124,7 +3124,11 @@ class PreviewComponent {
3124
3124
  this.useremail = this.roleContextService?.tempUserContext()?.email ?? await this.tokenService.getUserEmail();
3125
3125
  const initialData = this.store.profileSignal()?.basicDetails;
3126
3126
  if (initialData) {
3127
- initialData.email = this.useremail;
3127
+ // Resume Parsing flow: keep the resume's own parsed email instead of
3128
+ // overwriting it with the logged-in/target user's account email.
3129
+ if (!this.isResume) {
3130
+ initialData.email = this.useremail;
3131
+ }
3128
3132
  this.details.set(initialData);
3129
3133
  }
3130
3134
  this.prefillSectionFieldsFromBasicDetails();
@@ -5734,10 +5738,12 @@ class PreviewComponent {
5734
5738
  return this.providerName;
5735
5739
  }
5736
5740
  get effectiveTargetProviderId() {
5737
- console.log(this.roleContextService?.tempUserContext()?.tenantId);
5738
- console.log(sessionStorage.getItem('providerId'));
5739
- console.log(this.providerId);
5740
- if (this.roleContextService?.tempUserContext()?.tenantId && this.roleContextService?.tempUserContext()?.tenantId != undefined && this.roleContextService?.tempUserContext()?.tenantId != null && this.roleContextService?.tempUserContext()?.tenantId != '') {
5741
+ // Resume flow passes the picked producer's provider/tenant id explicitly on resumeModel
5742
+ // (set by the host app from the URL's p_id param) for the same reason as effectiveTargetUserId.
5743
+ if (this.isResume && this.resumeModel?.targetProviderId) {
5744
+ return this.resumeModel.targetProviderId;
5745
+ }
5746
+ if (this.roleContextService?.tempUserContext()?.tenantId) {
5741
5747
  return this.roleContextService?.tempUserContext()?.tenantId ?? '';
5742
5748
  }
5743
5749
  if (this.isProviderRole) {
@@ -5760,7 +5766,7 @@ class PreviewComponent {
5760
5766
  userBio: basic.summary || "",
5761
5767
  firstName: basic.firstName,
5762
5768
  lastName: basic.lastName,
5763
- email: this.useremail,
5769
+ email: this.isResume ? (basic.email || this.useremail) : this.useremail,
5764
5770
  address1: basic.address,
5765
5771
  address2: "",
5766
5772
  city: basic.city,
@@ -5771,7 +5777,7 @@ class PreviewComponent {
5771
5777
  latitude: null, // optional (if using Google API later)
5772
5778
  longitude: null,
5773
5779
  yearsActive: 0,
5774
- isInitialSetupCompleted: false,
5780
+ isInitialSetupCompleted: this.isResume ? true : false,
5775
5781
  id: this.payloadUserId,
5776
5782
  phoneNumber: basic.phone,
5777
5783
  yearsOfExperince: basic.yearsOfExperience,
@@ -5960,7 +5966,7 @@ class PreviewComponent {
5960
5966
  return {
5961
5967
  id: "00000000-0000-0000-0000-000000000000",
5962
5968
  providerName: this.effectiveProviderName,
5963
- ...(this.isProviderRole ? { targetProviderId: this.effectiveTargetProviderId } : {}),
5969
+ targetProviderId: this.effectiveTargetProviderId,
5964
5970
  targetUserId: this.effectiveTargetUserId,
5965
5971
  userName: this.payloadUserName,
5966
5972
  issuedState: exp.state,
@@ -5989,7 +5995,7 @@ class PreviewComponent {
5989
5995
  return {
5990
5996
  id: "00000000-0000-0000-0000-000000000000",
5991
5997
  providerName: this.effectiveProviderName,
5992
- ...(this.isProviderRole ? { targetProviderId: this.effectiveTargetProviderId } : {}),
5998
+ targetProviderId: this.effectiveTargetProviderId,
5993
5999
  targetUserId: this.effectiveTargetUserId,
5994
6000
  userName: this.payloadUserName,
5995
6001
  number: exp.licenseNumber,