ngx-sp-auth 2.1.7 → 3.0.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.
Files changed (50) hide show
  1. package/fesm2022/ngx-sp-auth.mjs +1629 -809
  2. package/fesm2022/ngx-sp-auth.mjs.map +1 -1
  3. package/lib/auth-config.d.ts +2 -0
  4. package/lib/auth.module.d.ts +1 -9
  5. package/lib/auth.routes.d.ts +2 -0
  6. package/lib/auth.service.d.ts +36 -8
  7. package/lib/components/login/login.component.d.ts +49 -21
  8. package/lib/components/login-os/login-os.component.d.ts +27 -0
  9. package/lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component.d.ts +4 -2
  10. package/lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component.d.ts +3 -1
  11. package/lib/components/menu-lateral/menu/menu-lateral.component.d.ts +31 -18
  12. package/lib/components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component.d.ts +4 -2
  13. package/lib/components/menu-lateral/menu-services.service.d.ts +21 -4
  14. package/lib/components/menu-lateral/model/dynamic-menu.d.ts +18 -0
  15. package/lib/components/menu-lateral/model/infrausuarioimg.d.ts +7 -7
  16. package/lib/components/menu-lateral/model/navsubmenu-searchitem.d.ts +5 -0
  17. package/lib/components/menu-lateral/model/ret-navsubmenu.d.ts +11 -0
  18. package/lib/components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component.d.ts +3 -1
  19. package/lib/components/nova-senha/nova-senhacomponent.d.ts +7 -5
  20. package/lib/custom/{custom-menu.service.d.ts → lib-custom-menu.service.d.ts} +10 -14
  21. package/lib/custom/{custom-storage.service.d.ts → lib-custom-storage.service.d.ts} +1 -4
  22. package/lib/custom/{menu-config.service.d.ts → lib-menu-config.service.d.ts} +11 -16
  23. package/lib/custom/models/icustom-login-service.d.ts +2 -0
  24. package/lib/custom/models/icustom-menu-service.d.ts +2 -0
  25. package/lib/custom/models/icustom-storage-service.d.ts +0 -1
  26. package/lib/custom/models/imenu-config.d.ts +2 -2
  27. package/lib/environments/environments.service.d.ts +8 -1
  28. package/lib/environments/models/ienvironments.d.ts +9 -0
  29. package/lib/guards/external-login-guard.d.ts +3 -5
  30. package/lib/interceptors/auth-aplic.interceptor.d.ts +4 -4
  31. package/lib/interceptors/auth-infra.interceptor.d.ts +1 -1
  32. package/lib/models/infraIn2FaTypeId.d.ts +5 -0
  33. package/lib/models/infraInAuthTypeId.d.ts +5 -0
  34. package/lib/models/login-os.model.d.ts +7 -0
  35. package/lib/models/ret-autenthication.d.ts +14 -0
  36. package/lib/models/ret-login.d.ts +1 -4
  37. package/lib/project/project-utils.service.d.ts +18 -0
  38. package/lib/storage/auth-storage.service.d.ts +21 -4
  39. package/package.json +3 -1
  40. package/public-api.d.ts +10 -10
  41. package/README.md +0 -207
  42. package/lib/components/menu-lateral/menu/list-estab.service.d.ts +0 -19
  43. package/lib/components/menu-lateral/model/iestabelecimento.model.d.ts +0 -4
  44. package/lib/models/custom-propriedades-login.d.ts +0 -11
  45. package/lib/server/ret-server-config.d.ts +0 -7
  46. package/lib/server/server.service.d.ts +0 -14
  47. package/src/assets/imgs/Property1-cadeado.png +0 -0
  48. package/src/assets/imgs/Property1-calendariofino.png +0 -0
  49. package/src/assets/imgs/Property1-mao.png +0 -0
  50. /package/lib/custom/{custom-login.service.d.ts → lib-custom-login.service.d.ts} +0 -0
@@ -1,34 +1,219 @@
1
- import * as i12 from '@angular/common';
2
- import { CommonModule, NgIf, NgFor } from '@angular/common';
3
1
  import * as i0 from '@angular/core';
4
- import { Injectable, Component, NgModule, EventEmitter, Output, Input, TemplateRef, ContentChild, ViewChild } from '@angular/core';
5
- import * as i3 from '@angular/forms';
6
- import { FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
2
+ import { importProvidersFrom, NgModule, Injectable, Inject, Component, EventEmitter, Output, Input, TemplateRef, ContentChild, ViewChild } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HTTP_INTERCEPTORS, HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
5
+ import * as i1$2 from '@azure/msal-angular';
6
+ import { MsalInterceptor, MsalGuard, MsalModule, MSAL_GUARD_CONFIG } from '@azure/msal-angular';
7
+ import { LogLevel, PublicClientApplication, InteractionType } from '@azure/msal-browser';
8
+ import { BehaviorSubject, take, tap, Subscription, timer, map as map$1, Subject, filter, of, lastValueFrom, from } from 'rxjs';
9
+ import * as i3 from 'ngx-sp-infra';
10
+ import { Utils, FormUtils, InfraModule } from 'ngx-sp-infra';
11
+ import * as i3$2 from '@angular/common';
12
+ import { CommonModule, NgIf } from '@angular/common';
13
+ import * as i3$1 from '@angular/forms';
14
+ import { Validators, ReactiveFormsModule } from '@angular/forms';
7
15
  import * as i1$1 from '@angular/router';
8
- import { RouterLink, RouterOutlet, RouterModule } from '@angular/router';
9
- import * as i9$1 from 'ngx-bootstrap/popover';
16
+ import { RouterLink, NavigationEnd, RouterOutlet } from '@angular/router';
17
+ import { take as take$1, tap as tap$1, map, switchMap } from 'rxjs/operators';
18
+ import * as i8 from '@angular/platform-browser';
19
+ import * as i10 from 'ngx-toastr';
20
+ import * as i12 from 'ngx-bootstrap/popover';
10
21
  import { PopoverModule } from 'ngx-bootstrap/popover';
11
- import * as i8 from 'ngx-bootstrap/tooltip';
22
+ import * as i13 from 'ngx-bootstrap/tooltip';
12
23
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
13
- import * as i6 from 'ngx-pagination';
24
+ import * as i7 from 'ngx-pagination';
14
25
  import { NgxPaginationModule } from 'ngx-pagination';
15
- import * as i5 from 'ngx-sp-infra';
16
- import { Utils, FormUtils, InfraModule, LibIconsComponent, FieldErrorMessageComponent } from 'ngx-sp-infra';
17
- import { BehaviorSubject, take, tap, Subscription, timer, map as map$1, Subject, of, merge, Observable, lastValueFrom, from } from 'rxjs';
18
- import * as i1$2 from 'ngx-bootstrap/modal';
19
- import * as i1 from '@angular/common/http';
20
- import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
21
- import { take as take$1, tap as tap$1, map, switchMap } from 'rxjs/operators';
22
- import * as i9 from '@angular/platform-browser';
23
- import * as i11 from 'ngx-toastr';
26
+ import * as i2 from 'ngx-bootstrap/modal';
24
27
 
25
- class LibCustomStorageService {
28
+ const isIE = false;
29
+ const hostAuthLogin = "http://localhost:4200/auth/login";
30
+ const msalConfig = {
31
+ auth: {
32
+ clientId: "clientId",
33
+ authority: "https://login.microsoftonline.com/tenantId",
34
+ redirectUri: hostAuthLogin + "/",
35
+ postLogoutRedirectUri: hostAuthLogin,
36
+ navigateToLoginRequestUrl: true
37
+ },
38
+ cache: {
39
+ cacheLocation: "localStorage",
40
+ storeAuthStateInCookie: isIE,
41
+ },
42
+ system: {
43
+ loggerOptions: {
44
+ loggerCallback: (logLevel, message, containsPii) => {
45
+ console.log(message);
46
+ },
47
+ logLevel: LogLevel.Error, // .Verbose
48
+ piiLoggingEnabled: false
49
+ }
50
+ }
51
+ };
52
+
53
+ class AuthModule {
54
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
55
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: AuthModule }); }
56
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthModule, providers: [
57
+ importProvidersFrom(MsalModule.forRoot(new PublicClientApplication(msalConfig), {
58
+ // The routing guard configuration.
59
+ interactionType: InteractionType.Redirect,
60
+ authRequest: {
61
+ scopes: [
62
+ "user.read"
63
+ ]
64
+ }
65
+ }, {
66
+ // MSAL interceptor configuration.
67
+ // The protected resource mapping maps your web API with the corresponding app scopes. If your code needs to call another web API, add the URI mapping here.
68
+ interactionType: InteractionType.Redirect,
69
+ protectedResourceMap: new Map([])
70
+ })),
71
+ {
72
+ provide: HTTP_INTERCEPTORS,
73
+ useClass: MsalInterceptor,
74
+ multi: true
75
+ },
76
+ MsalGuard, // MsalGuard added as provider here
77
+ ] }); }
78
+ }
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthModule, decorators: [{
80
+ type: NgModule,
81
+ args: [{
82
+ providers: [
83
+ importProvidersFrom(MsalModule.forRoot(new PublicClientApplication(msalConfig), {
84
+ // The routing guard configuration.
85
+ interactionType: InteractionType.Redirect,
86
+ authRequest: {
87
+ scopes: [
88
+ "user.read"
89
+ ]
90
+ }
91
+ }, {
92
+ // MSAL interceptor configuration.
93
+ // The protected resource mapping maps your web API with the corresponding app scopes. If your code needs to call another web API, add the URI mapping here.
94
+ interactionType: InteractionType.Redirect,
95
+ protectedResourceMap: new Map([])
96
+ })),
97
+ {
98
+ provide: HTTP_INTERCEPTORS,
99
+ useClass: MsalInterceptor,
100
+ multi: true
101
+ },
102
+ MsalGuard, // MsalGuard added as provider here
103
+ ]
104
+ }]
105
+ }] });
106
+
107
+ class LibCustomLoginService {
26
108
  constructor() {
27
- // #region Propriedades Customizadas para o Componente auth-storage.service.ts
28
- // indica se objeto já está marcado para salvar os dados no local storage.
29
- this.__isSaving = false;
109
+ // #region Propriedade Customizadas para o Componente login.component.ts
110
+ this.loginTitle = "";
111
+ this.loginSubtitle = "";
112
+ this.loginBackground = "";
113
+ this.loginLogotipo = "";
114
+ this.loginAltLogotipo = "";
115
+ this.loginPageTitle = "";
116
+ this.loginDesenvDomain = "";
117
+ this.loginDesenvUser = "";
118
+ this.loginDesenvPassword = "";
119
+ }
120
+ // #endregion Propriedade Customizadas para o Componente login.component.ts
121
+ // #region Métodos Customizadas para o Componente auth.service.ts
122
+ /**
123
+ * Método executado no auth.service.ts - método: login ()
124
+ * Utilizado para inicializações diversas
125
+ */
126
+ authLogin() {
127
+ this.storedAuthLogin();
128
+ }
129
+ /**
130
+ * Método executado no auth.service.ts - método: logout ()
131
+ * Utilizado para inicializações diversas
132
+ */
133
+ authLogout() {
134
+ this.storedAuthLogout();
135
+ }
136
+ /**
137
+ * Método executado no auth.service.ts - método: login ()
138
+ * Utilizado para informar o redirecionamento para a tela inicial após o login ok
139
+ *
140
+ * @param router Objeto de Router que será utilizado
141
+ */
142
+ authNavigateToPage(router) {
143
+ this.storedAuthNavigateToPage(router);
144
+ }
145
+ // #endregion Métodos recebidos do projeto
146
+ // #region Métodos Publicos
147
+ ConfigurarCustomLogin(customLoginService) {
148
+ //passando propriedades do projeto para a lib
149
+ this.loginTitle = customLoginService.loginTitle;
150
+ this.loginSubtitle = customLoginService.loginSubtitle;
151
+ this.loginBackground = customLoginService.loginBackground;
152
+ this.loginLogotipo = customLoginService.loginLogotipo;
153
+ this.loginAltLogotipo = customLoginService.loginAltLogotipo;
154
+ this.loginPageTitle = customLoginService.loginPageTitle;
155
+ this.loginDesenvDomain = customLoginService.loginDesenvDomain;
156
+ this.loginDesenvUser = customLoginService.loginDesenvUser;
157
+ this.loginDesenvPassword = customLoginService.loginDesenvPassword;
158
+ //passando implementação dos métodos do projeto para a lib
159
+ this.storedAuthLogin = customLoginService.authLogin;
160
+ this.storedAuthLogout = customLoginService.authLogout;
161
+ this.storedAuthNavigateToPage = customLoginService.authNavigateToPage;
162
+ }
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
164
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, providedIn: 'root' }); }
165
+ }
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, decorators: [{
167
+ type: Injectable,
168
+ args: [{ providedIn: 'root' }]
169
+ }], ctorParameters: () => [] });
170
+
171
+ /**Service responsável por pegar as opções do menu do projeto em que está sendo utilizada*/
172
+ class LibMenuConfigService {
173
+ constructor() {
174
+ this.menu = [];
175
+ this.menuDropdown = [];
176
+ }
177
+ /** Inicializa as opções do menu com base na rota atual e em uma lista personalizada (opcional).
178
+ * @param currentRoute A rota atual da aplicação
179
+ * @param customList Uma lista personalizada de opções de menu (opcional).
180
+ * @returns As opções do menu inicializadas.
181
+ */
182
+ initializeMenu(currentRoute, customList) {
183
+ this.menu = this.storedInitializeMenu(currentRoute, customList);
184
+ return this.menu;
185
+ }
186
+ setMenuType(isStaticMenu) {
187
+ this.storedSetMenuType(isStaticMenu);
188
+ }
189
+ updateRouteSelection(currentRoute, currentList) {
190
+ return this.updateRouteSelection(currentRoute, currentList);
191
+ }
192
+ /** Inicializa as opções do menu dropdown com base em uma lista personalizada (opcional).
193
+ * @param primaryDropdownList Uma lista personalizada de opções do dropdown (opcional).
194
+ * @returns As opções do dropdown inicializadas.
195
+ */
196
+ initializeMenuDropdown(primaryDropdownList) {
197
+ this.menuDropdown = this.storedInitializeMenuDropdown(primaryDropdownList);
198
+ return this.menuDropdown;
199
+ }
200
+ ConfigurarMenuConfig(menuConfig) {
201
+ //passando implementação dos métodos do projeto para a lib
202
+ this.storedInitializeMenu = menuConfig.initializeMenu;
203
+ this.storedInitializeMenuDropdown = menuConfig.initializeMenuDropdown;
204
+ this.storedSetMenuType = menuConfig.setMenuType;
205
+ this.updateRouteSelection = menuConfig.updateRouteSelection;
30
206
  }
31
- // #endregion Propriedades Customizadas para o Componente auth-storage.service.ts
207
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibMenuConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
208
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibMenuConfigService, providedIn: 'root' }); }
209
+ }
210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibMenuConfigService, decorators: [{
211
+ type: Injectable,
212
+ args: [{ providedIn: 'root' }]
213
+ }] });
214
+
215
+ class LibCustomStorageService {
216
+ constructor() { }
32
217
  // #region Métodos recebidos do projeto
33
218
  storedStorageConstructor() { }
34
219
  ;
@@ -59,23 +244,9 @@ class LibCustomStorageService {
59
244
  storageInitializeAutoStorage() {
60
245
  this.storedStorageInitializeAutoStorage();
61
246
  }
62
- // Método executado para salvar as propriedades no LocalStorage (não deve ser modificado)
63
- async __authStorageSaveLocalInstance() {
64
- if (this.__isSaving) {
65
- return;
66
- }
67
- this.__isSaving = true;
68
- this.storageSaveLocalInstance();
69
- this.__authStorageNotSaving();
70
- }
71
- // Método executado para salvar as propriedades no LocalStorage (não deve ser modificado)
72
- async __authStorageNotSaving() {
73
- this.__isSaving = false;
74
- }
75
247
  // #endregion Métodos Customizadas para o Componente auth-storage.service.ts
76
- ConfigurarCustomStorage(customStorageService) {
77
- //passando propriedades do projeto para a lib
78
- this.__isSaving = customStorageService.isSaving;
248
+ // #region Métodos Publicos
249
+ InitializeCustomStorage(customStorageService) {
79
250
  //passando implementação dos métodos do projeto para a lib
80
251
  this.storedStorageConstructor = customStorageService.storageConstructor;
81
252
  this.storedStorageInitializeAutoStorage = customStorageService.storageInitializeAutoStorage;
@@ -90,12 +261,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
90
261
  args: [{ providedIn: 'root' }]
91
262
  }], ctorParameters: () => [] });
92
263
 
264
+ /**Service responsável por pegar as opções do menu do projeto em que está sendo utilizada*/
265
+ class EnvironmentService {
266
+ constructor() {
267
+ this.production = false;
268
+ this.hostName = "";
269
+ this.product = "";
270
+ this.Sp2LocalhostInfra2AuthWS = "";
271
+ this.Sp2LocalhostInfra2LoginWS = "";
272
+ this.Sp2Localhost = "";
273
+ this.SpInfra2AuthWS = "";
274
+ this.SpInfra2LoginWS = "";
275
+ this.SpInfra2ErpWS = "";
276
+ }
277
+ ConfigurarEnvironments(properties) {
278
+ //passando propriedades do produto para a lib
279
+ this.production = properties.production;
280
+ this.hostName = properties.hostName;
281
+ this.product = properties.product;
282
+ this.Sp2LocalhostInfra2AuthWS = properties.Sp2LocalhostInfra2AuthWS;
283
+ this.Sp2LocalhostInfra2LoginWS = properties.Sp2LocalhostInfra2LoginWS;
284
+ this.Sp2Localhost = properties.Sp2LocalhostWS;
285
+ this.SpInfra2AuthWS = properties.SpInfra2AuthWS;
286
+ this.SpInfra2LoginWS = properties.SpInfra2LoginWS;
287
+ this.SpInfra2ErpWS = properties.SpInfra2ErpWS;
288
+ this.needsAuthAplic = properties.needsAuthAplic;
289
+ this.needsAuthInfra = properties.needsAuthInfra;
290
+ }
291
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
292
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, providedIn: 'root' }); }
293
+ }
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, decorators: [{
295
+ type: Injectable,
296
+ args: [{ providedIn: 'root' }]
297
+ }] });
298
+
93
299
  class AuthStorageService {
94
- constructor(_httpBackend, _customStorageService) {
300
+ constructor(_httpBackend, _customStorageService, _environmentService) {
95
301
  this._httpBackend = _httpBackend;
96
302
  this._customStorageService = _customStorageService;
97
- this._HOSTNAME = "https://siscandesv6.sispro.com.br";
98
- this._BASE_URL = `${this._HOSTNAME}/SisproErpCloud/Service_Private/Infra/SpInfra2LoginWS/api/LoginSisproERP`; // SpInfra2WS
303
+ this._environmentService = _environmentService;
304
+ this._BASE_URL = ''; // SpInfra2WS
99
305
  this.__local_key = 'user_auth_v6';
100
306
  // indica se objeto já está marcado para salvar os dados no local storage.
101
307
  this.__isSaving = false;
@@ -131,27 +337,49 @@ class AuthStorageService {
131
337
  this.__isExternalLogin = false;
132
338
  /** Se é para ignorar o método reCheckLogin */
133
339
  this.__ignoreCheckLogin = false;
340
+ //infraInAuthTypeId
341
+ this.__infraInAuthTypeId = 0;
342
+ //infraIn2FaTypeId
343
+ this.__infraIn2FaTypeId = null;
344
+ //is2FaEnabled
345
+ this.__is2FaEnabled = false;
346
+ // azureTenantId
347
+ this.__azureTenantId = "";
348
+ // azureClientId
349
+ this.__azureClientId = "";
134
350
  this._httpClient = new HttpClient(_httpBackend);
135
- //this._BASE_URL = !environment.production ? this._BASE_URL : `${environment.SpInfra2LoginWS}/LoginSisproERP`;
351
+ this._BASE_URL = `${_environmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
352
+ this._BASE_URL = !_environmentService.production ? this._BASE_URL : `${_environmentService.SpInfra2LoginWS}/LoginSisproERP`;
136
353
  // Método com customizações para inicializações da storage
137
354
  this._customStorageService.storageConstructor();
138
355
  const expectedLocalAuthStorage = localStorage.getItem(this.__local_key);
139
356
  if (expectedLocalAuthStorage) {
140
357
  const localAuthStorage = JSON.parse(expectedLocalAuthStorage);
141
- this.__ip = localAuthStorage.__ip;
142
- this.__tenantId = localAuthStorage.__tenantId;
143
- this.__infraUsuarioId = localAuthStorage.__infraUsuarioId;
144
- this.__infraEstabId = localAuthStorage.__infraEstabId;
145
- this.__infraEstabNome = localAuthStorage.__infraEstabNome;
146
- this.__infraEmpresaId = localAuthStorage.__infraEmpresaId;
147
- this.__infraEmpresaNome = localAuthStorage.__infraEmpresaNome;
148
- this.__user = localAuthStorage.__user;
149
- this.__userName = localAuthStorage.__userName;
150
- this.__tokenPayload = localAuthStorage.__tokenPayload;
151
- this.__authToken = localAuthStorage.__authToken;
152
- this.__dominio = localAuthStorage.__dominio;
153
- this.__isExternalLogin = localAuthStorage.__isExternalLogin;
154
- this.startLoginCheck();
358
+ try {
359
+ this.__ip = localAuthStorage.__ip;
360
+ this.__tenantId = localAuthStorage.__tenantId;
361
+ this.__infraUsuarioId = localAuthStorage.__infraUsuarioId;
362
+ this.__infraEstabId = localAuthStorage.__infraEstabId;
363
+ this.__infraEstabNome = localAuthStorage.__infraEstabNome;
364
+ this.__infraEmpresaId = localAuthStorage.__infraEmpresaId;
365
+ this.__infraEmpresaNome = localAuthStorage.__infraEmpresaNome;
366
+ this.__user = localAuthStorage.__user;
367
+ this.__userName = localAuthStorage.__userName;
368
+ this.__tokenPayload = localAuthStorage.__tokenPayload;
369
+ this.__authToken = localAuthStorage.__authToken;
370
+ this.__dominio = localAuthStorage.__dominio;
371
+ this.__isExternalLogin = localAuthStorage.__isExternalLogin;
372
+ this.__infraInAuthTypeId = localAuthStorage.__infraInAuthTypeId;
373
+ this.__infraIn2FaTypeId = localAuthStorage.__infraIn2FaTypeId;
374
+ this.__is2FaEnabled = localAuthStorage.__is2FaEnabled;
375
+ this.__azureTenantId = localAuthStorage.__azureTenantId;
376
+ this.__azureClientId = localAuthStorage.__azureClientId;
377
+ this.startLoginCheck();
378
+ }
379
+ catch (error) {
380
+ this.logout();
381
+ return;
382
+ }
155
383
  }
156
384
  }
157
385
  get ip() {
@@ -222,6 +450,10 @@ class AuthStorageService {
222
450
  get tokenPayload() {
223
451
  return this.__tokenPayload;
224
452
  }
453
+ set tokenPayload(value) {
454
+ this.__tokenPayload = value;
455
+ this.__saveLocalInstance();
456
+ }
225
457
  get authToken() {
226
458
  return this.__authToken;
227
459
  }
@@ -263,6 +495,41 @@ class AuthStorageService {
263
495
  this.__ignoreCheckLogin = value;
264
496
  this.__saveLocalInstance();
265
497
  }
498
+ get infraInAuthTypeId() {
499
+ return this.__infraInAuthTypeId;
500
+ }
501
+ set infraInAuthTypeId(value) {
502
+ this.__infraInAuthTypeId = value;
503
+ this.__saveLocalInstance();
504
+ }
505
+ get infraIn2FaTypeId() {
506
+ return this.__infraIn2FaTypeId;
507
+ }
508
+ set infraIn2FaTypeId(value) {
509
+ this.__infraIn2FaTypeId = value;
510
+ this.__saveLocalInstance();
511
+ }
512
+ get is2FaEnabled() {
513
+ return this.__is2FaEnabled;
514
+ }
515
+ set is2FaEnabled(value) {
516
+ this.__is2FaEnabled = value;
517
+ this.__saveLocalInstance();
518
+ }
519
+ get azureTenantId() {
520
+ return this.__azureTenantId;
521
+ }
522
+ set azureTenantId(value) {
523
+ this.__azureTenantId = value;
524
+ this.__saveLocalInstance();
525
+ }
526
+ get azureClientId() {
527
+ return this.__azureClientId;
528
+ }
529
+ set azureClientId(value) {
530
+ this.__azureClientId = value;
531
+ this.__saveLocalInstance();
532
+ }
266
533
  // #endregion GETTERS/SETTERS
267
534
  async __saveLocalInstance() {
268
535
  if (this.__isSaving) {
@@ -295,7 +562,12 @@ class AuthStorageService {
295
562
  "__authToken": "${this.authToken}",
296
563
  "__tokenPayload": ${JSON.stringify(this.tokenPayload)},
297
564
  "__dominio": "${this.dominio}",
298
- "__isExternalLogin": ${this.isExternalLogin}
565
+ "__isExternalLogin": ${this.isExternalLogin},
566
+ "__infraInAuthTypeId": ${this.infraInAuthTypeId},
567
+ "__infraIn2FaTypeId": ${this.infraIn2FaTypeId},
568
+ "__is2FaEnabled": ${this.is2FaEnabled},
569
+ "__azureTenantId": "${this.azureTenantId}",
570
+ "__azureClientId": "${this.azureClientId}"
299
571
  }
300
572
  `;
301
573
  return json;
@@ -364,6 +636,11 @@ class AuthStorageService {
364
636
  this.__dominio = "";
365
637
  this.__tokenPayload = {};
366
638
  this.__isExternalLogin = false;
639
+ this.__infraInAuthTypeId = 0;
640
+ this.__infraIn2FaTypeId = null;
641
+ this.__is2FaEnabled = false;
642
+ this.__azureTenantId = "";
643
+ this.__azureClientId = "";
367
644
  localStorage.removeItem(this.__local_key);
368
645
  // Método com customizações para finalizações da storage
369
646
  this._customStorageService.storageLogout();
@@ -440,89 +717,193 @@ class AuthStorageService {
440
717
  return false;
441
718
  }
442
719
  }
443
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, deps: [{ token: i1.HttpBackend }, { token: LibCustomStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
720
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, deps: [{ token: i1.HttpBackend }, { token: LibCustomStorageService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
444
721
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, providedIn: 'root' }); }
445
722
  }
446
723
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, decorators: [{
447
724
  type: Injectable,
448
725
  args: [{ providedIn: 'root' }]
449
- }], ctorParameters: () => [{ type: i1.HttpBackend }, { type: LibCustomStorageService }] });
726
+ }], ctorParameters: () => [{ type: i1.HttpBackend }, { type: LibCustomStorageService }, { type: EnvironmentService }] });
450
727
 
451
- class LibCustomLoginService {
452
- constructor() { }
453
- // #endregion Propriedade Customizadas para o Componente login.component.ts
454
- // #region Métodos Customizadas para o Componente auth.service.ts
455
- /**
456
- * Método executado no auth.service.ts - método: login ()
457
- * Utilizado para inicializações diversas
458
- */
459
- authLogin() {
460
- this.storedAuthLogin();
728
+ class LibCustomMenuService {
729
+ /** Obtém as opções do menu. */
730
+ get menuItems() {
731
+ return this._menuItems;
461
732
  }
462
- /**
463
- * Método executado no auth.service.ts - método: logout ()
464
- * Utilizado para inicializações diversas
465
- */
466
- authLogout() {
467
- this.storedAuthLogout();
733
+ set menuItems(value) {
734
+ this._menuItems = value;
468
735
  }
469
- /**
470
- * Método executado no auth.service.ts - método: login ()
471
- * Utilizado para informar o redirecionamento para a tela inicial após o login ok
472
- *
473
- * @param router Objeto de Router que será utilizado
474
- */
475
- authNavigateToPage(router) {
476
- router.navigate(["/home"]);
736
+ setEmpresa(value) { this.empresaId.next(value); }
737
+ // ! Definição do BehaviorSubject: responsável principal da emissão do evento
738
+ // #endregion Propriedade do Menu
739
+ constructor(_menuConfig, _authStorageService) {
740
+ this._menuConfig = _menuConfig;
741
+ this._authStorageService = _authStorageService;
742
+ // #region Propriedade Customizadas do Menu
743
+ this.menuDynamic = false;
744
+ this.menuDynamicCustom = false;
745
+ this.moduleName = "";
746
+ this.moduleImg = "";
747
+ this.moduleSvg = "";
748
+ this.themeColor = "";
749
+ // #endregion Propriedade Customizadas do Menu
750
+ // #region Propriedade do Menu
751
+ this._menuItems = [];
752
+ // ! Definição do BehaviorSubject: responsável principal da emissão do evento
753
+ this.empresaId = new BehaviorSubject({ estabelecimentoID: "", empresaID: "" });
754
+ this.applyEmpresa$ = this.empresaId.asObservable();
755
+ // inicializações do Menu Dinâmico
756
+ this.menuConfig = _menuConfig;
477
757
  }
478
- ConfigurarCustomLogin(customLoginService) {
758
+ // #region - Métodos Customizadas para o Menu dinâmico
759
+ // Método executado no menu-lateral.component.ts - método: onInit ()
760
+ // Utilizado para obter o Módulo para montagem do Menu Dinâmico Lateral
761
+ menuDynamicGetModuloId() {
762
+ return this.storeMenuDynamicGetModuloId();
763
+ }
764
+ // Método executado no menu-lateral.component.ts - método: onInit ()
765
+ // Utilizado para inicializações diversas
766
+ menuDynamicOnInit() {
767
+ this.storedMenuDynamicOnInit();
768
+ }
769
+ // Método executado no menu-lateral.component.ts - método: onInit ()
770
+ // Utilizado para inicializações diversas
771
+ menuStaticOnInit() {
772
+ this.storedMenuStaticOnInit();
773
+ }
774
+ // Método executado no menu-lateral.component.ts - método: openExpansibleMenu()
775
+ // Utilizado para inicializações ao Expandir a opção de Menu
776
+ menuopenExpansibleMenu(ref) {
777
+ this.storedMenuopenExpansibleMenu(ref);
778
+ }
779
+ /** Método que deve ser chamado na seleção de um novo estabelecimento, ele atualizará os valores do nosso BehaviorSubject para que possamos utilizá-lo em outras partes do sistema. */
780
+ emitEstabelecimentoEvent() {
781
+ this.setEmpresa({
782
+ estabelecimentoID: this._authStorageService.infraEstabId,
783
+ empresaID: this._authStorageService.infraEmpresaId
784
+ });
785
+ }
786
+ // #endregion Métodos recebidos do projeto
787
+ // #region Métodos Publicos
788
+ ConfigurarCustomMenuService(RealcustomMenuService) {
479
789
  //passando propriedades do projeto para a lib
480
- this.loginTitle = customLoginService.loginTitle;
481
- this.loginSubtitle = customLoginService.loginSubtitle;
482
- this.loginBackground = customLoginService.loginBackground;
483
- this.loginLogotipo = customLoginService.loginLogotipo;
484
- this.loginAltLogotipo = customLoginService.loginAltLogotipo;
485
- this.loginPageTitle = customLoginService.loginPageTitle;
486
- this.loginDesenvDomain = customLoginService.loginDesenvDomain;
487
- this.loginDesenvUser = customLoginService.loginDesenvUser;
488
- this.loginDesenvPassword = customLoginService.loginDesenvPassword;
790
+ this.menuDynamic = RealcustomMenuService.menuDynamic;
791
+ this.menuDynamicCustom = RealcustomMenuService.menuDynamicCustom;
792
+ this.moduleName = RealcustomMenuService.moduleName;
793
+ this.moduleImg = RealcustomMenuService.moduleImg;
794
+ this.moduleSvg = RealcustomMenuService.moduleSvg;
795
+ this.themeColor = RealcustomMenuService.themeColor;
489
796
  //passando implementação dos métodos do projeto para a lib
490
- this.storedAuthLogin = customLoginService.authLogin;
491
- this.storedAuthLogout = customLoginService.authLogout;
797
+ this.storeMenuDynamicGetModuloId = RealcustomMenuService.menuDynamicGetModuloId;
798
+ this.storedMenuStaticOnInit = RealcustomMenuService.menuStaticOnInit;
799
+ this.storedMenuopenExpansibleMenu = RealcustomMenuService.menuopenExpansibleMenu;
800
+ this.storedMenuDynamicOnInit = RealcustomMenuService.menuDynamicOnInit;
492
801
  }
493
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
494
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, providedIn: 'root' }); }
802
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, deps: [{ token: LibMenuConfigService }, { token: AuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
803
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, providedIn: 'root' }); }
495
804
  }
496
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, decorators: [{
805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, decorators: [{
497
806
  type: Injectable,
498
807
  args: [{ providedIn: 'root' }]
499
- }], ctorParameters: () => [] });
808
+ }], ctorParameters: () => [{ type: LibMenuConfigService }, { type: AuthStorageService }] });
500
809
 
