@senior-gestao-pessoas/payroll-core 9.3.0 → 9.4.0-0c5930a0-42b5-459f-90d0-a42c899218d2
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-pessoas-payroll-core.umd.js +164 -52
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
- package/components/historical-pix-account/historical-pix-account.component.d.ts +17 -3
- package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +5 -1
- package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +2 -1
- package/esm2015/components/historical-pix-account/historical-pix-account.component.js +83 -12
- package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +60 -44
- package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +2 -1
- package/esm5/components/historical-pix-account/historical-pix-account.component.js +99 -12
- package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +68 -44
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +140 -52
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +164 -52
- package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/locale/en-US.json +1 -1
- package/locale/es-ES.json +1 -1
- package/locale/pt-BR.json +1 -1
- package/package.json +1 -1
- package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
|
@@ -9422,17 +9422,23 @@
|
|
|
9422
9422
|
}());
|
|
9423
9423
|
|
|
9424
9424
|
var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
9425
|
-
function HistoricalPixAccountComponent(translateService, cd, formBuilder) {
|
|
9425
|
+
function HistoricalPixAccountComponent(translateService, cd, formBuilder, messageService) {
|
|
9426
9426
|
var _this = this;
|
|
9427
9427
|
this.translateService = translateService;
|
|
9428
9428
|
this.cd = cd;
|
|
9429
9429
|
this.formBuilder = formBuilder;
|
|
9430
|
+
this.messageService = messageService;
|
|
9430
9431
|
this.recordByRow = 1;
|
|
9431
9432
|
this.showDateChange = false;
|
|
9432
9433
|
this.isEditMode = false;
|
|
9433
9434
|
this.isViewMode = false;
|
|
9434
9435
|
this.withSideBar = true;
|
|
9435
9436
|
this.defaultCpfNumber = null;
|
|
9437
|
+
this.listDataReciever = [];
|
|
9438
|
+
this.isViewModeActive = new core.EventEmitter();
|
|
9439
|
+
this.isEditModeActive = new core.EventEmitter();
|
|
9440
|
+
this.isDeleteModeActive = new core.EventEmitter();
|
|
9441
|
+
this.listFromApp = [];
|
|
9436
9442
|
this.visibleChange = new core.EventEmitter();
|
|
9437
9443
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
9438
9444
|
this.orderBy = {
|
|
@@ -9466,26 +9472,50 @@
|
|
|
9466
9472
|
visible: _this.isEditMode,
|
|
9467
9473
|
label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
9468
9474
|
command: function () {
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9475
|
+
if (_this.isAllowToViewHistorical) {
|
|
9476
|
+
rowData["index"] = key;
|
|
9477
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
|
|
9478
|
+
_this.visible = true;
|
|
9479
|
+
}
|
|
9480
|
+
else {
|
|
9481
|
+
_this.isViewModeActive.emit(true);
|
|
9482
|
+
}
|
|
9472
9483
|
},
|
|
9473
9484
|
},
|
|
9474
9485
|
{
|
|
9475
9486
|
visible: !!(!_this.isEditMode && _this.withSideBar),
|
|
9476
9487
|
label: _this.translateService.instant("hcm.payroll.edit"),
|
|
9477
9488
|
command: function () {
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9489
|
+
if (_this.isAllowToEditHistorical) {
|
|
9490
|
+
rowData["index"] = key;
|
|
9491
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
|
|
9492
|
+
_this.visible = true;
|
|
9493
|
+
}
|
|
9494
|
+
else {
|
|
9495
|
+
_this.isEditModeActive.emit(true);
|
|
9496
|
+
if (_this.listFromApp.length == 0) {
|
|
9497
|
+
rowData["index"] = key;
|
|
9498
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
|
|
9499
|
+
_this.visible = true;
|
|
9500
|
+
}
|
|
9501
|
+
}
|
|
9481
9502
|
},
|
|
9482
9503
|
},
|
|
9483
9504
|
{
|
|
9484
9505
|
visible: !_this.isEditMode,
|
|
9485
9506
|
label: _this.translateService.instant("hcm.payroll.delete"),
|
|
9486
9507
|
command: function () {
|
|
9487
|
-
_this.
|
|
9488
|
-
|
|
9508
|
+
if (_this.isAllowToDeleteHistorical) {
|
|
9509
|
+
_this.loading = true;
|
|
9510
|
+
_this.deleteAnnuityItem(key);
|
|
9511
|
+
}
|
|
9512
|
+
else {
|
|
9513
|
+
_this.isDeleteModeActive.emit(true);
|
|
9514
|
+
if (_this.listFromApp.length == 0) {
|
|
9515
|
+
_this.loading = true;
|
|
9516
|
+
_this.deleteAnnuityItem(key);
|
|
9517
|
+
}
|
|
9518
|
+
}
|
|
9489
9519
|
},
|
|
9490
9520
|
},
|
|
9491
9521
|
];
|
|
@@ -9495,6 +9525,11 @@
|
|
|
9495
9525
|
HistoricalPixAccountComponent.prototype.ngOnInit = function () {
|
|
9496
9526
|
this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
|
|
9497
9527
|
};
|
|
9528
|
+
HistoricalPixAccountComponent.prototype.ngOnChanges = function (changes) {
|
|
9529
|
+
if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
|
|
9530
|
+
this.listFromApp = changes['listDataReciever'].currentValue;
|
|
9531
|
+
}
|
|
9532
|
+
};
|
|
9498
9533
|
HistoricalPixAccountComponent.prototype.createFormGroup = function () {
|
|
9499
9534
|
this.historicalPixAccountList = this.formBuilder.group({
|
|
9500
9535
|
historicalPixAccountList: this.formBuilder.control(null),
|
|
@@ -9551,6 +9586,13 @@
|
|
|
9551
9586
|
this.pixAccountItemInput = {};
|
|
9552
9587
|
this.visible = true;
|
|
9553
9588
|
};
|
|
9589
|
+
HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
|
|
9590
|
+
this.messageService.add({
|
|
9591
|
+
severity: "error",
|
|
9592
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9593
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9594
|
+
});
|
|
9595
|
+
};
|
|
9554
9596
|
HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
|
|
9555
9597
|
var newlist = __spread(this.getHistoricalPixAccountList());
|
|
9556
9598
|
newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
|
|
@@ -9696,10 +9738,39 @@
|
|
|
9696
9738
|
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
9697
9739
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
9698
9740
|
};
|
|
9741
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
|
|
9742
|
+
get: function () {
|
|
9743
|
+
return (this.permission["incluir"]);
|
|
9744
|
+
},
|
|
9745
|
+
enumerable: true,
|
|
9746
|
+
configurable: true
|
|
9747
|
+
});
|
|
9748
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
|
|
9749
|
+
get: function () {
|
|
9750
|
+
return (this.permission["excluir"]);
|
|
9751
|
+
},
|
|
9752
|
+
enumerable: true,
|
|
9753
|
+
configurable: true
|
|
9754
|
+
});
|
|
9755
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
|
|
9756
|
+
get: function () {
|
|
9757
|
+
return (this.permission["editar"]);
|
|
9758
|
+
},
|
|
9759
|
+
enumerable: true,
|
|
9760
|
+
configurable: true
|
|
9761
|
+
});
|
|
9762
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
|
|
9763
|
+
get: function () {
|
|
9764
|
+
return (this.permission["visualizar"]);
|
|
9765
|
+
},
|
|
9766
|
+
enumerable: true,
|
|
9767
|
+
configurable: true
|
|
9768
|
+
});
|
|
9699
9769
|
HistoricalPixAccountComponent.ctorParameters = function () { return [
|
|
9700
9770
|
{ type: core$1.TranslateService },
|
|
9701
9771
|
{ type: core.ChangeDetectorRef },
|
|
9702
|
-
{ type: forms.FormBuilder }
|
|
9772
|
+
{ type: forms.FormBuilder },
|
|
9773
|
+
{ type: api.MessageService }
|
|
9703
9774
|
]; };
|
|
9704
9775
|
__decorate([
|
|
9705
9776
|
core.ViewChild(angularComponents.CustomFieldsComponent, { static: false })
|
|
@@ -9749,6 +9820,21 @@
|
|
|
9749
9820
|
__decorate([
|
|
9750
9821
|
core.Input()
|
|
9751
9822
|
], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
|
|
9823
|
+
__decorate([
|
|
9824
|
+
core.Input()
|
|
9825
|
+
], HistoricalPixAccountComponent.prototype, "permission", void 0);
|
|
9826
|
+
__decorate([
|
|
9827
|
+
core.Input()
|
|
9828
|
+
], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
|
|
9829
|
+
__decorate([
|
|
9830
|
+
core.Output()
|
|
9831
|
+
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
9832
|
+
__decorate([
|
|
9833
|
+
core.Output()
|
|
9834
|
+
], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
|
|
9835
|
+
__decorate([
|
|
9836
|
+
core.Output()
|
|
9837
|
+
], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
|
|
9752
9838
|
__decorate([
|
|
9753
9839
|
core.Input()
|
|
9754
9840
|
], HistoricalPixAccountComponent.prototype, "dateChange", null);
|
|
@@ -9980,6 +10066,7 @@
|
|
|
9980
10066
|
percentage: this.formBuilder.control(null, forms.Validators.compose(__spread(this.initialValidatorOfPercentage, [
|
|
9981
10067
|
forms.Validators.max(this.maxValuePercentage),
|
|
9982
10068
|
]))),
|
|
10069
|
+
externalId: this.formBuilder.control(null),
|
|
9983
10070
|
customFields: this.formBuilder.control(null),
|
|
9984
10071
|
});
|
|
9985
10072
|
};
|
|
@@ -10412,6 +10499,8 @@
|
|
|
10412
10499
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
10413
10500
|
this.keyPayload = "historicalEmployeePix";
|
|
10414
10501
|
this.withSidebar = true;
|
|
10502
|
+
this.isOnlyView = new core.EventEmitter();
|
|
10503
|
+
this.isEditMode = new core.EventEmitter();
|
|
10415
10504
|
this.enableView = new core.EventEmitter();
|
|
10416
10505
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
10417
10506
|
this.loading = true;
|
|
@@ -10420,18 +10509,6 @@
|
|
|
10420
10509
|
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
|
|
10421
10510
|
field: "dateChange",
|
|
10422
10511
|
},
|
|
10423
|
-
{
|
|
10424
|
-
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
|
|
10425
|
-
field: "pixKeyType.value",
|
|
10426
|
-
},
|
|
10427
|
-
{
|
|
10428
|
-
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
|
|
10429
|
-
field: "pixKey",
|
|
10430
|
-
},
|
|
10431
|
-
{
|
|
10432
|
-
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
|
|
10433
|
-
field: "percentage",
|
|
10434
|
-
},
|
|
10435
10512
|
{
|
|
10436
10513
|
label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
|
|
10437
10514
|
field: "numberOfPixAccount",
|
|
@@ -10452,40 +10529,52 @@
|
|
|
10452
10529
|
var _this = this;
|
|
10453
10530
|
payload.forEach(function (value) {
|
|
10454
10531
|
value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
|
|
10455
|
-
value.pixKey = _this.formatPixKeyByType(value.pixKeyType, value.pixKey);
|
|
10456
|
-
value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
|
|
10457
10532
|
});
|
|
10458
10533
|
this.onGridLoad(payload);
|
|
10459
10534
|
this.loading = false;
|
|
10460
10535
|
};
|
|
10461
|
-
HistoricalPixAccountListComponent.prototype.formatPixKeyByType = function (pixKeyType, pixKey) {
|
|
10462
|
-
var keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
|
|
10463
|
-
if (keyType === "TELEPHONE") {
|
|
10464
|
-
return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
|
|
10465
|
-
}
|
|
10466
|
-
else if (keyType === "CPF") {
|
|
10467
|
-
return FormatUtilsService.getFormattedCpf(pixKey);
|
|
10468
|
-
}
|
|
10469
|
-
else if (keyType === "CNPJ") {
|
|
10470
|
-
return FormatUtilsService.getFormattedCnpj(pixKey);
|
|
10471
|
-
}
|
|
10472
|
-
else {
|
|
10473
|
-
return pixKey;
|
|
10474
|
-
}
|
|
10475
|
-
};
|
|
10476
10536
|
HistoricalPixAccountListComponent.prototype.getMenuActions = function (rowData) {
|
|
10477
10537
|
var _this = this;
|
|
10478
10538
|
return [
|
|
10479
10539
|
{
|
|
10480
10540
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
10481
10541
|
command: function () {
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
_this.
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10542
|
+
if (_this.isAllowToViewHistorical) {
|
|
10543
|
+
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10544
|
+
if (_this.withSidebar) {
|
|
10545
|
+
_this.isOnlyView.emit(true);
|
|
10546
|
+
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10547
|
+
relativeTo: _this.activatedRoute,
|
|
10548
|
+
});
|
|
10549
|
+
}
|
|
10550
|
+
else {
|
|
10551
|
+
_this.enableView.emit(dateChange);
|
|
10552
|
+
}
|
|
10553
|
+
}
|
|
10554
|
+
else {
|
|
10555
|
+
_this.isNotAllowMessage();
|
|
10556
|
+
}
|
|
10557
|
+
},
|
|
10558
|
+
},
|
|
10559
|
+
{
|
|
10560
|
+
label: this.translateService.instant("hcm.payroll.edit"),
|
|
10561
|
+
command: function () {
|
|
10562
|
+
if (_this.isAllowToEditHistorical) {
|
|
10563
|
+
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10564
|
+
if (_this.withSidebar) {
|
|
10565
|
+
_this.isOnlyView.emit(false);
|
|
10566
|
+
_this.isEditMode.emit(true);
|
|
10567
|
+
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10568
|
+
relativeTo: _this.activatedRoute,
|
|
10569
|
+
});
|
|
10570
|
+
}
|
|
10571
|
+
else {
|
|
10572
|
+
_this.enableView.emit(dateChange);
|
|
10573
|
+
}
|
|
10574
|
+
}
|
|
10575
|
+
else {
|
|
10576
|
+
_this.isNotAllowMessage();
|
|
10577
|
+
}
|
|
10489
10578
|
},
|
|
10490
10579
|
},
|
|
10491
10580
|
{
|
|
@@ -10495,14 +10584,10 @@
|
|
|
10495
10584
|
_this.delete(rowData.id, rowData.dateChange);
|
|
10496
10585
|
}
|
|
10497
10586
|
else {
|
|
10498
|
-
_this.
|
|
10499
|
-
severity: "error",
|
|
10500
|
-
summary: _this.translateService.instant("hcm.payroll.error"),
|
|
10501
|
-
detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
10502
|
-
});
|
|
10587
|
+
_this.isNotAllowMessage();
|
|
10503
10588
|
}
|
|
10504
10589
|
},
|
|
10505
|
-
}
|
|
10590
|
+
}
|
|
10506
10591
|
];
|
|
10507
10592
|
};
|
|
10508
10593
|
HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
|
|
@@ -10557,6 +10642,13 @@
|
|
|
10557
10642
|
});
|
|
10558
10643
|
}
|
|
10559
10644
|
};
|
|
10645
|
+
HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
|
|
10646
|
+
this.messageService.add({
|
|
10647
|
+
severity: "error",
|
|
10648
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
10649
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
10650
|
+
});
|
|
10651
|
+
};
|
|
10560
10652
|
HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
|
|
10561
10653
|
if (payload && payload.length) {
|
|
10562
10654
|
this.lastRecord = payload[0];
|
|
@@ -10576,6 +10668,20 @@
|
|
|
10576
10668
|
enumerable: true,
|
|
10577
10669
|
configurable: true
|
|
10578
10670
|
});
|
|
10671
|
+
Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
|
|
10672
|
+
get: function () {
|
|
10673
|
+
return (this.permission["visualizar"]);
|
|
10674
|
+
},
|
|
10675
|
+
enumerable: true,
|
|
10676
|
+
configurable: true
|
|
10677
|
+
});
|
|
10678
|
+
Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToEditHistorical", {
|
|
10679
|
+
get: function () {
|
|
10680
|
+
return (this.permission["editar"]);
|
|
10681
|
+
},
|
|
10682
|
+
enumerable: true,
|
|
10683
|
+
configurable: true
|
|
10684
|
+
});
|
|
10579
10685
|
Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
|
|
10580
10686
|
get: function () {
|
|
10581
10687
|
return this.getMenuActions.bind(this);
|
|
@@ -10626,6 +10732,12 @@
|
|
|
10626
10732
|
__decorate([
|
|
10627
10733
|
core.Input()
|
|
10628
10734
|
], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
|
|
10735
|
+
__decorate([
|
|
10736
|
+
core.Output()
|
|
10737
|
+
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
10738
|
+
__decorate([
|
|
10739
|
+
core.Output()
|
|
10740
|
+
], HistoricalPixAccountListComponent.prototype, "isEditMode", void 0);
|
|
10629
10741
|
__decorate([
|
|
10630
10742
|
core.Output()
|
|
10631
10743
|
], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
|