@senior-gestao-empresarial/angular-components 4.19.3 → 4.20.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/bundles/senior-gestao-empresarial-angular-components.umd.js +175 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js +2 -2
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js.map +1 -1
- package/components/lookups/entities/wizard-entities/country-lookup.d.ts +8 -0
- package/components/lookups/entities/wizard-entities/currency-lookup.d.ts +8 -0
- package/components/lookups/index.d.ts +2 -0
- package/components/permissions/index.d.ts +2 -0
- package/components/permissions/protocols/modules.enum.d.ts +4 -0
- package/components/permissions/protocols/query-module.d.ts +9 -0
- package/components/permissions/protocols/rec-modulo.d.ts +8 -0
- package/components/permissions/verify-module-permission-service.d.ts +9 -0
- package/components/permissions/verify-module-permission.d.ts +14 -0
- package/esm2015/components/lookups/entities/wizard-entities/country-lookup.js +52 -0
- package/esm2015/components/lookups/entities/wizard-entities/currency-lookup.js +52 -0
- package/esm2015/components/lookups/erp-lookups.module.js +6 -2
- package/esm2015/components/lookups/index.js +3 -1
- package/esm2015/components/permissions/index.js +3 -0
- package/esm2015/components/permissions/protocols/modules.enum.js +6 -0
- package/esm2015/components/permissions/protocols/query-module.js +1 -0
- package/esm2015/components/permissions/protocols/rec-modulo.js +1 -0
- package/esm2015/components/permissions/verify-module-permission-service.js +26 -0
- package/esm2015/components/permissions/verify-module-permission.js +50 -0
- package/esm2015/public-api.js +2 -1
- package/esm2015/senior-gestao-empresarial-angular-components.js +2 -1
- package/esm5/components/lookups/entities/wizard-entities/country-lookup.js +55 -0
- package/esm5/components/lookups/entities/wizard-entities/currency-lookup.js +55 -0
- package/esm5/components/lookups/erp-lookups.module.js +6 -2
- package/esm5/components/lookups/index.js +3 -1
- package/esm5/components/permissions/index.js +3 -0
- package/esm5/components/permissions/protocols/modules.enum.js +6 -0
- package/esm5/components/permissions/protocols/query-module.js +1 -0
- package/esm5/components/permissions/protocols/rec-modulo.js +1 -0
- package/esm5/components/permissions/verify-module-permission-service.js +28 -0
- package/esm5/components/permissions/verify-module-permission.js +52 -0
- package/esm5/public-api.js +2 -1
- package/esm5/senior-gestao-empresarial-angular-components.js +2 -1
- package/fesm2015/senior-gestao-empresarial-angular-components.js +163 -3
- package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-angular-components.js +173 -3
- package/fesm5/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/senior-gestao-empresarial-angular-components.d.ts +1 -0
- package/senior-gestao-empresarial-angular-components.metadata.json +1 -1
|
@@ -3,7 +3,7 @@ import { Input, Component, NgModule, Injectable, Inject, ɵɵdefineInjectable,
|
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { BreadcrumbModule as BreadcrumbModule$1 } from 'primeng/breadcrumb';
|
|
5
5
|
import { NavigationEnd, PRIMARY_OUTLET, ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
6
|
-
import { Subject, throwError, interval, of } from 'rxjs';
|
|
6
|
+
import { Subject, throwError, interval, of, ReplaySubject } from 'rxjs';
|
|
7
7
|
import { takeUntil, filter, catchError, map, takeWhile, switchMap, take } from 'rxjs/operators';
|
|
8
8
|
import * as moment_ from 'moment';
|
|
9
9
|
import { FormField, FieldType } from '@seniorsistemas/angular-components';
|
|
@@ -5372,6 +5372,102 @@ var E048SfcLookup = /** @class */ (function (_super) {
|
|
|
5372
5372
|
return E048SfcLookup;
|
|
5373
5373
|
}(ErpLookups));
|
|
5374
5374
|
|
|
5375
|
+
var CountryLookup = /** @class */ (function (_super) {
|
|
5376
|
+
__extends(CountryLookup, _super);
|
|
5377
|
+
function CountryLookup(lookupService, translate) {
|
|
5378
|
+
var _this = _super.call(this, lookupService, translate, "e006pai", [
|
|
5379
|
+
{
|
|
5380
|
+
name: "codPai",
|
|
5381
|
+
type: FieldType.String
|
|
5382
|
+
}, {
|
|
5383
|
+
name: "nomPai",
|
|
5384
|
+
type: FieldType.String
|
|
5385
|
+
},
|
|
5386
|
+
], [
|
|
5387
|
+
{
|
|
5388
|
+
name: "codPai",
|
|
5389
|
+
type: FieldType.String
|
|
5390
|
+
}, {
|
|
5391
|
+
name: "nomPai",
|
|
5392
|
+
type: FieldType.String
|
|
5393
|
+
}, {
|
|
5394
|
+
name: "e031moe.desMoe",
|
|
5395
|
+
type: FieldType.String
|
|
5396
|
+
},
|
|
5397
|
+
], [
|
|
5398
|
+
{
|
|
5399
|
+
name: "codPai",
|
|
5400
|
+
type: FieldType.String
|
|
5401
|
+
}, {
|
|
5402
|
+
name: "nomPai",
|
|
5403
|
+
type: FieldType.String
|
|
5404
|
+
}, {
|
|
5405
|
+
name: "e031moe.desMoe",
|
|
5406
|
+
type: FieldType.String
|
|
5407
|
+
},
|
|
5408
|
+
], "erpx_fnd", "starter") || this;
|
|
5409
|
+
_this.lookupService = lookupService;
|
|
5410
|
+
_this.translate = translate;
|
|
5411
|
+
return _this;
|
|
5412
|
+
}
|
|
5413
|
+
CountryLookup.ctorParameters = function () { return [
|
|
5414
|
+
{ type: ErpLookupsService },
|
|
5415
|
+
{ type: TranslateService }
|
|
5416
|
+
]; };
|
|
5417
|
+
CountryLookup = __decorate([
|
|
5418
|
+
Injectable()
|
|
5419
|
+
], CountryLookup);
|
|
5420
|
+
return CountryLookup;
|
|
5421
|
+
}(ErpLookups));
|
|
5422
|
+
|
|
5423
|
+
var CurrencyLookup = /** @class */ (function (_super) {
|
|
5424
|
+
__extends(CurrencyLookup, _super);
|
|
5425
|
+
function CurrencyLookup(lookupService, translate) {
|
|
5426
|
+
var _this = _super.call(this, lookupService, translate, "e031moe", [
|
|
5427
|
+
{
|
|
5428
|
+
name: "codMoe",
|
|
5429
|
+
type: FieldType.String
|
|
5430
|
+
}, {
|
|
5431
|
+
name: "desMoe",
|
|
5432
|
+
type: FieldType.String
|
|
5433
|
+
},
|
|
5434
|
+
], [
|
|
5435
|
+
{
|
|
5436
|
+
name: "codMoe",
|
|
5437
|
+
type: FieldType.String
|
|
5438
|
+
}, {
|
|
5439
|
+
name: "desMoe",
|
|
5440
|
+
type: FieldType.String
|
|
5441
|
+
}, {
|
|
5442
|
+
name: "sigMoe",
|
|
5443
|
+
type: FieldType.String
|
|
5444
|
+
},
|
|
5445
|
+
], [
|
|
5446
|
+
{
|
|
5447
|
+
name: "codMoe",
|
|
5448
|
+
type: FieldType.String
|
|
5449
|
+
}, {
|
|
5450
|
+
name: "desMoe",
|
|
5451
|
+
type: FieldType.String
|
|
5452
|
+
}, {
|
|
5453
|
+
name: "sigMoe",
|
|
5454
|
+
type: FieldType.String
|
|
5455
|
+
},
|
|
5456
|
+
], "erpx_fnd", "starter") || this;
|
|
5457
|
+
_this.lookupService = lookupService;
|
|
5458
|
+
_this.translate = translate;
|
|
5459
|
+
return _this;
|
|
5460
|
+
}
|
|
5461
|
+
CurrencyLookup.ctorParameters = function () { return [
|
|
5462
|
+
{ type: ErpLookupsService },
|
|
5463
|
+
{ type: TranslateService }
|
|
5464
|
+
]; };
|
|
5465
|
+
CurrencyLookup = __decorate([
|
|
5466
|
+
Injectable()
|
|
5467
|
+
], CurrencyLookup);
|
|
5468
|
+
return CurrencyLookup;
|
|
5469
|
+
}(ErpLookups));
|
|
5470
|
+
|
|
5375
5471
|
var ErpLookupsModule = /** @class */ (function () {
|
|
5376
5472
|
function ErpLookupsModule() {
|
|
5377
5473
|
}
|
|
@@ -5471,7 +5567,9 @@ var ErpLookupsModule = /** @class */ (function () {
|
|
|
5471
5567
|
naturezaReceitaPisCofins,
|
|
5472
5568
|
E048FctLookup,
|
|
5473
5569
|
EquipmentLookup,
|
|
5474
|
-
E048SfcLookup
|
|
5570
|
+
E048SfcLookup,
|
|
5571
|
+
CurrencyLookup,
|
|
5572
|
+
CountryLookup
|
|
5475
5573
|
],
|
|
5476
5574
|
declarations: [],
|
|
5477
5575
|
exports: [],
|
|
@@ -6424,9 +6522,81 @@ var WebsocketService = /** @class */ (function () {
|
|
|
6424
6522
|
return WebsocketService;
|
|
6425
6523
|
}());
|
|
6426
6524
|
|
|
6525
|
+
var VerifyModulePermissionService = /** @class */ (function () {
|
|
6526
|
+
function VerifyModulePermissionService(http) {
|
|
6527
|
+
this.http = http;
|
|
6528
|
+
}
|
|
6529
|
+
VerifyModulePermissionService_1 = VerifyModulePermissionService;
|
|
6530
|
+
VerifyModulePermissionService.prototype.queryModule = function (request) {
|
|
6531
|
+
return this.http.post(VerifyModulePermissionService_1.QUERY_MODULES_URL, request);
|
|
6532
|
+
};
|
|
6533
|
+
var VerifyModulePermissionService_1;
|
|
6534
|
+
VerifyModulePermissionService.QUERY_MODULES_URL = "erpx_fnd/empresa/queries/consultaModulo";
|
|
6535
|
+
VerifyModulePermissionService.ctorParameters = function () { return [
|
|
6536
|
+
{ type: HttpClient }
|
|
6537
|
+
]; };
|
|
6538
|
+
VerifyModulePermissionService.ɵprov = ɵɵdefineInjectable({ factory: function VerifyModulePermissionService_Factory() { return new VerifyModulePermissionService(ɵɵinject(HttpClient)); }, token: VerifyModulePermissionService, providedIn: "any" });
|
|
6539
|
+
VerifyModulePermissionService = VerifyModulePermissionService_1 = __decorate([
|
|
6540
|
+
Injectable({
|
|
6541
|
+
providedIn: "any"
|
|
6542
|
+
})
|
|
6543
|
+
], VerifyModulePermissionService);
|
|
6544
|
+
return VerifyModulePermissionService;
|
|
6545
|
+
}());
|
|
6546
|
+
|
|
6547
|
+
var VerifyModulePermission = /** @class */ (function () {
|
|
6548
|
+
function VerifyModulePermission(verifyModulePermissionService) {
|
|
6549
|
+
this.verifyModulePermissionService = verifyModulePermissionService;
|
|
6550
|
+
}
|
|
6551
|
+
VerifyModulePermission_1 = VerifyModulePermission;
|
|
6552
|
+
/**
|
|
6553
|
+
* Method to verify if user has permission on a specific module
|
|
6554
|
+
* @param module Module to verify the permission
|
|
6555
|
+
* @returns An boolean Observable
|
|
6556
|
+
*/
|
|
6557
|
+
VerifyModulePermission.prototype.hasPermission = function (module) {
|
|
6558
|
+
var moduleSubject = VerifyModulePermission_1.subjectsPerModuleMap.get(module);
|
|
6559
|
+
if (!moduleSubject) {
|
|
6560
|
+
var newModuleSubject_1 = new ReplaySubject(1);
|
|
6561
|
+
VerifyModulePermission_1.subjectsPerModuleMap.set(module, newModuleSubject_1);
|
|
6562
|
+
this.verifyModulePermissionService
|
|
6563
|
+
.queryModule({ modulo: module })
|
|
6564
|
+
.pipe(take(1))
|
|
6565
|
+
.subscribe(function (response) {
|
|
6566
|
+
var hasPermission = !!response.modulos.find(function (modulo) { return modulo.ativo && !modulo.empresa; });
|
|
6567
|
+
newModuleSubject_1.next(hasPermission);
|
|
6568
|
+
}, function (err) {
|
|
6569
|
+
VerifyModulePermission_1.subjectsPerModuleMap.delete(module);
|
|
6570
|
+
newModuleSubject_1.error(err);
|
|
6571
|
+
newModuleSubject_1.unsubscribe();
|
|
6572
|
+
});
|
|
6573
|
+
return newModuleSubject_1.asObservable();
|
|
6574
|
+
}
|
|
6575
|
+
return moduleSubject.asObservable();
|
|
6576
|
+
};
|
|
6577
|
+
var VerifyModulePermission_1;
|
|
6578
|
+
VerifyModulePermission.ctorParameters = function () { return [
|
|
6579
|
+
{ type: VerifyModulePermissionService }
|
|
6580
|
+
]; };
|
|
6581
|
+
VerifyModulePermission.subjectsPerModuleMap = new Map();
|
|
6582
|
+
VerifyModulePermission.ɵprov = ɵɵdefineInjectable({ factory: function VerifyModulePermission_Factory() { return new VerifyModulePermission(ɵɵinject(VerifyModulePermissionService)); }, token: VerifyModulePermission, providedIn: "root" });
|
|
6583
|
+
VerifyModulePermission = VerifyModulePermission_1 = __decorate([
|
|
6584
|
+
Injectable({
|
|
6585
|
+
providedIn: "root"
|
|
6586
|
+
})
|
|
6587
|
+
], VerifyModulePermission);
|
|
6588
|
+
return VerifyModulePermission;
|
|
6589
|
+
}());
|
|
6590
|
+
|
|
6591
|
+
var ModulesEnum;
|
|
6592
|
+
(function (ModulesEnum) {
|
|
6593
|
+
ModulesEnum["CONTROLADORIA"] = "CONTROLADORIA";
|
|
6594
|
+
ModulesEnum["MANUFATURA"] = "MANUFATURA";
|
|
6595
|
+
})(ModulesEnum || (ModulesEnum = {}));
|
|
6596
|
+
|
|
6427
6597
|
/**
|
|
6428
6598
|
* Generated bundle index. Do not edit.
|
|
6429
6599
|
*/
|
|
6430
6600
|
|
|
6431
|
-
export { BreadcrumbComponent, BreadcrumbModule, Breakpoints, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E082TprLookup, E085PesLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E600CcoLookup, E640LotLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, LigacaoItemFornecedorLookup, LookupValidationUtils, NcmLookup, NpsService, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, UnidadeMedidaLookup, UtilsModule, WebsocketService, naturezaReceitaPisCofins, ErpLookupsService as ɵa, StorageService as ɵb };
|
|
6601
|
+
export { BreadcrumbComponent, BreadcrumbModule, Breakpoints, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E082TprLookup, E085PesLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E600CcoLookup, E640LotLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, LigacaoItemFornecedorLookup, LookupValidationUtils, ModulesEnum, NcmLookup, NpsService, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, WebsocketService, naturezaReceitaPisCofins, ErpLookupsService as ɵa, StorageService as ɵb, VerifyModulePermissionService as ɵc };
|
|
6432
6602
|
//# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map
|