@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
|
@@ -8522,16 +8522,22 @@ class FormatUtilsService {
|
|
|
8522
8522
|
}
|
|
8523
8523
|
|
|
8524
8524
|
let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
8525
|
-
constructor(translateService, cd, formBuilder) {
|
|
8525
|
+
constructor(translateService, cd, formBuilder, messageService) {
|
|
8526
8526
|
this.translateService = translateService;
|
|
8527
8527
|
this.cd = cd;
|
|
8528
8528
|
this.formBuilder = formBuilder;
|
|
8529
|
+
this.messageService = messageService;
|
|
8529
8530
|
this.recordByRow = 1;
|
|
8530
8531
|
this.showDateChange = false;
|
|
8531
8532
|
this.isEditMode = false;
|
|
8532
8533
|
this.isViewMode = false;
|
|
8533
8534
|
this.withSideBar = true;
|
|
8534
8535
|
this.defaultCpfNumber = null;
|
|
8536
|
+
this.listDataReciever = [];
|
|
8537
|
+
this.isViewModeActive = new EventEmitter();
|
|
8538
|
+
this.isEditModeActive = new EventEmitter();
|
|
8539
|
+
this.isDeleteModeActive = new EventEmitter();
|
|
8540
|
+
this.listFromApp = [];
|
|
8535
8541
|
this.visibleChange = new EventEmitter();
|
|
8536
8542
|
this.ngUnsubscribe = new Subject();
|
|
8537
8543
|
this.orderBy = {
|
|
@@ -8564,26 +8570,50 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8564
8570
|
visible: this.isEditMode,
|
|
8565
8571
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
8566
8572
|
command: () => {
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8573
|
+
if (this.isAllowToViewHistorical) {
|
|
8574
|
+
rowData["index"] = key;
|
|
8575
|
+
this.pixAccountItemInput = { currentItem: rowData, listData: this.listDataNoPage, isEditMode: false };
|
|
8576
|
+
this.visible = true;
|
|
8577
|
+
}
|
|
8578
|
+
else {
|
|
8579
|
+
this.isViewModeActive.emit(true);
|
|
8580
|
+
}
|
|
8570
8581
|
},
|
|
8571
8582
|
},
|
|
8572
8583
|
{
|
|
8573
8584
|
visible: !!(!this.isEditMode && this.withSideBar),
|
|
8574
8585
|
label: this.translateService.instant("hcm.payroll.edit"),
|
|
8575
8586
|
command: () => {
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8587
|
+
if (this.isAllowToEditHistorical) {
|
|
8588
|
+
rowData["index"] = key;
|
|
8589
|
+
this.pixAccountItemInput = { currentItem: rowData, listData: this.listDataNoPage, isEditMode: true };
|
|
8590
|
+
this.visible = true;
|
|
8591
|
+
}
|
|
8592
|
+
else {
|
|
8593
|
+
this.isEditModeActive.emit(true);
|
|
8594
|
+
if (this.listFromApp.length == 0) {
|
|
8595
|
+
rowData["index"] = key;
|
|
8596
|
+
this.pixAccountItemInput = { currentItem: rowData, listData: this.listDataNoPage, isEditMode: true };
|
|
8597
|
+
this.visible = true;
|
|
8598
|
+
}
|
|
8599
|
+
}
|
|
8579
8600
|
},
|
|
8580
8601
|
},
|
|
8581
8602
|
{
|
|
8582
8603
|
visible: !this.isEditMode,
|
|
8583
8604
|
label: this.translateService.instant("hcm.payroll.delete"),
|
|
8584
8605
|
command: () => {
|
|
8585
|
-
this.
|
|
8586
|
-
|
|
8606
|
+
if (this.isAllowToDeleteHistorical) {
|
|
8607
|
+
this.loading = true;
|
|
8608
|
+
this.deleteAnnuityItem(key);
|
|
8609
|
+
}
|
|
8610
|
+
else {
|
|
8611
|
+
this.isDeleteModeActive.emit(true);
|
|
8612
|
+
if (this.listFromApp.length == 0) {
|
|
8613
|
+
this.loading = true;
|
|
8614
|
+
this.deleteAnnuityItem(key);
|
|
8615
|
+
}
|
|
8616
|
+
}
|
|
8587
8617
|
},
|
|
8588
8618
|
},
|
|
8589
8619
|
];
|
|
@@ -8593,6 +8623,11 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8593
8623
|
ngOnInit() {
|
|
8594
8624
|
this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
|
|
8595
8625
|
}
|
|
8626
|
+
ngOnChanges(changes) {
|
|
8627
|
+
if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
|
|
8628
|
+
this.listFromApp = changes['listDataReciever'].currentValue;
|
|
8629
|
+
}
|
|
8630
|
+
}
|
|
8596
8631
|
createFormGroup() {
|
|
8597
8632
|
this.historicalPixAccountList = this.formBuilder.group({
|
|
8598
8633
|
historicalPixAccountList: this.formBuilder.control(null),
|
|
@@ -8648,6 +8683,13 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8648
8683
|
this.pixAccountItemInput = {};
|
|
8649
8684
|
this.visible = true;
|
|
8650
8685
|
}
|
|
8686
|
+
isNotAllowMessage() {
|
|
8687
|
+
this.messageService.add({
|
|
8688
|
+
severity: "error",
|
|
8689
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
8690
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
8691
|
+
});
|
|
8692
|
+
}
|
|
8651
8693
|
deleteAnnuityItem(index) {
|
|
8652
8694
|
let newlist = [...this.getHistoricalPixAccountList()];
|
|
8653
8695
|
newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
|
|
@@ -8763,11 +8805,24 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8763
8805
|
getFormattedPercentage(value) {
|
|
8764
8806
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
8765
8807
|
}
|
|
8808
|
+
get isAllowToAddHistorical() {
|
|
8809
|
+
return (this.permission["incluir"]);
|
|
8810
|
+
}
|
|
8811
|
+
get isAllowToDeleteHistorical() {
|
|
8812
|
+
return (this.permission["excluir"]);
|
|
8813
|
+
}
|
|
8814
|
+
get isAllowToEditHistorical() {
|
|
8815
|
+
return (this.permission["editar"]);
|
|
8816
|
+
}
|
|
8817
|
+
get isAllowToViewHistorical() {
|
|
8818
|
+
return (this.permission["visualizar"]);
|
|
8819
|
+
}
|
|
8766
8820
|
};
|
|
8767
8821
|
HistoricalPixAccountComponent.ctorParameters = () => [
|
|
8768
8822
|
{ type: TranslateService },
|
|
8769
8823
|
{ type: ChangeDetectorRef },
|
|
8770
|
-
{ type: FormBuilder }
|
|
8824
|
+
{ type: FormBuilder },
|
|
8825
|
+
{ type: MessageService }
|
|
8771
8826
|
];
|
|
8772
8827
|
__decorate([
|
|
8773
8828
|
ViewChild(CustomFieldsComponent$1, { static: false })
|
|
@@ -8817,6 +8872,21 @@ __decorate([
|
|
|
8817
8872
|
__decorate([
|
|
8818
8873
|
Input()
|
|
8819
8874
|
], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
|
|
8875
|
+
__decorate([
|
|
8876
|
+
Input()
|
|
8877
|
+
], HistoricalPixAccountComponent.prototype, "permission", void 0);
|
|
8878
|
+
__decorate([
|
|
8879
|
+
Input()
|
|
8880
|
+
], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
|
|
8881
|
+
__decorate([
|
|
8882
|
+
Output()
|
|
8883
|
+
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
8884
|
+
__decorate([
|
|
8885
|
+
Output()
|
|
8886
|
+
], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
|
|
8887
|
+
__decorate([
|
|
8888
|
+
Output()
|
|
8889
|
+
], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
|
|
8820
8890
|
__decorate([
|
|
8821
8891
|
Input()
|
|
8822
8892
|
], HistoricalPixAccountComponent.prototype, "dateChange", null);
|
|
@@ -9045,6 +9115,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9045
9115
|
...this.initialValidatorOfPercentage,
|
|
9046
9116
|
Validators.max(this.maxValuePercentage),
|
|
9047
9117
|
])),
|
|
9118
|
+
externalId: this.formBuilder.control(null),
|
|
9048
9119
|
customFields: this.formBuilder.control(null),
|
|
9049
9120
|
});
|
|
9050
9121
|
}
|
|
@@ -9444,6 +9515,8 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9444
9515
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
9445
9516
|
this.keyPayload = "historicalEmployeePix";
|
|
9446
9517
|
this.withSidebar = true;
|
|
9518
|
+
this.isOnlyView = new EventEmitter();
|
|
9519
|
+
this.isEditMode = new EventEmitter();
|
|
9447
9520
|
this.enableView = new EventEmitter();
|
|
9448
9521
|
this.ngUnsubscribe = new Subject();
|
|
9449
9522
|
this.loading = true;
|
|
@@ -9452,18 +9525,6 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9452
9525
|
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
|
|
9453
9526
|
field: "dateChange",
|
|
9454
9527
|
},
|
|
9455
|
-
{
|
|
9456
|
-
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
|
|
9457
|
-
field: "pixKeyType.value",
|
|
9458
|
-
},
|
|
9459
|
-
{
|
|
9460
|
-
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
|
|
9461
|
-
field: "pixKey",
|
|
9462
|
-
},
|
|
9463
|
-
{
|
|
9464
|
-
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
|
|
9465
|
-
field: "percentage",
|
|
9466
|
-
},
|
|
9467
9528
|
{
|
|
9468
9529
|
label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
|
|
9469
9530
|
field: "numberOfPixAccount",
|
|
@@ -9483,39 +9544,51 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9483
9544
|
onLazyLoad(payload) {
|
|
9484
9545
|
payload.forEach((value) => {
|
|
9485
9546
|
value.dateChange = moment$e(value.dateChange).format(this.dateFormat);
|
|
9486
|
-
value.pixKey = this.formatPixKeyByType(value.pixKeyType, value.pixKey);
|
|
9487
|
-
value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
|
|
9488
9547
|
});
|
|
9489
9548
|
this.onGridLoad(payload);
|
|
9490
9549
|
this.loading = false;
|
|
9491
9550
|
}
|
|
9492
|
-
formatPixKeyByType(pixKeyType, pixKey) {
|
|
9493
|
-
const keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
|
|
9494
|
-
if (keyType === "TELEPHONE") {
|
|
9495
|
-
return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
|
|
9496
|
-
}
|
|
9497
|
-
else if (keyType === "CPF") {
|
|
9498
|
-
return FormatUtilsService.getFormattedCpf(pixKey);
|
|
9499
|
-
}
|
|
9500
|
-
else if (keyType === "CNPJ") {
|
|
9501
|
-
return FormatUtilsService.getFormattedCnpj(pixKey);
|
|
9502
|
-
}
|
|
9503
|
-
else {
|
|
9504
|
-
return pixKey;
|
|
9505
|
-
}
|
|
9506
|
-
}
|
|
9507
9551
|
getMenuActions(rowData) {
|
|
9508
9552
|
return [
|
|
9509
9553
|
{
|
|
9510
9554
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
9511
9555
|
command: () => {
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
this.
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9556
|
+
if (this.isAllowToViewHistorical) {
|
|
9557
|
+
const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
|
|
9558
|
+
if (this.withSidebar) {
|
|
9559
|
+
this.isOnlyView.emit(true);
|
|
9560
|
+
this.router.navigate([`historical-pix-account/${dateChange}`], {
|
|
9561
|
+
relativeTo: this.activatedRoute,
|
|
9562
|
+
});
|
|
9563
|
+
}
|
|
9564
|
+
else {
|
|
9565
|
+
this.enableView.emit(dateChange);
|
|
9566
|
+
}
|
|
9567
|
+
}
|
|
9568
|
+
else {
|
|
9569
|
+
this.isNotAllowMessage();
|
|
9570
|
+
}
|
|
9571
|
+
},
|
|
9572
|
+
},
|
|
9573
|
+
{
|
|
9574
|
+
label: this.translateService.instant("hcm.payroll.edit"),
|
|
9575
|
+
command: () => {
|
|
9576
|
+
if (this.isAllowToEditHistorical) {
|
|
9577
|
+
const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
|
|
9578
|
+
if (this.withSidebar) {
|
|
9579
|
+
this.isOnlyView.emit(false);
|
|
9580
|
+
this.isEditMode.emit(true);
|
|
9581
|
+
this.router.navigate([`historical-pix-account/${dateChange}`], {
|
|
9582
|
+
relativeTo: this.activatedRoute,
|
|
9583
|
+
});
|
|
9584
|
+
}
|
|
9585
|
+
else {
|
|
9586
|
+
this.enableView.emit(dateChange);
|
|
9587
|
+
}
|
|
9588
|
+
}
|
|
9589
|
+
else {
|
|
9590
|
+
this.isNotAllowMessage();
|
|
9591
|
+
}
|
|
9519
9592
|
},
|
|
9520
9593
|
},
|
|
9521
9594
|
{
|
|
@@ -9525,14 +9598,10 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9525
9598
|
this.delete(rowData.id, rowData.dateChange);
|
|
9526
9599
|
}
|
|
9527
9600
|
else {
|
|
9528
|
-
this.
|
|
9529
|
-
severity: "error",
|
|
9530
|
-
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9531
|
-
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9532
|
-
});
|
|
9601
|
+
this.isNotAllowMessage();
|
|
9533
9602
|
}
|
|
9534
9603
|
},
|
|
9535
|
-
}
|
|
9604
|
+
}
|
|
9536
9605
|
];
|
|
9537
9606
|
}
|
|
9538
9607
|
delete(id, dateChange) {
|
|
@@ -9586,6 +9655,13 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9586
9655
|
});
|
|
9587
9656
|
}
|
|
9588
9657
|
}
|
|
9658
|
+
isNotAllowMessage() {
|
|
9659
|
+
this.messageService.add({
|
|
9660
|
+
severity: "error",
|
|
9661
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9662
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9663
|
+
});
|
|
9664
|
+
}
|
|
9589
9665
|
onGridLoad(payload) {
|
|
9590
9666
|
if (payload && payload.length) {
|
|
9591
9667
|
this.lastRecord = payload[0];
|
|
@@ -9597,6 +9673,12 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9597
9673
|
get isAllowToDeleteHistorical() {
|
|
9598
9674
|
return (this.permission["excluir"]);
|
|
9599
9675
|
}
|
|
9676
|
+
get isAllowToViewHistorical() {
|
|
9677
|
+
return (this.permission["visualizar"]);
|
|
9678
|
+
}
|
|
9679
|
+
get isAllowToEditHistorical() {
|
|
9680
|
+
return (this.permission["editar"]);
|
|
9681
|
+
}
|
|
9600
9682
|
get scopedActions() {
|
|
9601
9683
|
return this.getMenuActions.bind(this);
|
|
9602
9684
|
}
|
|
@@ -9640,6 +9722,12 @@ __decorate([
|
|
|
9640
9722
|
__decorate([
|
|
9641
9723
|
Input()
|
|
9642
9724
|
], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
|
|
9725
|
+
__decorate([
|
|
9726
|
+
Output()
|
|
9727
|
+
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
9728
|
+
__decorate([
|
|
9729
|
+
Output()
|
|
9730
|
+
], HistoricalPixAccountListComponent.prototype, "isEditMode", void 0);
|
|
9643
9731
|
__decorate([
|
|
9644
9732
|
Output()
|
|
9645
9733
|
], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
|