@idsoftsource/initial-process 3.6.1 → 3.6.2

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.
@@ -7462,10 +7462,13 @@ class PreviewComponent {
7462
7462
  }));
7463
7463
  const mapping = res?.data?.[0];
7464
7464
  const providerId = mapping?.providerId ?? null;
7465
+ const providerUserMappingId = mapping?.id ?? null;
7465
7466
  if (providerId) {
7466
7467
  sessionStorage.setItem('providerId', providerId);
7468
+ if (providerUserMappingId)
7469
+ sessionStorage.setItem('providerUserMappingId', providerUserMappingId);
7467
7470
  sessionStorage.setItem('ip_provider_owner', this.payloadUserId);
7468
- this.cacheProviderIdLocally(providerId);
7471
+ this.cacheProviderIdLocally(providerId, providerUserMappingId);
7469
7472
  return true;
7470
7473
  }
7471
7474
  }
@@ -11406,7 +11409,7 @@ class ToolsComponent {
11406
11409
  var query = {
11407
11410
  page: 1,
11408
11411
  pageSize: 10,
11409
- filter: `forUser=${this.resolvedForUser}`,
11412
+ // filter: `forUser=${this.resolvedForUser}`,
11410
11413
  orderBy: 'toolName asc'
11411
11414
  };
11412
11415
  this.userToolService.getUserTool(query)
@@ -11800,7 +11803,7 @@ class ToolsComponent {
11800
11803
  starRating: v.starRating ?? 0,
11801
11804
  year: v.year ?? 0,
11802
11805
  userProfessionId: professionId ?? null,
11803
- professionName: v.professionName ?? '',
11806
+ // professionName: v.professionName ?? '',
11804
11807
  };
11805
11808
  });
11806
11809
  if (this.model?.id) {
@@ -11815,7 +11818,7 @@ class ToolsComponent {
11815
11818
  element.targetUserId = this.roleContextService?.tempUserContext()?.userId ?? this.userId ?? '';
11816
11819
  element.emailId = this.emailId ?? '';
11817
11820
  element.userName = this.user.fullName;
11818
- element.forUser = this.resolvedForUser;
11821
+ // element.forUser = this.resolvedForUser;
11819
11822
  });
11820
11823
  if (this.isEditMode && this.model) {
11821
11824
  const formValue = this.userToolModels[0];
@@ -12398,7 +12401,24 @@ class RoleSelectComponent {
12398
12401
  this.provider = this.bindProviderDetails();
12399
12402
  const existingProviderId = sessionStorage.getItem('providerId');
12400
12403
  if (existingProviderId) {
12401
- const providerUserMappingId = sessionStorage.getItem('providerUserMappingId');
12404
+ let providerUserMappingId = sessionStorage.getItem('providerUserMappingId');
12405
+ if (!providerUserMappingId) {
12406
+ try {
12407
+ const mappingRes = await firstValueFrom(this.providerdetail.getProviderUserMapping({
12408
+ TargetUserId: this.userId,
12409
+ Page: 1,
12410
+ PageSize: 1,
12411
+ }));
12412
+ const mapping = mappingRes?.data?.[0];
12413
+ if (mapping?.id) {
12414
+ providerUserMappingId = mapping.id;
12415
+ sessionStorage.setItem('providerUserMappingId', providerUserMappingId);
12416
+ }
12417
+ }
12418
+ catch (err) {
12419
+ console.error('Unable to look up existing provider mapping from server', err);
12420
+ }
12421
+ }
12402
12422
  const updatePayload = { ...this.provider, providerId: existingProviderId, providerUserMappingId: providerUserMappingId };
12403
12423
  const data = await firstValueFrom(this.providerService.updateInitialSetUpProvider(updatePayload));
12404
12424
  if (data?.failed) {