ngx-sp-auth 3.3.1 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/ngx-sp-auth.mjs
CHANGED
|
@@ -1286,7 +1286,7 @@ class MenuServicesService {
|
|
|
1286
1286
|
this._authStorageService = _authStorageService;
|
|
1287
1287
|
this._httpClient = _httpClient;
|
|
1288
1288
|
this._customEnvironmentService = _customEnvironmentService;
|
|
1289
|
-
this._BASE_URL = ""; //
|
|
1289
|
+
this._BASE_URL = ""; // SpInfra2ErpWS
|
|
1290
1290
|
this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
|
|
1291
1291
|
// #endregion Menu Dinâmico
|
|
1292
1292
|
// #endregion ==========> SERVICES <==========
|
|
@@ -1295,7 +1295,7 @@ class MenuServicesService {
|
|
|
1295
1295
|
// #region NewImg Event
|
|
1296
1296
|
// Implementação de lógica vista no link: https://hasangalakdinu.medium.com/how-to-call-a-function-in-another-component-angular-using-rxjs-3f2e85920705
|
|
1297
1297
|
this._subject = new Subject();
|
|
1298
|
-
this._BASE_URL = `${this._customEnvironmentService.SpInfra2ErpWS}`; //
|
|
1298
|
+
this._BASE_URL = `${this._customEnvironmentService.SpInfra2ErpWS}`; // SpInfra2ErpW
|
|
1299
1299
|
this._BASE_URL = !this._customEnvironmentService.production ? this._BASE_URL : `${this._customEnvironmentService.SpInfra2ErpWS}`;
|
|
1300
1300
|
}
|
|
1301
1301
|
// #region ==========> SERVICES <==========
|
|
@@ -1396,11 +1396,11 @@ class MenuServicesService {
|
|
|
1396
1396
|
/** Método executado para pegar o Menu lateral levando em conta as permissões do usuário, grupo e o tenant ativo
|
|
1397
1397
|
* Executado caso o getter do boolean Menu Dynamic seja true
|
|
1398
1398
|
*/
|
|
1399
|
-
getMenuLateral(
|
|
1399
|
+
getMenuLateral(projetoId) {
|
|
1400
1400
|
const headers = new HttpHeaders().set("Content-Type", "application/json");
|
|
1401
1401
|
const url = `${this._BASE_URL}/Menu/GetMenuLateral`;
|
|
1402
1402
|
const params = new HttpParams()
|
|
1403
|
-
.set('
|
|
1403
|
+
.set('projetoId', projetoId);
|
|
1404
1404
|
return this._httpClient
|
|
1405
1405
|
.get(url, { params: params, headers: headers })
|
|
1406
1406
|
.pipe(take(1), tap((response) => {
|
|
@@ -1568,8 +1568,8 @@ class LibCustomMenuService {
|
|
|
1568
1568
|
// #region - Métodos Customizadas para o Menu dinâmico
|
|
1569
1569
|
// Método executado no menu-lateral.component.ts - método: onInit ()
|
|
1570
1570
|
// Utilizado para obter o Módulo para montagem do Menu Dinâmico Lateral
|
|
1571
|
-
|
|
1572
|
-
return this._customMenuService.
|
|
1571
|
+
menuDynamicGetProjetoId() {
|
|
1572
|
+
return this._customMenuService.menuDynamicGetProjetoId();
|
|
1573
1573
|
}
|
|
1574
1574
|
// Método executado no menu-lateral.component.ts - método: onInit ()
|
|
1575
1575
|
// Utilizado para inicializações diversas
|
|
@@ -2763,8 +2763,8 @@ class MenuLateralComponent {
|
|
|
2763
2763
|
if (this._customMenuService.menuDynamic) {
|
|
2764
2764
|
this._customMenuService.menuConfig.setMenuType(false);
|
|
2765
2765
|
// Método com customizações obter o Módulo para montagem do Menu Dinâmico Lateral
|
|
2766
|
-
const
|
|
2767
|
-
this._menuServices.getMenuLateral(
|
|
2766
|
+
const projetoId = this._customMenuService.menuDynamicGetProjetoId();
|
|
2767
|
+
this._menuServices.getMenuLateral(projetoId).subscribe({
|
|
2768
2768
|
next: response => {
|
|
2769
2769
|
const menus = this.constroiRegrasDynamicMenu(response.MenuSubmenu);
|
|
2770
2770
|
this._customMenuService.menuItems = this._customMenuService.menuConfig.initializeMenu(this._router.url, menus);
|