501
- class AuthService {
502
- // #endregion PRIVATE
503
- // #endregion ==========> PROPERTIES <==========
504
- constructor(_httpClient, _router, _authStorageService, _customLoginService, _ipServiceService) {
505
- this._httpClient = _httpClient;
506
- this._router = _router;
507
- this._authStorageService = _authStorageService;
508
- this._customLoginService = _customLoginService;
509
- this._ipServiceService = _ipServiceService;
510
- // #region ==========> PROPERTIES <==========
511
- // #region PRIVATE
512
- // private readonly _HOSTNAME: any = window.location.hostname.includes("localhost")
513
- // ? `http://${window.location.hostname}`
514
- // : `https://${window.location.hostname}`;
515
- this._HOSTNAME = "https://siscandesv6.sispro.com.br";
516
- this._BASE_URL = `${this._HOSTNAME}/SisproErpCloud/Service_Private/Infra/SpInfra2LoginWS/api/LoginSisproERP`; // SpInfra2WS
517
- this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
810
+ var InfraInAuthTypeId;
811
+ (function (InfraInAuthTypeId) {
812
+ InfraInAuthTypeId[InfraInAuthTypeId["Local"] = 1] = "Local";
813
+ InfraInAuthTypeId[InfraInAuthTypeId["Azure"] = 2] = "Azure";
814
+ InfraInAuthTypeId[InfraInAuthTypeId["LDAP"] = 3] = "LDAP";
815
+ })(InfraInAuthTypeId || (InfraInAuthTypeId = {}));
816
+
817
+ var InfraIn2FaTypeId;
818
+ (function (InfraIn2FaTypeId) {
819
+ InfraIn2FaTypeId[InfraIn2FaTypeId["Email"] = 1] = "Email";
820
+ InfraIn2FaTypeId[InfraIn2FaTypeId["Google"] = 2] = "Google";
821
+ InfraIn2FaTypeId[InfraIn2FaTypeId["Microsoft"] = 3] = "Microsoft";
822
+ })(InfraIn2FaTypeId || (InfraIn2FaTypeId = {}));
823
+
824
+ class ProjectUtilservice {
825
+ constructor(router, authStorageService, checkUrlAndMethodService, messageService, _environmentService) {
826
+ this.router = router;
827
+ this.authStorageService = authStorageService;
828
+ this.checkUrlAndMethodService = checkUrlAndMethodService;
829
+ this.messageService = messageService;
830
+ this._environmentService = _environmentService;
831
+ }
832
+ // Exibe a mensagem de erro de uma requisição http
833
+ showHttpError(error) {
834
+ if (error.error instanceof ErrorEvent) {
835
+ // Erro ocorreu no lado do cliente
836
+ this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
837
+ }
838
+ else {
839
+ // Erro ocorreu no lado do servidor
840
+ let isUnauthorizedAccess = error.status === 401;
841
+ if (isUnauthorizedAccess) {
842
+ let isFromAplic = this.checkUrlAndMethodService.needsAuthRequest(error.url, "*", this._environmentService.needsAuthAplic);
843
+ if (isFromAplic) {
844
+ // Remove a autenticação do usuário.
845
+ this.authStorageService.isLoggedInSub.next(false);
846
+ this.authStorageService.urlRedirect = "/";
847
+ let promise = this.router.navigate(["/auth/login"]);
848
+ promise.then(this.showExpiredAccess.bind(this));
849
+ }
850
+ else {
851
+ this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
852
+ }
853
+ }
854
+ else {
855
+ this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
856
+ }
857
+ }
858
+ }
859
+ // Mostra uma mensagem de sessão expirada.
860
+ showExpiredAccess(navigationResult) {
861
+ if (navigationResult) {
862
+ this.messageService.showAlertWarning("Sessão expirada, logue-se novamente.");
863
+ }
864
+ }
865
+ // Obtém o hostName
866
+ getHostName() {
867
+ return this._environmentService.hostName;
868
+ }
869
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProjectUtilservice, deps: [{ token: i1$1.Router }, { token: AuthStorageService }, { token: i3.CheckUrlAndMethodService }, { token: i3.MessageService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
870
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProjectUtilservice, providedIn: 'root' }); }
871
+ }
872
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProjectUtilservice, decorators: [{
873
+ type: Injectable,
874
+ args: [{
875
+ providedIn: 'root'
876
+ }]
877
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthStorageService }, { type: i3.CheckUrlAndMethodService }, { type: i3.MessageService }, { type: EnvironmentService }] });
878
+
879
+ class AuthService {
880
+ // #endregion PRIVATE
881
+ // #endregion ==========> PROPERTIES <==========
882
+ constructor(_httpClient, _router, _authStorageService, _ipServiceService, _customLoginService, _projectUtilservice, _environmentService) {
883
+ this._httpClient = _httpClient;
884
+ this._router = _router;
885
+ this._authStorageService = _authStorageService;
886
+ this._ipServiceService = _ipServiceService;
887
+ this._customLoginService = _customLoginService;
888
+ this._projectUtilservice = _projectUtilservice;
889
+ this._environmentService = _environmentService;
890
+ // #region ==========> PROPERTIES <==========
891
+ // #region PRIVATE
892
+ this._pendingWarning = null;
893
+ this._BASE_URL = ''; // SpInfra2WS
894
+ this._AUTH_BASE_URL = ''; // SpInfra2AuthWS
895
+ this._BASE_OS_URL = ''; // SpInfra2LoginWS
896
+ this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
518
897
  this.ip = "undefined";
519
898
  this.city = "undefined";
520
899
  this.state = "undefined";
521
900
  this.country = "undefined";
522
- //this._BASE_URL = !environment.production ? this._BASE_URL : `${environment.SpInfra2LoginWS}/LoginSisproERP`;
523
- this._BASE_URL.includes("localhost") || this._BASE_URL.includes('127.0.0.1')
524
- ? this._BASE_URL
525
- : this._BASE_URL = "https://siscandesv6.sispro.com.br/SisproErpCloud/Service_Private/Infra/SpInfra2LoginWS/api/LoginSisproERP";
901
+ this._BASE_URL = `${this._environmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
902
+ this._AUTH_BASE_URL = `${this._environmentService.SpInfra2AuthWS}/Auth`; // SpInfra2AuthWS
903
+ this._BASE_OS_URL = `${this._environmentService.SpInfra2LoginWS}/LoginIntegradoOS`; // SpInfra2LoginWS
904
+ this._BASE_URL = !this._environmentService.production ? this._BASE_URL : `${this._environmentService.SpInfra2LoginWS}/LoginSisproERP`;
905
+ this._AUTH_BASE_URL = !this._environmentService.production ? this._AUTH_BASE_URL : `${this._environmentService.SpInfra2AuthWS}/Auth`;
906
+ this._BASE_OS_URL = !this._environmentService.production ? this._BASE_OS_URL : `${this._environmentService.SpInfra2LoginWS}/LoginIntegradoOS`;
526
907
  this.getParms();
527
908
  }
528
909
  // #region ==========> SERVICE METHODS <==========
@@ -549,7 +930,7 @@ class AuthService {
549
930
  },
550
931
  });
551
932
  }
552
- geHostName() {
933
+ getHostName() {
553
934
  let product = window.location.pathname;
554
935
  let index = product.indexOf("/auth/login");
555
936
  if (index != -1) {
@@ -558,25 +939,55 @@ class AuthService {
558
939
  else {
559
940
  product = "";
560
941
  }
561
- return this._HOSTNAME + product;
942
+ return this._projectUtilservice.getHostName() + product;
562
943
  }
563
944
  // #endregion GET
564
945
  // #region POST
946
+ /** Obtém o método de autenticação
947
+ * @param domain Domínio do login
948
+ * @returns Observable com os dados do método de autenticação, seja erro ou sucesso
949
+ */
950
+ getAuthentication(domain) {
951
+ const params = new HttpParams()
952
+ .set('domain', domain);
953
+ const url = `${this._AUTH_BASE_URL}/GetAuthentication`;
954
+ const headers = this._HTTP_HEADERS;
955
+ return this._httpClient
956
+ .post(url, null, { 'params': params, 'headers': headers })
957
+ .pipe(take$1(1), tap$1((response) => {
958
+ if (response.Error) {
959
+ throw Error(response.ErrorMessage);
960
+ }
961
+ localStorage.setItem('configServerUser', response.User);
962
+ localStorage.setItem('configServerPassword', response.Password);
963
+ this._authStorageService.tenantId = response.TenantId;
964
+ this._authStorageService.dominio = response.Domain;
965
+ this._authStorageService.infraInAuthTypeId = response.InfraInAuthTypeId;
966
+ this._authStorageService.infraIn2FaTypeId = response.InfraIn2FaTypeId;
967
+ this._authStorageService.is2FaEnabled = response.Is2FaEnabled;
968
+ this._authStorageService.azureTenantId = response.AzureTenantId;
969
+ this._authStorageService.azureClientId = response.AzureClientId;
970
+ this._authStorageService.tokenPayload = {};
971
+ }));
972
+ }
565
973
  /** Realiza o login no sistema
566
974
  * @param login Informações do formulário de login
567
975
  * @returns Observable com os dados do login realizado, seja erro ou sucesso
568
976
  */
569
- login(parmsLogin) {
977
+ login(domain, user, password) {
570
978
  let login = {
571
- usuario: parmsLogin.usuario,
572
- senha: parmsLogin.senha
979
+ usuario: user,
980
+ senha: password
573
981
  };
574
982
  const params = new HttpParams()
575
- .set('dominio', parmsLogin.dominio)
576
- .set('urlServidor', this.geHostName())
983
+ .set('dominio', domain)
984
+ .set('urlServidor', this.getHostName())
577
985
  .set('ip', this.ip)
578
986
  .set('browse', `${this._ipServiceService.getDataBrowserUser().browser} - ${this._ipServiceService.getDataBrowserUser().so}`)
579
- .set('localization', `${this.city}, ${this.state}, ${this.country}`);
987
+ .set('localization', `${this.city}, ${this.state}, ${this.country}`)
988
+ .set('infraInAuthTypeId', this._authStorageService.infraInAuthTypeId)
989
+ .set('infraIn2FaTypeId', this._authStorageService.infraIn2FaTypeId)
990
+ .set('is2FaEnabled', this._authStorageService.is2FaEnabled);
580
991
  const url = `${this._BASE_URL}/ValidateLogin`;
581
992
  const headers = this._HTTP_HEADERS;
582
993
  return this._httpClient
@@ -592,7 +1003,7 @@ class AuthService {
592
1003
  //Inicializar password
593
1004
  this._authStorageService.logout();
594
1005
  }
595
- else if (response.InfraInAuthTypeId == 1 && response.InfraIn2FaTypeId != null && response.InfraIn2FaTypeId == 1 && response.Is2FaEnabled) {
1006
+ else if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Local && this._authStorageService.infraIn2FaTypeId != null && this._authStorageService.infraIn2FaTypeId == InfraIn2FaTypeId.Email && this._authStorageService.is2FaEnabled) {
596
1007
  //Inicializar Autenticação Local 2 Fatores via Email
597
1008
  this._authStorageService.logout();
598
1009
  this._authStorageService.ip = this.ip;
@@ -602,6 +1013,9 @@ class AuthService {
602
1013
  this._authStorageService.userName = response.UserName;
603
1014
  this._authStorageService.dominio = response.Dominio;
604
1015
  this._authStorageService.isExternalLogin = false;
1016
+ this._authStorageService.infraInAuthTypeId = InfraInAuthTypeId.Local;
1017
+ this._authStorageService.infraIn2FaTypeId = InfraIn2FaTypeId.Email;
1018
+ this._authStorageService.is2FaEnabled = true;
605
1019
  }
606
1020
  else {
607
1021
  this._authStorageService.ignoreCheckLogin = true;
@@ -631,6 +1045,62 @@ class AuthService {
631
1045
  }
632
1046
  }));
633
1047
  }
1048
+ /** Realiza o login no sistema (Azure)
1049
+ * @param domain Domínio de login
1050
+ * @param user usuário de login (mail)
1051
+ * @returns Observable com os dados do login realizado, seja erro ou sucesso
1052
+ */
1053
+ loginAzure(domain, user) {
1054
+ let login = {
1055
+ usuario: user,
1056
+ senha: "azure"
1057
+ };
1058
+ const params = new HttpParams()
1059
+ .set('dominio', domain)
1060
+ .set('urlServidor', this.getHostName())
1061
+ .set('ip', this.ip)
1062
+ .set('browse', `${this._ipServiceService.getDataBrowserUser().browser} - ${this._ipServiceService.getDataBrowserUser().so}`)
1063
+ .set('localization', `${this.city}, ${this.state}, ${this.country}`)
1064
+ .set('infraInAuthTypeId', this._authStorageService.infraInAuthTypeId)
1065
+ .set('infraIn2FaTypeId', this._authStorageService.infraIn2FaTypeId)
1066
+ .set('is2FaEnabled', this._authStorageService.is2FaEnabled);
1067
+ const url = `${this._BASE_URL}/ValidateLogin`;
1068
+ const headers = this._HTTP_HEADERS;
1069
+ return this._httpClient
1070
+ .post(url, login, { 'params': params, 'headers': headers })
1071
+ .pipe(take$1(1), tap$1((response) => {
1072
+ if (response.FeedbackMessage != "") {
1073
+ return;
1074
+ }
1075
+ if (response.Error) {
1076
+ throw Error(response.ErrorMessage);
1077
+ }
1078
+ this._authStorageService.ignoreCheckLogin = true;
1079
+ this._authStorageService.isLoggedInSub.next(true);
1080
+ this._authStorageService.ip = this.ip;
1081
+ this._authStorageService.tenantId = response.TenantId;
1082
+ this._authStorageService.infraUsuarioId = response.InfraUsuarioId;
1083
+ this._authStorageService.infraEstabId = response.EstabelecimentoId;
1084
+ this._authStorageService.infraEstabNome = response.NomeEstabelecimento;
1085
+ this._authStorageService.infraEmpresaId = response.EmpresaId;
1086
+ this._authStorageService.infraEmpresaNome = response.NomeEmpresa;
1087
+ this._authStorageService.user = login.usuario;
1088
+ this._authStorageService.userName = response.UserName;
1089
+ this._authStorageService.authToken = response.Token;
1090
+ this._authStorageService.dominio = response.Dominio;
1091
+ this._authStorageService.isExternalLogin = false;
1092
+ // Método com customizações para inicializações do Login
1093
+ this._customLoginService.authLogin();
1094
+ if (this._authStorageService.urlRedirect == '' || this._authStorageService.urlRedirect == '/' || this._authStorageService.urlRedirect == '/auth/login') {
1095
+ // Método com customizações para redirecionamento da tela inicial após login ok
1096
+ this._customLoginService.authNavigateToPage(this._router);
1097
+ }
1098
+ else {
1099
+ this._router.navigate([this._authStorageService.urlRedirect]);
1100
+ }
1101
+ this._authStorageService.urlRedirect = "/";
1102
+ }));
1103
+ }
634
1104
  loginExternal(dominio, user, password) {
635
1105
  let login = {
636
1106
  usuario: user,
@@ -662,6 +1132,73 @@ class AuthService {
662
1132
  return response.Error;
663
1133
  }));
664
1134
  }
1135
+ /** Este método é utilizado para realizar o login no sistema integrado com a OS.
1136
+ * Originalmente pensado para utilizar apenas pelo componente de integração de login.
1137
+ * @param parmsLogin Informações do formulário de login
1138
+ * @param serialV6 Serial do V6
1139
+ *
1140
+ * @returns Observable com os dados do login realizado, seja erro ou sucesso
1141
+ */
1142
+ loginOS(parmsLogin, serialV6) {
1143
+ let login = {
1144
+ usuario: parmsLogin.usuario,
1145
+ senha: parmsLogin.senha
1146
+ };
1147
+ const params = new HttpParams()
1148
+ .set('dominio', parmsLogin.dominio)
1149
+ .set('urlServidor', this.getHostName())
1150
+ .set('ip', this.ip)
1151
+ .set('browse', `${this._ipServiceService.getDataBrowserUser().browser} - ${this._ipServiceService.getDataBrowserUser().so}`)
1152
+ .set('localization', `${this.city}, ${this.state}, ${this.country}`)
1153
+ .set('infraInAuthTypeId', this._authStorageService.infraInAuthTypeId)
1154
+ .set('infraIn2FaTypeId', this._authStorageService.infraIn2FaTypeId)
1155
+ .set('is2FaEnabled', this._authStorageService.is2FaEnabled)
1156
+ .set('serialV6', serialV6);
1157
+ const url = `${this._BASE_OS_URL}/ValidateOSLogin`;
1158
+ const headers = this._HTTP_HEADERS;
1159
+ return this._httpClient
1160
+ .post(url, login, { 'params': params, 'headers': headers })
1161
+ .pipe(take$1(1), tap$1((response) => {
1162
+ if (response.FeedbackMessage != "" && response.FeedbackMessage != null) {
1163
+ return;
1164
+ }
1165
+ if (response.Error) {
1166
+ this._authStorageService.logout();
1167
+ throw Error(response.ErrorMessage);
1168
+ }
1169
+ if (response.InitializePassword) {
1170
+ //Inicializar password
1171
+ this._authStorageService.logout();
1172
+ }
1173
+ else if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Local && this._authStorageService.infraIn2FaTypeId != null && this._authStorageService.infraIn2FaTypeId == InfraIn2FaTypeId.Email && this._authStorageService.is2FaEnabled) {
1174
+ //Inicializar Autenticação Local 2 Fatores via Email
1175
+ this._authStorageService.logout();
1176
+ this._authStorageService.ip = this.ip;
1177
+ this._authStorageService.tenantId = response.TenantId;
1178
+ this._authStorageService.infraUsuarioId = response.InfraUsuarioId;
1179
+ this._authStorageService.user = login.usuario;
1180
+ this._authStorageService.userName = response.UserName;
1181
+ this._authStorageService.dominio = response.Dominio;
1182
+ this._authStorageService.isExternalLogin = false;
1183
+ }
1184
+ else {
1185
+ this._authStorageService.ignoreCheckLogin = true;
1186
+ this._authStorageService.isLoggedInSub.next(true);
1187
+ this._authStorageService.ip = this.ip;
1188
+ this._authStorageService.tenantId = response.TenantId;
1189
+ this._authStorageService.infraUsuarioId = response.InfraUsuarioId;
1190
+ this._authStorageService.infraEstabId = response.EstabelecimentoId;
1191
+ this._authStorageService.infraEstabNome = response.NomeEstabelecimento;
1192
+ this._authStorageService.infraEmpresaId = response.EmpresaId;
1193
+ this._authStorageService.infraEmpresaNome = response.NomeEmpresa;
1194
+ this._authStorageService.user = login.usuario;
1195
+ this._authStorageService.userName = response.UserName;
1196
+ this._authStorageService.authToken = response.Token;
1197
+ this._authStorageService.dominio = response.Dominio;
1198
+ this._authStorageService.isExternalLogin = false;
1199
+ }
1200
+ }));
1201
+ }
665
1202
  logout() {
666
1203
  this._authStorageService.logout();
667
1204
  localStorage.removeItem('configsServerUser');
@@ -735,7 +1272,7 @@ class AuthService {
735
1272
  const params = new HttpParams()
736
1273
  .set('domain', parms.dominioFgtPsw)
737
1274
  .set('user', parms.usuarioFgtPsw)
738
- .set('urlServidor', this.geHostName())
1275
+ .set('urlServidor', this.getHostName())
739
1276
  .set('ip', this.ip)
740
1277
  .set('browse', `${this._ipServiceService.getDataBrowserUser().browser} - ${this._ipServiceService.getDataBrowserUser().so}`)
741
1278
  .set('localization', `${this.city}, ${this.state}, ${this.country}`);
@@ -787,105 +1324,85 @@ class AuthService {
787
1324
  }
788
1325
  }));
789
1326
  }
790
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: i1$1.Router }, { token: AuthStorageService }, { token: LibCustomLoginService }, { token: i5.IpServiceService }], target: i0.ɵɵFactoryTarget.Injectable }); }
791
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, providedIn: 'root' }); }
792
- }
793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, decorators: [{
794
- type: Injectable,
795
- args: [{ providedIn: 'root' }]
796
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Router }, { type: AuthStorageService }, { type: LibCustomLoginService }, { type: i5.IpServiceService }] });
797
-
798
- class ServerService {
799
- constructor(_httpClient) {
800
- this._httpClient = _httpClient;
801
- // private readonly _HOSTNAME: any = window.location.hostname.includes("localhost")
802
- // ? `http://${window.location.hostname}`
803
- // : `https://${window.location.hostname}`;
804
- this._HOSTNAME = "https://siscandesv6.sispro.com.br";
805
- this._BASE_URL = `${this._HOSTNAME}/SisproErpCloud/Service_Private/Infra/SpInfra2ConfigWS/api/Config`;
806
- this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
807
- this._BASE_URL.includes("localhost") || this._BASE_URL.includes('127.0.0.1')
808
- ? this._BASE_URL
809
- : this._BASE_URL = "https://siscandesv6.sispro.com.br/SisproErpCloud/Service_Private/Infra/SpInfra2ConfigWS/api/Config";
810
- }
811
- // #region GET Server
812
- getServer() {
813
- const url = `${this._BASE_URL}/GetConfig`;
814
- return this._httpClient
815
- .post(url, null, { 'headers': this._HTTP_HEADERS })
816
- .pipe(take(1), tap(response => {
817
- localStorage.setItem('configServerUser', response.User);
818
- localStorage.setItem('configServerPassword', response.Password);
819
- }));
820
- }
821
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ServerService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
822
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ServerService, providedIn: 'root' }); }
823
- }
824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ServerService, decorators: [{
825
- type: Injectable,
826
- args: [{
827
- providedIn: 'root'
828
- }]
829
- }], ctorParameters: () => [{ type: i1.HttpClient }] });
830
-
831
- /**Service responsável por pegar as opções do menu do projeto em que está sendo utilizada*/
832
- class EnvironmentService {
833
- constructor() {
834
- this.production = false;
835
- this.hostName = "https://siscandesv6.sispro.com.br";
1327
+ // #endregion POST
1328
+ // #endregion ==========> SERVICE METHODS <==========
1329
+ // #region ==========> UTILS <==========
1330
+ setPendingWarning(message) {
1331
+ this._pendingWarning = message;
836
1332
  }
837
- ConfigurarEnvironments(propriedades) {
838
- //passando propriedades do produto para a lib
839
- this.needsAuthAplic = propriedades.needsAuthAplic;
840
- this.needsAuthInfra = propriedades.needsAuthInfra;
1333
+ consumePendingWarning() {
1334
+ const message = this._pendingWarning;
1335
+ this._pendingWarning = null;
1336
+ return message;
841
1337
  }
842
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
843
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, providedIn: 'root' }); }
1338
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: i1$1.Router }, { token: AuthStorageService }, { token: i3.IpServiceService }, { token: LibCustomLoginService }, { token: ProjectUtilservice }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1339
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, providedIn: 'root' }); }
844
1340
  }
845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, decorators: [{
1341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, decorators: [{
846
1342
  type: Injectable,
847
1343
  args: [{ providedIn: 'root' }]
848
- }] });
1344
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Router }, { type: AuthStorageService }, { type: i3.IpServiceService }, { type: LibCustomLoginService }, { type: ProjectUtilservice }, { type: EnvironmentService }] });
849
1345
 
