@senior-gestao-pessoas/payroll-core 9.3.0-3956a1cf-41cb-4c73-952b-4f96be631787 → 9.3.0-57601500-80d3-4392-a75e-35abea58468a

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.
@@ -9464,7 +9464,6 @@
9464
9464
  if (rowData === void 0) { rowData = {}; }
9465
9465
  return [
9466
9466
  {
9467
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToViewHistorical),
9468
9467
  visible: _this.isEditMode,
9469
9468
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9470
9469
  command: function () {
@@ -9474,12 +9473,11 @@
9474
9473
  _this.visible = true;
9475
9474
  }
9476
9475
  else {
9477
- return;
9476
+ _this.isNotAllowMessage();
9478
9477
  }
9479
9478
  },
9480
9479
  },
9481
9480
  {
9482
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToEditHistorical),
9483
9481
  visible: !!(!_this.isEditMode && _this.withSideBar),
9484
9482
  label: _this.translateService.instant("hcm.payroll.edit"),
9485
9483
  command: function () {
@@ -9489,12 +9487,11 @@
9489
9487
  _this.visible = true;
9490
9488
  }
9491
9489
  else {
9492
- return;
9490
+ _this.isNotAllowMessage();
9493
9491
  }
9494
9492
  },
9495
9493
  },
9496
9494
  {
9497
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToDeleteHistorical),
9498
9495
  visible: !_this.isEditMode,
9499
9496
  label: _this.translateService.instant("hcm.payroll.delete"),
9500
9497
  command: function () {
@@ -9503,7 +9500,7 @@
9503
9500
  _this.deleteAnnuityItem(key);
9504
9501
  }
9505
9502
  else {
9506
- return;
9503
+ _this.isNotAllowMessage();
9507
9504
  }
9508
9505
  },
9509
9506
  },
@@ -9570,14 +9567,12 @@
9570
9567
  this.pixAccountItemInput = {};
9571
9568
  this.visible = true;
9572
9569
  };
9573
- HistoricalPixAccountComponent.prototype.isNotAllowMessage = function (isAllowHistorical) {
9574
- if (!isAllowHistorical) {
9575
- this.messageService.add({
9576
- severity: "error",
9577
- summary: this.translateService.instant("hcm.payroll.error"),
9578
- detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9579
- });
9580
- }
9570
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
9571
+ this.messageService.add({
9572
+ severity: "error",
9573
+ summary: this.translateService.instant("hcm.payroll.error"),
9574
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9575
+ });
9581
9576
  };
9582
9577
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9583
9578
  var newlist = __spread(this.getHistoricalPixAccountList());
@@ -10473,6 +10468,7 @@
10473
10468
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10474
10469
  this.keyPayload = "historicalEmployeePix";
10475
10470
  this.withSidebar = true;
10471
+ this.isOnlyView = new core.EventEmitter();
10476
10472
  this.enableView = new core.EventEmitter();
10477
10473
  this.ngUnsubscribe = new rxjs.Subject();
10478
10474
  this.loading = true;
@@ -10540,21 +10536,23 @@
10540
10536
  {
10541
10537
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10542
10538
  command: function () {
10539
+ console.log('COMMAND CALLED');
10540
+ console.log('this.isAllowToViewHistorical', _this.isAllowToViewHistorical);
10543
10541
  if (_this.isAllowToViewHistorical) {
10544
10542
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10545
- if (_this.withSidebar)
10543
+ console.log('withSidebar', _this.withSidebar);
10544
+ if (_this.withSidebar) {
10546
10545
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10547
10546
  relativeTo: _this.activatedRoute,
10548
10547
  });
10549
- else
10548
+ }
10549
+ else {
10550
+ _this.isOnlyView.emit(true);
10550
10551
  _this.enableView.emit(dateChange);
10552
+ }
10551
10553
  }
10552
10554
  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
- });
10555
+ _this.isNotAllowMessage();
10558
10556
  }
10559
10557
  },
10560
10558
  },
@@ -10565,11 +10563,7 @@
10565
10563
  _this.delete(rowData.id, rowData.dateChange);
10566
10564
  }
10567
10565
  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
- });
10566
+ _this.isNotAllowMessage();
10573
10567
  }
10574
10568
  },
10575
10569
  },
@@ -10627,6 +10621,13 @@
10627
10621
  });
10628
10622
  }
10629
10623
  };
10624
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10625
+ this.messageService.add({
10626
+ severity: "error",
10627
+ summary: this.translateService.instant("hcm.payroll.error"),
10628
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10629
+ });
10630
+ };
10630
10631
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10631
10632
  if (payload && payload.length) {
10632
10633
  this.lastRecord = payload[0];
@@ -10703,6 +10704,9 @@
10703
10704
  __decorate([
10704
10705
  core.Input()
10705
10706
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10707
+ __decorate([
10708
+ core.Output()
10709
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10706
10710
  __decorate([
10707
10711
  core.Output()
10708
10712
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);