@senior-gestao-pessoas/payroll-core 9.3.0-6fe87530-a4db-47c2-9330-935d415a90a5 → 9.3.0-7aaf9dac-728c-48d9-acf3-c7589164bebb

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.
@@ -9434,6 +9434,10 @@
9434
9434
  this.isViewMode = false;
9435
9435
  this.withSideBar = true;
9436
9436
  this.defaultCpfNumber = null;
9437
+ this.listDataReciever = [];
9438
+ this.isOnlyView = new core.EventEmitter();
9439
+ this.isOnlyEdit = new core.EventEmitter();
9440
+ this.isOnlyDelete = new core.EventEmitter();
9437
9441
  this.visibleChange = new core.EventEmitter();
9438
9442
  this.ngUnsubscribe = new rxjs.Subject();
9439
9443
  this.orderBy = {
@@ -9473,11 +9477,7 @@
9473
9477
  _this.visible = true;
9474
9478
  }
9475
9479
  else {
9476
- _this.messageService.add({
9477
- severity: "error",
9478
- summary: _this.translateService.instant("hcm.payroll.error"),
9479
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9480
- });
9480
+ _this.isOnlyView.emit(true);
9481
9481
  }
9482
9482
  },
9483
9483
  },
@@ -9486,16 +9486,19 @@
9486
9486
  label: _this.translateService.instant("hcm.payroll.edit"),
9487
9487
  command: function () {
9488
9488
  if (_this.isAllowToEditHistorical) {
9489
+ console.log("ENTER IN isAllowToEditHistorical");
9489
9490
  rowData["index"] = key;
9490
9491
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9491
9492
  _this.visible = true;
9492
9493
  }
9493
9494
  else {
9494
- _this.messageService.add({
9495
- severity: "error",
9496
- summary: _this.translateService.instant("hcm.payroll.error"),
9497
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9498
- });
9495
+ _this.isOnlyEdit.emit(true);
9496
+ if (!_this.listDataReciever) {
9497
+ console.log("ENTER IN listDataReciever");
9498
+ rowData["index"] = key;
9499
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9500
+ _this.visible = true;
9501
+ }
9499
9502
  }
9500
9503
  },
9501
9504
  },
@@ -9508,11 +9511,11 @@
9508
9511
  _this.deleteAnnuityItem(key);
9509
9512
  }
9510
9513
  else {
9511
- _this.messageService.add({
9512
- severity: "error",
9513
- summary: _this.translateService.instant("hcm.payroll.error"),
9514
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9515
- });
9514
+ _this.isOnlyDelete.emit(true);
9515
+ if (!_this.listDataReciever) {
9516
+ _this.loading = true;
9517
+ _this.deleteAnnuityItem(key);
9518
+ }
9516
9519
  }
9517
9520
  },
9518
9521
  },
@@ -9579,6 +9582,13 @@
9579
9582
  this.pixAccountItemInput = {};
9580
9583
  this.visible = true;
9581
9584
  };
9585
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
9586
+ this.messageService.add({
9587
+ severity: "error",
9588
+ summary: this.translateService.instant("hcm.payroll.error"),
9589
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9590
+ });
9591
+ };
9582
9592
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9583
9593
  var newlist = __spread(this.getHistoricalPixAccountList());
9584
9594
  newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
@@ -9809,6 +9819,18 @@
9809
9819
  __decorate([
9810
9820
  core.Input()
9811
9821
  ], HistoricalPixAccountComponent.prototype, "permission", void 0);
9822
+ __decorate([
9823
+ core.Input()
9824
+ ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
9825
+ __decorate([
9826
+ core.Output()
9827
+ ], HistoricalPixAccountComponent.prototype, "isOnlyView", void 0);
9828
+ __decorate([
9829
+ core.Output()
9830
+ ], HistoricalPixAccountComponent.prototype, "isOnlyEdit", void 0);
9831
+ __decorate([
9832
+ core.Output()
9833
+ ], HistoricalPixAccountComponent.prototype, "isOnlyDelete", void 0);
9812
9834
  __decorate([
9813
9835
  core.Input()
9814
9836
  ], HistoricalPixAccountComponent.prototype, "dateChange", null);
@@ -10473,6 +10495,7 @@
10473
10495
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10474
10496
  this.keyPayload = "historicalEmployeePix";
10475
10497
  this.withSidebar = true;
10498
+ this.isOnlyView = new core.EventEmitter();
10476
10499
  this.enableView = new core.EventEmitter();
10477
10500
  this.ngUnsubscribe = new rxjs.Subject();
10478
10501
  this.loading = true;
@@ -10542,19 +10565,18 @@
10542
10565
  command: function () {
10543
10566
  if (_this.isAllowToViewHistorical) {
10544
10567
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10545
- if (_this.withSidebar)
10568
+ if (_this.withSidebar) {
10569
+ _this.isOnlyView.emit(true);
10546
10570
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10547
10571
  relativeTo: _this.activatedRoute,
10548
10572
  });
10549
- else
10573
+ }
10574
+ else {
10550
10575
  _this.enableView.emit(dateChange);
10576
+ }
10551
10577
  }
10552
10578
  else {
10553
- _this.messageService.add({
10554
- severity: "error",
10555
- summary: _this.translateService.instant("hcm.payroll.error"),
10556
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10557
- });
10579
+ _this.isNotAllowMessage();
10558
10580
  }
10559
10581
  },
10560
10582
  },
@@ -10565,11 +10587,7 @@
10565
10587
  _this.delete(rowData.id, rowData.dateChange);
10566
10588
  }
10567
10589
  else {
10568
- _this.messageService.add({
10569
- severity: "error",
10570
- summary: _this.translateService.instant("hcm.payroll.error"),
10571
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10572
- });
10590
+ _this.isNotAllowMessage();
10573
10591
  }
10574
10592
  },
10575
10593
  },
@@ -10627,6 +10645,13 @@
10627
10645
  });
10628
10646
  }
10629
10647
  };
10648
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10649
+ this.messageService.add({
10650
+ severity: "error",
10651
+ summary: this.translateService.instant("hcm.payroll.error"),
10652
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10653
+ });
10654
+ };
10630
10655
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10631
10656
  if (payload && payload.length) {
10632
10657
  this.lastRecord = payload[0];
@@ -10703,6 +10728,9 @@
10703
10728
  __decorate([
10704
10729
  core.Input()
10705
10730
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10731
+ __decorate([
10732
+ core.Output()
10733
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10706
10734
  __decorate([
10707
10735
  core.Output()
10708
10736
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);