@idsoftsource/initial-process 1.1.3 → 1.1.5

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.
@@ -6,7 +6,7 @@ import * as i3 from '@angular/forms';
6
6
  import { NG_VALUE_ACCESSOR, COMPOSITION_BUFFER_MODE, Validators, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
7
  import * as i3$1 from '@angular/router';
8
8
  import { RouterModule } from '@angular/router';
9
- import { map, of, tap, Subscription, switchMap, finalize, catchError, EMPTY, Subject, takeUntil } from 'rxjs';
9
+ import { map, of, tap, Subscription, switchMap, finalize, catchError, EMPTY, Subject, takeUntil, firstValueFrom } from 'rxjs';
10
10
  import * as i1 from '@angular/common/http';
11
11
  import { HttpClient, HttpParams, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
12
12
  import * as i7 from 'ngx-bootstrap/modal';
@@ -5393,11 +5393,11 @@ class RoleSelectComponent {
5393
5393
  }
5394
5394
  }
5395
5395
  saveFinal() {
5396
- this.showLoader = true;
5397
5396
  if (this.userForm.invalid) {
5398
5397
  this.userForm.markAllAsTouched();
5399
5398
  return;
5400
5399
  }
5400
+ this.showLoader = true;
5401
5401
  const saved = profileSignal();
5402
5402
  const hasExistingImage = !!saved?.userDetail?.headshotFileId || !!this.user?.headshotFileId;
5403
5403
  const hasNewImage = !!this.fileDataUser || !!this.previewUrl; // ✅ IMPORTANT
@@ -5415,6 +5415,7 @@ class RoleSelectComponent {
5415
5415
  this.showLoader = false;
5416
5416
  if (res?.failed) {
5417
5417
  this.userError = res.failures?.[0]?.message;
5418
+ this.showLoader = false;
5418
5419
  return;
5419
5420
  }
5420
5421
  saveProfile({
@@ -30578,6 +30579,7 @@ class VerifyEmailComponent {
30578
30579
  authLogoutService;
30579
30580
  tokenService;
30580
30581
  router;
30582
+ auth;
30581
30583
  loading = false;
30582
30584
  successMessage = false;
30583
30585
  errorMessage = false;
@@ -30585,14 +30587,16 @@ class VerifyEmailComponent {
30585
30587
  // ✅ cooldown (30 seconds)
30586
30588
  cooldown = 0;
30587
30589
  interval;
30588
- constructor(libConfig, userService, authLogoutService, tokenService, router) {
30590
+ constructor(libConfig, userService, authLogoutService, tokenService, router, auth) {
30589
30591
  this.libConfig = libConfig;
30590
30592
  this.userService = userService;
30591
30593
  this.authLogoutService = authLogoutService;
30592
30594
  this.tokenService = tokenService;
30593
30595
  this.router = router;
30596
+ this.auth = auth;
30594
30597
  }
30595
30598
  async ngOnInit() {
30599
+ await firstValueFrom(this.auth.getAccessTokenSilently());
30596
30600
  debugger;
30597
30601
  if (this.libConfig.dashboardUrl?.toLowerCase()?.includes('dev')) {
30598
30602
  if (await this.tokenService.isEmailVerified()) {
@@ -30652,7 +30656,7 @@ class VerifyEmailComponent {
30652
30656
  clearInterval(this.interval);
30653
30657
  }
30654
30658
  }
30655
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: VerifyEmailComponent, deps: [{ token: LIBRARY_CONFIG }, { token: UserDetailService }, { token: i6.AuthLogoutService }, { token: i6.TokenService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
30659
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: VerifyEmailComponent, deps: [{ token: LIBRARY_CONFIG }, { token: UserDetailService }, { token: i6.AuthLogoutService }, { token: i6.TokenService }, { token: i3$1.Router }, { token: i9.AuthService }], target: i0.ɵɵFactoryTarget.Component });
30656
30660
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: VerifyEmailComponent, isStandalone: true, selector: "app-verify-email", ngImport: i0, template: "@if(pageLoader){\r\n<div class=\"align-content-center text-center\" style=\"height: 100vh;\">\r\n <loader [show]=\"true\"></loader>\r\n <div class=\"fs-5 fw-bolder\">Loading... Please wait !</div>\r\n</div>\r\n}@else{\r\n<div class=\"container d-flex justify-content-center align-items-center vh-100\">\r\n <div class=\"card shadow p-4 text-center\" style=\"max-width: 420px; width: 100%;\">\r\n \r\n <div class=\"icon mb-3 text-warning\" style=\"font-size: 60px;\">\r\n \u26A0\r\n </div>\r\n \r\n <h4 class=\"mb-3\">Email Verification</h4>\r\n \r\n <p class=\"text-muted\">\r\n Please check your inbox and click the verification link.\r\n <br><br>\r\n If you didn\u2019t receive the email, click the button below to resend the verification link.\r\n </p>\r\n \r\n <button class=\"btn btn-warning w-100 mt-3\" (click)=\"resendVerification()\" [disabled]=\"loading || cooldown > 0\">\r\n \r\n <!-- Normal -->\r\n <span *ngIf=\"!loading && cooldown === 0\">\r\n Resend Verification Email\r\n </span>\r\n \r\n <!-- Loading -->\r\n <span *ngIf=\"loading\">\r\n Sending...\r\n </span>\r\n \r\n <!-- Cooldown -->\r\n <span *ngIf=\"cooldown > 0 && !loading\">\r\n Retry in {{ cooldown }}s\r\n </span>\r\n \r\n </button>\r\n \r\n <div *ngIf=\"successMessage\" class=\"mt-3 text-success\">\r\n \u2705 Verification email sent! Please check your inbox.\r\n </div>\r\n \r\n <div *ngIf=\"errorMessage\" class=\"mt-3 text-danger\">\r\n \u274C Failed to resend email. Try again.\r\n </div>\r\n \r\n <!-- Optional logout -->\r\n <button class=\"btn btn-link mt-3\" (click)=\"logout()\">\r\n Logout\r\n </button>\r\n \r\n </div>\r\n</div>\r\n}\r\n ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: LoaderModule }, { kind: "component", type: LoaderComponent, selector: "loader", inputs: ["show", "small"] }] });
30657
30661
  }
30658
30662
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: VerifyEmailComponent, decorators: [{
@@ -30661,7 +30665,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
30661
30665
  }], ctorParameters: () => [{ type: undefined, decorators: [{
30662
30666
  type: Inject,
30663
30667
  args: [LIBRARY_CONFIG]
30664
- }] }, { type: UserDetailService }, { type: i6.AuthLogoutService }, { type: i6.TokenService }, { type: i3$1.Router }] });
30668
+ }] }, { type: UserDetailService }, { type: i6.AuthLogoutService }, { type: i6.TokenService }, { type: i3$1.Router }, { type: i9.AuthService }] });
30665
30669
 
30666
30670
  // app-type.enum.ts
30667
30671
  var AppType;