1346
+ var LoginProgress;
1347
+ (function (LoginProgress) {
1348
+ LoginProgress[LoginProgress["Domain"] = 1] = "Domain";
1349
+ LoginProgress[LoginProgress["Local"] = 2] = "Local";
1350
+ LoginProgress[LoginProgress["Azure"] = 3] = "Azure";
1351
+ })(LoginProgress || (LoginProgress = {}));
1352
+ // ajustes ERICK
1353
+ var SituacaoLogin;
1354
+ (function (SituacaoLogin) {
1355
+ SituacaoLogin[SituacaoLogin["LOGIN"] = 0] = "LOGIN";
1356
+ SituacaoLogin[SituacaoLogin["AUTENTICACAO_2_FATORES"] = 1] = "AUTENTICACAO_2_FATORES";
1357
+ SituacaoLogin[SituacaoLogin["ESQUECEU_SENHA"] = 2] = "ESQUECEU_SENHA";
1358
+ })(SituacaoLogin || (SituacaoLogin = {}));
1359
+ ;
1360
+ // ajustes ERICK
850
1361
  class LoginComponent {
851
- constructor(_bsModalService, _messageService, _formBuilder, _authService, _serverService, _environmentService, _authStorageService, _customLoginService, _title, _router, _toastrService) {
852
- this._bsModalService = _bsModalService;
853
- this._messageService = _messageService;
1362
+ constructor(_msalGuardConfiguration, _msalService, _customLoginService, _formBuilder, _projectUtilservice, _authService, _environmentService, _authStorageService, _title, _router, _toastrService,
1363
+ // Exibição de alerta para caso o payload do login OS não seja infromado corretamente
1364
+ _messageService) {
1365
+ this._msalGuardConfiguration = _msalGuardConfiguration;
1366
+ this._msalService = _msalService;
1367
+ this._customLoginService = _customLoginService;
854
1368
  this._formBuilder = _formBuilder;
1369
+ this._projectUtilservice = _projectUtilservice;
855
1370
  this._authService = _authService;
856
- this._serverService = _serverService;
857
1371
  this._environmentService = _environmentService;
858
1372
  this._authStorageService = _authStorageService;
859
- this._customLoginService = _customLoginService;
860
1373
  this._title = _title;
861
1374
  this._router = _router;
862
1375
  this._toastrService = _toastrService;
1376
+ this._messageService = _messageService;
863
1377
  // #region ==========> PROPERTIES <==========
864
1378
  // #region PRIVATE
865
- this.idFgtPsw = 1;
1379
+ this._situacaoLogin = SituacaoLogin.LOGIN;
1380
+ // #endregion PRIVATE
1381
+ // #region PUBLIC
866
1382
  // Variáveis específicas para funcionalidades padrões dos formulários
867
1383
  this.currentTime = new Date();
868
1384
  this.year = this.currentTime.getFullYear();
869
- this.isLoading = false;
1385
+ this.isLoadingDomain = false;
1386
+ this.isLoadingLogin = false;
1387
+ this.isLoadingAzure = false;
1388
+ this.isLoadingForgottenPassword = false;
870
1389
  this.isLoadingSendAuthentication2Fa = false;
871
- this.showParmsAuthentication2Fa = false;
872
1390
  this.isLoadingGetNewCode = false;
873
- //propriedades que vão receber os valores do customLoginService ####VERIFICAR DEPOIS####
874
- // @Input() customPropriedadesLogin?: CustomPropriedadesLogin;
1391
+ this.showParmsAuthentication2Fa = false;
1392
+ this.loginProgress = LoginProgress.Domain;
875
1393
  // #endregion PUBLIC
876
1394
  // #region Timer
877
1395
  this._subscription = new Subscription();
878
1396
  this.timerDuration = 90;
879
1397
  this.secondsLeft = this.timerDuration;
880
1398
  this.countdown$ = timer(0, 1000).pipe(take(this.timerDuration + 1), map$1(secondsElapsed => this.timerDuration - secondsElapsed));
881
- // #endregion Timer
882
- // #region ==========> FORM BUILDER <==========
883
- this.form = new FormGroup({});
884
- this.formFgtPsw = new FormGroup({});
885
- this.formAuthentication2Fa = new FormGroup({});
886
1399
  }
887
- ;
888
- ;
1400
+ get situacaoLogin() { return this._situacaoLogin; }
1401
+ set situacaoLogin(value) {
1402
+ this._situacaoLogin = value;
1403
+ if (value === SituacaoLogin.ESQUECEU_SENHA)
1404
+ this.createFormForgottenPassword();
1405
+ }
889
1406
  // Propriedade necessário para que a classe static FormUtils possa ser utilizada no Html
890
1407
  get FormUtils() {
891
1408
  return FormUtils;
@@ -893,13 +1410,19 @@ class LoginComponent {
893
1410
  // #region FORM DATA
894
1411
  // Variáveis específicas para funcionalidades padrões dos formulários (Login)
895
1412
  get dominio() {
896
- return this.form.get('dominio')?.value;
1413
+ return this.formDomain.get('dominio')?.value;
897
1414
  }
898
1415
  get usuario() {
899
- return this.form.get('usuario')?.value;
1416
+ return this.formLogin.get('usuario')?.value;
900
1417
  }
901
1418
  get senha() {
902
- return this.form.get('senha')?.value;
1419
+ return this.formLogin.get('senha')?.value;
1420
+ }
1421
+ get usuarioAzure() {
1422
+ return this.formAzure.get('usuario')?.value;
1423
+ }
1424
+ get senhaAzure() {
1425
+ return this.formAzure.get('senha')?.value;
903
1426
  }
904
1427
  // Variáveis específicas para funcionalidades padrões dos formulários (RequestRecoverPassword)
905
1428
  get dominioFgtPsw() {
@@ -914,7 +1437,7 @@ class LoginComponent {
914
1437
  }
915
1438
  // #endregion FORM DATA
916
1439
  // #endregion ==========> PROPERTIES <==========
917
- ngOnInit() {
1440
+ async ngOnInit() {
918
1441
  this._title.setTitle(this._customLoginService.loginPageTitle);
919
1442
  if (this._customLoginService.loginTitle != "") {
920
1443
  document.getElementById("title").innerHTML = this._customLoginService.loginTitle;
@@ -922,34 +1445,59 @@ class LoginComponent {
922
1445
  if (this._customLoginService.loginSubtitle != "") {
923
1446
  document.getElementById("subtitle").innerHTML = this._customLoginService.loginSubtitle;
924
1447
  }
925
- this.createForm();
1448
+ this.loginProgress = LoginProgress.Domain;
1449
+ this.createFormDomain();
1450
+ if (this._router.url.toLowerCase().startsWith('/auth/login#code=')) {
1451
+ this.loginProgress = LoginProgress.Azure;
1452
+ this.createFormAzure();
1453
+ await this.initMsalForLoginOk().then;
1454
+ return;
1455
+ }
926
1456
  }
927
1457
  // #region FORM VALIDATORS
928
1458
  // Método para configuração dos campos de edição do formulário (Login)
929
- createForm() {
930
- // Dados originais de Login
1459
+ createFormDomain() {
1460
+ // Dados originais de Login (Domínio)
931
1461
  if (this._environmentService.production) {
932
- this.form = this._formBuilder.group({
1462
+ this.formDomain = this._formBuilder.group({
933
1463
  dominio: ['', [Validators.required, Validators.maxLength(50)]],
1464
+ });
1465
+ }
1466
+ else {
1467
+ this.formDomain = this._formBuilder.group({
1468
+ dominio: [this._customLoginService.loginDesenvDomain, [Validators.required, Validators.maxLength(50)]],
1469
+ });
1470
+ }
1471
+ }
1472
+ createFormLogin() {
1473
+ // Dados originais de Login (Usuário e Senha)
1474
+ if (this._environmentService.production) {
1475
+ this.formLogin = this._formBuilder.group({
934
1476
  usuario: ['', [Validators.required, Validators.maxLength(100)]],
935
1477
  senha: ['', [Validators.required, Validators.maxLength(100)]]
936
1478
  });
937
1479
  }
938
1480
  else {
939
- this.form = this._formBuilder.group({
940
- dominio: [this._customLoginService.loginDesenvDomain, [Validators.required, Validators.maxLength(50)]],
1481
+ this.formLogin = this._formBuilder.group({
941
1482
  usuario: [this._customLoginService.loginDesenvUser, [Validators.required, Validators.maxLength(100)]],
942
1483
  senha: [this._customLoginService.loginDesenvPassword, [Validators.required, Validators.maxLength(100)]]
943
1484
  });
944
1485
  }
945
1486
  }
1487
+ createFormAzure() {
1488
+ // Dados originais de Login (Azure)
1489
+ this.formAzure = this._formBuilder.group({
1490
+ usuario: ['', [Validators.required, Validators.maxLength(100)]],
1491
+ senha: ['', [Validators.required, Validators.maxLength(100)]]
1492
+ });
1493
+ }
946
1494
  // Método para configuração dos campos de edição do formulário (RequestRecoverPassword)
947
1495
  createFormForgottenPassword() {
948
1496
  this.formFgtPsw = this._formBuilder.group({
949
1497
  dominioFgtPsw: ['', [Validators.required, Validators.maxLength(50)]],
950
1498
  usuarioFgtPsw: ['', [Validators.required, Validators.maxLength(100)]],
951
1499
  });
952
- this.formFgtPsw.get('recoverCdominioFgtPswodeRecPsw')?.setValue('');
1500
+ this.formFgtPsw.get('dominioFgtPsw')?.setValue('');
953
1501
  this.formFgtPsw.get('usuarioFgtPsw')?.setValue('');
954
1502
  }
955
1503
  // Método para configuração dos campos de edição do formulário (Autenticação 2 Fatores)
@@ -957,11 +1505,71 @@ class LoginComponent {
957
1505
  this.formAuthentication2Fa = this._formBuilder.group({
958
1506
  code: ['', [Validators.required, Validators.maxLength(6)]],
959
1507
  });
960
- this.form.get('code')?.setValue('');
1508
+ this.formAuthentication2Fa.get('code')?.setValue('');
961
1509
  }
962
1510
  // #endregion FORM VALIDATORS
963
1511
  // #endregion ==========> FORM BUILDER <==========
964
1512
  // #region ==========> SERVICE METHODS <==========
1513
+ // #region Azure
1514
+ async configMsal() {
1515
+ const isIE = window.navigator.userAgent.indexOf("MSIE ") > -1 || window.navigator.userAgent.indexOf("Trident/") > -1;
1516
+ const hostAuthLogin = !this._environmentService.production ? "http://localhost:4200/auth/login" : `${this._environmentService.hostName}/SisproErpCloud/${this._environmentService.product}/auth/login`;
1517
+ this._msalService.instance = new PublicClientApplication({
1518
+ auth: {
1519
+ clientId: `${this._authStorageService.azureClientId}`,
1520
+ authority: `https://login.microsoftonline.com/${this._authStorageService.azureTenantId}`,
1521
+ redirectUri: hostAuthLogin + "/",
1522
+ postLogoutRedirectUri: hostAuthLogin,
1523
+ navigateToLoginRequestUrl: true
1524
+ },
1525
+ cache: {
1526
+ cacheLocation: "localStorage",
1527
+ storeAuthStateInCookie: isIE
1528
+ },
1529
+ system: {
1530
+ loggerOptions: {
1531
+ loggerCallback: (logLevel, message, containsPii) => {
1532
+ console.log(message);
1533
+ },
1534
+ logLevel: LogLevel.Error,
1535
+ piiLoggingEnabled: false
1536
+ }
1537
+ }
1538
+ });
1539
+ }
1540
+ async initMsal() {
1541
+ await this.configMsal().then(() => {
1542
+ this._msalService.handleRedirectObservable().subscribe({
1543
+ next: (result) => {
1544
+ if (!this._msalService.instance.getActiveAccount() && this._msalService.instance.getAllAccounts().length > 0) {
1545
+ this._msalService.instance.setActiveAccount(result.account);
1546
+ }
1547
+ },
1548
+ error: (error) => {
1549
+ this._toastrService.warning(`Erro na inicialização dos parâmetros de configuração do 'Azure': ${error}`, '', { timeOut: 3000, extendedTimeOut: 2000 });
1550
+ }
1551
+ });
1552
+ });
1553
+ }
1554
+ async initMsalForLoginOk() {
1555
+ await this.configMsal().then(() => {
1556
+ this._msalService.handleRedirectObservable().subscribe({
1557
+ next: (result) => {
1558
+ if (!this._msalService.instance.getActiveAccount() && this._msalService.instance.getAllAccounts().length > 0) {
1559
+ this._msalService.instance.setActiveAccount(result.account);
1560
+ }
1561
+ this.logOnAzureOk();
1562
+ },
1563
+ error: (error) => {
1564
+ this.loginProgress = LoginProgress.Domain;
1565
+ this.createFormDomain();
1566
+ this._router.navigate(["/auth/login"]);
1567
+ this._toastrService.warning(`Erro na inicialização dos parâmetros de configuração do 'Azure': ${error}`, '', { timeOut: 3000, extendedTimeOut: 2000 });
1568
+ }
1569
+ });
1570
+ });
1571
+ }
1572
+ // #endregion Azure
965
1573
  // #region GET
966
1574
  // Obtém a Url do Config Erp
967
1575
  geturlErpConfig() {
@@ -969,77 +1577,164 @@ class LoginComponent {
969
1577
  return `${this._environmentService.hostName}/SisproErpCloud/ConfigErp`;
970
1578
  }
971
1579
  /*
972
- * Obtém os parâmetros de configuração do servidor para Autenticação Básica de segurança
1580
+ * Obtém os parâmetros de método de autenticação
973
1581
  */
974
- getServer() {
975
- if (this.form.valid) {
976
- this.isLoading = true;
977
- this._serverService.getServer().subscribe({
978
- next: response => {
979
- this.logOn();
1582
+ async getAuthentication() {
1583
+ if (this.formDomain.valid) {
1584
+ this.isLoadingDomain = true;
1585
+ this._authService.getAuthentication(this.dominio).subscribe({
1586
+ next: async (response) => {
1587
+ if (response.InfraInAuthTypeId == InfraInAuthTypeId.Local) {
1588
+ this.loginProgress = LoginProgress.Local;
1589
+ this.createFormLogin();
1590
+ }
1591
+ else if (response.InfraInAuthTypeId == InfraInAuthTypeId.Azure) {
1592
+ this.loginProgress = LoginProgress.Azure;
1593
+ this.createFormAzure();
1594
+ await this.initMsal();
1595
+ }
1596
+ else if (response.InfraInAuthTypeId == InfraInAuthTypeId.LDAP) {
1597
+ this.loginProgress = LoginProgress.Local;
1598
+ this.createFormLogin();
1599
+ }
1600
+ this.isLoadingDomain = false;
980
1601
  },
981
1602
  error: (error) => {
982
- this.isLoading = false;
983
- //this._projectUtilservice.showHttpError(error);
984
- this._messageService.showAlertDanger(error);
985
- //pode ser substituido por console.error
986
- throw new Error(error);
1603
+ this.isLoadingDomain = false;
1604
+ this._projectUtilservice.showHttpError(error);
987
1605
  },
988
1606
  });
989
1607
  }
990
1608
  else {
991
- FormUtils.validateFields(this.form);
1609
+ FormUtils.validateFields(this.formDomain);
992
1610
  }
993
1611
  }
994
1612
  // #endregion GET
995
1613
  // #region POST
996
1614
  // Executa o Login
997
1615
  logOn() {
998
- this._authService.login(this.form.value).subscribe({
999
- next: (response) => {
1000
- this.isLoading = false;
1001
- if (response.FeedbackMessage != "") {
1002
- this._toastrService.warning(response.FeedbackMessage, '', {
1003
- timeOut: 3000,
1004
- extendedTimeOut: 2000
1005
- });
1006
- return;
1007
- }
1008
- //Incialização de Senha
1009
- if (response.InitializePassword) {
1010
- let param = btoa(`true$${this.dominio}$${this.usuario}$${response.statusSenha}`);
1011
- this._router.navigate([`auth/login/novaSenha/${param}`]);
1012
- this._toastrService.success("Verifique no seu e-mail o código de validação.");
1013
- }
1014
- if (response.InfraInAuthTypeId == 1 && response.InfraIn2FaTypeId != null && response.InfraIn2FaTypeId == 1 && response.Is2FaEnabled) {
1015
- this.createFormAuthentication2Fa();
1016
- this._subscription = this.countdown$.subscribe(secondsLeft => {
1017
- this.secondsLeft = secondsLeft;
1018
- });
1019
- this.showParmsAuthentication2Fa = true;
1020
- this._toastrService.success("Verifique no seu e-mail o código de validação.");
1021
- }
1022
- },
1023
- error: (error) => {
1024
- this.isLoading = false;
1025
- //this._projectUtilservice.showHttpError(error);
1026
- this._messageService.showAlertDanger(error);
1027
- throw new Error(error);
1028
- },
1029
- });
1030
- }
1031
- // Envia requisição para esquecer senha
1616
+ if (this.formLogin.valid) {
1617
+ this.isLoadingLogin = true;
1618
+ this._authService.login(this.dominio, this.usuario, this.senha).subscribe({
1619
+ next: (response) => {
1620
+ this.isLoadingLogin = false;
1621
+ if (response.FeedbackMessage != "") {
1622
+ this._toastrService.warning(response.FeedbackMessage, '', { timeOut: 3000, extendedTimeOut: 2000 });
1623
+ return;
1624
+ }
1625
+ //Incialização de Senha
1626
+ if (response.InitializePassword) {
1627
+ let param = btoa(`true$${this.dominio}$${this.usuario}$${response.StatusSenha}`);
1628
+ this._router.navigate([`auth/login/novaSenha/${param}`]);
1629
+ this._toastrService.success("Verifique no seu e-mail o código de validação.");
1630
+ }
1631
+ if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Local && this._authStorageService.infraIn2FaTypeId != null && this._authStorageService.infraIn2FaTypeId == InfraIn2FaTypeId.Email && this._authStorageService.is2FaEnabled) {
1632
+ this.createFormAuthentication2Fa();
1633
+ this._subscription = this.countdown$.subscribe(secondsLeft => {
1634
+ this.secondsLeft = secondsLeft;
1635
+ });
1636
+ this.showParmsAuthentication2Fa = true;
1637
+ this._toastrService.success("Verifique no seu e-mail o código de validação.");
1638
+ }
1639
+ },
1640
+ error: (error) => {
1641
+ this.isLoadingLogin = false;
1642
+ this._projectUtilservice.showHttpError(error);
1643
+ },
1644
+ });
1645
+ }
1646
+ else {
1647
+ FormUtils.validateFields(this.formLogin);
1648
+ }
1649
+ }
1650
+ // Executa o Login (Admin)
1651
+ logOnAdmin() {
1652
+ if (this.formAzure.valid) {
1653
+ if (this.usuarioAzure.toUpperCase() != "ADMIN") {
1654
+ this._toastrService.warning("Esta opção é somente permitida para o usuário 'Admin'.", '', { timeOut: 3000, extendedTimeOut: 2000 });
1655
+ }
1656
+ else {
1657
+ const infraInAuthTypeId = this._authStorageService.infraInAuthTypeId;
1658
+ const infraIn2FaTypeId = this._authStorageService.infraIn2FaTypeId;
1659
+ const is2FaEnabled = this._authStorageService.is2FaEnabled;
1660
+ this._authStorageService.infraInAuthTypeId = InfraInAuthTypeId.Local;
1661
+ this._authStorageService.infraIn2FaTypeId = null;
1662
+ this._authStorageService.is2FaEnabled = false;
1663
+ this.isLoadingAzure = true;
1664
+ this._authService.login(this.dominio, this.usuarioAzure, this.senhaAzure).subscribe({
1665
+ next: (response) => {
1666
+ this.isLoadingAzure = false;
1667
+ if (response.FeedbackMessage != "") {
1668
+ this._toastrService.warning(response.FeedbackMessage, '', { timeOut: 3000, extendedTimeOut: 2000 });
1669
+ return;
1670
+ }
1671
+ //Incialização de Senha
1672
+ if (response.InitializePassword) {
1673
+ let param = btoa(`true$${this.dominio}$${this.usuarioAzure}$${response.StatusSenha}`);
1674
+ this._router.navigate([`auth/login/novaSenha/${param}`]);
1675
+ this._toastrService.success("Verifique no seu e-mail o código de validação.");
1676
+ }
1677
+ if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Local && this._authStorageService.infraIn2FaTypeId != null && this._authStorageService.infraIn2FaTypeId == InfraIn2FaTypeId.Email && this._authStorageService.is2FaEnabled) {
1678
+ this.createFormAuthentication2Fa();
1679
+ this._subscription = this.countdown$.subscribe(secondsLeft => {
1680
+ this.secondsLeft = secondsLeft;
1681
+ });
1682
+ this.showParmsAuthentication2Fa = true;
1683
+ this._toastrService.success("Verifique no seu e-mail o código de validação.");
1684
+ }
1685
+ },
1686
+ error: (error) => {
1687
+ this.isLoadingAzure = false;
1688
+ this._projectUtilservice.showHttpError(error);
1689
+ },
1690
+ });
1691
+ this._authStorageService.infraInAuthTypeId = infraInAuthTypeId;
1692
+ this._authStorageService.infraIn2FaTypeId = infraIn2FaTypeId;
1693
+ this._authStorageService.is2FaEnabled = is2FaEnabled;
1694
+ }
1695
+ }
1696
+ else {
1697
+ FormUtils.validateFields(this.formAzure);
1698
+ }
1699
+ }
1700
+ // Executa o Login (Azure)
1701
+ logOnAzure() {
1702
+ if (this._msalGuardConfiguration.authRequest) {
1703
+ this._msalService.loginRedirect({ ...this._msalGuardConfiguration.authRequest });
1704
+ }
1705
+ else {
1706
+ this._msalService.loginRedirect();
1707
+ }
1708
+ }
1709
+ // Executa o Login após o retorno ok do Azure
1710
+ async logOnAzureOk() {
1711
+ let username = this._msalService.instance.getActiveAccount()?.idTokenClaims?.preferred_username;
1712
+ this._authService.loginAzure(this._authStorageService.dominio, username ?? "").subscribe({
1713
+ next: (response) => {
1714
+ if (response.FeedbackMessage != "") {
1715
+ this._toastrService.warning(response.FeedbackMessage, '', { timeOut: 3000, extendedTimeOut: 2000 });
1716
+ }
1717
+ },
1718
+ error: (error) => {
1719
+ this.loginProgress = LoginProgress.Domain;
1720
+ this.createFormDomain();
1721
+ this._router.navigate(["/auth/login"]);
1722
+ this._projectUtilservice.showHttpError(error);
1723
+ },
1724
+ });
1725
+ }
1726
+ // Envia requisição para esquecer senha
1032
1727
  sendForgottenPassword() {
1033
1728
  if (this.formFgtPsw.valid) {
1034
- this._serverService.getServer().subscribe({
1729
+ this.isLoadingForgottenPassword = true;
1730
+ this._authService.getAuthentication(this.dominio).subscribe({
1035
1731
  next: response => {
1036
1732
  this.forgottenPassword();
1037
1733
  },
1038
1734
  error: (error) => {
1039
- //this._projectUtilservice.showHttpError(error);
1040
- this._messageService.showAlertDanger(error);
1041
- throw new Error(error);
1042
- },
1735
+ this.isLoadingForgottenPassword = false;
1736
+ this._projectUtilservice.showHttpError(error);
1737
+ }
1043
1738
  });
1044
1739
  }
1045
1740
  else {
@@ -1049,16 +1744,16 @@ class LoginComponent {
1049
1744
  // Requisição para esquecer senha
1050
1745
  forgottenPassword() {
1051
1746
  this._authService.forgottenPassword(this.formFgtPsw.value).subscribe({
1052
- next: (response) => {
1053
- this.closeForgottenPasswordModal();
1747
+ next: () => {
1748
+ this.isLoadingForgottenPassword = false;
1054
1749
  let param = btoa(`false$${this.dominioFgtPsw}$${this.usuarioFgtPsw}$${3}`);
1055
- this._router.navigate([`auth/login/novaSenha/${param}`]);
1056
- this._toastrService.success("Verifique no seu e-mail o código de validação.");
1750
+ this._router.navigate([`auth/login/novaSenha/${param}`]).then(() => {
1751
+ this._toastrService.success("Verifique no seu e-mail o código de validação.");
1752
+ });
1057
1753
  },
1058
1754
  error: (error) => {
1059
- //this._projectUtilservice.showHttpError(error);
1060
- this._messageService.showAlertDanger(error);
1061
- throw new Error(error);
1755
+ this.isLoadingForgottenPassword = false;
1756
+ this._projectUtilservice.showHttpError(error);
1062
1757
  },
1063
1758
  });
1064
1759
  }
@@ -1081,16 +1776,14 @@ class LoginComponent {
1081
1776
  },
1082
1777
  error: (error) => {
1083
1778
  this.isLoadingSendAuthentication2Fa = false;
1084
- //this._projectUtilservice.showHttpError(error);
1085
- this._messageService.showAlertDanger(error);
1086
- throw new Error(error);
1779
+ this._projectUtilservice.showHttpError(error);
1087
1780
  },
1088
1781
  });
1089
1782
  }
1090
1783
  // Envia requisição para validar código 2 fatores
1091
1784
  getNewCode() {
1092
1785
  this.isLoadingGetNewCode = true;
1093
- this._serverService.getServer().subscribe({
1786
+ this._authService.getAuthentication(this._authStorageService.dominio).subscribe({
1094
1787
  next: response => {
1095
1788
  this._subscription = this.countdown$.subscribe(secondsLeft => {
1096
1789
  this.secondsLeft = secondsLeft;
@@ -1098,9 +1791,7 @@ class LoginComponent {
1098
1791
  this.GetNewCode2Fa();
1099
1792
  },
1100
1793
  error: (error) => {
1101
- //this._projectUtilservice.showHttpError(error);
1102
- this._messageService.showAlertDanger(error);
1103
- throw new Error(error);
1794
+ this._projectUtilservice.showHttpError(error);
1104
1795
  },
1105
1796
  });
1106
1797
  }
@@ -1113,9 +1804,7 @@ class LoginComponent {
1113
1804
  },
1114
1805
  error: (error) => {
1115
1806
  this.isLoadingGetNewCode = false;
1116
- //this._projectUtilservice.showHttpError(error);
1117
- this._messageService.showAlertDanger(error);
1118
- throw new Error(error);
1807
+ this._projectUtilservice.showHttpError(error);
1119
1808
  },
1120
1809
  });
1121
1810
  }
@@ -1123,428 +1812,274 @@ class LoginComponent {
1123
1812
  // #region UTILIDADES
1124
1813
  // Retorno para a tela de login
1125
1814
  voltar() {
1815
+ this.loginProgress = LoginProgress.Domain;
1816
+ this.createFormDomain();
1126
1817
  this._subscription.unsubscribe();
1127
1818
  this.showParmsAuthentication2Fa = false;
1128
1819
  this._authStorageService.logout();
1129
1820
  this._router.navigate(["/auth/login"]);
1130
1821
  }
1131
- // #endregion UTILIDADES
1132
- // #endregion ==========> SERVICE METHODS <==========
1133
- // #region ==========> MODALS <==========
1134
- // Executa esquecer senha
1135
- openForgottenPasswordModal(template) {
1136
- this.createFormForgottenPassword();
1137
- this.modalRef = this._bsModalService.show(template, {
1138
- class: 'modal-dialog-centered',
1139
- ignoreBackdropClick: false,
1140
- keyboard: false,
1141
- id: this.idFgtPsw
1142
- });
1822
+ // Retorno para a tela de login
1823
+ returnDomain() {
1824
+ this.loginProgress = LoginProgress.Domain;
1825
+ this.createFormDomain();
1826
+ this._authStorageService.logout();
1827
+ this._router.navigate(["/auth/login"]);
1143
1828
  }
1144
- // Encerra esquecer senha
1145
- closeForgottenPasswordModal() {
1146
- this._bsModalService.hide(this.idFgtPsw);
1829
+ showIntegracaoAlert() {
1830
+ const warningMessage = this._authService.consumePendingWarning();
1831
+ if (warningMessage) {
1832
+ this._messageService.showAlertWarning(warningMessage);
1833
+ }
1147
1834
  }
1148
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginComponent, deps: [{ token: i1$2.BsModalService }, { token: i5.MessageService }, { token: i3.FormBuilder }, { token: AuthService }, { token: ServerService }, { token: EnvironmentService }, { token: AuthStorageService }, { token: LibCustomLoginService }, { token: i9.Title }, { token: i1$1.Router }, { token: i11.ToastrService }], target: i0.ɵɵFactoryTarget.Component }); }
1149
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: LoginComponent, isStandalone: false, selector: "lib-login", ngImport: i0, template: "<div class=\"container-fluid\">\n\t<div class=\"row\">\n\t\t<!-- Conte\u00FAdo da DIV do background -->\n\t\t<div class=\"col-md-7\">\n\t\t\t<div class=\"background\" style=\"background-image: linear-gradient(to bottom, rgba(10, 44, 81, 0.9), rgba(10, 44, 81, 0.9)), url({{_customLoginService.loginBackground}})\">\n\t\t\t\t<div class=\"text-position texto-apresentacao ps-5\">\n\t\t\t\t\t<h1 class=\"title\" id=\"title\"></h1>\n\t\t\t\t\t<p class=\"subtitle\" id=\"subtitle\"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- Conte\u00FAdo da DIV de Login -->\n\t\t<div class=\"col-md-5\">\n\n\t\t\t<div class=\"div-size\">\n\t\t\t\t<div class=\"logotipo\">\n\t\t\t\t\t<img style=\"height: 95px;\" src=\"{{ _customLoginService.loginLogotipo }}\" alt=\"{{ _customLoginService.loginAltLogotipo }}\" />\n\t\t\t\t</div>\n\t\t\t\t<form *ngIf=\"!showParmsAuthentication2Fa; else Authentication2Fa\" [formGroup]=\"form\" class=\"form-position\">\n\t\t\t\t\t<div class=\"input-group input-group-lg form-item\">\n\t\t\t\t\t\t<span class=\"input-group-text\" id=\"basic-addon1\"\n\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px\">\n\t\t\t\t\t\t\t<img src=\"assets/icons/cloud.svg\" alt=\"cloud icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"dominio\" id=\"dominio\"\n\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"Dom\u00EDnio\" aria-label=\"Dom\u00EDnio\"\n\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('dominio'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('dominio')\" label=\"Dom\u00EDnio\"></app-field-error-message>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"input-group input-group-lg form-item\">\n\t\t\t\t\t\t<span class=\"input-group-text\" id=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px\">\n\t\t\t\t\t\t\t<img src=\"assets/icons/at-sign.svg\" alt=\"at-sign icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"usuario\" id=\"usuario\"\n\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"Usu\u00E1rio\" aria-label=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('usuario'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('usuario')\" label=\"Usu\u00E1rio\"></app-field-error-message>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"input-group input-group-lg form-item\" style=\"margin-bottom: 8px;\">\n\t\t\t\t\t\t<span class=\"input-group-text\" id=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px;\">\n\t\t\t\t\t\t\t<img src=\"assets/icons/lock.svg\" alt=\"lock-icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<input type=\"password\" class=\"form-control\" formControlName=\"senha\" id=\"senha\"\n\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"Senha\" aria-label=\"senha\"\n\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('senha'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('senha')\" label=\"Senha\"></app-field-error-message>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"remember-password\">\n\t\t\t\t\t<!-- Lembrar Senha\n\t\t\t\t\t\t<input id=\"checkboxLembrarSenha\" type=\"checkbox\" />\n\t\t\t\t\t\t<label for=\"checkboxLembrarSenha\"> Lembrar minha senha </label>\n \t\t\t\t\t-->\n\t\t\t\t\t</div>\n\t\t\t\t\t<button [disabled]=\"isLoading\" (click)=\"getServer()\" type=\"submit\"\n\t\t\t\t\t\tclass=\"btn btn-primary btn-acessar btn-lg\">\n\t\t\t\t\t\t<app-loading-button [isLoading]=\"isLoading\"></app-loading-button>\n\t\t\t\t\t\t<span> Acessar </span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type=\"button\" (click)=\"openForgottenPasswordModal(forgottenPasswordModal)\" class=\"forgotten-password\">\n\t\t\t\t\t\t<span> Esqueceu sua senha? </span>\n\t\t\t\t\t</button>\n\t\t\t\t</form>\n\n\t\t\t\t<ng-template #Authentication2Fa>\n\t\t\t\t\t<form [formGroup]=\"formAuthentication2Fa\" class=\"form-position\">\n\t\t\t\t\t\t<div class=\"input-group input-group-lg form-item mb-3\">\n\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px;\">\n\t\t\t\t\t\t\t\t<img src=\"assets/icons/lock.svg\" alt=\"lock-icon\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"code\" id=\"code\"\n\t\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"C\u00F3digo de 2 fatores\" aria-label=\"C\u00F3digo de 2 fatores\"\n\t\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAuthentication2Fa.get('code'))\">\n\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAuthentication2Fa.get('code')\" label=\"C\u00F3digo de 2 fatores\"></app-field-error-message>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<button (click)=\"voltar()\" type=\"button\" class=\"btn btn-acessar glb-btn-outline-dark-disabled col me-1\">\n\t\t\t\t\t\t\t\tVoltar\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<button [disabled]=\"isLoadingSendAuthentication2Fa\" (click)=\"sendCode()\" type=\"button\" class=\"btn btn-acessar btn-primary col ms-1\">\n\t\t\t\t\t\t\t\t<app-loading-button [isLoading]=\"isLoadingSendAuthentication2Fa\"></app-loading-button>\n\t\t\t\t\t\t\t\tAcessar\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<button *ngIf=\"secondsLeft == 0; else newCode\" \n\t\t\t\t\t\t\t\t[disabled]=\"isLoading\" (click)=\"getNewCode()\" type=\"button\" class=\"btn btn-acessar btn-outline-primary col\">\n\t\t\t\t\t\t\t\t<app-loading-button [isLoading]=\"isLoading\"></app-loading-button>\n\t\t\t\t\t\t\t\tEnviar novo c\u00F3digo\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<ng-template #newCode>\n\t\t\t\t\t\t\t\t<p class=\"text-center\">{{ secondsLeft}} {{ secondsLeft == 1 ? 'segundo' : 'segundos' }} para obter novo c\u00F3digo</p>\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\t\n\t\t\t\t</ng-template>\n\t\t\t\t\n\t\t\t\t<div class=\"footer-position\">\n\t\t\t\t\t<footer>\n\t\t\t\t\t\t<span class=\"footer\"> \n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/JmGeNlJdw/1/poli%CC%81tica-de-privacidade/pt_BR?s=1685731510066\" target=\"_blank\" class=\"sispro text-primary\"> Pol\u00EDtica de Privacidade </a>\n\t\t\t\t\t\t\t<p class=\"separator\"> | </p>\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/Rork35NN2/2/poli%CC%81tica-de-cookies/pt_BR?s=1685731551976\" target=\"_blank\" class=\"sispro text-primary\"> Pol\u00EDtica de Cookies </a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"footer\"> Desenvolvido por \n\t\t\t\t\t\t\t<a href=\"https://www.sispro.com.br/\" target=\"_blank\" class=\"sispro text-primary\"> SISPRO </a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"footer\"> Servi\u00E7os e Tecnologia da Informa\u00E7\u00E3o LTDA \u00A9 {{ year }} Todos os direitos reservados </span>\n\t\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t\t<a href=\"https://pt-br.facebook.com/SisproERP/\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<lib-icon class=\"text-primary\" iconName=\"facebook\" iconSize=\"medium-small\"/>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<a href=\"https://www.instagram.com/accounts/login/?next=/sispro_software/\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<lib-icon class=\"text-primary\" iconName=\"instagram\" iconSize=\"medium-small\"/>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<a href=\"https://br.linkedin.com/company/sispro\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<lib-icon class=\"text-primary\" iconName=\"linkedin\" iconSize=\"medium-small\"/>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex justify-content-center\">\n\t\t\t\t\t\t\t\t<a [href]=\"geturlErpConfig()\" style=\"text-decoration: none; font-size: 12px;\">\n\t\t\t\t\t\t\t\t\tConfigurar ERP\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t</footer>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n<!-- Template do modal de senha esquecida -->\n<ng-template #forgottenPasswordModal>\n\t<form [formGroup]=\"formFgtPsw\">\n\t\t<div class=\"modal-content\" style=\"box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.5);\">\n\t\t\t<div class=\"modal-header p-3\">\n\t\t\t\t<h4 class=\"modal-title\"> Recupera\u00E7\u00E3o de senha </h4>\n\t\t\t\t<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\n\t\t\t\t\t(click)=\"closeForgottenPasswordModal()\">\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<label for=\"inputDominioFgtPsw\" class=\"input-label\"> Dom\u00EDnio <span class=\"text-danger\">*</span></label>\n\t\t\t\t<input type=\"text\" id=\"inputDominioFgtPsw\" formControlName=\"dominioFgtPsw\"\n\t\t\t\t\tclass=\"form-control input-text\" aria-label=\"Sizing example input\" aria-label=\"Dom\u00EDnio\"\n\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('dominioFgtPsw'))\">\n\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('dominioFgtPsw')\" label=\"Dom\u00EDnio\"></app-field-error-message>\t\t\t\t\n\n\t\t\t\t<label for=\"inputUsuarioFgtPsw\" class=\"input-label\"> Usu\u00E1rio <span class=\"text-danger\">*</span></label>\n\t\t\t\t<input type=\"text\" id=\"inputUsuarioFgtPsw\" formControlName=\"usuarioFgtPsw\"\n\t\t\t\t\tclass=\"form-control input-text\" aria-label=\"Sizing example input\" aria-label=\"Usu\u00E1rio\"\n\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('usuarioFgtPsw'))\">\n\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('usuarioFgtPsw')\" label=\"Usu\u00E1rio\"></app-field-error-message>\t\t\t\t\n\t\t\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<button type=\"button\" class=\"btn glb-btn-dark-disabled modal-button\" (click)=\"closeForgottenPasswordModal()\">\n\t\t\t\t\t<span> Cancelar </span>\n\t\t\t\t</button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-primary modal-button\" (click)=\"sendForgottenPassword();\">\n\t\t\t\t\t<span> Continuar </span>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t</div>\n\t</form>\n</ng-template>\n", styles: ["@charset \"UTF-8\";*{padding:0;margin:0;font-family:Open Sans,sans-serif}.background{display:grid;height:100vh;align-content:center;background-size:cover;color:#f5f5f5;align-items:center;justify-content:center}.div-size{display:flex;flex-direction:column;justify-content:space-around;width:100%;height:100vh;align-items:center;background-color:#f5f5f5;box-shadow:0 0 15px #333}.title{font-size:3.5vw;text-transform:uppercase;font-weight:700}.subtitle{font-size:21px}.logotipo{display:flex;justify-content:center;margin-top:10%}.form-position{display:flex;flex-direction:column;align-content:center;width:378px}.form-item{margin-bottom:16px}.input-group-text{padding:10px 11px;border-radius:4px 0 0 4px}.remember-password{display:flex;align-items:center;margin-bottom:8px;justify-content:center}.remember-password label{margin-left:8px}.forgotten-password{background-color:#f5f5f5;border:none;text-decoration:underline;font-size:14px;box-shadow:none;margin-top:8px;cursor:pointer}.forgotten-password:focus{outline-style:none}.input-label{font-size:16px;padding:10px 0 8px 16px}.input-label:first-child{font-size:16px;padding-top:16px}.input-text{width:343px;height:38px;margin:0 0 10px 16px;padding:0 8px}.input-text:last-child{font-size:16px;margin-bottom:24px}.form-control{max-width:341px}.footer{display:flex;justify-content:center}.footer-position{font-size:14px;display:flex;justify-content:center;align-items:flex-end}.icons{display:flex;justify-content:center;align-items:center;margin-top:16px}.icons a{padding:4px}.icon-item{margin-left:24px;color:#007bff}.sispro{color:#2847a0;margin-left:5px;text-transform:uppercase;text-decoration:none;font-weight:700}.modal-footer{padding:0}.modal:before{content:\"\";display:inline-block;height:100%;vertical-align:middle}.modal-style{display:flex;align-items:center;justify-content:center}.modal-style h4{font-size:20px;font-weight:700;padding:10px}.modal-button{margin:16px 0;padding:7px 12px}.modal-button:last-child{margin-right:16px;margin-left:8px}.modal-close{display:flex;align-content:center;margin-right:10px;padding:6px}.col-md-7,.col-md-5{padding:0}.btn-acessar{height:48px;outline-style:none}.texto-apresentacao{align-items:start}.separator{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.FieldErrorMessageComponent, selector: "app-field-error-message, lib-error-message", inputs: ["customMessage", "control", "label"] }, { kind: "component", type: i5.LoadingButtonComponent, selector: "app-loading-button, lib-loading-button", inputs: ["isLoading"] }, { kind: "component", type: i5.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }], preserveWhitespaces: true }); }
1835
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginComponent, deps: [{ token: MSAL_GUARD_CONFIG }, { token: i1$2.MsalService }, { token: LibCustomLoginService }, { token: i3$1.FormBuilder }, { token: ProjectUtilservice }, { token: AuthService }, { token: EnvironmentService }, { token: AuthStorageService }, { token: i8.Title }, { token: i1$1.Router }, { token: i10.ToastrService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
1836
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: LoginComponent, isStandalone: true, selector: "app-login", ngImport: i0, template: "<div id=\"login\" class=\"container-fluid\">\n\t<div class=\"row\">\n\t\t<!-- Conte\u00FAdo da DIV do background -->\n\t\t<div class=\"col-md-6 px-0\">\n\t\t\t<div class=\"background\" style=\"background-image: linear-gradient(to bottom, rgba(10, 44, 81, 0.9), rgba(10, 44, 81, 0.9)), url({{_customLoginService.loginBackground}})\">\n\t\t\t\t<div class=\"text-position texto-apresentacao ps-5\">\n\t\t\t\t\t<h1 class=\"title\" id=\"title\"></h1>\n\t\t\t\t\t<p class=\"subtitle\" id=\"subtitle\"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- Conte\u00FAdo da DIV de Login -->\n\t\t<div class=\"col-md-6 px-0\">\n\n\t\t\t<div class=\"div-size\">\n\t\t\t\t<div class=\"logotipo\">\n\t\t\t\t\t<img style=\"height: 95px;\" src=\"{{ this._customLoginService.loginLogotipo }}\" alt=\"{{ this._customLoginService.loginAltLogotipo }}\" />\n\t\t\t\t</div>\n\n\t\t\t\t@if (situacaoLogin !== 2) {\n\t\t\t\t\t@if (!showParmsAuthentication2Fa) {\n\t\t\t\t\t\t@switch (loginProgress) {\n\t\t\t\t\t\t\t@case(1) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formDomain\" class=\"form-position\">\n\t\t\t\t\t\t\t\t\t<div class=\"col mb-3\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"predio\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" placeholder=\"Dom\u00EDnio\" formControlName=\"dominio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formDomain.get('dominio'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formDomain.get('dominio')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingDomain\" loadingText=\"Acessando...\" class=\"btn btn-primary\" [disabled]=\"isLoadingDomain\" (click)=\"getAuthentication()\">\n\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t@case(2) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formLogin\" class=\"form-position\">\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control px-3\" formControlName=\"usuario\" placeholder=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formLogin.get('usuario'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formLogin.get('usuario')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-lock-text\"><lib-icon iconName=\"chave\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control px-3\" formControlName=\"senha\" placeholder=\"Senha\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formLogin.get('senha'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formLogin.get('senha')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button (click)=\"returnDomain()\" type=\"button\" class=\"btn btn-outline-secondary w-100\">\n\t\t\t\t\t\t\t\t\t\t\t\tVoltar\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingLogin\" loadingText=\"Acessando...\" class=\"btn btn-primary btn-heigth-48 w-100\" [disabled]=\"isLoadingLogin\" (click)=\"logOn()\">\n\t\t\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t\t\t\t\t<a type=\"button\" (click)=\"situacaoLogin = 2\" class=\"fw-bold text-decoration-none text-secondary\"\n\t\t\t\t\t\t\t\t\t\t\ttooltip=\"N\u00E3o se preocupe, clique aqui e informe o dom\u00EDnio e o usu\u00E1rio desejados que enviaremos um e-mail com maiores informa\u00E7\u00F5es.\">\n\t\t\t\t\t\t\t\t\t\t\tEsqueceu sua senha? </a>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t@case(3) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formAzure\" class=\"form-position formAzure\">\n\t\t\t\t\t\t\t\t\t<div class=\"w-100 mb-3\">\n\t\t\t\t\t\t\t\t\t\t<button type=\"button\" loadingText=\"Acessando...\" class=\"btn btn-primary p-2 mb-3 w-100 d-flex align-items-center justify-content-center gap-2\" (click)=\"logOnAzure()\">\n\t\t\t\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" heigth=\"14\" width=\"14\" viewBox=\"0 0 23 23\"><path fill=\"transparent\" d=\"M0 0h23v23H0z\"/><path fill=\"#f35325\" d=\"M1 1h10v10H1z\"/><path fill=\"#81bc06\" d=\"M12 1h10v10H12z\"/><path fill=\"#05a6f0\" d=\"M1 12h10v10H1z\"/><path fill=\"#ffba08\" d=\"M12 12h10v10H12z\"/></svg>\n\t\t\t\t\t\t\t\t\t\t\tMicrosoft\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t<div class=\"w-100 text-center text-secondary\">\n\t\t\t\t\t\t\t\t\t\t\t<span id=\"ou-text\"> ou </span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control px-3\" formControlName=\"usuario\" placeholder=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAzure.get('usuario'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAzure.get('usuario')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-lock-text\"><lib-icon iconName=\"chave\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control px-3\" formControlName=\"senha\" placeholder=\"Senha\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAzure.get('senha'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAzure.get('senha')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button (click)=\"returnDomain()\" type=\"button\" class=\"btn btn-outline-secondary w-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<lib-icon iconName=\"seta-esquerda\" /> VOLTAR\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingAzure\" loadingText=\"Acessando...\" class=\"btn btn-primary btn-heigth-48 w-100\" [disabled]=\"isLoadingAzure\" (click)=\"logOnAdmin()\">\n\t\t\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@else {\n\t\t\t\t\t\t<form [formGroup]=\"formAuthentication2Fa\" class=\"form-position\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><img src=\"assets/icons/lock.svg\" alt=\"lock-icon\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"code\" id=\"code\" placeholder=\"C\u00F3digo de 2 fatores\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAuthentication2Fa.get('code'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAuthentication2Fa.get('code')\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center gap-3 mb-3\">\n\t\t\t\t\t\t\t\t<button (click)=\"voltar()\" type=\"button\" class=\"btn btn-outline-secondary col\"> <lib-icon iconName=\"seta-esquerda\" /> VOLTAR </button>\n\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingSendAuthentication2Fa\" [disabled]=\"isLoadingSendAuthentication2Fa\" (click)=\"sendCode()\" type=\"button\" class=\"btn btn-primary col\">\n\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center justify-content-center\">\n\t\t\t\t\t\t\t\t@if (secondsLeft === 0) {\n\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingForgottenPassword\" loadingText=\"Enviando...\" [disabled]=\"isLoadingForgottenPassword\" (click)=\"getNewCode()\" type=\"button\" class=\"btn btn-outline-primary col\">\n\t\t\t\t\t\t\t\t\t\tEnviar novo c\u00F3digo <lib-icon iconName=\"aviao-papel\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t<span class=\"fw-bold text-secondary\">{{ secondsLeft }} {{ secondsLeft == 1 ? 'segundo' : 'segundos' }} para obter novo c\u00F3digo</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</form>\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@else {\n\t\t\t\t\t<form [formGroup]=\"formFgtPsw\" class=\"form-position\">\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"predio\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"dominioFgtPssInput\" placeholder=\"Dom\u00EDnio\" formControlName=\"dominioFgtPsw\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('dominioFgtPsw'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('dominioFgtPsw')\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"usuarioFgtPssInput\" placeholder=\"Usu\u00E1rio\" formControlName=\"usuarioFgtPsw\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('usuarioFgtPsw'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('usuarioFgtPsw')\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\t\t@if(formFgtPsw.get('usuarioFgtPsw')?.value === 'admin' || formFgtPsw.get('usuarioFgtPsw')?.value === 'CRMadmin'){\n <p class=\"texto-admin\">N\u00E3o \u00E9 poss\u00EDvel alterar a senha do usu\u00E1rio 'admin'</p>\n }@else{\n <button [libLoading]=\"isLoadingForgottenPassword\" loadingText=\"Enviando...\" class=\"btn btn-primary btn-heigth-48\" [disabled]=\"isLoadingForgottenPassword\" (click)=\"sendForgottenPassword()\">\n Enviar e-mail <lib-icon iconName=\"aviao-papel\" />\n </button>\n }\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t\t<a type=\"button\" (click)=\"situacaoLogin = 0\" class=\"fw-bold text-decoration-none text-secondary\" tooltip=\"Retornar para o login.\"> <lib-icon iconName=\"seta-esquerda\" /> Voltar para o login </a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t<div class=\"footer-position\">\n\t\t\t\t\t<footer>\n\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center justify-content-center gap-2\">\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/JmGeNlJdw/1/poli%CC%81tica-de-privacidade/pt_BR?s=1685731510066\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> POL\u00CDTICA DE PRIVACIDADE </a>\n\t\t\t\t\t\t\t<span> | </span>\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/Rork35NN2/2/poli%CC%81tica-de-cookies/pt_BR?s=1685731551976\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> POL\u00CDTICA DE COOKIES </a>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p class=\"text-secondary\">\n\t\t\t\t\t\t\tDesenvolvido por <a href=\"https://www.sispro.com.br/\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> SISPRO </a> \u00A9 {{ year }} Todos os direitos reservados\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t<a href=\"https://pt-br.facebook.com/SisproERP/\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"facebook\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t\t<a href=\"https://www.instagram.com/accounts/login/?next=/sispro_software/\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"instagram\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t\t<a href=\"https://br.linkedin.com/company/sispro\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"linkedin\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"text-center\">\n\t\t\t\t\t\t\t<a class=\"text-primary fw-bold text-decoration-none glb-font-size-12\" [href]=\"geturlErpConfig()\"> Configurar ERP </a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</footer>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n", styles: ["@charset \"UTF-8\";#login .background{display:grid;height:100vh;align-content:center;background-size:cover;color:#f5f5f5;align-items:center;justify-content:center}#login .div-size{display:flex;flex-direction:column;justify-content:space-around;width:100%;height:100vh;align-items:center;background-color:#f5f5f5;box-shadow:0 0 15px #333}#login .title{font-size:3.5vw;text-transform:uppercase;font-weight:700}#login .subtitle{font-size:21px}#login .logotipo{display:flex;justify-content:center;margin-top:10%}#login .form-position{display:flex;flex-direction:column;align-content:center;width:378px}#login .form-item{margin-bottom:16px}#login .footer{display:flex;justify-content:center}#login .footer-position{font-size:14px;display:flex;justify-content:center;align-items:flex-end}#login .icons{display:flex;justify-content:center;align-items:center;margin-top:16px}#login .icons a{padding:4px}#login .icon-item{margin-left:24px;color:#007bff}#login .col-md-7,#login .col-md-5{padding:0}#login .btn-acessar{height:48px;outline-style:none}#login .texto-apresentacao{align-items:start}#login .separator{margin-left:5px}#login #ou-text{display:flex;flex-direction:row;align-items:center;justify-content:space-between}#login #ou-text:before{content:\"\";display:block;width:100%;height:1px;border-bottom:1px solid rgb(108,117,125);margin-right:12px}#login #ou-text:after{content:\"\";display:block;width:100%;height:1px;border-bottom:1px solid rgb(108,117,125);margin-left:12px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.FieldErrorMessageComponent, selector: "app-field-error-message, lib-error-message", inputs: ["customMessage", "control", "label"] }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "directive", type: i3.LoadingBtnDirective, selector: "button[libLoading], a[libLoading]", inputs: ["loadingText", "loadingType", "libLoading"] }, { kind: "ngmodule", type: CommonModule }], preserveWhitespaces: true }); }
1150
1837
  }
1151
1838
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginComponent, decorators: [{
1152
1839
  type: Component,
1153
- args: [{ selector: 'lib-login', standalone: false, preserveWhitespaces: true, template: "<div class=\"container-fluid\">\n\t<div class=\"row\">\n\t\t<!-- Conte\u00FAdo da DIV do background -->\n\t\t<div class=\"col-md-7\">\n\t\t\t<div class=\"background\" style=\"background-image: linear-gradient(to bottom, rgba(10, 44, 81, 0.9), rgba(10, 44, 81, 0.9)), url({{_customLoginService.loginBackground}})\">\n\t\t\t\t<div class=\"text-position texto-apresentacao ps-5\">\n\t\t\t\t\t<h1 class=\"title\" id=\"title\"></h1>\n\t\t\t\t\t<p class=\"subtitle\" id=\"subtitle\"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- Conte\u00FAdo da DIV de Login -->\n\t\t<div class=\"col-md-5\">\n\n\t\t\t<div class=\"div-size\">\n\t\t\t\t<div class=\"logotipo\">\n\t\t\t\t\t<img style=\"height: 95px;\" src=\"{{ _customLoginService.loginLogotipo }}\" alt=\"{{ _customLoginService.loginAltLogotipo }}\" />\n\t\t\t\t</div>\n\t\t\t\t<form *ngIf=\"!showParmsAuthentication2Fa; else Authentication2Fa\" [formGroup]=\"form\" class=\"form-position\">\n\t\t\t\t\t<div class=\"input-group input-group-lg form-item\">\n\t\t\t\t\t\t<span class=\"input-group-text\" id=\"basic-addon1\"\n\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px\">\n\t\t\t\t\t\t\t<img src=\"assets/icons/cloud.svg\" alt=\"cloud icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"dominio\" id=\"dominio\"\n\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"Dom\u00EDnio\" aria-label=\"Dom\u00EDnio\"\n\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('dominio'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('dominio')\" label=\"Dom\u00EDnio\"></app-field-error-message>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"input-group input-group-lg form-item\">\n\t\t\t\t\t\t<span class=\"input-group-text\" id=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px\">\n\t\t\t\t\t\t\t<img src=\"assets/icons/at-sign.svg\" alt=\"at-sign icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"usuario\" id=\"usuario\"\n\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"Usu\u00E1rio\" aria-label=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('usuario'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('usuario')\" label=\"Usu\u00E1rio\"></app-field-error-message>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"input-group input-group-lg form-item\" style=\"margin-bottom: 8px;\">\n\t\t\t\t\t\t<span class=\"input-group-text\" id=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px;\">\n\t\t\t\t\t\t\t<img src=\"assets/icons/lock.svg\" alt=\"lock-icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<input type=\"password\" class=\"form-control\" formControlName=\"senha\" id=\"senha\"\n\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"Senha\" aria-label=\"senha\"\n\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('senha'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('senha')\" label=\"Senha\"></app-field-error-message>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"remember-password\">\n\t\t\t\t\t<!-- Lembrar Senha\n\t\t\t\t\t\t<input id=\"checkboxLembrarSenha\" type=\"checkbox\" />\n\t\t\t\t\t\t<label for=\"checkboxLembrarSenha\"> Lembrar minha senha </label>\n \t\t\t\t\t-->\n\t\t\t\t\t</div>\n\t\t\t\t\t<button [disabled]=\"isLoading\" (click)=\"getServer()\" type=\"submit\"\n\t\t\t\t\t\tclass=\"btn btn-primary btn-acessar btn-lg\">\n\t\t\t\t\t\t<app-loading-button [isLoading]=\"isLoading\"></app-loading-button>\n\t\t\t\t\t\t<span> Acessar </span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type=\"button\" (click)=\"openForgottenPasswordModal(forgottenPasswordModal)\" class=\"forgotten-password\">\n\t\t\t\t\t\t<span> Esqueceu sua senha? </span>\n\t\t\t\t\t</button>\n\t\t\t\t</form>\n\n\t\t\t\t<ng-template #Authentication2Fa>\n\t\t\t\t\t<form [formGroup]=\"formAuthentication2Fa\" class=\"form-position\">\n\t\t\t\t\t\t<div class=\"input-group input-group-lg form-item mb-3\">\n\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t\tstyle=\"padding: 10px; border-radius: 4px 0px 0px 4px;\">\n\t\t\t\t\t\t\t\t<img src=\"assets/icons/lock.svg\" alt=\"lock-icon\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"code\" id=\"code\"\n\t\t\t\t\t\t\t\taria-label=\"Sizing example input\" placeholder=\"C\u00F3digo de 2 fatores\" aria-label=\"C\u00F3digo de 2 fatores\"\n\t\t\t\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAuthentication2Fa.get('code'))\">\n\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAuthentication2Fa.get('code')\" label=\"C\u00F3digo de 2 fatores\"></app-field-error-message>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<button (click)=\"voltar()\" type=\"button\" class=\"btn btn-acessar glb-btn-outline-dark-disabled col me-1\">\n\t\t\t\t\t\t\t\tVoltar\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<button [disabled]=\"isLoadingSendAuthentication2Fa\" (click)=\"sendCode()\" type=\"button\" class=\"btn btn-acessar btn-primary col ms-1\">\n\t\t\t\t\t\t\t\t<app-loading-button [isLoading]=\"isLoadingSendAuthentication2Fa\"></app-loading-button>\n\t\t\t\t\t\t\t\tAcessar\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<button *ngIf=\"secondsLeft == 0; else newCode\" \n\t\t\t\t\t\t\t\t[disabled]=\"isLoading\" (click)=\"getNewCode()\" type=\"button\" class=\"btn btn-acessar btn-outline-primary col\">\n\t\t\t\t\t\t\t\t<app-loading-button [isLoading]=\"isLoading\"></app-loading-button>\n\t\t\t\t\t\t\t\tEnviar novo c\u00F3digo\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<ng-template #newCode>\n\t\t\t\t\t\t\t\t<p class=\"text-center\">{{ secondsLeft}} {{ secondsLeft == 1 ? 'segundo' : 'segundos' }} para obter novo c\u00F3digo</p>\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\t\n\t\t\t\t</ng-template>\n\t\t\t\t\n\t\t\t\t<div class=\"footer-position\">\n\t\t\t\t\t<footer>\n\t\t\t\t\t\t<span class=\"footer\"> \n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/JmGeNlJdw/1/poli%CC%81tica-de-privacidade/pt_BR?s=1685731510066\" target=\"_blank\" class=\"sispro text-primary\"> Pol\u00EDtica de Privacidade </a>\n\t\t\t\t\t\t\t<p class=\"separator\"> | </p>\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/Rork35NN2/2/poli%CC%81tica-de-cookies/pt_BR?s=1685731551976\" target=\"_blank\" class=\"sispro text-primary\"> Pol\u00EDtica de Cookies </a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"footer\"> Desenvolvido por \n\t\t\t\t\t\t\t<a href=\"https://www.sispro.com.br/\" target=\"_blank\" class=\"sispro text-primary\"> SISPRO </a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"footer\"> Servi\u00E7os e Tecnologia da Informa\u00E7\u00E3o LTDA \u00A9 {{ year }} Todos os direitos reservados </span>\n\t\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t\t<a href=\"https://pt-br.facebook.com/SisproERP/\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<lib-icon class=\"text-primary\" iconName=\"facebook\" iconSize=\"medium-small\"/>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<a href=\"https://www.instagram.com/accounts/login/?next=/sispro_software/\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<lib-icon class=\"text-primary\" iconName=\"instagram\" iconSize=\"medium-small\"/>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<a href=\"https://br.linkedin.com/company/sispro\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<lib-icon class=\"text-primary\" iconName=\"linkedin\" iconSize=\"medium-small\"/>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex justify-content-center\">\n\t\t\t\t\t\t\t\t<a [href]=\"geturlErpConfig()\" style=\"text-decoration: none; font-size: 12px;\">\n\t\t\t\t\t\t\t\t\tConfigurar ERP\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t</footer>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n<!-- Template do modal de senha esquecida -->\n<ng-template #forgottenPasswordModal>\n\t<form [formGroup]=\"formFgtPsw\">\n\t\t<div class=\"modal-content\" style=\"box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.5);\">\n\t\t\t<div class=\"modal-header p-3\">\n\t\t\t\t<h4 class=\"modal-title\"> Recupera\u00E7\u00E3o de senha </h4>\n\t\t\t\t<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\n\t\t\t\t\t(click)=\"closeForgottenPasswordModal()\">\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<label for=\"inputDominioFgtPsw\" class=\"input-label\"> Dom\u00EDnio <span class=\"text-danger\">*</span></label>\n\t\t\t\t<input type=\"text\" id=\"inputDominioFgtPsw\" formControlName=\"dominioFgtPsw\"\n\t\t\t\t\tclass=\"form-control input-text\" aria-label=\"Sizing example input\" aria-label=\"Dom\u00EDnio\"\n\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('dominioFgtPsw'))\">\n\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('dominioFgtPsw')\" label=\"Dom\u00EDnio\"></app-field-error-message>\t\t\t\t\n\n\t\t\t\t<label for=\"inputUsuarioFgtPsw\" class=\"input-label\"> Usu\u00E1rio <span class=\"text-danger\">*</span></label>\n\t\t\t\t<input type=\"text\" id=\"inputUsuarioFgtPsw\" formControlName=\"usuarioFgtPsw\"\n\t\t\t\t\tclass=\"form-control input-text\" aria-label=\"Sizing example input\" aria-label=\"Usu\u00E1rio\"\n\t\t\t\t\taria-describedby=\"inputGroup-sizing-lg\"\n\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('usuarioFgtPsw'))\">\n\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('usuarioFgtPsw')\" label=\"Usu\u00E1rio\"></app-field-error-message>\t\t\t\t\n\t\t\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<button type=\"button\" class=\"btn glb-btn-dark-disabled modal-button\" (click)=\"closeForgottenPasswordModal()\">\n\t\t\t\t\t<span> Cancelar </span>\n\t\t\t\t</button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-primary modal-button\" (click)=\"sendForgottenPassword();\">\n\t\t\t\t\t<span> Continuar </span>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t</div>\n\t</form>\n</ng-template>\n", styles: ["@charset \"UTF-8\";*{padding:0;margin:0;font-family:Open Sans,sans-serif}.background{display:grid;height:100vh;align-content:center;background-size:cover;color:#f5f5f5;align-items:center;justify-content:center}.div-size{display:flex;flex-direction:column;justify-content:space-around;width:100%;height:100vh;align-items:center;background-color:#f5f5f5;box-shadow:0 0 15px #333}.title{font-size:3.5vw;text-transform:uppercase;font-weight:700}.subtitle{font-size:21px}.logotipo{display:flex;justify-content:center;margin-top:10%}.form-position{display:flex;flex-direction:column;align-content:center;width:378px}.form-item{margin-bottom:16px}.input-group-text{padding:10px 11px;border-radius:4px 0 0 4px}.remember-password{display:flex;align-items:center;margin-bottom:8px;justify-content:center}.remember-password label{margin-left:8px}.forgotten-password{background-color:#f5f5f5;border:none;text-decoration:underline;font-size:14px;box-shadow:none;margin-top:8px;cursor:pointer}.forgotten-password:focus{outline-style:none}.input-label{font-size:16px;padding:10px 0 8px 16px}.input-label:first-child{font-size:16px;padding-top:16px}.input-text{width:343px;height:38px;margin:0 0 10px 16px;padding:0 8px}.input-text:last-child{font-size:16px;margin-bottom:24px}.form-control{max-width:341px}.footer{display:flex;justify-content:center}.footer-position{font-size:14px;display:flex;justify-content:center;align-items:flex-end}.icons{display:flex;justify-content:center;align-items:center;margin-top:16px}.icons a{padding:4px}.icon-item{margin-left:24px;color:#007bff}.sispro{color:#2847a0;margin-left:5px;text-transform:uppercase;text-decoration:none;font-weight:700}.modal-footer{padding:0}.modal:before{content:\"\";display:inline-block;height:100%;vertical-align:middle}.modal-style{display:flex;align-items:center;justify-content:center}.modal-style h4{font-size:20px;font-weight:700;padding:10px}.modal-button{margin:16px 0;padding:7px 12px}.modal-button:last-child{margin-right:16px;margin-left:8px}.modal-close{display:flex;align-content:center;margin-right:10px;padding:6px}.col-md-7,.col-md-5{padding:0}.btn-acessar{height:48px;outline-style:none}.texto-apresentacao{align-items:start}.separator{margin-left:5px}\n"] }]
1154
- }], ctorParameters: () => [{ type: i1$2.BsModalService }, { type: i5.MessageService }, { type: i3.FormBuilder }, { type: AuthService }, { type: ServerService }, { type: EnvironmentService }, { type: AuthStorageService }, { type: LibCustomLoginService }, { type: i9.Title }, { type: i1$1.Router }, { type: i11.ToastrService }] });
1155
-
1156
- class AuthModule {
1157
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1158
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: AuthModule, declarations: [LoginComponent], imports: [CommonModule,
1159
- ReactiveFormsModule,
1160
- InfraModule,
1161
- NgxPaginationModule,
1162
- PopoverModule,
1163
- TooltipModule,
1164
- CommonModule,
1165
- RouterLink,
1166
- RouterOutlet], exports: [LoginComponent] }); }
1167
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthModule, imports: [CommonModule,
1168
- ReactiveFormsModule,
1169
- InfraModule,
1170
- NgxPaginationModule,
1171
- PopoverModule,
1172
- TooltipModule,
1173
- CommonModule] }); }
1174
- }
1175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthModule, decorators: [{
1176
- type: NgModule,
1177
- args: [{
1178
- declarations: [
1179
- LoginComponent,
1180
- ],
1181
- imports: [
1182
- CommonModule,
1840
+ args: [{ selector: 'app-login', imports: [
1183
1841
  ReactiveFormsModule,
1184
1842
  InfraModule,
1185
- NgxPaginationModule,
1186
- PopoverModule,
1187
- TooltipModule,
1188
1843
  CommonModule,
1189
- RouterLink,
1190
- RouterOutlet
1191
- ],
1192
- exports: [
1193
- LoginComponent,
1194
- ]
1195
- }]
1196
- }] });
1844
+ NgIf
1845
+ ], preserveWhitespaces: true, template: "<div id=\"login\" class=\"container-fluid\">\n\t<div class=\"row\">\n\t\t<!-- Conte\u00FAdo da DIV do background -->\n\t\t<div class=\"col-md-6 px-0\">\n\t\t\t<div class=\"background\" style=\"background-image: linear-gradient(to bottom, rgba(10, 44, 81, 0.9), rgba(10, 44, 81, 0.9)), url({{_customLoginService.loginBackground}})\">\n\t\t\t\t<div class=\"text-position texto-apresentacao ps-5\">\n\t\t\t\t\t<h1 class=\"title\" id=\"title\"></h1>\n\t\t\t\t\t<p class=\"subtitle\" id=\"subtitle\"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- Conte\u00FAdo da DIV de Login -->\n\t\t<div class=\"col-md-6 px-0\">\n\n\t\t\t<div class=\"div-size\">\n\t\t\t\t<div class=\"logotipo\">\n\t\t\t\t\t<img style=\"height: 95px;\" src=\"{{ this._customLoginService.loginLogotipo }}\" alt=\"{{ this._customLoginService.loginAltLogotipo }}\" />\n\t\t\t\t</div>\n\n\t\t\t\t@if (situacaoLogin !== 2) {\n\t\t\t\t\t@if (!showParmsAuthentication2Fa) {\n\t\t\t\t\t\t@switch (loginProgress) {\n\t\t\t\t\t\t\t@case(1) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formDomain\" class=\"form-position\">\n\t\t\t\t\t\t\t\t\t<div class=\"col mb-3\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"predio\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" placeholder=\"Dom\u00EDnio\" formControlName=\"dominio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formDomain.get('dominio'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formDomain.get('dominio')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingDomain\" loadingText=\"Acessando...\" class=\"btn btn-primary\" [disabled]=\"isLoadingDomain\" (click)=\"getAuthentication()\">\n\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t@case(2) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formLogin\" class=\"form-position\">\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control px-3\" formControlName=\"usuario\" placeholder=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formLogin.get('usuario'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formLogin.get('usuario')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-lock-text\"><lib-icon iconName=\"chave\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control px-3\" formControlName=\"senha\" placeholder=\"Senha\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formLogin.get('senha'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formLogin.get('senha')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button (click)=\"returnDomain()\" type=\"button\" class=\"btn btn-outline-secondary w-100\">\n\t\t\t\t\t\t\t\t\t\t\t\tVoltar\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingLogin\" loadingText=\"Acessando...\" class=\"btn btn-primary btn-heigth-48 w-100\" [disabled]=\"isLoadingLogin\" (click)=\"logOn()\">\n\t\t\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t\t\t\t\t<a type=\"button\" (click)=\"situacaoLogin = 2\" class=\"fw-bold text-decoration-none text-secondary\"\n\t\t\t\t\t\t\t\t\t\t\ttooltip=\"N\u00E3o se preocupe, clique aqui e informe o dom\u00EDnio e o usu\u00E1rio desejados que enviaremos um e-mail com maiores informa\u00E7\u00F5es.\">\n\t\t\t\t\t\t\t\t\t\t\tEsqueceu sua senha? </a>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t@case(3) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formAzure\" class=\"form-position formAzure\">\n\t\t\t\t\t\t\t\t\t<div class=\"w-100 mb-3\">\n\t\t\t\t\t\t\t\t\t\t<button type=\"button\" loadingText=\"Acessando...\" class=\"btn btn-primary p-2 mb-3 w-100 d-flex align-items-center justify-content-center gap-2\" (click)=\"logOnAzure()\">\n\t\t\t\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" heigth=\"14\" width=\"14\" viewBox=\"0 0 23 23\"><path fill=\"transparent\" d=\"M0 0h23v23H0z\"/><path fill=\"#f35325\" d=\"M1 1h10v10H1z\"/><path fill=\"#81bc06\" d=\"M12 1h10v10H12z\"/><path fill=\"#05a6f0\" d=\"M1 12h10v10H1z\"/><path fill=\"#ffba08\" d=\"M12 12h10v10H12z\"/></svg>\n\t\t\t\t\t\t\t\t\t\t\tMicrosoft\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t<div class=\"w-100 text-center text-secondary\">\n\t\t\t\t\t\t\t\t\t\t\t<span id=\"ou-text\"> ou </span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control px-3\" formControlName=\"usuario\" placeholder=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAzure.get('usuario'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAzure.get('usuario')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-lock-text\"><lib-icon iconName=\"chave\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control px-3\" formControlName=\"senha\" placeholder=\"Senha\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAzure.get('senha'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAzure.get('senha')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button (click)=\"returnDomain()\" type=\"button\" class=\"btn btn-outline-secondary w-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<lib-icon iconName=\"seta-esquerda\" /> VOLTAR\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingAzure\" loadingText=\"Acessando...\" class=\"btn btn-primary btn-heigth-48 w-100\" [disabled]=\"isLoadingAzure\" (click)=\"logOnAdmin()\">\n\t\t\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@else {\n\t\t\t\t\t\t<form [formGroup]=\"formAuthentication2Fa\" class=\"form-position\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><img src=\"assets/icons/lock.svg\" alt=\"lock-icon\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"code\" id=\"code\" placeholder=\"C\u00F3digo de 2 fatores\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAuthentication2Fa.get('code'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAuthentication2Fa.get('code')\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center gap-3 mb-3\">\n\t\t\t\t\t\t\t\t<button (click)=\"voltar()\" type=\"button\" class=\"btn btn-outline-secondary col\"> <lib-icon iconName=\"seta-esquerda\" /> VOLTAR </button>\n\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingSendAuthentication2Fa\" [disabled]=\"isLoadingSendAuthentication2Fa\" (click)=\"sendCode()\" type=\"button\" class=\"btn btn-primary col\">\n\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center justify-content-center\">\n\t\t\t\t\t\t\t\t@if (secondsLeft === 0) {\n\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingForgottenPassword\" loadingText=\"Enviando...\" [disabled]=\"isLoadingForgottenPassword\" (click)=\"getNewCode()\" type=\"button\" class=\"btn btn-outline-primary col\">\n\t\t\t\t\t\t\t\t\t\tEnviar novo c\u00F3digo <lib-icon iconName=\"aviao-papel\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t<span class=\"fw-bold text-secondary\">{{ secondsLeft }} {{ secondsLeft == 1 ? 'segundo' : 'segundos' }} para obter novo c\u00F3digo</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</form>\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@else {\n\t\t\t\t\t<form [formGroup]=\"formFgtPsw\" class=\"form-position\">\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"predio\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"dominioFgtPssInput\" placeholder=\"Dom\u00EDnio\" formControlName=\"dominioFgtPsw\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('dominioFgtPsw'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('dominioFgtPsw')\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"usuarioFgtPssInput\" placeholder=\"Usu\u00E1rio\" formControlName=\"usuarioFgtPsw\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('usuarioFgtPsw'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('usuarioFgtPsw')\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\t\t@if(formFgtPsw.get('usuarioFgtPsw')?.value === 'admin' || formFgtPsw.get('usuarioFgtPsw')?.value === 'CRMadmin'){\n <p class=\"texto-admin\">N\u00E3o \u00E9 poss\u00EDvel alterar a senha do usu\u00E1rio 'admin'</p>\n }@else{\n <button [libLoading]=\"isLoadingForgottenPassword\" loadingText=\"Enviando...\" class=\"btn btn-primary btn-heigth-48\" [disabled]=\"isLoadingForgottenPassword\" (click)=\"sendForgottenPassword()\">\n Enviar e-mail <lib-icon iconName=\"aviao-papel\" />\n </button>\n }\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t\t<a type=\"button\" (click)=\"situacaoLogin = 0\" class=\"fw-bold text-decoration-none text-secondary\" tooltip=\"Retornar para o login.\"> <lib-icon iconName=\"seta-esquerda\" /> Voltar para o login </a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t<div class=\"footer-position\">\n\t\t\t\t\t<footer>\n\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center justify-content-center gap-2\">\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/JmGeNlJdw/1/poli%CC%81tica-de-privacidade/pt_BR?s=1685731510066\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> POL\u00CDTICA DE PRIVACIDADE </a>\n\t\t\t\t\t\t\t<span> | </span>\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/Rork35NN2/2/poli%CC%81tica-de-cookies/pt_BR?s=1685731551976\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> POL\u00CDTICA DE COOKIES </a>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p class=\"text-secondary\">\n\t\t\t\t\t\t\tDesenvolvido por <a href=\"https://www.sispro.com.br/\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> SISPRO </a> \u00A9 {{ year }} Todos os direitos reservados\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t<a href=\"https://pt-br.facebook.com/SisproERP/\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"facebook\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t\t<a href=\"https://www.instagram.com/accounts/login/?next=/sispro_software/\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"instagram\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t\t<a href=\"https://br.linkedin.com/company/sispro\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"linkedin\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"text-center\">\n\t\t\t\t\t\t\t<a class=\"text-primary fw-bold text-decoration-none glb-font-size-12\" [href]=\"geturlErpConfig()\"> Configurar ERP </a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</footer>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n", styles: ["@charset \"UTF-8\";#login .background{display:grid;height:100vh;align-content:center;background-size:cover;color:#f5f5f5;align-items:center;justify-content:center}#login .div-size{display:flex;flex-direction:column;justify-content:space-around;width:100%;height:100vh;align-items:center;background-color:#f5f5f5;box-shadow:0 0 15px #333}#login .title{font-size:3.5vw;text-transform:uppercase;font-weight:700}#login .subtitle{font-size:21px}#login .logotipo{display:flex;justify-content:center;margin-top:10%}#login .form-position{display:flex;flex-direction:column;align-content:center;width:378px}#login .form-item{margin-bottom:16px}#login .footer{display:flex;justify-content:center}#login .footer-position{font-size:14px;display:flex;justify-content:center;align-items:flex-end}#login .icons{display:flex;justify-content:center;align-items:center;margin-top:16px}#login .icons a{padding:4px}#login .icon-item{margin-left:24px;color:#007bff}#login .col-md-7,#login .col-md-5{padding:0}#login .btn-acessar{height:48px;outline-style:none}#login .texto-apresentacao{align-items:start}#login .separator{margin-left:5px}#login #ou-text{display:flex;flex-direction:row;align-items:center;justify-content:space-between}#login #ou-text:before{content:\"\";display:block;width:100%;height:1px;border-bottom:1px solid rgb(108,117,125);margin-right:12px}#login #ou-text:after{content:\"\";display:block;width:100%;height:1px;border-bottom:1px solid rgb(108,117,125);margin-left:12px}\n"] }]
1846
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1847
+ type: Inject,
1848
+ args: [MSAL_GUARD_CONFIG]
1849
+ }] }, { type: i1$2.MsalService }, { type: LibCustomLoginService }, { type: i3$1.FormBuilder }, { type: ProjectUtilservice }, { type: AuthService }, { type: EnvironmentService }, { type: AuthStorageService }, { type: i8.Title }, { type: i1$1.Router }, { type: i10.ToastrService }, { type: i3.MessageService }] });
1197
1850
 
1198
- class MenuServicesService {
1199
- constructor(_authStorageService, _httpClient) {
1200
- this._authStorageService = _authStorageService;
1201
- this._httpClient = _httpClient;
1202
- this._BASE_URL = "https://siscandesv6.sispro.com.br/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api"; // SpInfra2AplicWS
1203
- this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
1204
- // #endregion Menu: Estabelecimentos
1205
- // #endregion UPDATE
1206
- // #region DELETE
1207
- // [...]
1208
- // #endregion DELETE
1209
- // #endregion ==========> SERVICES <==========
1210
- // #region ==========> UTILITIES <==========
1211
- this._menuFooterImg = null;
1212
- // #region NewImg Event
1213
- // Implementação de lógica vista no link: https://hasangalakdinu.medium.com/how-to-call-a-function-in-another-component-angular-using-rxjs-3f2e85920705
1214
- this._subject = new Subject();
1215
- //verificar se é a melhor solucão
1216
- //this._BASE_URL = !environment.production ? this._BASE_URL : `${environment.SpInfra2ErpWS}`;
1851
+ class LoginOSModel {
1852
+ // Sugestão do GPT: "Pra facilitar instanciar a partir de objetos."
1853
+ constructor(init) {
1854
+ this.dominio = "";
1855
+ this.usuario = "";
1856
+ this.redirectUrl = "";
1857
+ this.serialV6 = "";
1858
+ Object.assign(this, init);
1217
1859
  }
1218
- // #region ==========> SERVICES <==========
1219
- // #region PREPARATION
1220
- // #region Menu: Usuário
1221
- // [...]
1222
- // #endregion Menu: Usuário
1223
- // #region Menu: Estabelecimentos
1224
- getEstabelecimentosModalList(usuarioID, pesquisa) {
1225
- const params = new HttpParams()
1226
- .set('pesquisa', pesquisa);
1227
- const headers = new HttpHeaders()
1228
- .set('Content-Type', 'application/json');
1229
- const url = `${this._BASE_URL}/InfraEstabelecimento/GetEstabelecimentosModal`;
1230
- return this._httpClient
1231
- .get(url, { 'params': params, 'headers': headers })
1232
- .pipe(take(1), tap(response => {
1233
- if (response.Error) {
1234
- throw Error(response.ErrorMessage);
1235
- }
1236
- }));
1237
- }
1238
- // #endregion Menu: Estabelecimentos
1239
- // #endregion PREPARATION
1240
- // #region GET
1241
- // #region Menu: Usuário
1242
- getImagemMenu() {
1243
- const url = `${this._BASE_URL}/InfraUsuario/GetImagemMenu`;
1244
- return this._httpClient
1245
- .get(url, { 'headers': this._HTTP_HEADERS })
1246
- .pipe(take(1), tap(response => {
1247
- if (response.Error) {
1248
- throw Error(response.ErrorMessage);
1249
- }
1250
- this.saveImageToStorage(response.InfraUsuarioImg.Imagem, response.InfraUsuarioImg.FileName);
1251
- }));
1252
- }
1253
- // #endregion Menu: Usuário
1254
- // #region Menu: Estabelecimentos
1255
- getEstabelecimentoSession(estabID) {
1256
- const params = new HttpParams()
1257
- .set('id', estabID);
1258
- const url = `${this._BASE_URL}/InfraEstabelecimento/GetEstabelecimentoSession`;
1259
- return this._httpClient
1260
- .get(url, { 'params': params, 'headers': this._HTTP_HEADERS })
1261
- .pipe(take(1), tap(response => {
1262
- if (response.Error) {
1263
- throw Error(response.ErrorMessage);
1264
- }
1265
- }));
1266
- }
1267
- // #endregion Menu: Estabelecimentos
1268
- // #region Get Usuario Email
1269
- getUsuarioEmail() {
1270
- const url = `${this._BASE_URL}/InfraUsuario/GetUsuarioEmail`;
1271
- return this._httpClient
1272
- .get(url, { 'headers': this._HTTP_HEADERS })
1273
- .pipe(take(1), tap(response => {
1274
- if (response.Error) {
1275
- throw Error(response.ErrorMessage);
1276
- }
1277
- }));
1278
- }
1279
- // #endregion Get Usuario Email
1280
- // #endregion GET
1281
- // #region CREATE
1282
- // [...]
1283
- // #endregion CREATE
1284
- // #region UPDATE
1285
- // #region Menu: Usuário
1286
- updateLastLogEstabID(estabID) {
1287
- const params = new HttpParams()
1288
- .set('estabID', estabID);
1289
- const url = `${this._BASE_URL}/InfraUsuario/UpdateLastSelectedEstabelecimento`;
1290
- return this._httpClient
1291
- .post(url, null, { 'params': params, 'headers': this._HTTP_HEADERS })
1292
- .pipe(take(1), tap(response => {
1293
- if (response.Error) {
1294
- throw Error(response.ErrorMessage);
1295
- }
1296
- }));
1297
- }
1298
- // #endregion Menu: Usuário
1299
- // #region Menu: Estabelecimentos
1300
- defineDefaultEstabelecimento(estabID, usuarioID, isDefault) {
1301
- const params = new HttpParams()
1302
- .set('estabID', estabID)
1303
- .set('isDefault', isDefault);
1304
- const url = `${this._BASE_URL}/InfraEstabelecimento/DefineDefaultEstab`;
1305
- return this._httpClient
1306
- .post(url, null, { 'params': params, 'headers': this._HTTP_HEADERS })
1307
- .pipe(take(1), tap(response => {
1308
- if (response.Error) {
1309
- throw Error(response.ErrorMessage);
1310
- }
1311
- }));
1312
- }
1313
- getMenuFooterImg() {
1314
- const cachedFooterImg = JSON.parse(localStorage.getItem('menuFooterImg'));
1315
- if (cachedFooterImg) {
1316
- return cachedFooterImg;
1317
- }
1318
- return this._menuFooterImg;
1319
- }
1320
- setMenuFooterImg(value) {
1321
- this._menuFooterImg = value;
1322
- localStorage.setItem('menuFooterImg', JSON.stringify(value));
1323
- }
1324
- saveImageToStorage(footerImgSrc, footerImgName) {
1325
- this.setMenuFooterImg({ USUARIOID: this._authStorageService.infraUsuarioId, FILENAME: footerImgName, FILE: footerImgSrc });
1326
- }
1327
- newUserImageEvent(value) {
1328
- this._subject.next(value);
1329
- }
1330
- getNewUserImageEvent() {
1331
- return this._subject.asObservable();
1332
- }
1333
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, deps: [{ token: AuthStorageService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
1334
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, providedIn: 'root' }); }
1335
- }
1336
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, decorators: [{
1337
- type: Injectable,
1338
- args: [{
1339
- providedIn: 'root'
1340
- }]
1341
- }], ctorParameters: () => [{ type: AuthStorageService }, { type: i1.HttpClient }] });
1342
-
1343
- class ListEstabService {
1344
- constructor(http) {
1345
- this.http = http;
1346
- this.cacheName = "";
1347
- this.menuKey = `${this.cacheName}_ListaEstabs`;
1348
- this.baseUrl = "assets/jsons/lista-estabs.json";
1349
- this.storage = window.localStorage;
1350
- }
1351
- getList() {
1352
- let iMenu = this.get();
1353
- let httpCall = this.http.get(this.baseUrl).pipe(tap((iMenuFromServer) => {
1354
- this.set(iMenuFromServer);
1355
- }));
1356
- // Caso o menu já esteja gravado no local, é retornado ele no observable e logo em seguida
1357
- // é realizada a chamada HTTP para buscar o mais novo menu.
1358
- if (iMenu) {
1359
- let obs = of(iMenu);
1360
- let obsMerged = merge(obs, httpCall);
1361
- return obsMerged;
1362
- }
1363
- return httpCall;
1364
- }
1365
- set(value) {
1366
- let iMenuJson = JSON.stringify(value);
1367
- this.storage.setItem(this.menuKey, iMenuJson);
1368
- }
1369
- get() {
1370
- let possibleIMenus = this.storage.getItem(this.menuKey);
1371
- if (possibleIMenus) {
1372
- let iMenus = JSON.parse(possibleIMenus);
1373
- return iMenus;
1374
- }
1375
- return null;
1376
- }
1377
- remove() {
1378
- this.storage.removeItem(this.menuKey);
1379
- }
1380
- getCacheName(cacheName) {
1381
- //passando propriedades do produto para a service
1382
- this.cacheName = cacheName;
1383
- }
1384
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ListEstabService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
1385
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ListEstabService, providedIn: 'root' }); }
1386
1860
  }
1387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ListEstabService, decorators: [{
1388
- type: Injectable,
1389
- args: [{
1390
- providedIn: 'root'
1391
- }]
1392
- }], ctorParameters: () => [{ type: i1.HttpClient }] });
1393
1861
 
1394
- /**Service responsável por pegar as opções do menu do projeto em que está sendo utilizada*/
1395
- class MenuConfigService {
1396
- constructor() {
1397
- this._menuOptions = [];
1398
- /** Indica se o menu é estático ou dinâmico. */
1399
- this._isMenuStatic = false;
1400
- this.menu = [];
1401
- this.menuDropdown = [];
1402
- }
1403
- /** Obtém as opções do menu. */
1404
- get menuOptions() { return this._menuOptions; }
1405
- set menuOptions(value) { this._menuOptions = value; }
1406
- /** Inicializa as opções do menu com base na rota atual e em uma lista personalizada (opcional).
1407
- * @param currentRoute A rota atual da aplicação
1408
- * @param customList Uma lista personalizada de opções de menu (opcional).
1409
- * @returns As opções do menu inicializadas.
1410
- */
1411
- setMenuStatic(isStaticMenu) {
1412
- this._isMenuStatic = isStaticMenu;
1862
+ class LoginOSComponent {
1863
+ // #endregion PUBLIC
1864
+ // #endregion ==========> PROPERTIES <==========
1865
+ // #region ==========> INITIALIZATION <==========
1866
+ constructor(_authService, _projectUtilservice, _route, _router, _storageService) {
1867
+ this._authService = _authService;
1868
+ this._projectUtilservice = _projectUtilservice;
1869
+ this._route = _route;
1870
+ this._router = _router;
1871
+ this._storageService = _storageService;
1872
+ // #endregion PRIVATE
1873
+ // #region PUBLIC
1874
+ this.loginStatus = "loading";
1875
+ this.timer = 3;
1413
1876
  }
1414
- initializeMenu(currentRoute, customList) {
1415
- if (this.storedInitializeMenu) {
1416
- this.menu = this.storedInitializeMenu(currentRoute, customList);
1417
- }
1418
- return this.menu;
1877
+ ngOnInit() {
1878
+ this.getParams();
1879
+ this.logOn();
1419
1880
  }
1420
- updateRouteSelection(currentRoute, currentList) {
1421
- currentList.forEach((item) => {
1422
- if (item.children) {
1423
- item.children.forEach(child => { child.isSelected = currentRoute.includes(child.route); });
1424
- }
1425
- const anyChildSelected = item.children ? item.children.some(child => child.isSelected === true) : false;
1426
- item.isSelected = false;
1427
- if (!item.children && currentRoute.includes(item.route)) {
1428
- item.isSelected = true;
1429
- }
1430
- else if (item.children && anyChildSelected) {
1431
- item.isSelected = true;
1881
+ // #endregion ==========> INITIALIZATION <==========
1882
+ // #region ==========> API METHODS <==========
1883
+ // #region LOGIN
1884
+ logOn() {
1885
+ this.loginStatus = "loading";
1886
+ let status = "none";
1887
+ const currDominio = this._storageService.dominio ?? undefined;
1888
+ const currUsuario = this._storageService.user ?? undefined;
1889
+ this._authService.getAuthentication(this._loginOSModel.dominio).subscribe({
1890
+ next: () => {
1891
+ if (currDominio === this._loginOSModel.dominio && currUsuario === this._loginOSModel.usuario) {
1892
+ status = "keep";
1893
+ this.redirect();
1894
+ return;
1895
+ }
1896
+ status = (!currDominio || !currUsuario) ? "none" : "updated";
1897
+ this._authService.loginOS(this._parmsLogin, this._loginOSModel.serialV6).subscribe({
1898
+ next: () => {
1899
+ if (status === "none") {
1900
+ this.startTimer();
1901
+ this.loginStatus = "success";
1902
+ }
1903
+ else {
1904
+ this.startTimer();
1905
+ this.loginStatus = "updated";
1906
+ }
1907
+ },
1908
+ error: (error) => {
1909
+ this.loginStatus = "error";
1910
+ this._projectUtilservice.showHttpError(error);
1911
+ },
1912
+ });
1913
+ },
1914
+ error: (error) => {
1915
+ this.loginStatus = "error";
1916
+ this._projectUtilservice.showHttpError(error);
1432
1917
  }
1433
1918
  });
1434
- return currentList;
1435
- }
1436
- /** Inicializa as opções do menu dropdown com base em uma lista personalizada (opcional).
1437
- * @param primaryDropdownList Uma lista personalizada de opções do dropdown (opcional).
1438
- * @returns As opções do dropdown inicializadas.
1439
- */
1440
- initializeMenuDropdown(primaryDropdownList) {
1441
- if (this.storedInitializeMenuDropdown) {
1442
- this.menuDropdown = this.storedInitializeMenuDropdown(primaryDropdownList);
1443
- }
1444
- return this.menuDropdown;
1445
- }
1446
- ConfigurarMenuConfig(menuConfig) {
1447
- //passando propriedades do projeto para a lib
1448
- this._menuOptions = menuConfig.menuOptions;
1449
- this._isMenuStatic = menuConfig.isMenuStatic;
1450
- //passando implementação dos métodos do projeto para a lib
1451
- this.storedInitializeMenu = menuConfig.initializeMenu;
1452
- this.storedInitializeMenuDropdown = menuConfig.initializeMenuDropdown;
1453
- }
1454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1455
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuConfigService, providedIn: 'root' }); }
1456
- }
1457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuConfigService, decorators: [{
1458
- type: Injectable,
1459
- args: [{ providedIn: 'root' }]
1460
- }] });
1461
-
1462
- class LibCustomMenuService {
1463
- /** Obtém as opções do menu. */
1464
- get menuItems() {
1465
- return this._menuItems;
1466
- }
1467
- set menuItems(value) {
1468
- this._menuItems = value;
1469
- }
1470
- setEmpresa(value) { this.empresaId.next(value); }
1471
- constructor(_menuConfig, _authStorageService, _router) {
1472
- this._menuConfig = _menuConfig;
1473
- this._authStorageService = _authStorageService;
1474
- this._router = _router;
1475
- // #region Propriedade Customizadas do Menu
1476
- this.menuDynamic = false;
1477
- this.moduleName = "";
1478
- this.moduleImg = "";
1479
- this.moduleSvg = "";
1480
- this.themeColor = "";
1481
- // #endregion Propriedade Customizadas do Menu
1482
- // #region Propriedade do Menu
1483
- this._MENU_BASE_URL = "https://siscandesv6.sispro.com.br/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api";
1484
- this.currentURL = "";
1485
- this._menuItems = [];
1486
- this.menuList = [];
1487
- this.menuLateralUpdated = [];
1488
- // ! Definição do BehaviorSubject: responsável principal da emissão do evento
1489
- this.empresaId = new BehaviorSubject({ estabelecimentoID: "", empresaID: "" });
1490
- this.applyEmpresa$ = this.empresaId.asObservable();
1491
- // inicializações do Menu Dinâmico
1492
- this.currentURL = this._router.url;
1493
- this.menuConfig = _menuConfig;
1494
1919
  }
1495
- ConfigurarCustomMenuService(RealcustomMenuService) {
1496
- //passando propriedades do projeto para a lib
1497
- this.menuDynamic = RealcustomMenuService.menuDynamic;
1498
- this.moduleName = RealcustomMenuService.moduleName;
1499
- this.moduleImg = RealcustomMenuService.moduleImg;
1500
- this.moduleSvg = RealcustomMenuService.moduleSvg;
1501
- this.themeColor = RealcustomMenuService.themeColor;
1502
- //passando implementação dos métodos do projeto para a lib
1503
- this.storedMenuStaticOnInit = RealcustomMenuService.menuStaticOnInit;
1504
- this.storedMenuopenExpansibleMenu = RealcustomMenuService.menuopenExpansibleMenu;
1505
- this.storedMenuDynamicOnInit = RealcustomMenuService.menuDynamicOnInit;
1506
- }
1507
- // #region - Métodos Customizadas para o Menu dinâmico
1508
- // Método executado no menu-lateral.component.ts - método: onInit ()
1509
- // Utilizado para inicializações diversas
1510
- menuDynamicOnInit() {
1511
- if (this.storedMenuDynamicOnInit) {
1512
- this.storedMenuDynamicOnInit();
1513
- }
1920
+ // #endregion LOGIN
1921
+ // #endregion ==========> API METHODS <==========
1922
+ // #region ==========> UTILS <==========
1923
+ redirect() {
1924
+ let hostname = window.location.host == "localhost" ? "siscandesv6.sispro.com.br" : window.location.host;
1925
+ let baseURL = `https://${hostname}/SisproErpCloud`;
1926
+ if (!this._loginOSModel.redirectUrl)
1927
+ this._router.navigateByUrl("/home");
1928
+ else
1929
+ window.location.replace(`${baseURL}${this._loginOSModel.redirectUrl}`);
1930
+ }
1931
+ startTimer() {
1932
+ this._timerSubscription = timer(0, 1000)
1933
+ .pipe(take(this.timer + 1))
1934
+ .subscribe(count => {
1935
+ this.timer = this.timer - count;
1936
+ if (this.timer === 0)
1937
+ this.redirect();
1938
+ });
1514
1939
  }
1515
- // Método executado no menu-lateral.component.ts - método: onInit ()
1516
- // Utilizado para inicializações diversas
1517
- menuStaticOnInit() {
1518
- if (this.storedMenuStaticOnInit) {
1519
- this.storedMenuStaticOnInit();
1940
+ getParams() {
1941
+ const payloadString = this._route.snapshot.queryParamMap.get('payload');
1942
+ if (!payloadString) {
1943
+ console.warn('Payload não encontrado na URL.');
1944
+ this.loginStatus = "error";
1945
+ throw new Error('Payload não encontrado na URL.');
1520
1946
  }
1521
- }
1522
- // Método executado no menu-lateral.component.ts - método: openExpansibleMenu()
1523
- // Utilizado para inicializações ao Exoandir a opção de Menu
1524
- menuopenExpansibleMenu(ref) {
1525
- if (this.storedMenuopenExpansibleMenu) {
1526
- this.storedMenuopenExpansibleMenu(ref);
1947
+ try {
1948
+ const payloadJson = JSON.parse(atob(payloadString));
1949
+ this._loginOSModel = new LoginOSModel({
1950
+ dominio: payloadJson.dominio ?? '',
1951
+ usuario: payloadJson.usuario ?? '',
1952
+ redirectUrl: payloadJson.redirectUrl ?? '',
1953
+ serialV6: payloadJson.serialV6 ?? ''
1954
+ });
1955
+ this._parmsLogin = {
1956
+ dominio: payloadJson.dominio,
1957
+ usuario: payloadJson.usuario,
1958
+ senha: ""
1959
+ };
1960
+ }
1961
+ catch (error) {
1962
+ console.error('Erro ao fazer parse do payload:', error);
1963
+ throw error;
1527
1964
  }
1528
1965
  }
1529
- /** Método que deve ser chamado na seleção de um novo estabelecimento, ele atualizará os valores do nosso BehaviorSubject para que possamos utilizá-lo em outras partes do sistema. */
1530
- emitEstabelecimentoEvent() {
1531
- this.setEmpresa({
1532
- estabelecimentoID: this._authStorageService.infraEstabId,
1533
- empresaID: this._authStorageService.infraEmpresaId
1534
- });
1966
+ // #endregion ==========> UTILS <==========
1967
+ ngOnDestroy() {
1968
+ this._timerSubscription?.unsubscribe();
1535
1969
  }
1536
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, deps: [{ token: MenuConfigService }, { token: AuthStorageService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
1537
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, providedIn: 'root' }); }
1970
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginOSComponent, deps: [{ token: AuthService }, { token: ProjectUtilservice }, { token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: AuthStorageService }], target: i0.ɵɵFactoryTarget.Component }); }
1971
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: LoginOSComponent, isStandalone: true, selector: "login-os", ngImport: i0, template: `
1972
+ <div class="d-flex flex-column justify-content-center align-items-center h-100 w-100 bg-light" >
1973
+
1974
+ @switch (loginStatus) {
1975
+ @case ("loading") {
1976
+ <div class="text-center">
1977
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
1978
+ <h2 class="fw-bold">Carregando Informações...</h2>
1979
+ <p class="text-muted">Por favor, aguarde enquanto os dados são carregados.</p>
1980
+ </div>
1981
+ <div class="spinner-border text-primary" role="status"></div>
1982
+ }
1983
+ @case ("success") {
1984
+ <div class="text-center">
1985
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
1986
+ <h2 class="fw-bold">Login efetuado com sucesso</h2>
1987
+ <h2 class="fw-bold">Bem-vindo à V6!</h2>
1988
+ @if (timer > 0) { <span class="text-muted">Redirecionando você em {{ timer }} segundos...</span> }
1989
+ @else { <span class="text-muted">Se você não foi redirecionado automaticamente, <b class="text-primary glb-cursor-pointer" (click)="redirect()">clique aqui</b></span> }
1990
+ <div><lib-icon iconName="p-check" iconColor="green" [iconSize]="50" /></div>
1991
+ </div>
1992
+ }
1993
+ @case ("error") {
1994
+ <div class="text-center">
1995
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
1996
+ <h2 class="text-danger fw-bold">Não foi possível efetuar o login</h2>
1997
+ <span class="text-muted">Verifique os parâmetros enviados e tente novamente.</span>
1998
+ <div><lib-icon iconName="p-pare" iconColor="red" [iconSize]="50" /></div>
1999
+ </div>
2000
+ }
2001
+ @case ("updated") {
2002
+ <div class="text-center">
2003
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
2004
+ <h2 class="fw-bold">Sessão atualizada com sucesso</h2>
2005
+ @if (timer > 0) { <span class="text-muted">Redirecionando você em {{ timer }} segundos...</span> }
2006
+ @else { <span class="text-muted">Se você não foi redirecionado automaticamente, <b class="text-primary glb-cursor-pointer" (click)="redirect()">clique aqui</b></span> }
2007
+ <div><lib-icon iconName="p-check" iconColor="green" [iconSize]="50" /></div>
2008
+ </div>
2009
+ }
2010
+ @default {
2011
+ <div class="text-center">
2012
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
2013
+ <h2 class="fw-bold">Carregando Informações...</h2>
2014
+ <p class="text-muted">Por favor, aguarde enquanto os dados são carregados.</p>
2015
+ </div>
2016
+ <div class="spinner-border text-primary" role="status"></div>
2017
+ }
2018
+ }
2019
+
2020
+ </div>
2021
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }] }); }
1538
2022
  }
1539
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, decorators: [{
1540
- type: Injectable,
1541
- args: [{ providedIn: 'root' }]
1542
- }], ctorParameters: () => [{ type: MenuConfigService }, { type: AuthStorageService }, { type: i1$1.Router }] });
2023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginOSComponent, decorators: [{
2024
+ type: Component,
2025
+ args: [{ selector: 'login-os', standalone: true, imports: [
2026
+ InfraModule
2027
+ ], template: `
2028
+ <div class="d-flex flex-column justify-content-center align-items-center h-100 w-100 bg-light" >
2029
+
2030
+ @switch (loginStatus) {
2031
+ @case ("loading") {
2032
+ <div class="text-center">
2033
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
2034
+ <h2 class="fw-bold">Carregando Informações...</h2>
2035
+ <p class="text-muted">Por favor, aguarde enquanto os dados são carregados.</p>
2036
+ </div>
2037
+ <div class="spinner-border text-primary" role="status"></div>
2038
+ }
2039
+ @case ("success") {
2040
+ <div class="text-center">
2041
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
2042
+ <h2 class="fw-bold">Login efetuado com sucesso</h2>
2043
+ <h2 class="fw-bold">Bem-vindo à V6!</h2>
2044
+ @if (timer > 0) { <span class="text-muted">Redirecionando você em {{ timer }} segundos...</span> }
2045
+ @else { <span class="text-muted">Se você não foi redirecionado automaticamente, <b class="text-primary glb-cursor-pointer" (click)="redirect()">clique aqui</b></span> }
2046
+ <div><lib-icon iconName="p-check" iconColor="green" [iconSize]="50" /></div>
2047
+ </div>
2048
+ }
2049
+ @case ("error") {
2050
+ <div class="text-center">
2051
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
2052
+ <h2 class="text-danger fw-bold">Não foi possível efetuar o login</h2>
2053
+ <span class="text-muted">Verifique os parâmetros enviados e tente novamente.</span>
2054
+ <div><lib-icon iconName="p-pare" iconColor="red" [iconSize]="50" /></div>
2055
+ </div>
2056
+ }
2057
+ @case ("updated") {
2058
+ <div class="text-center">
2059
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
2060
+ <h2 class="fw-bold">Sessão atualizada com sucesso</h2>
2061
+ @if (timer > 0) { <span class="text-muted">Redirecionando você em {{ timer }} segundos...</span> }
2062
+ @else { <span class="text-muted">Se você não foi redirecionado automaticamente, <b class="text-primary glb-cursor-pointer" (click)="redirect()">clique aqui</b></span> }
2063
+ <div><lib-icon iconName="p-check" iconColor="green" [iconSize]="50" /></div>
2064
+ </div>
2065
+ }
2066
+ @default {
2067
+ <div class="text-center">
2068
+ <img src="assets/imgs/logo.png" alt="Loading Logo" class="mb-3" style="max-width: 150px;">
2069
+ <h2 class="fw-bold">Carregando Informações...</h2>
2070
+ <p class="text-muted">Por favor, aguarde enquanto os dados são carregados.</p>
2071
+ </div>
2072
+ <div class="spinner-border text-primary" role="status"></div>
2073
+ }
2074
+ }
2075
+
2076
+ </div>
2077
+ ` }]
2078
+ }], ctorParameters: () => [{ type: AuthService }, { type: ProjectUtilservice }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AuthStorageService }] });
1543
2079
 
1544
- //import { environment } from '../../../../environments/environments';
1545
- // import { ProjectUtilservice } from 'src/app/project/utils/project-utils.service';
1546
2080
  class SecondaryDropdownComponent {
1547
- constructor() {
2081
+ constructor(_projectUtilservice) {
2082
+ this._projectUtilservice = _projectUtilservice;
1548
2083
  this.modulo = { id: null, icon: null, label: null, URL: null, secondary_level: null };
1549
2084
  this.backPrimaryDropdown = new EventEmitter();
1550
2085
  }
@@ -1554,33 +2089,35 @@ class SecondaryDropdownComponent {
1554
2089
  this.backPrimaryDropdown.emit(true);
1555
2090
  }
1556
2091
  redirectToModulo(modulo) {
1557
- const url = `https://siscandesv6.sispro.com.br/SisproErpCloud/${modulo}`;
2092
+ const url = `${this._projectUtilservice.getHostName()}/SisproErpCloud/${modulo}`;
1558
2093
  window.open(url, '_blank');
1559
2094
  }
1560
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecondaryDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1561
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SecondaryDropdownComponent, isStandalone: true, selector: "app-secondary-dropdown", inputs: { modulo: "modulo" }, outputs: { backPrimaryDropdown: "backPrimaryDropdown" }, ngImport: i0, template: "<div class=\"d-flex flex-row\">\n <button class=\"chevron d-flex m-0 p-0 align-items-start\" (click)=\"backToPrimary()\"> \n <lib-icon iconName=\"seta-esquerda\" iconSize=\"small\"/>\n </button>\n\n <div class=\"d-flex flex-column flex-row\">\n <li *ngIf=\"modulo != null\">\n <img class=\"ms-1 mb-2\" src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n <span>{{ modulo.label }}</span>\n </li>\n <div *ngIf=\"modulo && modulo.secondary_level != null\">\n <li *ngFor=\"let moduloItem of modulo.secondary_level;\" (click)=\"redirectToModulo(moduloItem.URL)\">\n <a class=\"dropdown-item mb-2 ms-2\">\n <img src=\"{{ moduloItem.icon }}\" alt=\"{{ moduloItem.label }}\">\n {{ moduloItem.label }}\n </a>\n <li>\n </div>\n </div>\n</div>", styles: ["*{padding:0;margin:0}.chevron{margin-bottom:16px;margin-left:14px}li img{margin-left:8px;margin-right:4px}li span{font-weight:700}li a:hover{font-weight:700;background-color:transparent}.dropdown-item{margin-left:32px}button{background-color:transparent;border:none}\n"], dependencies: [{ kind: "ngmodule", type: InfraModule }, { kind: "component", type: i5.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }] }); }
2095
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecondaryDropdownComponent, deps: [{ token: ProjectUtilservice }], target: i0.ɵɵFactoryTarget.Component }); }
2096
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SecondaryDropdownComponent, isStandalone: true, selector: "app-secondary-dropdown", inputs: { modulo: "modulo" }, outputs: { backPrimaryDropdown: "backPrimaryDropdown" }, ngImport: i0, template: "<div class=\"d-flex flex-row\">\n <button class=\"chevron d-flex m-0 p-0 align-items-start\" (click)=\"backToPrimary()\"> \n <lib-icon iconName=\"seta-esquerda\" iconSize=\"small\"/>\n </button>\n\n <div class=\"d-flex flex-column flex-row\">\n <li *ngIf=\"modulo != null\">\n <img class=\"ms-1 mb-2\" src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n <span>{{ modulo.label }}</span>\n </li>\n <div *ngIf=\"modulo && modulo.secondary_level != null\">\n <li *ngFor=\"let moduloItem of modulo.secondary_level;\" (click)=\"redirectToModulo(moduloItem.URL)\">\n <a class=\"dropdown-item mb-2 ms-2\">\n <img src=\"{{ moduloItem.icon }}\" alt=\"{{ moduloItem.label }}\">\n {{ moduloItem.label }}\n </a>\n <li>\n </div>\n </div>\n</div>", styles: ["*{padding:0;margin:0}.chevron{margin-bottom:16px;margin-left:14px}li img{margin-left:8px;margin-right:4px}li span{font-weight:700}li a:hover{font-weight:700;background-color:transparent}.dropdown-item{margin-left:32px}button{background-color:transparent;border:none}\n"], dependencies: [{ kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1562
2097
  }
1563
2098
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecondaryDropdownComponent, decorators: [{
1564
2099
  type: Component,
1565
- args: [{ selector: 'app-secondary-dropdown', imports: [InfraModule], template: "<div class=\"d-flex flex-row\">\n <button class=\"chevron d-flex m-0 p-0 align-items-start\" (click)=\"backToPrimary()\"> \n <lib-icon iconName=\"seta-esquerda\" iconSize=\"small\"/>\n </button>\n\n <div class=\"d-flex flex-column flex-row\">\n <li *ngIf=\"modulo != null\">\n <img class=\"ms-1 mb-2\" src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n <span>{{ modulo.label }}</span>\n </li>\n <div *ngIf=\"modulo && modulo.secondary_level != null\">\n <li *ngFor=\"let moduloItem of modulo.secondary_level;\" (click)=\"redirectToModulo(moduloItem.URL)\">\n <a class=\"dropdown-item mb-2 ms-2\">\n <img src=\"{{ moduloItem.icon }}\" alt=\"{{ moduloItem.label }}\">\n {{ moduloItem.label }}\n </a>\n <li>\n </div>\n </div>\n</div>", styles: ["*{padding:0;margin:0}.chevron{margin-bottom:16px;margin-left:14px}li img{margin-left:8px;margin-right:4px}li span{font-weight:700}li a:hover{font-weight:700;background-color:transparent}.dropdown-item{margin-left:32px}button{background-color:transparent;border:none}\n"] }]
1566
- }], ctorParameters: () => [], propDecorators: { modulo: [{
2100
+ args: [{ selector: 'app-secondary-dropdown', imports: [
2101
+ InfraModule,
2102
+ CommonModule
2103
+ ], template: "<div class=\"d-flex flex-row\">\n <button class=\"chevron d-flex m-0 p-0 align-items-start\" (click)=\"backToPrimary()\"> \n <lib-icon iconName=\"seta-esquerda\" iconSize=\"small\"/>\n </button>\n\n <div class=\"d-flex flex-column flex-row\">\n <li *ngIf=\"modulo != null\">\n <img class=\"ms-1 mb-2\" src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n <span>{{ modulo.label }}</span>\n </li>\n <div *ngIf=\"modulo && modulo.secondary_level != null\">\n <li *ngFor=\"let moduloItem of modulo.secondary_level;\" (click)=\"redirectToModulo(moduloItem.URL)\">\n <a class=\"dropdown-item mb-2 ms-2\">\n <img src=\"{{ moduloItem.icon }}\" alt=\"{{ moduloItem.label }}\">\n {{ moduloItem.label }}\n </a>\n <li>\n </div>\n </div>\n</div>", styles: ["*{padding:0;margin:0}.chevron{margin-bottom:16px;margin-left:14px}li img{margin-left:8px;margin-right:4px}li span{font-weight:700}li a:hover{font-weight:700;background-color:transparent}.dropdown-item{margin-left:32px}button{background-color:transparent;border:none}\n"] }]
2104
+ }], ctorParameters: () => [{ type: ProjectUtilservice }], propDecorators: { modulo: [{
1567
2105
  type: Input
1568
2106
  }], backPrimaryDropdown: [{
1569
2107
  type: Output
1570
2108
  }] } });
