ngx-sp-auth 4.6.3 → 4.6.4
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
|
@@ -1609,11 +1609,9 @@ class MenuServicesService {
|
|
|
1609
1609
|
getEstabelecimentosModalList(usuarioID, pesquisa) {
|
|
1610
1610
|
const params = new HttpParams()
|
|
1611
1611
|
.set('pesquisa', pesquisa);
|
|
1612
|
-
const headers = new HttpHeaders()
|
|
1613
|
-
.set('Content-Type', 'application/json');
|
|
1614
1612
|
const url = `${this._BASE_URL}/InfraEstabelecimento/GetEstabelecimentosModal`;
|
|
1615
1613
|
return this._httpClient
|
|
1616
|
-
.get(url, { 'params': params, 'headers':
|
|
1614
|
+
.get(url, { 'params': params, 'headers': this._HTTP_HEADERS })
|
|
1617
1615
|
.pipe(take(1), tap(response => {
|
|
1618
1616
|
if (response.Error) {
|
|
1619
1617
|
throw Error(response.ErrorMessage);
|
|
@@ -1685,15 +1683,13 @@ class MenuServicesService {
|
|
|
1685
1683
|
}
|
|
1686
1684
|
// #endregion Menu: Version
|
|
1687
1685
|
// #region Menu: IsMenuAllowed
|
|
1688
|
-
/** Método executado para validar a permissão de acesso a uma opção do menu
|
|
1689
|
-
*/
|
|
1686
|
+
/** Método executado para validar a permissão de acesso a uma opção do menu. */
|
|
1690
1687
|
isMenuAllowed(route) {
|
|
1691
1688
|
const params = new HttpParams()
|
|
1692
1689
|
.set('route', route);
|
|
1693
|
-
const headers = new HttpHeaders().set("Content-Type", "application/json");
|
|
1694
1690
|
const url = `${this._BASE_URL}/Menu/IsMenuAllowed`;
|
|
1695
1691
|
return this._httpClient
|
|
1696
|
-
.get(url, { 'params': params, headers:
|
|
1692
|
+
.get(url, { 'params': params, headers: this._HTTP_HEADERS })
|
|
1697
1693
|
.pipe(take(1), tap((response) => {
|
|
1698
1694
|
if (response.Error) {
|
|
1699
1695
|
throw Error(response.ErrorMessage);
|
|
@@ -1735,73 +1731,63 @@ class MenuServicesService {
|
|
|
1735
1731
|
// #endregion UPDATE
|
|
1736
1732
|
// #region Menu Dinâmico
|
|
1737
1733
|
/** Método executado para pegar o Menu lateral levando em conta as permissões do usuário, grupo e o tenant ativo
|
|
1738
|
-
|
|
1734
|
+
* Executado caso o getter do boolean Menu Dynamic seja true
|
|
1739
1735
|
*/
|
|
1740
1736
|
getMenuLateral(projetoId) {
|
|
1741
|
-
const headers = new HttpHeaders().set("Content-Type", "application/json");
|
|
1742
1737
|
const url = `${this._BASE_URL}/Menu/GetMenuLateral`;
|
|
1743
1738
|
const params = new HttpParams()
|
|
1744
1739
|
.set('projetoId', projetoId);
|
|
1745
1740
|
return this._httpClient
|
|
1746
|
-
.get(url, { params: params, headers:
|
|
1741
|
+
.get(url, { 'params': params, 'headers': this._HTTP_HEADERS })
|
|
1747
1742
|
.pipe(take(1), tap((response) => {
|
|
1748
1743
|
if (response.Error) {
|
|
1749
1744
|
throw Error(response.ErrorMessage);
|
|
1750
1745
|
}
|
|
1751
1746
|
}));
|
|
1752
1747
|
}
|
|
1753
|
-
/** Método executado para montar estrutura de título, submenu e telas de acordo com os modelos presentes na ngx-sp-infra
|
|
1754
|
-
|
|
1755
|
-
|
|
1748
|
+
/** Método executado para montar estrutura de título, submenu e telas de acordo com os modelos presentes na **ngx-sp-infra**
|
|
1749
|
+
* envia-se o título deste grupo de submenus, ícone e enum daqueles submenus que
|
|
1750
|
+
* ficarão alocados no grupo de determinado título enviado
|
|
1756
1751
|
*/
|
|
1757
1752
|
getTelaSubmenus(NavSubmenuSearchItems) {
|
|
1758
|
-
const headers = new HttpHeaders()
|
|
1759
|
-
.set('Content-Type', 'application/json');
|
|
1760
1753
|
const url = `${this._BASE_URL}/Menu/GetTelaSubmenus`;
|
|
1761
1754
|
return this._httpClient
|
|
1762
|
-
.post(url, JSON.stringify(NavSubmenuSearchItems), { 'headers':
|
|
1755
|
+
.post(url, JSON.stringify(NavSubmenuSearchItems), { 'headers': this._HTTP_HEADERS })
|
|
1763
1756
|
.pipe(take(1), tap(response => {
|
|
1764
1757
|
if (response.Error) {
|
|
1765
1758
|
throw Error(response.ErrorMessage);
|
|
1766
1759
|
}
|
|
1767
1760
|
}));
|
|
1768
1761
|
}
|
|
1769
|
-
/** Método executado para montar estrutura da tela de submenu com os cards baseado no IdUnico do menu acessado em específico
|
|
1770
|
-
*/
|
|
1762
|
+
/** Método executado para montar estrutura da tela de submenu com os cards baseado no IdUnico do menu acessado em específico. */
|
|
1771
1763
|
getTelaSubmenusWithCards(MenuIdUnico) {
|
|
1772
|
-
const headers = new HttpHeaders()
|
|
1773
|
-
.set('Content-Type', 'application/json');
|
|
1774
1764
|
const url = `${this._BASE_URL}/Menu/GetTelaSubmenusWithCards`;
|
|
1775
1765
|
const params = new HttpParams()
|
|
1776
1766
|
.set('MenuIdUnico', MenuIdUnico);
|
|
1777
1767
|
return this._httpClient
|
|
1778
|
-
.get(url, { 'params': params, 'headers':
|
|
1768
|
+
.get(url, { 'params': params, 'headers': this._HTTP_HEADERS })
|
|
1779
1769
|
.pipe(take(1), tap(response => {
|
|
1780
1770
|
if (response.Error) {
|
|
1781
1771
|
throw Error(response.ErrorMessage);
|
|
1782
1772
|
}
|
|
1783
1773
|
}));
|
|
1784
1774
|
}
|
|
1785
|
-
/** Método executado para pegar os produtos para monta o MenuDropdown
|
|
1786
|
-
*/
|
|
1775
|
+
/** Método executado para pegar os produtos para monta o MenuDropdown. */
|
|
1787
1776
|
getProjects() {
|
|
1788
|
-
const headers = new HttpHeaders().set("Content-Type", "application/json");
|
|
1789
1777
|
const url = `${this._BASE_URL}/Menu/GetProjects`;
|
|
1790
1778
|
return this._httpClient
|
|
1791
|
-
.get(url, { headers:
|
|
1779
|
+
.get(url, { headers: this._HTTP_HEADERS })
|
|
1792
1780
|
.pipe(take(1), tap((response) => {
|
|
1793
1781
|
if (response.Error) {
|
|
1794
1782
|
throw Error(response.ErrorMessage);
|
|
1795
1783
|
}
|
|
1796
1784
|
}));
|
|
1797
1785
|
}
|
|
1798
|
-
/** Método executado para pegar o HostName de direcionamento para OS
|
|
1799
|
-
*/
|
|
1786
|
+
/** Método executado para pegar o HostName de direcionamento para OS. */
|
|
1800
1787
|
GetHostServerOutSystems() {
|
|
1801
|
-
const headers = new HttpHeaders().set("Content-Type", "application/json");
|
|
1802
1788
|
const url = `${this._BASE_URL}/Menu/GetHostServerOutSystems`;
|
|
1803
1789
|
return this._httpClient
|
|
1804
|
-
.get(url, { headers:
|
|
1790
|
+
.get(url, { headers: this._HTTP_HEADERS })
|
|
1805
1791
|
.pipe(take(1), tap((response) => {
|
|
1806
1792
|
if (response.Error) {
|
|
1807
1793
|
throw Error(response.ErrorMessage);
|
|
@@ -1822,12 +1808,8 @@ class MenuServicesService {
|
|
|
1822
1808
|
saveImageToStorage(footerImgSrc, footerImgName) {
|
|
1823
1809
|
this.setMenuFooterImg({ USUARIOID: this._authStorageService.infraUsuarioId, FILENAME: footerImgName, FILE: footerImgSrc });
|
|
1824
1810
|
}
|
|
1825
|
-
newUserImageEvent(value) {
|
|
1826
|
-
|
|
1827
|
-
}
|
|
1828
|
-
getNewUserImageEvent() {
|
|
1829
|
-
return this._subject.asObservable();
|
|
1830
|
-
}
|
|
1811
|
+
newUserImageEvent(value) { this._subject.next(value); }
|
|
1812
|
+
getNewUserImageEvent() { return this._subject.asObservable(); }
|
|
1831
1813
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MenuServicesService, deps: [{ token: AuthStorageService }, { token: i1.HttpClient }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1832
1814
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MenuServicesService, providedIn: 'root' }); }
|
|
1833
1815
|
}
|
|
@@ -3326,14 +3308,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
3326
3308
|
}] } });
|
|
3327
3309
|
|
|
3328
3310
|
class VersoesModalComponent {
|
|
3329
|
-
constructor(
|
|
3330
|
-
this.
|
|
3331
|
-
this.
|
|
3311
|
+
constructor(_menuService, _authUtils) {
|
|
3312
|
+
this._menuService = _menuService;
|
|
3313
|
+
this._authUtils = _authUtils;
|
|
3332
3314
|
// #region ==========> PROPERTIES <==========
|
|
3333
3315
|
// #region PUBLIC
|
|
3334
3316
|
this.onClose = new EventEmitter();
|
|
3335
3317
|
this.versionInfra = '';
|
|
3336
3318
|
this.versionCorporativo = '';
|
|
3319
|
+
this.closeSelf = () => { this.onClose.emit(); };
|
|
3337
3320
|
}
|
|
3338
3321
|
ngOnInit() {
|
|
3339
3322
|
this.getVersions();
|
|
@@ -3350,41 +3333,30 @@ class VersoesModalComponent {
|
|
|
3350
3333
|
// #endregion ==========> PROPERTIES <==========
|
|
3351
3334
|
// #region ==========> SERVICES <==========
|
|
3352
3335
|
// #region PREPARATION
|
|
3336
|
+
/** Obtém Versão instalada da Infra e dos outros produtos.
|
|
3337
|
+
*
|
|
3338
|
+
* Este método receberá no futuro uma lista de Versões de produtos cadastrados e listados em ordem.
|
|
3339
|
+
*/
|
|
3353
3340
|
getVersions() {
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
this.versionInfra = response.Version;
|
|
3358
|
-
},
|
|
3359
|
-
error: error => {
|
|
3360
|
-
this._authUtilService.showHttpError(error);
|
|
3361
|
-
}
|
|
3341
|
+
this._menuService.getVersionInfra().subscribe({
|
|
3342
|
+
next: response => this.versionInfra = response.Version,
|
|
3343
|
+
error: error => this._authUtils.showHttpError(error)
|
|
3362
3344
|
});
|
|
3363
|
-
//
|
|
3364
|
-
this.
|
|
3365
|
-
next: response =>
|
|
3366
|
-
|
|
3367
|
-
},
|
|
3368
|
-
error: error => {
|
|
3369
|
-
this._authUtilService.showHttpError(error);
|
|
3370
|
-
}
|
|
3345
|
+
// Versão do Corporativo
|
|
3346
|
+
this._menuService.getVersionCorporativo().subscribe({
|
|
3347
|
+
next: response => this.versionCorporativo = response.Version,
|
|
3348
|
+
error: error => this._authUtils.showHttpError(error)
|
|
3371
3349
|
});
|
|
3372
3350
|
}
|
|
3373
|
-
// #endregion PREPARATION
|
|
3374
|
-
// #endregion ==========> SERVICES <==========
|
|
3375
|
-
// #region ==========> MODALS <==========
|
|
3376
|
-
closeSelf() {
|
|
3377
|
-
this.onClose.emit();
|
|
3378
|
-
}
|
|
3379
3351
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: VersoesModalComponent, deps: [{ token: MenuServicesService }, { token: AuthUtilService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3380
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: VersoesModalComponent, isStandalone: true, selector: "versoes-modal", outputs: { onClose: "onClose" }, ngImport: i0, template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered modal-lg\">\n <h4 class=\"modal-title pull-left color-modal fw-bold\" style=\"font-size: 20px;\"> Vers\
|
|
3352
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: VersoesModalComponent, isStandalone: true, selector: "versoes-modal", outputs: { onClose: "onClose" }, ngImport: i0, template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered modal-lg\">\n <h4 class=\"modal-title pull-left color-modal fw-bold\" style=\"font-size: 20px;\"> Vers\u00E3o atual: {{ versionInfra }} </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 <p>Patches dos m\u00F3dulos espec\u00EDficos:</p>\n\n <ul class=\"p-0\">\n <li>\n <span class=\"fw-bold\">Corporativo | <a type=\"button\" class=\"text-decoration-none text-primary fw-bold\" tooltip=\"Clique aqui para acessar o que mudou nesta vers\u00E3o\">{{ versionCorporativo }} <lib-icon iconName=\"acessoexterno\" iconSize=\"small\" /> </a></span>\n </li>\n </ul>\n\n <p class=\"mb-0 mt-3\">Acesse as release notes de todas as vers\u00F5es do ERP <a [href]=\"releaseNotesUrl\" target=\"_blank\" class=\"fw-bold text-decoration-none text-primary\">clicando aqui</a> </p>\n </div>\n</div>", styles: ["ul{list-style-type:none!important}\n"], dependencies: [{ kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "ngmodule", type: CommonModule }] }); }
|
|
3381
3353
|
}
|
|
3382
3354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: VersoesModalComponent, decorators: [{
|
|
3383
3355
|
type: Component,
|
|
3384
3356
|
args: [{ selector: 'versoes-modal', imports: [
|
|
3385
3357
|
InfraModule,
|
|
3386
3358
|
CommonModule
|
|
3387
|
-
], template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered modal-lg\">\n <h4 class=\"modal-title pull-left color-modal fw-bold\" style=\"font-size: 20px;\"> Vers\
|
|
3359
|
+
], template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered modal-lg\">\n <h4 class=\"modal-title pull-left color-modal fw-bold\" style=\"font-size: 20px;\"> Vers\u00E3o atual: {{ versionInfra }} </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 <p>Patches dos m\u00F3dulos espec\u00EDficos:</p>\n\n <ul class=\"p-0\">\n <li>\n <span class=\"fw-bold\">Corporativo | <a type=\"button\" class=\"text-decoration-none text-primary fw-bold\" tooltip=\"Clique aqui para acessar o que mudou nesta vers\u00E3o\">{{ versionCorporativo }} <lib-icon iconName=\"acessoexterno\" iconSize=\"small\" /> </a></span>\n </li>\n </ul>\n\n <p class=\"mb-0 mt-3\">Acesse as release notes de todas as vers\u00F5es do ERP <a [href]=\"releaseNotesUrl\" target=\"_blank\" class=\"fw-bold text-decoration-none text-primary\">clicando aqui</a> </p>\n </div>\n</div>", styles: ["ul{list-style-type:none!important}\n"] }]
|
|
3388
3360
|
}], ctorParameters: () => [{ type: MenuServicesService }, { type: AuthUtilService }], propDecorators: { onClose: [{
|
|
3389
3361
|
type: Output
|
|
3390
3362
|
}] } });
|