@senior-gestao-pessoas/payroll-core 9.3.0-d99b0dbd-5fc0-4b98-979b-fe30c751fa36 → 9.3.0-e7358b40-0308-4e65-bc8c-f57b969edb86
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 +87 -31
- 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 +11 -2
- package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +2 -0
- package/esm2015/components/historical-pix-account/historical-pix-account.component.js +64 -20
- package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +19 -15
- package/esm5/components/historical-pix-account/historical-pix-account.component.js +72 -20
- package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +19 -15
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +79 -31
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +87 -31
- package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
|
@@ -8533,6 +8533,11 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8533
8533
|
this.isViewMode = false;
|
|
8534
8534
|
this.withSideBar = true;
|
|
8535
8535
|
this.defaultCpfNumber = null;
|
|
8536
|
+
this.listDataReciever = [];
|
|
8537
|
+
this.isOnlyView = new EventEmitter();
|
|
8538
|
+
this.isOnlyEdit = new EventEmitter();
|
|
8539
|
+
this.isOnlyDelete = new EventEmitter();
|
|
8540
|
+
this.listFromApp = [];
|
|
8536
8541
|
this.visibleChange = new EventEmitter();
|
|
8537
8542
|
this.ngUnsubscribe = new Subject();
|
|
8538
8543
|
this.orderBy = {
|
|
@@ -8565,26 +8570,33 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8565
8570
|
visible: this.isEditMode,
|
|
8566
8571
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
8567
8572
|
command: () => {
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
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.isOnlyView.emit(true);
|
|
8580
|
+
}
|
|
8571
8581
|
},
|
|
8572
8582
|
},
|
|
8573
8583
|
{
|
|
8574
8584
|
visible: !!(!this.isEditMode && this.withSideBar),
|
|
8575
8585
|
label: this.translateService.instant("hcm.payroll.edit"),
|
|
8576
8586
|
command: () => {
|
|
8577
|
-
if (this.isAllowToEditHistorical
|
|
8587
|
+
if (this.isAllowToEditHistorical) {
|
|
8578
8588
|
rowData["index"] = key;
|
|
8579
8589
|
this.pixAccountItemInput = { currentItem: rowData, listData: this.listDataNoPage, isEditMode: true };
|
|
8580
8590
|
this.visible = true;
|
|
8581
8591
|
}
|
|
8582
8592
|
else {
|
|
8583
|
-
this.
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8593
|
+
this.isOnlyEdit.emit(true);
|
|
8594
|
+
if (this.listFromApp.length == 0) {
|
|
8595
|
+
console.log('ENTER IN EDIT');
|
|
8596
|
+
rowData["index"] = key;
|
|
8597
|
+
this.pixAccountItemInput = { currentItem: rowData, listData: this.listDataNoPage, isEditMode: true };
|
|
8598
|
+
this.visible = true;
|
|
8599
|
+
}
|
|
8588
8600
|
}
|
|
8589
8601
|
},
|
|
8590
8602
|
},
|
|
@@ -8592,16 +8604,16 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8592
8604
|
visible: !this.isEditMode,
|
|
8593
8605
|
label: this.translateService.instant("hcm.payroll.delete"),
|
|
8594
8606
|
command: () => {
|
|
8595
|
-
if (this.isAllowToDeleteHistorical
|
|
8607
|
+
if (this.isAllowToDeleteHistorical) {
|
|
8596
8608
|
this.loading = true;
|
|
8597
8609
|
this.deleteAnnuityItem(key);
|
|
8598
8610
|
}
|
|
8599
8611
|
else {
|
|
8600
|
-
this.
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
}
|
|
8612
|
+
this.isOnlyDelete.emit(true);
|
|
8613
|
+
if (this.listFromApp.length == 0) {
|
|
8614
|
+
this.loading = true;
|
|
8615
|
+
this.deleteAnnuityItem(key);
|
|
8616
|
+
}
|
|
8605
8617
|
}
|
|
8606
8618
|
},
|
|
8607
8619
|
},
|
|
@@ -8612,6 +8624,13 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8612
8624
|
ngOnInit() {
|
|
8613
8625
|
this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
|
|
8614
8626
|
}
|
|
8627
|
+
ngOnChanges(changes) {
|
|
8628
|
+
if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
|
|
8629
|
+
console.log('changes', changes['listDataReciever'].currentValue);
|
|
8630
|
+
this.listFromApp = changes['listDataReciever'].currentValue;
|
|
8631
|
+
console.log('listFromApp', this.listFromApp);
|
|
8632
|
+
}
|
|
8633
|
+
}
|
|
8615
8634
|
createFormGroup() {
|
|
8616
8635
|
this.historicalPixAccountList = this.formBuilder.group({
|
|
8617
8636
|
historicalPixAccountList: this.formBuilder.control(null),
|
|
@@ -8667,6 +8686,13 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8667
8686
|
this.pixAccountItemInput = {};
|
|
8668
8687
|
this.visible = true;
|
|
8669
8688
|
}
|
|
8689
|
+
isNotAllowMessage() {
|
|
8690
|
+
this.messageService.add({
|
|
8691
|
+
severity: "error",
|
|
8692
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
8693
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
8694
|
+
});
|
|
8695
|
+
}
|
|
8670
8696
|
deleteAnnuityItem(index) {
|
|
8671
8697
|
let newlist = [...this.getHistoricalPixAccountList()];
|
|
8672
8698
|
newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
|
|
@@ -8782,11 +8808,17 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8782
8808
|
getFormattedPercentage(value) {
|
|
8783
8809
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
8784
8810
|
}
|
|
8811
|
+
get isAllowToAddHistorical() {
|
|
8812
|
+
return (this.permission["incluir"]);
|
|
8813
|
+
}
|
|
8785
8814
|
get isAllowToDeleteHistorical() {
|
|
8786
|
-
return (this.permission["
|
|
8815
|
+
return (this.permission["excluir"]);
|
|
8787
8816
|
}
|
|
8788
8817
|
get isAllowToEditHistorical() {
|
|
8789
|
-
return (this.permission["
|
|
8818
|
+
return (this.permission["editar"]);
|
|
8819
|
+
}
|
|
8820
|
+
get isAllowToViewHistorical() {
|
|
8821
|
+
return (this.permission["visualizar"]);
|
|
8790
8822
|
}
|
|
8791
8823
|
};
|
|
8792
8824
|
HistoricalPixAccountComponent.ctorParameters = () => [
|
|
@@ -8846,6 +8878,18 @@ __decorate([
|
|
|
8846
8878
|
__decorate([
|
|
8847
8879
|
Input()
|
|
8848
8880
|
], HistoricalPixAccountComponent.prototype, "permission", void 0);
|
|
8881
|
+
__decorate([
|
|
8882
|
+
Input()
|
|
8883
|
+
], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
|
|
8884
|
+
__decorate([
|
|
8885
|
+
Output()
|
|
8886
|
+
], HistoricalPixAccountComponent.prototype, "isOnlyView", void 0);
|
|
8887
|
+
__decorate([
|
|
8888
|
+
Output()
|
|
8889
|
+
], HistoricalPixAccountComponent.prototype, "isOnlyEdit", void 0);
|
|
8890
|
+
__decorate([
|
|
8891
|
+
Output()
|
|
8892
|
+
], HistoricalPixAccountComponent.prototype, "isOnlyDelete", void 0);
|
|
8849
8893
|
__decorate([
|
|
8850
8894
|
Input()
|
|
8851
8895
|
], HistoricalPixAccountComponent.prototype, "dateChange", null);
|
|
@@ -9474,6 +9518,7 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9474
9518
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
9475
9519
|
this.keyPayload = "historicalEmployeePix";
|
|
9476
9520
|
this.withSidebar = true;
|
|
9521
|
+
this.isOnlyView = new EventEmitter();
|
|
9477
9522
|
this.enableView = new EventEmitter();
|
|
9478
9523
|
this.ngUnsubscribe = new Subject();
|
|
9479
9524
|
this.loading = true;
|
|
@@ -9539,9 +9584,10 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9539
9584
|
{
|
|
9540
9585
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
9541
9586
|
command: () => {
|
|
9542
|
-
if (this.isAllowToViewHistorical
|
|
9587
|
+
if (this.isAllowToViewHistorical) {
|
|
9543
9588
|
const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
|
|
9544
9589
|
if (this.withSidebar) {
|
|
9590
|
+
this.isOnlyView.emit(true);
|
|
9545
9591
|
this.router.navigate([`historical-pix-account/${dateChange}`], {
|
|
9546
9592
|
relativeTo: this.activatedRoute,
|
|
9547
9593
|
});
|
|
@@ -9551,11 +9597,7 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9551
9597
|
}
|
|
9552
9598
|
}
|
|
9553
9599
|
else {
|
|
9554
|
-
this.
|
|
9555
|
-
severity: "error",
|
|
9556
|
-
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9557
|
-
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9558
|
-
});
|
|
9600
|
+
this.isNotAllowMessage();
|
|
9559
9601
|
}
|
|
9560
9602
|
},
|
|
9561
9603
|
},
|
|
@@ -9566,11 +9608,7 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9566
9608
|
this.delete(rowData.id, rowData.dateChange);
|
|
9567
9609
|
}
|
|
9568
9610
|
else {
|
|
9569
|
-
this.
|
|
9570
|
-
severity: "error",
|
|
9571
|
-
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9572
|
-
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9573
|
-
});
|
|
9611
|
+
this.isNotAllowMessage();
|
|
9574
9612
|
}
|
|
9575
9613
|
},
|
|
9576
9614
|
},
|
|
@@ -9627,19 +9665,26 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9627
9665
|
});
|
|
9628
9666
|
}
|
|
9629
9667
|
}
|
|
9668
|
+
isNotAllowMessage() {
|
|
9669
|
+
this.messageService.add({
|
|
9670
|
+
severity: "error",
|
|
9671
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9672
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9673
|
+
});
|
|
9674
|
+
}
|
|
9630
9675
|
onGridLoad(payload) {
|
|
9631
9676
|
if (payload && payload.length) {
|
|
9632
9677
|
this.lastRecord = payload[0];
|
|
9633
9678
|
}
|
|
9634
9679
|
}
|
|
9635
9680
|
get isAllowToAddHistorical() {
|
|
9636
|
-
return (this.permission["
|
|
9681
|
+
return (this.permission["incluir"]);
|
|
9637
9682
|
}
|
|
9638
9683
|
get isAllowToDeleteHistorical() {
|
|
9639
|
-
return (this.permission["
|
|
9684
|
+
return (this.permission["excluir"]);
|
|
9640
9685
|
}
|
|
9641
9686
|
get isAllowToViewHistorical() {
|
|
9642
|
-
return (this.permission["
|
|
9687
|
+
return (this.permission["visualizar"]);
|
|
9643
9688
|
}
|
|
9644
9689
|
get scopedActions() {
|
|
9645
9690
|
return this.getMenuActions.bind(this);
|
|
@@ -9684,6 +9729,9 @@ __decorate([
|
|
|
9684
9729
|
__decorate([
|
|
9685
9730
|
Input()
|
|
9686
9731
|
], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
|
|
9732
|
+
__decorate([
|
|
9733
|
+
Output()
|
|
9734
|
+
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
9687
9735
|
__decorate([
|
|
9688
9736
|
Output()
|
|
9689
9737
|
], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
|