1571
2109
 
1572
- //import { ProjectUtilservice } from 'src/app/project/utils/project-utils.service';
1573
- //import { environment } from '../../../../environments/environments';
1574
2110
  class PrimaryDropdownComponent {
1575
- constructor(_customMenuService) {
2111
+ constructor(_customMenuService, _projectUtilservice) {
1576
2112
  this._customMenuService = _customMenuService;
1577
- this.buttonWasClicked = new Observable;
2113
+ this._projectUtilservice = _projectUtilservice;
2114
+ this.selectDataState = false;
1578
2115
  this.primaryDropdown = [];
1579
2116
  }
1580
2117
  ngOnInit() {
1581
2118
  this.buttonWasClicked.subscribe(() => { this.selectDataState = true; });
1582
2119
  // Resolver colisão de eventos
1583
- if (this._customMenuService.menuDynamic) {
2120
+ if (this._customMenuService.menuDynamic || this._customMenuService.menuDynamicCustom) {
1584
2121
  if (!this._customMenuService.menuConfig) {
1585
2122
  setTimeout(() => {
1586
2123
  this.primaryDropdown = this._customMenuService.menuConfig.initializeMenuDropdown(this.primaryDropdown);
@@ -1612,26 +2149,30 @@ class PrimaryDropdownComponent {
1612
2149
  this.selectDataState = true;
1613
2150
  }
1614
2151
  redirectToPrePortal() {
1615
- const url = `https://siscandesv6.sispro.com.br/SisproErpCloud/PrePortal`;
2152
+ const url = `${this._projectUtilservice.getHostName()}/SisproErpCloud/PrePortal`;
1616
2153
  window.open(url, '_blank');
1617
2154
  }
1618
2155
  redirectToModulo(modulo) {
1619
- const url = `https://siscandesv6.sispro.com.br/SisproErpCloud/${modulo}`;
2156
+ const url = `${this._projectUtilservice.getHostName()}/SisproErpCloud/${modulo}`;
1620
2157
  window.open(url, '_blank');
1621
2158
  }
1622
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PrimaryDropdownComponent, deps: [{ token: LibCustomMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
1623
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: PrimaryDropdownComponent, isStandalone: true, selector: "app-primary-dropdown", inputs: { buttonWasClicked: "buttonWasClicked" }, ngImport: i0, template: "<div class=\"p-2\">\n <div *ngIf=\"selectDataState; else secondary_dropdown\" class=\"mb-2 w-100\">\n <li *ngFor=\"let modulo of primaryDropdown\" (click)=\"(modulo.secondary_level != null ? openDropdown(modulo, secondary_dropdown) : redirectToModulo(modulo.URL))\">\n <a class=\"dropdown-item mb-2\">\n <img src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n {{ modulo.label }}\n </a>\n </li>\n <hr class=\"dropdown-divider\">\n <li>\n <a class=\"dropdown-item link-portal mt-2\" (click)=\"redirectToPrePortal()\" target=\"_blank\">Portal Sispro</a>\n </li>\n </div>\n\n <ng-template #secondary_dropdown>\n <div #secondary_ref (clickOutside)=\"onClickedOutside($event, secondary_ref)\">\n <app-secondary-dropdown [modulo]=\"modulo\" (backPrimaryDropdown)=\"backToPrimary($event)\"></app-secondary-dropdown>\n </div>\n </ng-template>\n</div>", styles: ["*{padding:0;margin:0}li a{font-size:14px}li a img{margin-right:4px}li a:hover{font-weight:700;background-color:transparent}.dropdown-divider{height:0}.link-portal{color:#2847a0;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}\n"], dependencies: [{ kind: "component", type: SecondaryDropdownComponent, selector: "app-secondary-dropdown", inputs: ["modulo"], outputs: ["backPrimaryDropdown"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
2159
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PrimaryDropdownComponent, deps: [{ token: LibCustomMenuService }, { token: ProjectUtilservice }], target: i0.ɵɵFactoryTarget.Component }); }
2160
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: PrimaryDropdownComponent, isStandalone: true, selector: "app-primary-dropdown", inputs: { buttonWasClicked: "buttonWasClicked" }, ngImport: i0, template: "<div class=\"p-2\">\n <div *ngIf=\"selectDataState; else secondary_dropdown\" class=\"mb-2 w-100\">\n <li *ngFor=\"let modulo of primaryDropdown\" (click)=\"(modulo.secondary_level != null ? openDropdown(modulo, secondary_dropdown) : redirectToModulo(modulo.URL))\">\n <a class=\"dropdown-item mb-2\">\n <img src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n {{ modulo.label }}\n </a>\n </li>\n <hr class=\"dropdown-divider\">\n <li>\n <a class=\"dropdown-item link-portal mt-2\" (click)=\"redirectToPrePortal()\" target=\"_blank\">Portal Sispro</a>\n </li>\n </div>\n\n <ng-template #secondary_dropdown>\n <div #secondary_ref (clickOutside)=\"onClickedOutside($event, secondary_ref)\">\n <app-secondary-dropdown [modulo]=\"this.modulo\" (backPrimaryDropdown)=\"backToPrimary($event)\"></app-secondary-dropdown>\n </div>\n </ng-template>\n</div>", styles: ["*{padding:0;margin:0}li a{font-size:14px}li a img{margin-right:4px}li a:hover{font-weight:700;background-color:transparent}.dropdown-divider{height:0}.link-portal{color:#2847a0;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}\n"], dependencies: [{ kind: "component", type: SecondaryDropdownComponent, selector: "app-secondary-dropdown", inputs: ["modulo"], outputs: ["backPrimaryDropdown"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1624
2161
  }
1625
2162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PrimaryDropdownComponent, decorators: [{
1626
2163
  type: Component,
1627
- args: [{ selector: 'app-primary-dropdown', imports: [SecondaryDropdownComponent, NgIf, NgFor], template: "<div class=\"p-2\">\n <div *ngIf=\"selectDataState; else secondary_dropdown\" class=\"mb-2 w-100\">\n <li *ngFor=\"let modulo of primaryDropdown\" (click)=\"(modulo.secondary_level != null ? openDropdown(modulo, secondary_dropdown) : redirectToModulo(modulo.URL))\">\n <a class=\"dropdown-item mb-2\">\n <img src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n {{ modulo.label }}\n </a>\n </li>\n <hr class=\"dropdown-divider\">\n <li>\n <a class=\"dropdown-item link-portal mt-2\" (click)=\"redirectToPrePortal()\" target=\"_blank\">Portal Sispro</a>\n </li>\n </div>\n\n <ng-template #secondary_dropdown>\n <div #secondary_ref (clickOutside)=\"onClickedOutside($event, secondary_ref)\">\n <app-secondary-dropdown [modulo]=\"modulo\" (backPrimaryDropdown)=\"backToPrimary($event)\"></app-secondary-dropdown>\n </div>\n </ng-template>\n</div>", styles: ["*{padding:0;margin:0}li a{font-size:14px}li a img{margin-right:4px}li a:hover{font-weight:700;background-color:transparent}.dropdown-divider{height:0}.link-portal{color:#2847a0;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}\n"] }]
1628
- }], ctorParameters: () => [{ type: LibCustomMenuService }], propDecorators: { buttonWasClicked: [{
2164
+ args: [{ selector: 'app-primary-dropdown', imports: [
2165
+ SecondaryDropdownComponent,
2166
+ CommonModule
2167
+ ], template: "<div class=\"p-2\">\n <div *ngIf=\"selectDataState; else secondary_dropdown\" class=\"mb-2 w-100\">\n <li *ngFor=\"let modulo of primaryDropdown\" (click)=\"(modulo.secondary_level != null ? openDropdown(modulo, secondary_dropdown) : redirectToModulo(modulo.URL))\">\n <a class=\"dropdown-item mb-2\">\n <img src=\"{{ modulo.icon }}\" alt=\"{{ modulo.label }}\">\n {{ modulo.label }}\n </a>\n </li>\n <hr class=\"dropdown-divider\">\n <li>\n <a class=\"dropdown-item link-portal mt-2\" (click)=\"redirectToPrePortal()\" target=\"_blank\">Portal Sispro</a>\n </li>\n </div>\n\n <ng-template #secondary_dropdown>\n <div #secondary_ref (clickOutside)=\"onClickedOutside($event, secondary_ref)\">\n <app-secondary-dropdown [modulo]=\"this.modulo\" (backPrimaryDropdown)=\"backToPrimary($event)\"></app-secondary-dropdown>\n </div>\n </ng-template>\n</div>", styles: ["*{padding:0;margin:0}li a{font-size:14px}li a img{margin-right:4px}li a:hover{font-weight:700;background-color:transparent}.dropdown-divider{height:0}.link-portal{color:#2847a0;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}\n"] }]
2168
+ }], ctorParameters: () => [{ type: LibCustomMenuService }, { type: ProjectUtilservice }], propDecorators: { buttonWasClicked: [{
1629
2169
  type: Input
1630
2170
  }] } });
1631
2171
 
1632
2172
  class DynamicMenuComponent {
1633
- constructor(router) {
2173
+ constructor(router, _projectUtilService) {
1634
2174
  this.router = router;
2175
+ this._projectUtilService = _projectUtilService;
1635
2176
  this.selectTemplate = new EventEmitter;
1636
2177
  this.titleSubmenu = "";
1637
2178
  this.submenuList = [];
@@ -1656,15 +2197,21 @@ class DynamicMenuComponent {
1656
2197
  ref.classList.toggle("yellow-star");
1657
2198
  }
1658
2199
  getExternalUrl(url) {
1659
- return `https://siscandesv6.sispro.com.br/SisproErpCloud/${url}`;
2200
+ return `${this._projectUtilService.getHostName()}/${url}`;
1660
2201
  }
1661
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicMenuComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1662
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicMenuComponent, isStandalone: true, selector: "app-dynamic-menu", inputs: { submenuRef: "submenuRef", recebeParam: "recebeParam", titleSubmenu: "titleSubmenu", submenuList: "submenuList" }, outputs: { selectTemplate: "selectTemplate" }, queries: [{ propertyName: "desiredContent", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<div #submenu class=\"header-submenu\">\n <h1 class=\"titulo pb-3 pt-4\">{{ titleSubmenu }}</h1>\n <div class=\"itens-list\">\n <ul style=\"width: 100%\">\n \n <li *ngFor=\"let itemList of submenuList; let i = index\" [id]=\"itemList!.id\" \n class=\"d-flex justify-content-between align-items-center\"\n [class]=\"i == 0 ? 'mt-1' : ''\">\n \n <a *ngIf=\"!itemList.isExternal; else externalMenu\"\n [routerLink]=\"itemList!.route != null ? ['/' + itemList!.route] : null\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(itemList.route)\"\n target=\"_blank\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n </ng-template>\n\n <!-- <button class=\"star favoritos\" #star (click)=\"changeStar(star, itemList)\"></button> -->\n </li>\n\n </ul>\n </div>\n</div>", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;color:#fff}ul{list-style:none;padding-left:0;display:inline;white-space:nowrap}.titulo{font-size:20px;font-weight:700;display:flex;justify-content:center;border-bottom:1px solid #2847a0}ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}ul li{font-size:16px;padding-bottom:18px}ul li span:hover{font-weight:700}a{text-decoration:none}.itens-list{display:flex;align-items:center}.itens-list .favoritos,.itens-list span{cursor:pointer}.footer-menu{display:flex;flex-direction:column;justify-content:center;padding-bottom:16px}.footer-menu .footer-components{border-top:1px solid #3265ee;padding-top:16px;padding-left:17px;white-space:nowrap}.footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0 15px 0 0}.footer-components{display:flex;justify-content:center;align-items:center}button{position:relative;border:none;background-color:transparent}.photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.star{width:24px;height:24px;background-repeat:no-repeat}.yellow-star{width:26px;height:24px;background-repeat:no-repeat}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
2202
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicMenuComponent, deps: [{ token: i1$1.Router }, { token: ProjectUtilservice }], target: i0.ɵɵFactoryTarget.Component }); }
2203
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DynamicMenuComponent, isStandalone: true, selector: "app-dynamic-menu", inputs: { submenuRef: "submenuRef", recebeParam: "recebeParam", titleSubmenu: "titleSubmenu", submenuList: "submenuList" }, outputs: { selectTemplate: "selectTemplate" }, queries: [{ propertyName: "desiredContent", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<div #submenu class=\"header-submenu\">\n <h1 class=\"titulo pb-3 pt-4\">{{ titleSubmenu }}</h1>\n <div class=\"itens-list\">\n <ul style=\"width: 100%\">\n \n <li *ngFor=\"let itemList of submenuList; let i = index\" [id]=\"itemList!.id\" \n class=\"d-flex justify-content-between align-items-center\"\n [class]=\"i == 0 ? 'mt-1' : ''\">\n \n <a *ngIf=\"!itemList.isExternal; else externalMenu\"\n [routerLink]=\"itemList!.route != null ? ['/' + itemList!.route] : null\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(itemList.route)\"\n target=\"_blank\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n </ng-template>\n\n <!-- <button class=\"star favoritos\" #star (click)=\"changeStar(star, itemList)\"></button> -->\n </li>\n\n </ul>\n </div>\n</div>", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;color:#fff}ul{list-style:none;padding-left:0;display:inline;white-space:nowrap}.titulo{font-size:20px;font-weight:700;display:flex;justify-content:center;border-bottom:1px solid #2847a0}ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}ul li{font-size:16px;padding-bottom:18px}ul li span:hover{font-weight:700}a{text-decoration:none}.itens-list{display:flex;align-items:center}.itens-list .favoritos,.itens-list span{cursor:pointer}.footer-menu{display:flex;flex-direction:column;justify-content:center;padding-bottom:16px}.footer-menu .footer-components{border-top:1px solid #3265ee;padding-top:16px;padding-left:17px;white-space:nowrap}.footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0 15px 0 0}.footer-components{display:flex;justify-content:center;align-items:center}button{position:relative;border:none;background-color:transparent}.photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.star{width:24px;height:24px;background-repeat:no-repeat}.yellow-star{width:26px;height:24px;background-repeat:no-repeat}\n"], dependencies: [{ kind: "ngmodule", type:
2204
+ // AuthRoutingModule,
2205
+ CommonModule }, { kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
1663
2206
  }
1664
2207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DynamicMenuComponent, decorators: [{
1665
2208
  type: Component,
1666
- args: [{ selector: 'app-dynamic-menu', imports: [RouterModule], template: "<div #submenu class=\"header-submenu\">\n <h1 class=\"titulo pb-3 pt-4\">{{ titleSubmenu }}</h1>\n <div class=\"itens-list\">\n <ul style=\"width: 100%\">\n \n <li *ngFor=\"let itemList of submenuList; let i = index\" [id]=\"itemList!.id\" \n class=\"d-flex justify-content-between align-items-center\"\n [class]=\"i == 0 ? 'mt-1' : ''\">\n \n <a *ngIf=\"!itemList.isExternal; else externalMenu\"\n [routerLink]=\"itemList!.route != null ? ['/' + itemList!.route] : null\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(itemList.route)\"\n target=\"_blank\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n </ng-template>\n\n <!-- <button class=\"star favoritos\" #star (click)=\"changeStar(star, itemList)\"></button> -->\n </li>\n\n </ul>\n </div>\n</div>", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;color:#fff}ul{list-style:none;padding-left:0;display:inline;white-space:nowrap}.titulo{font-size:20px;font-weight:700;display:flex;justify-content:center;border-bottom:1px solid #2847a0}ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}ul li{font-size:16px;padding-bottom:18px}ul li span:hover{font-weight:700}a{text-decoration:none}.itens-list{display:flex;align-items:center}.itens-list .favoritos,.itens-list span{cursor:pointer}.footer-menu{display:flex;flex-direction:column;justify-content:center;padding-bottom:16px}.footer-menu .footer-components{border-top:1px solid #3265ee;padding-top:16px;padding-left:17px;white-space:nowrap}.footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0 15px 0 0}.footer-components{display:flex;justify-content:center;align-items:center}button{position:relative;border:none;background-color:transparent}.photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.star{width:24px;height:24px;background-repeat:no-repeat}.yellow-star{width:26px;height:24px;background-repeat:no-repeat}\n"] }]
1667
- }], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: { selectTemplate: [{
2209
+ args: [{ selector: 'app-dynamic-menu', imports: [
2210
+ // AuthRoutingModule,
2211
+ CommonModule,
2212
+ RouterLink
2213
+ ], template: "<div #submenu class=\"header-submenu\">\n <h1 class=\"titulo pb-3 pt-4\">{{ titleSubmenu }}</h1>\n <div class=\"itens-list\">\n <ul style=\"width: 100%\">\n \n <li *ngFor=\"let itemList of submenuList; let i = index\" [id]=\"itemList!.id\" \n class=\"d-flex justify-content-between align-items-center\"\n [class]=\"i == 0 ? 'mt-1' : ''\">\n \n <a *ngIf=\"!itemList.isExternal; else externalMenu\"\n [routerLink]=\"itemList!.route != null ? ['/' + itemList!.route] : null\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(itemList.route)\"\n target=\"_blank\" \n (click)=\"recebeParam($event, submenuRef)\">\n <span>{{ itemList!.label }}</span>\n </a>\n </ng-template>\n\n <!-- <button class=\"star favoritos\" #star (click)=\"changeStar(star, itemList)\"></button> -->\n </li>\n\n </ul>\n </div>\n</div>", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;color:#fff}ul{list-style:none;padding-left:0;display:inline;white-space:nowrap}.titulo{font-size:20px;font-weight:700;display:flex;justify-content:center;border-bottom:1px solid #2847a0}ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}ul li{font-size:16px;padding-bottom:18px}ul li span:hover{font-weight:700}a{text-decoration:none}.itens-list{display:flex;align-items:center}.itens-list .favoritos,.itens-list span{cursor:pointer}.footer-menu{display:flex;flex-direction:column;justify-content:center;padding-bottom:16px}.footer-menu .footer-components{border-top:1px solid #3265ee;padding-top:16px;padding-left:17px;white-space:nowrap}.footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0 15px 0 0}.footer-components{display:flex;justify-content:center;align-items:center}button{position:relative;border:none;background-color:transparent}.photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.star{width:24px;height:24px;background-repeat:no-repeat}.yellow-star{width:26px;height:24px;background-repeat:no-repeat}\n"] }]
2214
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: ProjectUtilservice }], propDecorators: { selectTemplate: [{
1668
2215
  type: Output
1669
2216
  }], submenuRef: [{
1670
2217
  type: Input
@@ -1688,16 +2235,207 @@ class NotifSubmenuComponent {
1688
2235
  }
1689
2236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NotifSubmenuComponent, decorators: [{
1690
2237
  type: Component,
1691
- args: [{ selector: 'app-notif-submenu', template: "<div class=\"header-submenu\">\n <h1 class=\"titulo pb-3 pt-4\">Notifica\u00E7\u00F5es</h1>\n</div>\n<div class=\"body-notif\">\n <div class=\"new-notif\">\n <div class=\"session-header p-2\">\n <p class=\"session-h-item\">Novas (2)</p><p>Marcar todas como Lidas</p>\n </div>\n <div class=\"scroll\">\n <div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <div class=\"read-notif\">\n <div class=\"session-header p-2\">\n <p class=\"session-h-item\">Lidas</p>\n </div>\n <div class=\"scroll-second\">\n <div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;color:#fff}ul{list-style:none;padding-left:0;display:inline;white-space:nowrap}::-webkit-scrollbar{width:4px;background:transparent}::-webkit-scrollbar-thumb{background:#fff;border-radius:16px}.titulo{font-size:20px;font-weight:700;display:flex;justify-content:center;border-bottom:1px solid #2847a0}ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}button{position:relative;border:none;background-color:transparent}.session-header{display:flex;justify-content:space-between;background-color:#2847a0}.session-header .session-h-item{font-weight:700}.session{border-bottom:1px solid #fff;overflow:auto;height:100%}.session:last-child{border-bottom:none}.session-start{display:flex}.item-end{display:flex;justify-content:space-between}.scroll{margin-right:2px;overflow:auto;max-height:300px}.scroll-second{margin-right:2px;overflow:auto;max-height:481px}\n"] }]
2238
+ args: [{ selector: 'app-notif-submenu', imports: [], template: "<div class=\"header-submenu\">\n <h1 class=\"titulo pb-3 pt-4\">Notifica\u00E7\u00F5es</h1>\n</div>\n<div class=\"body-notif\">\n <div class=\"new-notif\">\n <div class=\"session-header p-2\">\n <p class=\"session-h-item\">Novas (2)</p><p>Marcar todas como Lidas</p>\n </div>\n <div class=\"scroll\">\n <div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <div class=\"read-notif\">\n <div class=\"session-header p-2\">\n <p class=\"session-h-item\">Lidas</p>\n </div>\n <div class=\"scroll-second\">\n <div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n <div class=\"session mb-3 pb-3\">\n <div class=\"session-start mt-3 ms-3\">\n <img src=\"assets/icons/file-text.svg\" alt=\"\"><p>Contratos</p>\n </div>\n <div class=\"m-4\">\n <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has </p>\n </div>\n <div class=\"item-end ms-4 mx-4\">\n <button>Marcar como lida</button>\n <p>2h atr\u00E1s</p>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;color:#fff}ul{list-style:none;padding-left:0;display:inline;white-space:nowrap}::-webkit-scrollbar{width:4px;background:transparent}::-webkit-scrollbar-thumb{background:#fff;border-radius:16px}.titulo{font-size:20px;font-weight:700;display:flex;justify-content:center;border-bottom:1px solid #2847a0}ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}button{position:relative;border:none;background-color:transparent}.session-header{display:flex;justify-content:space-between;background-color:#2847a0}.session-header .session-h-item{font-weight:700}.session{border-bottom:1px solid #fff;overflow:auto;height:100%}.session:last-child{border-bottom:none}.session-start{display:flex}.item-end{display:flex;justify-content:space-between}.scroll{margin-right:2px;overflow:auto;max-height:300px}.scroll-second{margin-right:2px;overflow:auto;max-height:481px}\n"] }]
1692
2239
  }], ctorParameters: () => [] });
1693
2240
 
2241
+ class MenuServicesService {
2242
+ constructor(_authStorageService, _httpClient, _environmentService) {
2243
+ this._authStorageService = _authStorageService;
2244
+ this._httpClient = _httpClient;
2245
+ this._environmentService = _environmentService;
2246
+ this._BASE_URL = ""; // SpInfra2AplicWS
2247
+ this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
2248
+ // #endregion Menu Dinâmico
2249
+ // #endregion ==========> SERVICES <==========
2250
+ // #region ==========> UTILITIES <==========
2251
+ this._menuFooterImg = null;
2252
+ // #region NewImg Event
2253
+ // Implementação de lógica vista no link: https://hasangalakdinu.medium.com/how-to-call-a-function-in-another-component-angular-using-rxjs-3f2e85920705
2254
+ this._subject = new Subject();
2255
+ this._BASE_URL = `${this._environmentService.SpInfra2ErpWS}`; // SpInfra2ErpWS
2256
+ this._BASE_URL = !this._environmentService.production ? this._BASE_URL : `${this._environmentService.SpInfra2ErpWS}`;
2257
+ }
2258
+ // #region ==========> SERVICES <==========
2259
+ // #region PREPARATION
2260
+ // #region Menu: Usuário
2261
+ // [...]
2262
+ // #endregion Menu: Usuário
2263
+ // #region Menu: Estabelecimentos
2264
+ getEstabelecimentosModalList(usuarioID, pesquisa) {
2265
+ const params = new HttpParams()
2266
+ .set('pesquisa', pesquisa);
2267
+ const headers = new HttpHeaders()
2268
+ .set('Content-Type', 'application/json');
2269
+ const url = `${this._BASE_URL}/InfraEstabelecimento/GetEstabelecimentosModal`;
2270
+ return this._httpClient
2271
+ .get(url, { 'params': params, 'headers': headers })
2272
+ .pipe(take(1), tap(response => {
2273
+ if (response.Error) {
2274
+ throw Error(response.ErrorMessage);
2275
+ }
2276
+ }));
2277
+ }
2278
+ // #endregion Menu: Estabelecimentos
2279
+ // #endregion PREPARATION
2280
+ // #region GET
2281
+ // #region Menu: Usuário
2282
+ getImagemMenu() {
2283
+ const url = `${this._BASE_URL}/InfraUsuario/GetImagemMenu`;
2284
+ return this._httpClient
2285
+ .get(url, { 'headers': this._HTTP_HEADERS })
2286
+ .pipe(take(1), tap(response => {
2287
+ if (response.Error) {
2288
+ throw Error(response.ErrorMessage);
2289
+ }
2290
+ this.saveImageToStorage(response.InfraUsuarioImg.IMAGEM, response.InfraUsuarioImg.FILENAME);
2291
+ }));
2292
+ }
2293
+ // #endregion Menu: Usuário
2294
+ // #region Menu: Estabelecimentos
2295
+ getEstabelecimentoSession(estabID) {
2296
+ const params = new HttpParams()
2297
+ .set('id', estabID);
2298
+ const url = `${this._BASE_URL}/InfraEstabelecimento/GetEstabelecimentoSession`;
2299
+ return this._httpClient
2300
+ .get(url, { 'params': params, 'headers': this._HTTP_HEADERS })
2301
+ .pipe(take(1), tap(response => {
2302
+ if (response.Error) {
2303
+ throw Error(response.ErrorMessage);
2304
+ }
2305
+ }));
2306
+ }
2307
+ // #endregion Menu: Estabelecimentos
2308
+ // #region Get Usuario Email
2309
+ getUsuarioEmail() {
2310
+ const url = `${this._BASE_URL}/InfraUsuario/GetUsuarioEmail`;
2311
+ return this._httpClient
2312
+ .get(url, { 'headers': this._HTTP_HEADERS })
2313
+ .pipe(take(1), tap(response => {
2314
+ if (response.Error) {
2315
+ throw Error(response.ErrorMessage);
2316
+ }
2317
+ }));
2318
+ }
2319
+ // #endregion Get Usuario Email
2320
+ // #endregion GET
2321
+ // #region UPDATE
2322
+ // #region Menu: Usuário
2323
+ updateLastLogEstabID(estabID) {
2324
+ const params = new HttpParams()
2325
+ .set('estabID', estabID);
2326
+ const url = `${this._BASE_URL}/InfraUsuario/UpdateLastSelectedEstabelecimento`;
2327
+ return this._httpClient
2328
+ .post(url, null, { 'params': params, 'headers': this._HTTP_HEADERS })
2329
+ .pipe(take(1), tap(response => {
2330
+ if (response.Error) {
2331
+ throw Error(response.ErrorMessage);
2332
+ }
2333
+ }));
2334
+ }
2335
+ // #endregion Menu: Usuário
2336
+ // #region Menu: Estabelecimentos
2337
+ defineDefaultEstabelecimento(estabID, usuarioID, isDefault) {
2338
+ const params = new HttpParams()
2339
+ .set('estabID', estabID)
2340
+ .set('isDefault', isDefault);
2341
+ const url = `${this._BASE_URL}/InfraEstabelecimento/DefineDefaultEstab`;
2342
+ return this._httpClient
2343
+ .post(url, null, { 'params': params, 'headers': this._HTTP_HEADERS })
2344
+ .pipe(take(1), tap(response => {
2345
+ if (response.Error) {
2346
+ throw Error(response.ErrorMessage);
2347
+ }
2348
+ }));
2349
+ }
2350
+ // #endregion Menu: Estabelecimentos
2351
+ // #endregion UPDATE
2352
+ // #region Menu Dinâmico
2353
+ /** Método executado para pegar o Menu lateral levando em conta as permissões do usuário, grupo e o tenant ativo
2354
+ * Executado caso o getter do boolean Menu Dynamic seja true
2355
+ */
2356
+ getMenuLateral(moduloId) {
2357
+ const headers = new HttpHeaders().set("Content-Type", "application/json");
2358
+ const url = `${this._BASE_URL}/Menu/GetMenuLateral`;
2359
+ const params = new HttpParams()
2360
+ .set('moduloId', moduloId);
2361
+ return this._httpClient
2362
+ .get(url, { params: params, headers: headers })
2363
+ .pipe(take(1), tap((response) => {
2364
+ if (response.Error) {
2365
+ throw Error(response.ErrorMessage);
2366
+ }
2367
+ }));
2368
+ }
2369
+ /** Método executado para montar estrutura de título, submenu e telas de acordo com os modelos presentes na ngx-sp-infra
2370
+ * envia-se o título deste grupo de submenus, ícone e enum daqueles submenus que
2371
+ * ficarão alocados no grupo de determinado título enviado
2372
+ */
2373
+ getTelaSubmenus(NavSubmenuSearchItems) {
2374
+ const headers = new HttpHeaders()
2375
+ .set('Content-Type', 'application/json');
2376
+ const url = `${this._BASE_URL}/Menu/GetTelaSubmenus`;
2377
+ return this._httpClient
2378
+ .post(url, JSON.stringify(NavSubmenuSearchItems), { 'headers': headers })
2379
+ .pipe(take(1), tap(response => {
2380
+ if (response.Error) {
2381
+ throw Error(response.ErrorMessage);
2382
+ }
2383
+ }));
2384
+ }
2385
+ /** Método executado para montar estrutura da tela de submenu com os cards baseado no IdUnico do menu acessado em específico
2386
+ */
2387
+ getTelaSubmenusWithCards(MenuIdUnico) {
2388
+ const headers = new HttpHeaders()
2389
+ .set('Content-Type', 'application/json');
2390
+ const url = `${this._BASE_URL}/Menu/GetTelaSubmenusWithCards`;
2391
+ const params = new HttpParams()
2392
+ .set('MenuIdUnico', MenuIdUnico);
2393
+ return this._httpClient
2394
+ .get(url, { 'params': params, 'headers': headers })
2395
+ .pipe(take(1), tap(response => {
2396
+ if (response.Error) {
2397
+ throw Error(response.ErrorMessage);
2398
+ }
2399
+ }));
2400
+ }
2401
+ getMenuFooterImg() {
2402
+ const cachedFooterImg = JSON.parse(localStorage.getItem('menuFooterImg'));
2403
+ if (cachedFooterImg) {
2404
+ return cachedFooterImg;
2405
+ }
2406
+ return this._menuFooterImg;
2407
+ }
2408
+ setMenuFooterImg(value) {
2409
+ this._menuFooterImg = value;
2410
+ localStorage.setItem('menuFooterImg', JSON.stringify(value));
2411
+ }
2412
+ saveImageToStorage(footerImgSrc, footerImgName) {
2413
+ this.setMenuFooterImg({ USUARIOID: this._authStorageService.infraUsuarioId, FILENAME: footerImgName, FILE: footerImgSrc });
2414
+ }
2415
+ newUserImageEvent(value) {
2416
+ this._subject.next(value);
2417
+ }
2418
+ getNewUserImageEvent() {
2419
+ return this._subject.asObservable();
2420
+ }
2421
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, deps: [{ token: AuthStorageService }, { token: i1.HttpClient }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2422
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, providedIn: 'root' }); }
2423
+ }
2424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, decorators: [{
2425
+ type: Injectable,
2426
+ args: [{
2427
+ providedIn: 'root'
2428
+ }]
2429
+ }], ctorParameters: () => [{ type: AuthStorageService }, { type: i1.HttpClient }, { type: EnvironmentService }] });
2430
+
1694
2431
  class SelecaoEstabelecimentosModalComponent {
1695
- constructor(_authStorageService, _bsModalService, _customMenuService, _menuServicesService, _messageService) {
2432
+ constructor(_authStorageService, _bsModalService, _customMenuService, _menuServicesService, _messageService, _projectUtilService) {
1696
2433
  this._authStorageService = _authStorageService;
1697
2434
  this._bsModalService = _bsModalService;
1698
2435
  this._customMenuService = _customMenuService;
1699
2436
  this._menuServicesService = _menuServicesService;
1700
2437
  this._messageService = _messageService;
2438
+ this._projectUtilService = _projectUtilService;
1701
2439
  // #region ==========> PROPERTIES <==========
1702
2440
  // #region PRIVATE
1703
2441
  // [...]
@@ -1705,7 +2443,6 @@ class SelecaoEstabelecimentosModalComponent {
1705
2443
  // #region PUBLIC
1706
2444
  this.onClose = new EventEmitter();
1707
2445
  this.onSelected = new EventEmitter();
1708
- this.$estabelecimentosList = [];
1709
2446
  this.page = 1;
1710
2447
  this.itemsPerPage = 10;
1711
2448
  this.response_messages = {
@@ -1741,9 +2478,7 @@ class SelecaoEstabelecimentosModalComponent {
1741
2478
  }
1742
2479
  },
1743
2480
  error: error => {
1744
- //this._projectUtilService.showHttpError(error);
1745
- this._messageService.showAlertDanger(error);
1746
- throw new Error(error);
2481
+ this._projectUtilService.showHttpError(error);
1747
2482
  this.$estabelecimentosList = [];
1748
2483
  }
1749
2484
  });
@@ -1767,9 +2502,7 @@ class SelecaoEstabelecimentosModalComponent {
1767
2502
  : this._messageService.showAlertSuccess('Estabelecimento padrão removido para o usuário');
1768
2503
  },
1769
2504
  error: error => {
1770
- //this._projectUtilService.showHttpError(error);
1771
- this._messageService.showAlertDanger(error);
1772
- throw new Error(error);
2505
+ this._projectUtilService.showHttpError(error);
1773
2506
  }
1774
2507
  });
1775
2508
  }
@@ -1868,29 +2601,42 @@ class SelecaoEstabelecimentosModalComponent {
1868
2601
  closeSelf() {
1869
2602
  this.onClose.emit();
1870
2603
  }
1871
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SelecaoEstabelecimentosModalComponent, deps: [{ token: AuthStorageService }, { token: i1$2.BsModalService }, { token: LibCustomMenuService }, { token: MenuServicesService }, { token: i5.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
1872
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SelecaoEstabelecimentosModalComponent, isStandalone: true, selector: "selecao-estabelecimentos-modal", outputs: { onClose: "onClose", onSelected: "onSelected" }, ngImport: i0, template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered\">\n <h4 class=\"modal-title pull-left color-modal\" style=\"font-size: 20px; font-weight: bold;\"> Selecione um\n estabelecimento </h4>\n <button (click)=\"closeSelf()\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"modal-message\">\n <div class=\"search-and-filters d-flex flex-row align-items-center justify-content-between\">\n <div class=\"d-flex flex-row w-100\">\n <div class=\"input-group\">\n <span class=\"input-group-text px-2\" id=\"basic-addon1\"\n style=\"background-color: transparent; border-right: none;\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\"/>\n </span>\n <input type=\"text\" class=\"form-control border-start-0 ps-0\" id=\"pesquisaInput\" #pesquisa\n placeholder=\"Digite o C\u00F3digo\" (keyup.enter)=\"refreshList(pesquisa.value)\">\n </div>\n </div>\n\n <div class=\"filters d-flex align-items-center justify-content-between ms-3\">\n <div class=\"search-buttons d-flex flex-row align-items-center my-0 mx-0\">\n <button id=\"clearFilterBtn\" class=\"btn btn-outline-primary ms-0 no-hover-btn me-2\"\n (click)=\"pesquisa.value = ''; refreshList(pesquisa.value)\"> Limpar </button>\n <button id=\"searchFilterBtn\" class=\"btn btn-primary me-0\" (click)=\"refreshList(pesquisa.value)\"> Pesquisar\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"table-list w-100 mt-3\" *ngIf=\"$estabelecimentosList; else loading\">\n <table class=\"table table-bordered table-hover mb-0\">\n <thead class=\"fs-6\">\n <tr>\n <th scope=\"col\" class=\"col-11 align-middle th\">Estabelecimento <span\n class=\"text-primary fst-italic\">(duplo-clique para selecionar)</span></th>\n <th scope=\"col\" class=\"col-1 align-middle text-center th\">A\u00E7\u00F5es</th>\n </tr>\n </thead>\n\n <tbody *ngIf=\"$estabelecimentosList.length > 0; else emptyList\">\n <tr\n *ngFor=\"let estabelecimento of $estabelecimentosList | paginate: { itemsPerPage: itemsPerPage, currentPage: page }\"\n (dblclick)=\"selectEstabelecimento(estabelecimento.ID, estabelecimento.NOMEEXIBICAO)\" role=\"button\">\n <td><span class=\"row-name\"> {{ estabelecimento.CODIGO }} - {{ estabelecimento.NOMEEXIBICAO }} </span>\n <span class=\"subname\"> {{ estabelecimento.IS_MATRIZ ? \"Matriz \" : null }} CNPJ: {{ estabelecimento.CNPJ\n }} </span></td>\n <td class=\"text-center align-middle\">\n <div class=\"action-icons d-flex flex-row align-items-center justify-content-around\">\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"flexSwitchCheckChecked\"\n tooltip=\"Estabelecimento padr\u00E3o\" [checked]=\"estabelecimento.IS_DEFAULT\"\n style=\"transform: translateY(3px); height: 1rem; width: 28px;\" #isDefaultRow\n (click)=\"estabelecimento.IS_DEFAULT = !estabelecimento.IS_DEFAULT; defineDefaultEstabelecimento(estabelecimento.ID, estabelecimento.IS_DEFAULT)\">\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n\n <!-- #region EMPTY LIST CELL -->\n <ng-template #emptyList>\n <tbody>\n <tr>\n <td colspan=\"2\" class=\"align-middle\"><span class=\"row-name fw-light fst-italic text-center\"> {{\n response_messages.emptyMessage }} </span></td>\n </tr>\n </tbody>\n </ng-template>\n <!-- #endregion EMPTY LIST CELL -->\n </table>\n\n <!-- #region PAGINATION -->\n <div class=\"d-flex justify-content-end mt-2\" *ngIf=\"$estabelecimentosList.length > 0\">\n <div class=\"d-flex align-items-center\">\n <label class=\"me-2\" style=\"white-space: nowrap;\">Itens por p\u00E1gina</label>\n <select class=\"form-select select-search\" (change)=\"onSelectChange($event)\">\n <option class=\"selected\" value=\"10\" selected>10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n\n <pagination-controls class=\"sp-pagination mt-3\" (pageChange)=\"page = $event\"\n previousLabel=\"\u00AB&nbsp;&nbsp;&nbsp;\" nextLabel=\"&nbsp;&nbsp;&nbsp;\u00BB\" [maxSize]=\"5\">\n </pagination-controls>\n </div>\n <!-- #endregion PAGINATION -->\n \n </div>\n\n <!-- <div class=\"d-flex justify-content-between align-items-center mt-3\">\n <span style=\"color: #6C757D\"> Registros {{$estabelecimentosList.length}} de {{$estabelecimentosList.length}} </span>\n <nav aria-label=\"...\">\n <ul class=\"pagination mb-0\">\n <li class=\"page-item disabled\"> <a class=\"page-link\" href=\"#\" tabindex=\"-1\">Anterior</a> </li>\n <li class=\"page-item active\"> <a class=\"page-link\" href=\"#\">1</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">2</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">3</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">Pr\u00F3ximo</a> </li>\n </ul>\n </nav>\n </div> -->\n\n\n <ng-template #loading>\n <lib-spinner></lib-spinner>\n </ng-template>\n </div>\n </div>\n</div>", styles: [".table-list table thead{height:50px;font-size:1rem;background-color:#e9ecef}.table-list table thead .status-header{width:5%}.table-list table thead th:first-child{width:50px;height:50px}.table-list table thead th{font-size:16px}.table-list table .center-content{text-align:center}.table-list table tbody{font-size:.875rem}.table-list table tbody>tr:hover{background-color:#cce5ff}.table-list table tbody span.row-name{display:block;width:100%;font-weight:700}.table-list table tbody span.subname{color:#0f0f0f80}.table-list table tbody .action-icons{color:#007bff}.table-list table tbody .action-icons a{margin:0 .75rem}.table-list table tbody .status{width:13px;height:13px;border-radius:50%}.table-list table tbody .active{background-color:#28a745}.table-list table tbody .inactive{background-color:#a72828}.name-estab{font-size:14px;font-weight:700;text-transform:uppercase;color:#212529}.subname-estab{font-size:12px;color:#212529}#clearFilterBtn,#searchFilterBtn{padding:6px 12px}\n"], dependencies: [{ kind: "ngmodule", type: InfraModule }, { kind: "component", type: i5.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: i5.LibSpinnerComponent, selector: "lib-spinner", inputs: ["type", "theme", "size", "helperText"] }, { kind: "ngmodule", type: NgxPaginationModule }, { kind: "pipe", type: i6.PaginatePipe, name: "paginate" }, { kind: "component", type: i6.PaginationControlsComponent, selector: "pagination-controls", inputs: ["id", "maxSize", "directionLinks", "autoHide", "responsive", "previousLabel", "nextLabel", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], outputs: ["pageChange", "pageBoundsCorrection"] }] }); }
2604
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SelecaoEstabelecimentosModalComponent, deps: [{ token: AuthStorageService }, { token: i2.BsModalService }, { token: LibCustomMenuService }, { token: MenuServicesService }, { token: i3.MessageService }, { token: ProjectUtilservice }], target: i0.ɵɵFactoryTarget.Component }); }
2605
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SelecaoEstabelecimentosModalComponent, isStandalone: true, selector: "selecao-estabelecimentos-modal", outputs: { onClose: "onClose", onSelected: "onSelected" }, ngImport: i0, template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered\">\n <h4 class=\"modal-title pull-left color-modal\" style=\"font-size: 20px; font-weight: bold;\"> Selecione um\n estabelecimento </h4>\n <button (click)=\"closeSelf()\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"modal-message\">\n <div class=\"search-and-filters d-flex flex-row align-items-center justify-content-between\">\n <div class=\"d-flex flex-row w-100\">\n <div class=\"input-group\">\n <span class=\"input-group-text px-2\" id=\"basic-addon1\"\n style=\"background-color: transparent; border-right: none;\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\"/>\n </span>\n <input type=\"text\" class=\"form-control border-start-0 ps-0\" id=\"pesquisaInput\" #pesquisa\n placeholder=\"Digite o C\u00F3digo\" (keyup.enter)=\"refreshList(pesquisa.value)\">\n </div>\n </div>\n\n <div class=\"filters d-flex align-items-center justify-content-between ms-3\">\n <div class=\"search-buttons d-flex flex-row align-items-center my-0 mx-0\">\n <button id=\"clearFilterBtn\" class=\"btn btn-outline-primary ms-0 no-hover-btn me-2\"\n (click)=\"pesquisa.value = ''; refreshList(pesquisa.value)\"> Limpar </button>\n <button id=\"searchFilterBtn\" class=\"btn btn-primary me-0\" (click)=\"refreshList(pesquisa.value)\"> Pesquisar\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"table-list w-100 mt-3\" *ngIf=\"$estabelecimentosList; else loading\">\n <table class=\"table table-bordered table-hover mb-0\">\n <thead class=\"fs-6\">\n <tr>\n <th scope=\"col\" class=\"col-11 align-middle th\">Estabelecimento <span\n class=\"text-primary fst-italic\">(duplo-clique para selecionar)</span></th>\n <th scope=\"col\" class=\"col-1 align-middle text-center th\">A\u00E7\u00F5es</th>\n </tr>\n </thead>\n\n <tbody *ngIf=\"$estabelecimentosList.length > 0; else emptyList\">\n <tr\n *ngFor=\"let estabelecimento of $estabelecimentosList | paginate: { itemsPerPage: itemsPerPage, currentPage: page }\"\n (dblclick)=\"selectEstabelecimento(estabelecimento.ID, estabelecimento.NOMEEXIBICAO)\" role=\"button\">\n <td><span class=\"row-name\"> {{ estabelecimento.CODIGO }} - {{ estabelecimento.NOMEEXIBICAO }} </span>\n <span class=\"subname\"> {{ estabelecimento.IS_MATRIZ ? \"Matriz \" : null }} CNPJ: {{ estabelecimento.CNPJ\n }} </span></td>\n <td class=\"text-center align-middle\">\n <div class=\"action-icons d-flex flex-row align-items-center justify-content-around\">\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"flexSwitchCheckChecked\"\n tooltip=\"Estabelecimento padr\u00E3o\" [checked]=\"estabelecimento.IS_DEFAULT\"\n style=\"transform: translateY(3px); height: 1rem; width: 28px;\" #isDefaultRow\n (click)=\"estabelecimento.IS_DEFAULT = !estabelecimento.IS_DEFAULT; defineDefaultEstabelecimento(estabelecimento.ID, estabelecimento.IS_DEFAULT)\">\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n\n <!-- #region EMPTY LIST CELL -->\n <ng-template #emptyList>\n <tbody>\n <tr>\n <td colspan=\"2\" class=\"align-middle\"><span class=\"row-name fw-light fst-italic text-center\"> {{\n response_messages.emptyMessage }} </span></td>\n </tr>\n </tbody>\n </ng-template>\n <!-- #endregion EMPTY LIST CELL -->\n </table>\n\n <!-- #region PAGINATION -->\n <div class=\"d-flex justify-content-end mt-2\" *ngIf=\"$estabelecimentosList.length > 0\">\n <div class=\"d-flex align-items-center\">\n <label class=\"me-2\" style=\"white-space: nowrap;\">Itens por p\u00E1gina</label>\n <select class=\"form-select select-search\" (change)=\"onSelectChange($event)\">\n <option class=\"selected\" value=\"10\" selected>10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n\n <pagination-controls class=\"sp-pagination mt-3\" (pageChange)=\"page = $event\"\n previousLabel=\"\u00AB&nbsp;&nbsp;&nbsp;\" nextLabel=\"&nbsp;&nbsp;&nbsp;\u00BB\" [maxSize]=\"5\">\n </pagination-controls>\n </div>\n <!-- #endregion PAGINATION -->\n \n </div>\n\n <!-- <div class=\"d-flex justify-content-between align-items-center mt-3\">\n <span style=\"color: #6C757D\"> Registros {{$estabelecimentosList.length}} de {{$estabelecimentosList.length}} </span>\n <nav aria-label=\"...\">\n <ul class=\"pagination mb-0\">\n <li class=\"page-item disabled\"> <a class=\"page-link\" href=\"#\" tabindex=\"-1\">Anterior</a> </li>\n <li class=\"page-item active\"> <a class=\"page-link\" href=\"#\">1</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">2</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">3</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">Pr\u00F3ximo</a> </li>\n </ul>\n </nav>\n </div> -->\n\n\n <ng-template #loading>\n <lib-spinner></lib-spinner>\n </ng-template>\n </div>\n </div>\n</div>", styles: [".table-list table thead{height:50px;font-size:1rem;background-color:#e9ecef}.table-list table thead .status-header{width:5%}.table-list table thead th:first-child{width:50px;height:50px}.table-list table thead th{font-size:16px}.table-list table .center-content{text-align:center}.table-list table tbody{font-size:.875rem}.table-list table tbody>tr:hover{background-color:#cce5ff}.table-list table tbody span.row-name{display:block;width:100%;font-weight:700}.table-list table tbody span.subname{color:#0f0f0f80}.table-list table tbody .action-icons{color:#007bff}.table-list table tbody .action-icons a{margin:0 .75rem}.table-list table tbody .status{width:13px;height:13px;border-radius:50%}.table-list table tbody .active{background-color:#28a745}.table-list table tbody .inactive{background-color:#a72828}.name-estab{font-size:14px;font-weight:700;text-transform:uppercase;color:#212529}.subname-estab{font-size:12px;color:#212529}#clearFilterBtn,#searchFilterBtn{padding:6px 12px}\n"], dependencies: [{ kind: "ngmodule", type: NgxPaginationModule }, { kind: "pipe", type: i7.PaginatePipe, name: "paginate" }, { kind: "component", type: i7.PaginationControlsComponent, selector: "pagination-controls", inputs: ["id", "maxSize", "directionLinks", "autoHide", "responsive", "previousLabel", "nextLabel", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], outputs: ["pageChange", "pageBoundsCorrection"] }, { kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: i3.LibSpinnerComponent, selector: "lib-spinner", inputs: ["type", "theme", "size", "helperText"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1873
2606
  }
1874
2607
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SelecaoEstabelecimentosModalComponent, decorators: [{
1875
2608
  type: Component,
1876
- args: [{ selector: 'selecao-estabelecimentos-modal', imports: [InfraModule, NgxPaginationModule], template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered\">\n <h4 class=\"modal-title pull-left color-modal\" style=\"font-size: 20px; font-weight: bold;\"> Selecione um\n estabelecimento </h4>\n <button (click)=\"closeSelf()\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"modal-message\">\n <div class=\"search-and-filters d-flex flex-row align-items-center justify-content-between\">\n <div class=\"d-flex flex-row w-100\">\n <div class=\"input-group\">\n <span class=\"input-group-text px-2\" id=\"basic-addon1\"\n style=\"background-color: transparent; border-right: none;\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\"/>\n </span>\n <input type=\"text\" class=\"form-control border-start-0 ps-0\" id=\"pesquisaInput\" #pesquisa\n placeholder=\"Digite o C\u00F3digo\" (keyup.enter)=\"refreshList(pesquisa.value)\">\n </div>\n </div>\n\n <div class=\"filters d-flex align-items-center justify-content-between ms-3\">\n <div class=\"search-buttons d-flex flex-row align-items-center my-0 mx-0\">\n <button id=\"clearFilterBtn\" class=\"btn btn-outline-primary ms-0 no-hover-btn me-2\"\n (click)=\"pesquisa.value = ''; refreshList(pesquisa.value)\"> Limpar </button>\n <button id=\"searchFilterBtn\" class=\"btn btn-primary me-0\" (click)=\"refreshList(pesquisa.value)\"> Pesquisar\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"table-list w-100 mt-3\" *ngIf=\"$estabelecimentosList; else loading\">\n <table class=\"table table-bordered table-hover mb-0\">\n <thead class=\"fs-6\">\n <tr>\n <th scope=\"col\" class=\"col-11 align-middle th\">Estabelecimento <span\n class=\"text-primary fst-italic\">(duplo-clique para selecionar)</span></th>\n <th scope=\"col\" class=\"col-1 align-middle text-center th\">A\u00E7\u00F5es</th>\n </tr>\n </thead>\n\n <tbody *ngIf=\"$estabelecimentosList.length > 0; else emptyList\">\n <tr\n *ngFor=\"let estabelecimento of $estabelecimentosList | paginate: { itemsPerPage: itemsPerPage, currentPage: page }\"\n (dblclick)=\"selectEstabelecimento(estabelecimento.ID, estabelecimento.NOMEEXIBICAO)\" role=\"button\">\n <td><span class=\"row-name\"> {{ estabelecimento.CODIGO }} - {{ estabelecimento.NOMEEXIBICAO }} </span>\n <span class=\"subname\"> {{ estabelecimento.IS_MATRIZ ? \"Matriz \" : null }} CNPJ: {{ estabelecimento.CNPJ\n }} </span></td>\n <td class=\"text-center align-middle\">\n <div class=\"action-icons d-flex flex-row align-items-center justify-content-around\">\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"flexSwitchCheckChecked\"\n tooltip=\"Estabelecimento padr\u00E3o\" [checked]=\"estabelecimento.IS_DEFAULT\"\n style=\"transform: translateY(3px); height: 1rem; width: 28px;\" #isDefaultRow\n (click)=\"estabelecimento.IS_DEFAULT = !estabelecimento.IS_DEFAULT; defineDefaultEstabelecimento(estabelecimento.ID, estabelecimento.IS_DEFAULT)\">\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n\n <!-- #region EMPTY LIST CELL -->\n <ng-template #emptyList>\n <tbody>\n <tr>\n <td colspan=\"2\" class=\"align-middle\"><span class=\"row-name fw-light fst-italic text-center\"> {{\n response_messages.emptyMessage }} </span></td>\n </tr>\n </tbody>\n </ng-template>\n <!-- #endregion EMPTY LIST CELL -->\n </table>\n\n <!-- #region PAGINATION -->\n <div class=\"d-flex justify-content-end mt-2\" *ngIf=\"$estabelecimentosList.length > 0\">\n <div class=\"d-flex align-items-center\">\n <label class=\"me-2\" style=\"white-space: nowrap;\">Itens por p\u00E1gina</label>\n <select class=\"form-select select-search\" (change)=\"onSelectChange($event)\">\n <option class=\"selected\" value=\"10\" selected>10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n\n <pagination-controls class=\"sp-pagination mt-3\" (pageChange)=\"page = $event\"\n previousLabel=\"\u00AB&nbsp;&nbsp;&nbsp;\" nextLabel=\"&nbsp;&nbsp;&nbsp;\u00BB\" [maxSize]=\"5\">\n </pagination-controls>\n </div>\n <!-- #endregion PAGINATION -->\n \n </div>\n\n <!-- <div class=\"d-flex justify-content-between align-items-center mt-3\">\n <span style=\"color: #6C757D\"> Registros {{$estabelecimentosList.length}} de {{$estabelecimentosList.length}} </span>\n <nav aria-label=\"...\">\n <ul class=\"pagination mb-0\">\n <li class=\"page-item disabled\"> <a class=\"page-link\" href=\"#\" tabindex=\"-1\">Anterior</a> </li>\n <li class=\"page-item active\"> <a class=\"page-link\" href=\"#\">1</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">2</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">3</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">Pr\u00F3ximo</a> </li>\n </ul>\n </nav>\n </div> -->\n\n\n <ng-template #loading>\n <lib-spinner></lib-spinner>\n </ng-template>\n </div>\n </div>\n</div>", styles: [".table-list table thead{height:50px;font-size:1rem;background-color:#e9ecef}.table-list table thead .status-header{width:5%}.table-list table thead th:first-child{width:50px;height:50px}.table-list table thead th{font-size:16px}.table-list table .center-content{text-align:center}.table-list table tbody{font-size:.875rem}.table-list table tbody>tr:hover{background-color:#cce5ff}.table-list table tbody span.row-name{display:block;width:100%;font-weight:700}.table-list table tbody span.subname{color:#0f0f0f80}.table-list table tbody .action-icons{color:#007bff}.table-list table tbody .action-icons a{margin:0 .75rem}.table-list table tbody .status{width:13px;height:13px;border-radius:50%}.table-list table tbody .active{background-color:#28a745}.table-list table tbody .inactive{background-color:#a72828}.name-estab{font-size:14px;font-weight:700;text-transform:uppercase;color:#212529}.subname-estab{font-size:12px;color:#212529}#clearFilterBtn,#searchFilterBtn{padding:6px 12px}\n"] }]
1877
- }], ctorParameters: () => [{ type: AuthStorageService }, { type: i1$2.BsModalService }, { type: LibCustomMenuService }, { type: MenuServicesService }, { type: i5.MessageService }], propDecorators: { onClose: [{
2609
+ args: [{ selector: 'selecao-estabelecimentos-modal', imports: [
2610
+ NgxPaginationModule,
2611
+ InfraModule,
2612
+ CommonModule
2613
+ ], template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered\">\n <h4 class=\"modal-title pull-left color-modal\" style=\"font-size: 20px; font-weight: bold;\"> Selecione um\n estabelecimento </h4>\n <button (click)=\"closeSelf()\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"modal-message\">\n <div class=\"search-and-filters d-flex flex-row align-items-center justify-content-between\">\n <div class=\"d-flex flex-row w-100\">\n <div class=\"input-group\">\n <span class=\"input-group-text px-2\" id=\"basic-addon1\"\n style=\"background-color: transparent; border-right: none;\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\"/>\n </span>\n <input type=\"text\" class=\"form-control border-start-0 ps-0\" id=\"pesquisaInput\" #pesquisa\n placeholder=\"Digite o C\u00F3digo\" (keyup.enter)=\"refreshList(pesquisa.value)\">\n </div>\n </div>\n\n <div class=\"filters d-flex align-items-center justify-content-between ms-3\">\n <div class=\"search-buttons d-flex flex-row align-items-center my-0 mx-0\">\n <button id=\"clearFilterBtn\" class=\"btn btn-outline-primary ms-0 no-hover-btn me-2\"\n (click)=\"pesquisa.value = ''; refreshList(pesquisa.value)\"> Limpar </button>\n <button id=\"searchFilterBtn\" class=\"btn btn-primary me-0\" (click)=\"refreshList(pesquisa.value)\"> Pesquisar\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"table-list w-100 mt-3\" *ngIf=\"$estabelecimentosList; else loading\">\n <table class=\"table table-bordered table-hover mb-0\">\n <thead class=\"fs-6\">\n <tr>\n <th scope=\"col\" class=\"col-11 align-middle th\">Estabelecimento <span\n class=\"text-primary fst-italic\">(duplo-clique para selecionar)</span></th>\n <th scope=\"col\" class=\"col-1 align-middle text-center th\">A\u00E7\u00F5es</th>\n </tr>\n </thead>\n\n <tbody *ngIf=\"$estabelecimentosList.length > 0; else emptyList\">\n <tr\n *ngFor=\"let estabelecimento of $estabelecimentosList | paginate: { itemsPerPage: itemsPerPage, currentPage: page }\"\n (dblclick)=\"selectEstabelecimento(estabelecimento.ID, estabelecimento.NOMEEXIBICAO)\" role=\"button\">\n <td><span class=\"row-name\"> {{ estabelecimento.CODIGO }} - {{ estabelecimento.NOMEEXIBICAO }} </span>\n <span class=\"subname\"> {{ estabelecimento.IS_MATRIZ ? \"Matriz \" : null }} CNPJ: {{ estabelecimento.CNPJ\n }} </span></td>\n <td class=\"text-center align-middle\">\n <div class=\"action-icons d-flex flex-row align-items-center justify-content-around\">\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"flexSwitchCheckChecked\"\n tooltip=\"Estabelecimento padr\u00E3o\" [checked]=\"estabelecimento.IS_DEFAULT\"\n style=\"transform: translateY(3px); height: 1rem; width: 28px;\" #isDefaultRow\n (click)=\"estabelecimento.IS_DEFAULT = !estabelecimento.IS_DEFAULT; defineDefaultEstabelecimento(estabelecimento.ID, estabelecimento.IS_DEFAULT)\">\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n\n <!-- #region EMPTY LIST CELL -->\n <ng-template #emptyList>\n <tbody>\n <tr>\n <td colspan=\"2\" class=\"align-middle\"><span class=\"row-name fw-light fst-italic text-center\"> {{\n response_messages.emptyMessage }} </span></td>\n </tr>\n </tbody>\n </ng-template>\n <!-- #endregion EMPTY LIST CELL -->\n </table>\n\n <!-- #region PAGINATION -->\n <div class=\"d-flex justify-content-end mt-2\" *ngIf=\"$estabelecimentosList.length > 0\">\n <div class=\"d-flex align-items-center\">\n <label class=\"me-2\" style=\"white-space: nowrap;\">Itens por p\u00E1gina</label>\n <select class=\"form-select select-search\" (change)=\"onSelectChange($event)\">\n <option class=\"selected\" value=\"10\" selected>10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n\n <pagination-controls class=\"sp-pagination mt-3\" (pageChange)=\"page = $event\"\n previousLabel=\"\u00AB&nbsp;&nbsp;&nbsp;\" nextLabel=\"&nbsp;&nbsp;&nbsp;\u00BB\" [maxSize]=\"5\">\n </pagination-controls>\n </div>\n <!-- #endregion PAGINATION -->\n \n </div>\n\n <!-- <div class=\"d-flex justify-content-between align-items-center mt-3\">\n <span style=\"color: #6C757D\"> Registros {{$estabelecimentosList.length}} de {{$estabelecimentosList.length}} </span>\n <nav aria-label=\"...\">\n <ul class=\"pagination mb-0\">\n <li class=\"page-item disabled\"> <a class=\"page-link\" href=\"#\" tabindex=\"-1\">Anterior</a> </li>\n <li class=\"page-item active\"> <a class=\"page-link\" href=\"#\">1</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">2</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">3</a> </li>\n <li class=\"page-item\"> <a class=\"page-link\" href=\"#\">Pr\u00F3ximo</a> </li>\n </ul>\n </nav>\n </div> -->\n\n\n <ng-template #loading>\n <lib-spinner></lib-spinner>\n </ng-template>\n </div>\n </div>\n</div>", styles: [".table-list table thead{height:50px;font-size:1rem;background-color:#e9ecef}.table-list table thead .status-header{width:5%}.table-list table thead th:first-child{width:50px;height:50px}.table-list table thead th{font-size:16px}.table-list table .center-content{text-align:center}.table-list table tbody{font-size:.875rem}.table-list table tbody>tr:hover{background-color:#cce5ff}.table-list table tbody span.row-name{display:block;width:100%;font-weight:700}.table-list table tbody span.subname{color:#0f0f0f80}.table-list table tbody .action-icons{color:#007bff}.table-list table tbody .action-icons a{margin:0 .75rem}.table-list table tbody .status{width:13px;height:13px;border-radius:50%}.table-list table tbody .active{background-color:#28a745}.table-list table tbody .inactive{background-color:#a72828}.name-estab{font-size:14px;font-weight:700;text-transform:uppercase;color:#212529}.subname-estab{font-size:12px;color:#212529}#clearFilterBtn,#searchFilterBtn{padding:6px 12px}\n"] }]
2614
+ }], ctorParameters: () => [{ type: AuthStorageService }, { type: i2.BsModalService }, { type: LibCustomMenuService }, { type: MenuServicesService }, { type: i3.MessageService }, { type: ProjectUtilservice }], propDecorators: { onClose: [{
1878
2615
  type: Output
1879
2616
  }], onSelected: [{
1880
2617
  type: Output
1881
2618
  }] } });
1882
2619
 
1883
2620
  class MenuLateralComponent {
1884
- constructor(_customMenuService, _authStorageService, _bsModalService, _menuServices, _messageService,
1885
- //private _projectUtilService: ProjectUtilservice,
1886
- _router, _authService) {
2621
+ constructor(_msalGuardConfiguration, _msalService, _toastrService, _customMenuService, _authStorageService, _bsModalService, _menuServices, _messageService, _projectUtilService, _router, _authService, _environmentService) {
2622
+ this._msalGuardConfiguration = _msalGuardConfiguration;
2623
+ this._msalService = _msalService;
2624
+ this._toastrService = _toastrService;
1887
2625
  this._customMenuService = _customMenuService;
1888
2626
  this._authStorageService = _authStorageService;
1889
2627
  this._bsModalService = _bsModalService;
1890
2628
  this._menuServices = _menuServices;
1891
2629
  this._messageService = _messageService;
2630
+ this._projectUtilService = _projectUtilService;
1892
2631
  this._router = _router;
1893
2632
  this._authService = _authService;
2633
+ this._environmentService = _environmentService;
2634
+ this.handleKeyboardShortcut = (event) => {
2635
+ if (event.ctrlKey && event.key.toLowerCase() === 'b') {
2636
+ event.preventDefault(); // Prevents any default behavior (like bold in text editors)
2637
+ this.openExpansibleMenu(this.sidebar.nativeElement);
2638
+ }
2639
+ };
1894
2640
  this.MODAL_ESTABELECIMENTO = 1;
1895
2641
  this.nomeEstabelecimento = 'Estabelecimento padrão';
1896
2642
  this.titleSubmenu = "";
@@ -1912,31 +2658,47 @@ class MenuLateralComponent {
1912
2658
  this.footerUserName = "Usuário";
1913
2659
  this.isPopoverVisible = false;
1914
2660
  this.showBalloon = false;
1915
- // propriedades iniciadas quando passar o CustomMenuService
1916
- this.menuDynamic = false;
1917
- this.menuConfig = new MenuConfigService;
1918
2661
  // Implementação que verifica eventos acionados na classe de service.
1919
2662
  this._menuServices.getNewUserImageEvent().subscribe(() => { this.getMenuUserImg(); });
1920
2663
  }
1921
- ngOnInit() {
2664
+ async ngOnInit() {
2665
+ document.addEventListener('keydown', this.handleKeyboardShortcut);
1922
2666
  // Inscreva-se no evento NavigationEnd para receber notificações quando a rota mudar, serve para atualizar a seleção do menu corretamente
1923
- this._router.events.pipe().subscribe((event) => {
1924
- this._customMenuService.menuItems = this._customMenuService.menuConfig.updateRouteSelection(this._router.url, this._customMenuService.menuItems);
1925
- });
1926
- if (!this._customMenuService.menuDynamic) {
1927
- this._customMenuService.menuConfig.setMenuStatic(true);
2667
+ this._router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((event) => { this._customMenuService.menuItems = this._customMenuService.menuConfig.updateRouteSelection(this._router.url, this._customMenuService.menuItems); });
2668
+ if (!this._customMenuService.menuDynamic && !this._customMenuService.menuDynamicCustom) {
2669
+ this._customMenuService.menuConfig.setMenuType(true);
1928
2670
  this._customMenuService.menuItems = this._customMenuService.menuConfig.initializeMenu(this._router.url);
1929
2671
  // Método com customizações para inicialização do Menu Estático
1930
2672
  this._customMenuService.menuStaticOnInit();
1931
2673
  }
1932
2674
  else {
1933
2675
  // Método com customizações para inicialização do Menu Dinâmico
2676
+ if (this._customMenuService.menuDynamic) {
2677
+ this._customMenuService.menuConfig.setMenuType(false);
2678
+ // Método com customizações obter o Módulo para montagem do Menu Dinâmico Lateral
2679
+ const moduloId = this._customMenuService.menuDynamicGetModuloId();
2680
+ this._menuServices.getMenuLateral(moduloId).subscribe({
2681
+ next: response => {
2682
+ const menus = this.constroiRegrasDynamicMenu(response.MenuSubmenu);
2683
+ this._customMenuService.menuItems = this._customMenuService.menuConfig.initializeMenu(this._router.url, menus);
2684
+ }, error: error => {
2685
+ this._customMenuService.menuItems = this._customMenuService.menuConfig.initializeMenu(this._router.url);
2686
+ }
2687
+ });
2688
+ }
1934
2689
  this._customMenuService.menuDynamicOnInit();
1935
2690
  }
1936
2691
  this.nomeEstabelecimento = this._authStorageService.infraEstabNome;
1937
2692
  this.footerUserName = this._authStorageService.userName;
1938
2693
  this.checkForCachedImage();
1939
2694
  this.getUserEmail();
2695
+ // Tratamemto exclusivo para o método de autenticação Azure
2696
+ if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Azure && this._authStorageService.user.toLowerCase() != "admin") {
2697
+ await this.initMsal();
2698
+ }
2699
+ }
2700
+ ngOnDestroy() {
2701
+ document.removeEventListener('keydown', this.handleKeyboardShortcut);
1940
2702
  }
1941
2703
  // #endregion PUBLIC
1942
2704
  // #endregion ==========> PROPERTIES <==========
@@ -1950,30 +2712,20 @@ class MenuLateralComponent {
1950
2712
  this._authStorageService.infraEmpresaNome = response.InfraEmpresaNome;
1951
2713
  },
1952
2714
  error: error => {
1953
- //this._projectUtilService.showHttpError(error);
1954
- this._messageService.showAlertDanger(error);
1955
- throw new Error(error);
2715
+ this._projectUtilService.showHttpError(error);
1956
2716
  }
1957
2717
  });
1958
2718
  }
1959
2719
  getMenuUserImg() {
1960
2720
  this._menuServices.getImagemMenu().subscribe({
1961
- next: response => { this.footerUserImgSrc = response.InfraUsuarioImg.Imagem; },
1962
- error: error => {
1963
- //this._projectUtilService.showHttpError(error);
1964
- this._messageService.showAlertDanger(error);
1965
- throw new Error(error);
1966
- }
2721
+ next: response => { this.footerUserImgSrc = response.InfraUsuarioImg.IMAGEM; },
2722
+ error: error => { this._projectUtilService.showHttpError(error); }
1967
2723
  });
1968
2724
  }
1969
2725
  getUserEmail() {
1970
2726
  this._menuServices.getUsuarioEmail().subscribe({
1971
2727
  next: response => { this.footerUserEmail = response.Email; },
1972
- error: error => {
1973
- //this._projectUtilService.showHttpError(error);
1974
- this._messageService.showAlertDanger(error);
1975
- throw new Error(error);
1976
- }
2728
+ error: error => { this._projectUtilService.showHttpError(error); }
1977
2729
  });
1978
2730
  }
1979
2731
  // #endregion GET
@@ -2001,7 +2753,7 @@ class MenuLateralComponent {
2001
2753
  this._customMenuService.menuopenExpansibleMenu(ref);
2002
2754
  }
2003
2755
  openSubmenu(menu, ref, desiredMenu) {
2004
- if (menu.children && menu.children.length > 0) {
2756
+ if (menu.children && menu.children.length > 0 && menu.route == "") {
2005
2757
  this.titleSubmenu = menu.label;
2006
2758
  this.desiredContent = desiredMenu;
2007
2759
  ref.classList.remove("opened-notif-sub");
@@ -2019,18 +2771,9 @@ class MenuLateralComponent {
2019
2771
  this.onClickedOutside(new Event(""), ref);
2020
2772
  }
2021
2773
  }
2022
- // public onClickedOutside(e: Event, ref: HTMLDivElement): void {
2023
- // ref.classList.remove("opened-sub");
2024
- // this.submenuList = [];
2025
- // }
2026
2774
  onClickedOutside(e, ref) {
2027
- if (ref) {
2028
- ref.classList.remove("opened-sub");
2029
- this.submenuList = [];
2030
- }
2031
- else {
2032
- console.warn('ref is undefined or null');
2033
- }
2775
+ ref.classList.remove("opened-sub");
2776
+ this.submenuList = [];
2034
2777
  }
2035
2778
  // #region MENU FOOTER USER IMAGE
2036
2779
  validateCachedImg(footerImg) {
@@ -2052,12 +2795,65 @@ class MenuLateralComponent {
2052
2795
  }
2053
2796
  // #endregion MENU FOOTER USER IMAGE
2054
2797
  logout() {
2798
+ // Verifica se é Login Azure
2799
+ if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Azure && this._authStorageService.user.toLowerCase() != "admin") {
2800
+ const hostAuthLogin = !this._environmentService.production ? "http://localhost:4200/auth/login" : `${this._environmentService.hostName}/SisproErpCloud/${this._environmentService.product}/auth/login`;
2801
+ this._msalService.logoutRedirect({
2802
+ postLogoutRedirectUri: hostAuthLogin
2803
+ });
2804
+ }
2055
2805
  this._authService.logout();
2056
2806
  }
2057
2807
  getExternalUrl(url) {
2058
- return `https://siscandesv6.sispro.com.br/SisproErpCloud/${url}`;
2808
+ return `${this._projectUtilService.getHostName()}/${url}`;
2809
+ }
2810
+ constroiRegrasDynamicMenu(menus) {
2811
+ const home = { id: 1, label: "Início", descricao: "Tela inicial", icon: "casa", route: "home", isExternal: false, isSelected: this._router.url.includes("home"), };
2812
+ menus.unshift(home);
2813
+ return menus;
2059
2814
  }
2060
2815
  // #endregion ==========> UTILITIES <==========
2816
+ // #region Azure
2817
+ async configMsal() {
2818
+ const isIE = window.navigator.userAgent.indexOf("MSIE ") > -1 || window.navigator.userAgent.indexOf("Trident/") > -1;
2819
+ const hostAuthLogin = !this._environmentService.production ? "http://localhost:4200/auth/login" : `${this._environmentService.hostName}/SisproErpCloud/${this._environmentService.product}/auth/login`;
2820
+ this._msalService.instance = new PublicClientApplication({
2821
+ auth: {
2822
+ clientId: `${this._authStorageService.azureClientId}`,
2823
+ authority: `https://login.microsoftonline.com/${this._authStorageService.azureTenantId}`,
2824
+ redirectUri: hostAuthLogin + "/",
2825
+ postLogoutRedirectUri: hostAuthLogin,
2826
+ navigateToLoginRequestUrl: true
2827
+ },
2828
+ cache: {
2829
+ cacheLocation: "localStorage",
2830
+ storeAuthStateInCookie: isIE
2831
+ },
2832
+ system: {
2833
+ loggerOptions: {
2834
+ loggerCallback: (logLevel, message, containsPii) => {
2835
+ console.log(message);
2836
+ },
2837
+ logLevel: LogLevel.Error,
2838
+ piiLoggingEnabled: false
2839
+ }
2840
+ }
2841
+ });
2842
+ }
2843
+ async initMsal() {
2844
+ await this.configMsal().then(() => {
2845
+ this._msalService.handleRedirectObservable().subscribe({
2846
+ next: (result) => {
2847
+ if (!this._msalService.instance.getActiveAccount() && this._msalService.instance.getAllAccounts().length > 0) {
2848
+ this._msalService.instance.setActiveAccount(result.account);
2849
+ }
2850
+ },
2851
+ error: (error) => {
2852
+ this._toastrService.warning(`Erro na inicialização dos parâmetros de configuração do 'Azure': ${error}`, '', { timeOut: 3000, extendedTimeOut: 2000 });
2853
+ }
2854
+ });
2855
+ });
2856
+ }
2061
2857
  // #region ==========> MODALS <==========
2062
2858
  /** Função simples com o objetivo de abrir os modais no centro da tela.
2063
2859
  * @param template Template HTML do modal que será aberto.
@@ -2077,13 +2873,31 @@ class MenuLateralComponent {
2077
2873
  closeModal(modalID) {
2078
2874
  this._bsModalService.hide(modalID);
2079
2875
  }
2080
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuLateralComponent, deps: [{ token: LibCustomMenuService }, { token: AuthStorageService }, { token: i1$2.BsModalService }, { token: MenuServicesService }, { token: i5.MessageService }, { token: i1$1.Router }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
2081
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MenuLateralComponent, isStandalone: true, selector: "app-menu-lateral", queries: [{ propertyName: "desiredContent", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "notif_template", first: true, predicate: ["notif_menu"], descendants: true }, { propertyName: "menuLink", first: true, predicate: ["menuLink"], descendants: true }], ngImport: i0, template: "<!-- #region MAIN CONTENT -->\n<div class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" \n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"openExpansibleMenu(sidebar)\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n\n <ng-container>\n <img *ngIf=\"_customMenuService.moduleImg != ''; else moduleSVG\" [src]=\"_customMenuService.moduleImg\" alt=\"\">\n <span class=\"ps-2\"> {{ _customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n\n <ng-template #moduleSVG>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\"/>\n </ng-template>\n </ng-container>\n\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModal(modalEstabelecimento, MODAL_ESTABELECIMENTO)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\" \n class=\"p-1 rounded\" \n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\" \n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route)\"\n target=\"_blank\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components ps-1 pt-2\" [class.open]=\"showBalloon\">\n <button type=\"button\" class=\"btn btn-primary\">\n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile ms-1\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n </ng-template>\n <span class=\"glb-text-width-120 w-auto fw-bold text-start text-truncate ms-1 me-1\">\n {{ footerUserName }}\n </span>\n </button>\n </div>\n </div>\n \n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\"> \n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\"> \n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\"> \n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n \n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<!-- tem que perguntar pro Erick -->\n<!-- [submenuRef]=\"submenu_ref\" -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu \n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\"\n [submenuRef]=\"submenu_ref\"\n [recebeParam]=\"onClickedOutside.bind(this)\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModal(MODAL_ESTABELECIMENTO)\"\n (onSelected)=\"closeModal(MODAL_ESTABELECIMENTO); updateLastLogEstabelecimento($event);\"></selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #endregion TEMPLATES -->\n", styles: [".main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:212px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento{margin:0}.sidebar.closed .icon-estabelecimento button{justify-content:center}.sidebar.closed .icon-estabelecimento button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column;padding-bottom:8px}.footer-menu .footer-components{display:flex;justify-content:space-between;border-top:1px solid #3265ee;white-space:nowrap;align-items:center}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;padding-bottom:16px;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;padding-top:16px;padding-left:17px;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px}.sidebar.closed span{display:none}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"], dependencies: [{ kind: "component", type: LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: PrimaryDropdownComponent, selector: "app-primary-dropdown", inputs: ["buttonWasClicked"] }, { kind: "component", type: SelecaoEstabelecimentosModalComponent, selector: "selecao-estabelecimentos-modal", outputs: ["onClose", "onSelected"] }, { kind: "component", type: NotifSubmenuComponent, selector: "app-notif-submenu" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: DynamicMenuComponent, selector: "app-dynamic-menu", inputs: ["submenuRef", "recebeParam", "titleSubmenu", "submenuList"], outputs: ["selectTemplate"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i9$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }] }); }
2876
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuLateralComponent, deps: [{ token: MSAL_GUARD_CONFIG }, { token: i1$2.MsalService }, { token: i10.ToastrService }, { token: LibCustomMenuService }, { token: AuthStorageService }, { token: i2.BsModalService }, { token: MenuServicesService }, { token: i3.MessageService }, { token: ProjectUtilservice }, { token: i1$1.Router }, { token: AuthService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
2877
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MenuLateralComponent, isStandalone: true, selector: "app-menu-lateral", queries: [{ propertyName: "desiredContent", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true, static: true }, { propertyName: "notif_template", first: true, predicate: ["notif_menu"], descendants: true }, { propertyName: "menuLink", first: true, predicate: ["menuLink"], descendants: true }], ngImport: i0, template: "<!-- #region MAIN CONTENT -->\n<div id=\"menu\" class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" \n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"openExpansibleMenu(sidebar)\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n\n <ng-container>\n <img *ngIf=\"_customMenuService.moduleImg != ''; else moduleSVG\" [src]=\"_customMenuService.moduleImg\" alt=\"\">\n <span class=\"ps-2\"> {{ this._customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n\n <ng-template #moduleSVG>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\"/>\n </ng-template>\n </ng-container>\n\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModal(modalEstabelecimento, MODAL_ESTABELECIMENTO)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\" \n class=\"p-1 rounded\" \n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\" \n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route)\"\n target=\"_blank\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components d-flex flex-row align-items-center gap-2 py-2 px-1 justify-content-center gap-2\" [class.open]=\"showBalloon\">\n @if (footerUserImgSrc) {\n <img class=\"photo-profile\" [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n }\n @else {\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n }\n\n <span class=\"text-truncate fw-bold text-start\" style=\"max-width: 100%;\"> {{ footerUserName }} </span>\n </div>\n </div>\n \n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\"> \n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\"> \n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"currentColor\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\"> \n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n \n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu \n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\" [submenuRef]=\"submenu_ref\" [recebeParam]=\"onClickedOutside.bind(this)\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModal(MODAL_ESTABELECIMENTO)\"\n (onSelected)=\"closeModal(MODAL_ESTABELECIMENTO); updateLastLogEstabelecimento($event);\"></selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #endregion TEMPLATES -->\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}#menu.main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:212px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento{margin:0}.sidebar.closed .icon-estabelecimento button{justify-content:center}.sidebar.closed .icon-estabelecimento button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column}.footer-menu .footer-components{border-top:1px solid #3265ee}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px}.sidebar.closed span{display:none}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"], dependencies: [{ kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i12.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i13.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: InfraModule }, { kind: "directive", type: i3.ClickOutsideDirective, selector: "[clickOutside], [libClickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: i3.FooterComponent, selector: "[app-footer], app-footer, lib-footer" }, { kind: "component", type: SelecaoEstabelecimentosModalComponent, selector: "selecao-estabelecimentos-modal", outputs: ["onClose", "onSelected"] }, { kind: "component", type: NotifSubmenuComponent, selector: "app-notif-submenu" }, { kind: "component", type: DynamicMenuComponent, selector: "app-dynamic-menu", inputs: ["submenuRef", "recebeParam", "titleSubmenu", "submenuList"], outputs: ["selectTemplate"] }, { kind: "component", type: PrimaryDropdownComponent, selector: "app-primary-dropdown", inputs: ["buttonWasClicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
2082
2878
  }
2083
2879
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuLateralComponent, decorators: [{
2084
2880
  type: Component,
2085
- args: [{ selector: 'app-menu-lateral', imports: [LibIconsComponent, PrimaryDropdownComponent, SelecaoEstabelecimentosModalComponent, NotifSubmenuComponent, RouterModule, TooltipModule, DynamicMenuComponent, PopoverModule], template: "<!-- #region MAIN CONTENT -->\n<div class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" \n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"openExpansibleMenu(sidebar)\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n\n <ng-container>\n <img *ngIf=\"_customMenuService.moduleImg != ''; else moduleSVG\" [src]=\"_customMenuService.moduleImg\" alt=\"\">\n <span class=\"ps-2\"> {{ _customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n\n <ng-template #moduleSVG>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\"/>\n </ng-template>\n </ng-container>\n\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModal(modalEstabelecimento, MODAL_ESTABELECIMENTO)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\" \n class=\"p-1 rounded\" \n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\" \n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route)\"\n target=\"_blank\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components ps-1 pt-2\" [class.open]=\"showBalloon\">\n <button type=\"button\" class=\"btn btn-primary\">\n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile ms-1\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n </ng-template>\n <span class=\"glb-text-width-120 w-auto fw-bold text-start text-truncate ms-1 me-1\">\n {{ footerUserName }}\n </span>\n </button>\n </div>\n </div>\n \n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\"> \n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\"> \n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\"> \n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n \n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<!-- tem que perguntar pro Erick -->\n<!-- [submenuRef]=\"submenu_ref\" -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu \n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\"\n [submenuRef]=\"submenu_ref\"\n [recebeParam]=\"onClickedOutside.bind(this)\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModal(MODAL_ESTABELECIMENTO)\"\n (onSelected)=\"closeModal(MODAL_ESTABELECIMENTO); updateLastLogEstabelecimento($event);\"></selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #endregion TEMPLATES -->\n", styles: [".main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:212px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento{margin:0}.sidebar.closed .icon-estabelecimento button{justify-content:center}.sidebar.closed .icon-estabelecimento button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column;padding-bottom:8px}.footer-menu .footer-components{display:flex;justify-content:space-between;border-top:1px solid #3265ee;white-space:nowrap;align-items:center}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;padding-bottom:16px;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;padding-top:16px;padding-left:17px;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px}.sidebar.closed span{display:none}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"] }]
2086
- }], ctorParameters: () => [{ type: LibCustomMenuService }, { type: AuthStorageService }, { type: i1$2.BsModalService }, { type: MenuServicesService }, { type: i5.MessageService }, { type: i1$1.Router }, { type: AuthService }], propDecorators: { notif_template: [{
2881
+ args: [{ selector: 'app-menu-lateral', imports: [
2882
+ PopoverModule,
2883
+ TooltipModule,
2884
+ InfraModule,
2885
+ SelecaoEstabelecimentosModalComponent,
2886
+ NotifSubmenuComponent,
2887
+ DynamicMenuComponent,
2888
+ PrimaryDropdownComponent,
2889
+ CommonModule,
2890
+ RouterLink,
2891
+ RouterOutlet,
2892
+ NgIf
2893
+ ], template: "<!-- #region MAIN CONTENT -->\n<div id=\"menu\" class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" \n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"openExpansibleMenu(sidebar)\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n\n <ng-container>\n <img *ngIf=\"_customMenuService.moduleImg != ''; else moduleSVG\" [src]=\"_customMenuService.moduleImg\" alt=\"\">\n <span class=\"ps-2\"> {{ this._customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n\n <ng-template #moduleSVG>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\"/>\n </ng-template>\n </ng-container>\n\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModal(modalEstabelecimento, MODAL_ESTABELECIMENTO)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\" \n class=\"p-1 rounded\" \n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\" \n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n \n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route)\"\n target=\"_blank\" \n [id]=\"'item' + menuItem.id\" \n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" \n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\" \n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\" \n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components d-flex flex-row align-items-center gap-2 py-2 px-1 justify-content-center gap-2\" [class.open]=\"showBalloon\">\n @if (footerUserImgSrc) {\n <img class=\"photo-profile\" [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n }\n @else {\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n }\n\n <span class=\"text-truncate fw-bold text-start\" style=\"max-width: 100%;\"> {{ footerUserName }} </span>\n </div>\n </div>\n \n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\"> \n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\"> \n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"currentColor\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\"> \n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n \n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu \n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\" [submenuRef]=\"submenu_ref\" [recebeParam]=\"onClickedOutside.bind(this)\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModal(MODAL_ESTABELECIMENTO)\"\n (onSelected)=\"closeModal(MODAL_ESTABELECIMENTO); updateLastLogEstabelecimento($event);\"></selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #endregion TEMPLATES -->\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}#menu.main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:212px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento{margin:0}.sidebar.closed .icon-estabelecimento button{justify-content:center}.sidebar.closed .icon-estabelecimento button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column}.footer-menu .footer-components{border-top:1px solid #3265ee}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px}.sidebar.closed span{display:none}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"] }]
2894
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2895
+ type: Inject,
2896
+ args: [MSAL_GUARD_CONFIG]
2897
+ }] }, { type: i1$2.MsalService }, { type: i10.ToastrService }, { type: LibCustomMenuService }, { type: AuthStorageService }, { type: i2.BsModalService }, { type: MenuServicesService }, { type: i3.MessageService }, { type: ProjectUtilservice }, { type: i1$1.Router }, { type: AuthService }, { type: EnvironmentService }], propDecorators: { sidebar: [{
2898
+ type: ViewChild,
2899
+ args: ['sidebar', { static: true }]
2900
+ }], notif_template: [{
2087
2901
  type: ViewChild,
2088
2902
  args: ["notif_menu"]
2089
2903
  }], menuLink: [{
@@ -2095,10 +2909,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2095
2909
  }] } });
2096
2910
 
2097
2911
  class NovaSenhaComponent {
2098
- constructor(_formBuilder, _messageService, _serverService, _authService, _authStorageService, _title, _router, _route) {
2912
+ constructor(_formBuilder, _projectUtilservice, _messageService, _authService, _authStorageService, _title, _router, _route) {
2099
2913
  this._formBuilder = _formBuilder;
2914
+ this._projectUtilservice = _projectUtilservice;
2100
2915
  this._messageService = _messageService;
2101
- this._serverService = _serverService;
2102
2916
  this._authService = _authService;
2103
2917
  this._authStorageService = _authStorageService;
2104
2918
  this._title = _title;
@@ -2109,18 +2923,17 @@ class NovaSenhaComponent {
2109
2923
  this.domain = "";
2110
2924
  this.user = "";
2111
2925
  this.createPassword = false;
2926
+ this.isDisabled = true;
2112
2927
  this.esqueceuSenhaText = "Enviamos um código para o seu e-mail.<br>Insira-o abaixo para redefinir sua senha.";
2113
2928
  this.primeiroAcessoText = "Este é o seu primeiro acesso. Por favor,<br>Insira abaixo o código enviado pare seu<br>e-mail para definir sua senha.";
2114
2929
  this.senhaExpiradaText = "Sua senha expirou e precisa ser atualizada.<br>Enviamos um código para o seu e-mail.<br>Insira-o abaixo para definir sua senha.";
2115
- this.cadeadoImg = 'assets/imgs/Property1-cadeado.png';
2116
- this.maoImg = 'assets/imgs/Property1-mao.png';
2117
- this.calendarioImg = 'assets/imgs/Property1-calendariofino.png';
2930
+ this.cadeadoImg = 'assets/imgs/cadeado.png';
2931
+ this.maoImg = 'assets/imgs/mao.png';
2932
+ this.calendarioImg = 'assets/imgs/calendario-fino.png';
2118
2933
  // #region PRIVATE
2119
2934
  // #region PUBLIC
2120
- // #region ==========> FORM BUILDER <==========
2121
- this.form = new FormGroup({});
2935
+ this.isLoading = false;
2122
2936
  this.passwordLabel = "";
2123
- this.statusSenha = 0;
2124
2937
  }
2125
2938
  ngOnInit() {
2126
2939
  this._title.setTitle("Nova Senha");
@@ -2176,15 +2989,13 @@ class NovaSenhaComponent {
2176
2989
  /**
2177
2990
  * Puxa o nome do servidor salvo na configuração da máquina
2178
2991
  */
2179
- getServer() {
2992
+ getAuthentication() {
2180
2993
  if (this.form.valid) {
2181
- this._serverService.getServer().subscribe({
2994
+ this._authService.getAuthentication(this.domain).subscribe({
2182
2995
  next: response => {
2183
2996
  },
2184
2997
  error: (error) => {
2185
- //this._projectUtilservice.showHttpError(error);
2186
- this._messageService.showAlertDanger(error);
2187
- throw new Error(error);
2998
+ this._projectUtilservice.showHttpError(error);
2188
2999
  },
2189
3000
  });
2190
3001
  }
@@ -2197,12 +3008,14 @@ class NovaSenhaComponent {
2197
3008
  // Envia requisição para recuperar de senha
2198
3009
  sendPassword() {
2199
3010
  if (this.form.valid) {
2200
- this._serverService.getServer().subscribe({
3011
+ this.isLoading = true;
3012
+ this._authService.getAuthentication(this.domain).subscribe({
2201
3013
  next: response => {
2202
3014
  this.updatePassword();
2203
3015
  },
2204
3016
  error: (error) => {
2205
- //this._projectUtilservice.showHttpError(error);
3017
+ this.isLoading = false;
3018
+ this._projectUtilservice.showHttpError(error);
2206
3019
  },
2207
3020
  });
2208
3021
  }
@@ -2214,28 +3027,28 @@ class NovaSenhaComponent {
2214
3027
  updatePassword() {
2215
3028
  if (this.createPassword) {
2216
3029
  this._authService.createPassword(this.domain, this.user, this.form.value).subscribe({
2217
- next: (response) => {
3030
+ next: () => {
3031
+ this.isLoading = false;
2218
3032
  this._messageService.showAlertSuccess('Você definiu sua senha com sucesso. Preencha suas novas credenciais para acessar o sistema.');
2219
3033
  this.cancelar();
2220
3034
  },
2221
3035
  error: (error) => {
2222
- //this._projectUtilservice.showHttpError(error);
2223
- this._messageService.showAlertDanger(error);
2224
- throw new Error(error);
2225
- },
3036
+ this.isLoading = false;
3037
+ this._projectUtilservice.showHttpError(error);
3038
+ }
2226
3039
  });
2227
3040
  }
2228
3041
  else {
2229
3042
  this._authService.recoverPassword(this.domain, this.user, this.form.value).subscribe({
2230
- next: (response) => {
3043
+ next: () => {
3044
+ this.isLoading = false;
2231
3045
  this._messageService.showAlertSuccess('Você redefiniu sua senha com sucesso. Preencha suas novas credenciais para acessar o sistema.');
2232
3046
  this.cancelar();
2233
3047
  },
2234
3048
  error: (error) => {
2235
- //this._projectUtilservice.showHttpError(error);
2236
- this._messageService.showAlertDanger(error);
2237
- throw new Error(error);
2238
- },
3049
+ this.isLoading = false;
3050
+ this._projectUtilservice.showHttpError(error);
3051
+ }
2239
3052
  });
2240
3053
  }
2241
3054
  }
@@ -2266,41 +3079,44 @@ class NovaSenhaComponent {
2266
3079
  this._authStorageService.logout();
2267
3080
  this._router.navigate(["/auth/login"]);
2268
3081
  }
2269
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NovaSenhaComponent, deps: [{ token: i3.FormBuilder }, { token: i5.MessageService }, { token: ServerService }, { token: AuthService }, { token: AuthStorageService }, { token: i9.Title }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
2270
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: NovaSenhaComponent, isStandalone: true, selector: "app-nova-senha", ngImport: i0, template: "<body>\n\t<div id=\"main-container\">\n\t\t<!-- #region MAIN CONTENT -->\n\t\t<div class=\"glb-main-container password-container\">\n\t\t\t<div class=\"password-info-container\">\n\t\t\t\t<div class=\"img mb-3\">\n\t\t\t\t\t<img [src]=\"statusSenha == 2 ? calendarioImg : statusSenha == 1 ? maoImg : statusSenha == 3 ? cadeadoImg : '' \" width=\"125.69\" height=\"122\">\n\t\t\t\t</div>\n\t\t\t\t<div class=\"text\">\n\t\t\t\t\t<h4>{{statusSenha == 2 ? 'Senha expirada' : statusSenha == 1 ? 'Primeiro acesso' : statusSenha == 3 ? 'Esqueceu sua senha?' : ''}}</h4>\n\t\t\t\t\t<p [innerHTML]=\"statusSenha == 2 ? senhaExpiradaText : statusSenha == 1 ? primeiroAcessoText : statusSenha == 3 ? esqueceuSenhaText : '' \"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<form [formGroup]=\"form\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t\t<label for=\"inputCode\" class=\"form-label\"> C\u00F3digo de valida\u00E7\u00E3o <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"Insira seu c\u00F3digo aqui...\" id=\"inputCode\" class=\"form-control\" formControlName=\"code\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('code'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('code')\" label=\"C\u00F3digo de valida\u00E7\u00E3o\"></app-field-error-message>\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t\t<label for=\"inputPassword\" class=\"form-label\"> Digite uma nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t\t<input type=\"password\" placeholder=\"Digite sua nova senha...\" id=\"inputPassword\" class=\"form-control\" formControlName=\"password\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('password'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('password')\" label=\"{{ passwordLabel }}\"></app-field-error-message>\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t\t<label for=\"inputConfirmPassword\" class=\"form-label\"> Confirme sua nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t\t<input type=\"password\" placeholder=\"Digite a senha novamente...\" id=\"inputConfirmPassword\" class=\"form-control\" formControlName=\"confirmPassword\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('confirmPassword'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('confirmPassword')\" label=\"Confirme sua Senha\"></app-field-error-message>\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\n\t\t\t\t\t<div class=\"btns\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary modal-button\" (click)=\"sendPassword()\">\n\t\t\t\t\t\t\t<span> Redefinir senha </span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type=\"button\" class=\"btn modal-button cancelar-btn\" (click)=\"cancelar()\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<span><span class=\"icon\"><lib-icon iconName=\"p-seta-esquerda\" [iconSize]=\"20\"/></span>Voltar para a tela de login</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t\t<!-- #endregion MAIN CONTENT -->\n\t</div>\n\t</body>\n\t", styles: ["body{background-color:#f5f5f5;height:100%!important;margin:0!important;padding:0!important}#main-container{display:flex;align-items:center;justify-content:center;height:100%}.password-container{padding:30px;width:37%;border:none;box-shadow:0 2px -1px #0000001a}.img{width:26%}.text{display:flex;flex-direction:column;align-items:flex-start;margin-left:auto}.text h4{font-weight:700}.text p{text-align:start}.password-info-container{display:flex;gap:15px}.btns{display:flex;flex-direction:column;gap:10px;align-items:center;width:100%}button{width:100%;padding:10px;border:none}button .cancelar-btn{background-color:none}.cancelar-btn span{color:#6c757d;font-weight:700}input{padding:10px}input::placeholder{color:#8d8d8d;font-size:15px}.icon{margin-right:5px;font-weight:700}\n"], dependencies: [{ kind: "component", type: FieldErrorMessageComponent, selector: "app-field-error-message, lib-error-message", inputs: ["customMessage", "control", "label"] }, { kind: "component", type: LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true }); }
3082
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NovaSenhaComponent, deps: [{ token: i3$1.FormBuilder }, { token: ProjectUtilservice }, { token: i3.MessageService }, { token: AuthService }, { token: AuthStorageService }, { token: i8.Title }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
3083
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: NovaSenhaComponent, isStandalone: true, selector: "app-nova-senha", ngImport: i0, template: "<body>\n<div id=\"main-container\">\n\t<!-- #region MAIN CONTENT -->\n\t<div class=\"glb-main-container password-container\">\n\t\t<div class=\"password-info-container\">\n\t\t\t<div class=\"img mb-3\">\n\t\t\t\t<img [src]=\"statusSenha == 2 ? calendarioImg : statusSenha == 1 ? maoImg : statusSenha == 3 ? cadeadoImg : '' \" width=\"125.69\" height=\"122\">\n\t\t\t</div>\n\t\t\t<div class=\"text\">\n\t\t\t\t<h4>{{statusSenha == 2 ? 'Senha expirada' : statusSenha == 1 ? 'Primeiro acesso' : statusSenha == 3 ? 'Esqueceu sua senha?' : ''}}</h4>\n\t\t\t\t<p [innerHTML]=\"statusSenha == 2 ? senhaExpiradaText : statusSenha == 1 ? primeiroAcessoText : statusSenha == 3 ? esqueceuSenhaText : '' \"></p>\n\t\t\t</div>\n\t\t</div>\n\t\t<form [formGroup]=\"form\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputCode\" class=\"form-label\"> C\u00F3digo de valida\u00E7\u00E3o <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"text\" placeholder=\"Insira seu c\u00F3digo aqui...\" id=\"inputCode\" class=\"form-control\" formControlName=\"code\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('code'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('code')\" label=\"C\u00F3digo de valida\u00E7\u00E3o\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputPassword\" class=\"form-label\"> Digite uma nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"password\" placeholder=\"Digite sua nova senha...\" id=\"inputPassword\" class=\"form-control\" formControlName=\"password\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('password'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('password')\" label=\"{{ passwordLabel }}\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputConfirmPassword\" class=\"form-label\"> Confirme sua nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"password\" placeholder=\"Digite a senha novamente...\" id=\"inputConfirmPassword\" class=\"form-control\" formControlName=\"confirmPassword\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('confirmPassword'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('confirmPassword')\" label=\"Confirme sua Senha\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t\t<div class=\"btns\">\n\t\t\t\t\t<button [libLoading]=\"isLoading\" loadingText=\"Redefinindo...\" [disabled]=\"isLoading\" (click)=\"sendPassword()\" type=\"button\" class=\"btn btn-primary col w-100\">\n\t\t\t\t\t\tRedefinir senha <lib-icon iconName=\"login\" />\n\t\t\t\t\t</button>\n\n\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t<a type=\"button\" class=\"fw-bold text-decoration-none text-secondary\" (click)=\"cancelar()\">\n\t\t\t\t\t\t\t<lib-icon iconName=\"p-seta-esquerda\" /> Voltar para a tela de login </a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t</form>\n\t</div>\n\t<!-- #endregion MAIN CONTENT -->\n</div>\n</body>\n", styles: ["body{background-color:#f5f5f5;height:100%!important;margin:0!important;padding:0!important}#main-container{display:flex;align-items:center;justify-content:center;height:100%}.password-container{padding:30px;width:37%;border:none;box-shadow:0 2px -1px #0000001a}.img{width:26%}.text{display:flex;flex-direction:column;align-items:flex-start;margin-left:auto}.text h4{font-weight:700}.text p{text-align:start}.password-info-container{display:flex;gap:15px}.btns{display:flex;flex-direction:column;align-items:center;width:100%}input::placeholder{color:#8d8d8d;font-size:15px}.icon{margin-right:5px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.FieldErrorMessageComponent, selector: "app-field-error-message, lib-error-message", inputs: ["customMessage", "control", "label"] }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "directive", type: i3.LoadingBtnDirective, selector: "button[libLoading], a[libLoading]", inputs: ["loadingText", "loadingType", "libLoading"] }], preserveWhitespaces: true }); }
2271
3084
  }
2272
3085
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NovaSenhaComponent, decorators: [{
2273
3086
  type: Component,
2274
- args: [{ selector: 'app-nova-senha', preserveWhitespaces: true, imports: [FieldErrorMessageComponent, LibIconsComponent, ReactiveFormsModule], template: "<body>\n\t<div id=\"main-container\">\n\t\t<!-- #region MAIN CONTENT -->\n\t\t<div class=\"glb-main-container password-container\">\n\t\t\t<div class=\"password-info-container\">\n\t\t\t\t<div class=\"img mb-3\">\n\t\t\t\t\t<img [src]=\"statusSenha == 2 ? calendarioImg : statusSenha == 1 ? maoImg : statusSenha == 3 ? cadeadoImg : '' \" width=\"125.69\" height=\"122\">\n\t\t\t\t</div>\n\t\t\t\t<div class=\"text\">\n\t\t\t\t\t<h4>{{statusSenha == 2 ? 'Senha expirada' : statusSenha == 1 ? 'Primeiro acesso' : statusSenha == 3 ? 'Esqueceu sua senha?' : ''}}</h4>\n\t\t\t\t\t<p [innerHTML]=\"statusSenha == 2 ? senhaExpiradaText : statusSenha == 1 ? primeiroAcessoText : statusSenha == 3 ? esqueceuSenhaText : '' \"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<form [formGroup]=\"form\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t\t<label for=\"inputCode\" class=\"form-label\"> C\u00F3digo de valida\u00E7\u00E3o <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"Insira seu c\u00F3digo aqui...\" id=\"inputCode\" class=\"form-control\" formControlName=\"code\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('code'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('code')\" label=\"C\u00F3digo de valida\u00E7\u00E3o\"></app-field-error-message>\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t\t<label for=\"inputPassword\" class=\"form-label\"> Digite uma nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t\t<input type=\"password\" placeholder=\"Digite sua nova senha...\" id=\"inputPassword\" class=\"form-control\" formControlName=\"password\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('password'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('password')\" label=\"{{ passwordLabel }}\"></app-field-error-message>\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t\t<label for=\"inputConfirmPassword\" class=\"form-label\"> Confirme sua nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t\t<input type=\"password\" placeholder=\"Digite a senha novamente...\" id=\"inputConfirmPassword\" class=\"form-control\" formControlName=\"confirmPassword\"\n\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('confirmPassword'))\">\n\t\t\t\t\t\t<app-field-error-message [control]=\"form.get('confirmPassword')\" label=\"Confirme sua Senha\"></app-field-error-message>\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\n\t\t\t\t\t<div class=\"btns\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary modal-button\" (click)=\"sendPassword()\">\n\t\t\t\t\t\t\t<span> Redefinir senha </span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type=\"button\" class=\"btn modal-button cancelar-btn\" (click)=\"cancelar()\">\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<span><span class=\"icon\"><lib-icon iconName=\"p-seta-esquerda\" [iconSize]=\"20\"/></span>Voltar para a tela de login</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t\t<!-- #endregion MAIN CONTENT -->\n\t</div>\n\t</body>\n\t", styles: ["body{background-color:#f5f5f5;height:100%!important;margin:0!important;padding:0!important}#main-container{display:flex;align-items:center;justify-content:center;height:100%}.password-container{padding:30px;width:37%;border:none;box-shadow:0 2px -1px #0000001a}.img{width:26%}.text{display:flex;flex-direction:column;align-items:flex-start;margin-left:auto}.text h4{font-weight:700}.text p{text-align:start}.password-info-container{display:flex;gap:15px}.btns{display:flex;flex-direction:column;gap:10px;align-items:center;width:100%}button{width:100%;padding:10px;border:none}button .cancelar-btn{background-color:none}.cancelar-btn span{color:#6c757d;font-weight:700}input{padding:10px}input::placeholder{color:#8d8d8d;font-size:15px}.icon{margin-right:5px;font-weight:700}\n"] }]
2275
- }], ctorParameters: () => [{ type: i3.FormBuilder }, { type: i5.MessageService }, { type: ServerService }, { type: AuthService }, { type: AuthStorageService }, { type: i9.Title }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }] });
3087
+ args: [{ selector: 'app-nova-senha', imports: [
3088
+ ReactiveFormsModule,
3089
+ InfraModule,
3090
+ ], preserveWhitespaces: true, template: "<body>\n<div id=\"main-container\">\n\t<!-- #region MAIN CONTENT -->\n\t<div class=\"glb-main-container password-container\">\n\t\t<div class=\"password-info-container\">\n\t\t\t<div class=\"img mb-3\">\n\t\t\t\t<img [src]=\"statusSenha == 2 ? calendarioImg : statusSenha == 1 ? maoImg : statusSenha == 3 ? cadeadoImg : '' \" width=\"125.69\" height=\"122\">\n\t\t\t</div>\n\t\t\t<div class=\"text\">\n\t\t\t\t<h4>{{statusSenha == 2 ? 'Senha expirada' : statusSenha == 1 ? 'Primeiro acesso' : statusSenha == 3 ? 'Esqueceu sua senha?' : ''}}</h4>\n\t\t\t\t<p [innerHTML]=\"statusSenha == 2 ? senhaExpiradaText : statusSenha == 1 ? primeiroAcessoText : statusSenha == 3 ? esqueceuSenhaText : '' \"></p>\n\t\t\t</div>\n\t\t</div>\n\t\t<form [formGroup]=\"form\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputCode\" class=\"form-label\"> C\u00F3digo de valida\u00E7\u00E3o <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"text\" placeholder=\"Insira seu c\u00F3digo aqui...\" id=\"inputCode\" class=\"form-control\" formControlName=\"code\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('code'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('code')\" label=\"C\u00F3digo de valida\u00E7\u00E3o\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputPassword\" class=\"form-label\"> Digite uma nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"password\" placeholder=\"Digite sua nova senha...\" id=\"inputPassword\" class=\"form-control\" formControlName=\"password\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('password'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('password')\" label=\"{{ passwordLabel }}\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputConfirmPassword\" class=\"form-label\"> Confirme sua nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"password\" placeholder=\"Digite a senha novamente...\" id=\"inputConfirmPassword\" class=\"form-control\" formControlName=\"confirmPassword\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('confirmPassword'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('confirmPassword')\" label=\"Confirme sua Senha\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t\t<div class=\"btns\">\n\t\t\t\t\t<button [libLoading]=\"isLoading\" loadingText=\"Redefinindo...\" [disabled]=\"isLoading\" (click)=\"sendPassword()\" type=\"button\" class=\"btn btn-primary col w-100\">\n\t\t\t\t\t\tRedefinir senha <lib-icon iconName=\"login\" />\n\t\t\t\t\t</button>\n\n\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t<a type=\"button\" class=\"fw-bold text-decoration-none text-secondary\" (click)=\"cancelar()\">\n\t\t\t\t\t\t\t<lib-icon iconName=\"p-seta-esquerda\" /> Voltar para a tela de login </a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t</form>\n\t</div>\n\t<!-- #endregion MAIN CONTENT -->\n</div>\n</body>\n", styles: ["body{background-color:#f5f5f5;height:100%!important;margin:0!important;padding:0!important}#main-container{display:flex;align-items:center;justify-content:center;height:100%}.password-container{padding:30px;width:37%;border:none;box-shadow:0 2px -1px #0000001a}.img{width:26%}.text{display:flex;flex-direction:column;align-items:flex-start;margin-left:auto}.text h4{font-weight:700}.text p{text-align:start}.password-info-container{display:flex;gap:15px}.btns{display:flex;flex-direction:column;align-items:center;width:100%}input::placeholder{color:#8d8d8d;font-size:15px}.icon{margin-right:5px;font-weight:700}\n"] }]
3091
+ }], ctorParameters: () => [{ type: i3$1.FormBuilder }, { type: ProjectUtilservice }, { type: i3.MessageService }, { type: AuthService }, { type: AuthStorageService }, { type: i8.Title }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }] });
2276
3092
 
2277
3093
  class IMenu {
2278
3094
  constructor() {
3095
+ this.ID = 0;
3096
+ this.UNICOID = 0;
2279
3097
  this.LABEL = "";
2280
3098
  this.DESCRICAO = "";
2281
3099
  this.URL = "";
2282
3100
  this.CLASS_ICON = "";
3101
+ this.IS_EXIBEMENU = false;
2283
3102
  this.URL_DASHBOARD = "";
2284
3103
  this.TAG = "";
2285
- this.STRUCT_LIST = [];
3104
+ this.FK = 0;
2286
3105
  }
2287
3106
  }
2288
3107
 
2289
3108
  class InfraUsuarioImg {
2290
3109
  constructor() {
2291
- this.Tenant_Id = 0;
2292
- this.Id = 0;
2293
- this.Imagem = "";
2294
- this.FileName = "";
2295
- this.DataCriacao = new Date();
2296
- this.Is_Active = false;
2297
- this.UsuarioId = "";
3110
+ this.TENANT_ID = 0;
3111
+ this.ID = 0;
3112
+ this.IMAGEM = "";
3113
+ this.FILENAME = "";
3114
+ this.DATACRIACAO = new Date();
3115
+ this.IS_ACTIVE = false;
3116
+ this.USUARIOID = "";
2298
3117
  }
2299
3118
  }
2300
3119
 
2301
- class CustomPropriedadesLogin {
2302
- }
2303
-
2304
3120
  class AuthGuard {
2305
3121
  constructor(router, authStorageService) {
2306
3122
  this.router = router;
@@ -2331,11 +3147,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2331
3147
  }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthStorageService }] });
2332
3148
 
2333
3149
  class ExternaLoginlGuard {
2334
- constructor(router, authService, authStorageService, serverService) {
3150
+ constructor(router, authService, authStorageService) {
2335
3151
  this.router = router;
2336
3152
  this.authService = authService;
2337
3153
  this.authStorageService = authStorageService;
2338
- this.serverService = serverService;
2339
3154
  }
2340
3155
  canActivate(_route, _state) {
2341
3156
  let param = atob(_route.paramMap.get('param'));
@@ -2364,7 +3179,7 @@ class ExternaLoginlGuard {
2364
3179
  }
2365
3180
  // Executa o Login Externo
2366
3181
  async logOnExternal(domain, user, password) {
2367
- const retConfig = await this.handleGetServer();
3182
+ const retConfig = await this.handleGetAuthentication(domain);
2368
3183
  if (!retConfig) {
2369
3184
  return this.navigateToError();
2370
3185
  }
@@ -2380,9 +3195,9 @@ class ExternaLoginlGuard {
2380
3195
  }
2381
3196
  }
2382
3197
  // Retorna os parâmetros de configuração.
2383
- getServer() {
3198
+ getAuthentication(domain) {
2384
3199
  return new Promise((resolve, reject) => {
2385
- this.serverService.getServer().subscribe({
3200
+ this.authService.getAuthentication(domain).subscribe({
2386
3201
  next: response => {
2387
3202
  resolve(true);
2388
3203
  },
@@ -2393,22 +3208,22 @@ class ExternaLoginlGuard {
2393
3208
  });
2394
3209
  }
2395
3210
  // Handle para busca dos parâmetros de configuração.
2396
- async handleGetServer() {
3211
+ async handleGetAuthentication(domain) {
2397
3212
  try {
2398
- const response = await this.getServer();
3213
+ const response = await this.getAuthentication(domain);
2399
3214
  return true;
2400
3215
  }
2401
3216
  catch (error) {
2402
3217
  return false;
2403
3218
  }
2404
3219
  }
2405
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternaLoginlGuard, deps: [{ token: i1$1.Router }, { token: AuthService }, { token: AuthStorageService }, { token: ServerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3220
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternaLoginlGuard, deps: [{ token: i1$1.Router }, { token: AuthService }, { token: AuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2406
3221
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternaLoginlGuard, providedIn: 'root' }); }
2407
3222
  }
2408
3223
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternaLoginlGuard, decorators: [{
2409
3224
  type: Injectable,
2410
3225
  args: [{ providedIn: 'root' }]
2411
- }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthService }, { type: AuthStorageService }, { type: ServerService }] });
3226
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthService }, { type: AuthStorageService }] });
2412
3227
 
2413
3228
  /**
2414
3229
  * Protege a página de login de ser carregada quando o usuário já está logado,
@@ -2448,10 +3263,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2448
3263
  * Depende do serviço de autenticação.
2449
3264
  */
2450
3265
  class AuthAplicInterceptor {
2451
- constructor(authCheckService, _environmentService, token) {
3266
+ constructor(authCheckService, token, _environmentService) {
2452
3267
  this.authCheckService = authCheckService;
2453
- this._environmentService = _environmentService;
2454
3268
  this.token = token;
3269
+ this._environmentService = _environmentService;
2455
3270
  }
2456
3271
  intercept(req, next) {
2457
3272
  // convert promise to observable using 'from' operator
@@ -2468,13 +3283,13 @@ class AuthAplicInterceptor {
2468
3283
  }
2469
3284
  return await lastValueFrom(next.handle(changedReq));
2470
3285
  }
2471
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, deps: [{ token: i5.CheckUrlAndMethodService }, { token: EnvironmentService }, { token: AuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3286
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, deps: [{ token: i3.CheckUrlAndMethodService }, { token: AuthStorageService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2472
3287
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, providedIn: 'root' }); }
2473
3288
  }
2474
3289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, decorators: [{
2475
3290
  type: Injectable,
2476
3291
  args: [{ providedIn: 'root' }]
2477
- }], ctorParameters: () => [{ type: i5.CheckUrlAndMethodService }, { type: EnvironmentService }, { type: AuthStorageService }] });
3292
+ }], ctorParameters: () => [{ type: i3.CheckUrlAndMethodService }, { type: AuthStorageService }, { type: EnvironmentService }] });
2478
3293
 
2479
3294
  /**
2480
3295
  * \brief Intercepta uma chamada HTTP para inserir a autenticação da Sispro.
@@ -2494,17 +3309,22 @@ class AuthInfraInterceptor {
2494
3309
  }
2495
3310
  return next.handle(changedReq);
2496
3311
  }
2497
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, deps: [{ token: i5.CheckUrlAndMethodService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3312
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, deps: [{ token: i3.CheckUrlAndMethodService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2498
3313
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, providedIn: 'root' }); }
2499
3314
  }
2500
3315
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, decorators: [{
2501
3316
  type: Injectable,
2502
3317
  args: [{ providedIn: 'root' }]
2503
- }], ctorParameters: () => [{ type: i5.CheckUrlAndMethodService }, { type: EnvironmentService }] });
3318
+ }], ctorParameters: () => [{ type: i3.CheckUrlAndMethodService }, { type: EnvironmentService }] });
3319
+
3320
+ const AUTH_ROUTES = [
3321
+ { path: '', component: LoginComponent, data: { title: "SisproERP | Meu portal" } },
3322
+ { path: 'novaSenha/:param', component: NovaSenhaComponent, data: { title: "Nova Senha" } }
3323
+ ];
2504
3324
 
2505
3325
  /**
2506
3326
  * Generated bundle index. Do not edit.
2507
3327
  */
2508
3328
 
2509
- export { AuthAplicInterceptor, AuthGuard, AuthInfraInterceptor, AuthModule, AuthService, AuthStorageService, CustomPropriedadesLogin, DynamicMenuComponent, EnvironmentService, ExternaLoginlGuard, IMenu, InfraUsuarioImg, LibCustomLoginService, LibCustomMenuService, LibCustomStorageService, ListEstabService, LoginComponent, LoginGuard, MenuConfigService, MenuLateralComponent, MenuServicesService, NotifSubmenuComponent, NovaSenhaComponent, PrimaryDropdownComponent, SecondaryDropdownComponent, SelecaoEstabelecimentosModalComponent, ServerService };
3329
+ export { AUTH_ROUTES, AuthAplicInterceptor, AuthGuard, AuthInfraInterceptor, AuthModule, AuthStorageService, DynamicMenuComponent, EnvironmentService, ExternaLoginlGuard, IMenu, InfraUsuarioImg, LibCustomLoginService, LibCustomMenuService, LibCustomStorageService, LibMenuConfigService, LoginComponent, LoginGuard, LoginOSComponent, LoginProgress, MenuLateralComponent, NotifSubmenuComponent, NovaSenhaComponent, PrimaryDropdownComponent, SecondaryDropdownComponent, SelecaoEstabelecimentosModalComponent, SituacaoLogin };
2510
3330
  //# sourceMappingURL=ngx-sp-auth.mjs.map