dts-backoffice-util 19.6.0 → 19.6.1

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.
package/README.md CHANGED
@@ -12,9 +12,9 @@ Segue abaixo as últimas versões da Biblioteca, conforme a versão do PO-UI e A
12
12
 
13
13
  | PO-UI | Angular | Versão dtsBackofficeUtil |
14
14
  |-|-|-|
15
- | v19 | v19 | 19.6.0 |
15
+ | v19 | v19 | 19.6.1 |
16
16
  | v18 | v18 | 18.3.0 |
17
- | v17 | v17 | 17.1.0 |
17
+ | v17 | v17 | 17.2.0 |
18
18
  | v16 | v16 | 16.1.0 |
19
19
  | v15 | v15 | 15.4.1 |
20
20
  | v14 | v14 | 14.4.1 |
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Output, Input, ViewChild, Component, ViewChildren, Pipe, NgModule } from '@angular/core';
3
3
  import { of, forkJoin, map as map$1, lastValueFrom } from 'rxjs';
4
- import { map } from 'rxjs/operators';
5
4
  import * as i1 from '@angular/common/http';
6
5
  import { HttpErrorResponse, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
6
+ import { map } from 'rxjs/operators';
7
7
  import * as i1$1 from '@po-ui/ng-components';
8
8
  import { PoModule } from '@po-ui/ng-components';
9
9
  import * as i3 from '@angular/common';
@@ -14,23 +14,15 @@ import { FormsModule } from '@angular/forms';
14
14
  class UserLoginService {
15
15
  constructor(http) {
16
16
  this.http = http;
17
- this.apiUrl = '/totvs-menu/rest/getSessionInfo';
18
- this.userLogin = undefined;
19
17
  }
20
18
  getUserLogin() {
19
+ if (sessionStorage.getItem('username')) {
20
+ return of(sessionStorage.getItem('username'));
21
+ }
21
22
  if (localStorage.getItem('username')) {
22
23
  return of(localStorage.getItem('username'));
23
24
  }
24
- if (this.userLogin) {
25
- return of(this.userLogin);
26
- }
27
- else {
28
- return this.http.get(`${this.apiUrl}`)
29
- .pipe(map((response) => {
30
- this.userLogin = response.userName;
31
- return response.userName;
32
- }));
33
- }
25
+ return of(undefined);
34
26
  }
35
27
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: UserLoginService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
36
28
  /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: UserLoginService, providedIn: 'root' }); }