@senior-gestao-pessoas/payroll-core 9.3.0-4d39b464-875a-426e-94a5-e9a89ba0079c → 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.
@@ -9467,26 +9467,27 @@
9467
9467
  visible: _this.isEditMode,
9468
9468
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9469
9469
  command: function () {
9470
- rowData["index"] = key;
9471
- _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9472
- _this.visible = true;
9470
+ if (_this.isAllowToViewHistorical) {
9471
+ rowData["index"] = key;
9472
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9473
+ _this.visible = true;
9474
+ }
9475
+ else {
9476
+ _this.isNotAllowMessage();
9477
+ }
9473
9478
  },
9474
9479
  },
9475
9480
  {
9476
9481
  visible: !!(!_this.isEditMode && _this.withSideBar),
9477
9482
  label: _this.translateService.instant("hcm.payroll.edit"),
9478
9483
  command: function () {
9479
- if (_this.isAllowToEditHistorical && rowData) {
9484
+ if (_this.isAllowToEditHistorical) {
9480
9485
  rowData["index"] = key;
9481
9486
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9482
9487
  _this.visible = true;
9483
9488
  }
9484
9489
  else {
9485
- _this.messageService.add({
9486
- severity: "error",
9487
- summary: _this.translateService.instant("hcm.payroll.error"),
9488
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9489
- });
9490
+ _this.isNotAllowMessage();
9490
9491
  }
9491
9492
  },
9492
9493
  },
@@ -9494,16 +9495,12 @@
9494
9495
  visible: !_this.isEditMode,
9495
9496
  label: _this.translateService.instant("hcm.payroll.delete"),
9496
9497
  command: function () {
9497
- if (_this.isAllowToDeleteHistorical && rowData) {
9498
+ if (_this.isAllowToDeleteHistorical) {
9498
9499
  _this.loading = true;
9499
9500
  _this.deleteAnnuityItem(key);
9500
9501
  }
9501
9502
  else {
9502
- _this.messageService.add({
9503
- severity: "error",
9504
- summary: _this.translateService.instant("hcm.payroll.error"),
9505
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9506
- });
9503
+ _this.isNotAllowMessage();
9507
9504
  }
9508
9505
  },
9509
9506
  },
@@ -9570,6 +9567,13 @@
9570
9567
  this.pixAccountItemInput = {};
9571
9568
  this.visible = true;
9572
9569
  };
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
+ });
9576
+ };
9573
9577
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9574
9578
  var newlist = __spread(this.getHistoricalPixAccountList());
9575
9579
  newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
@@ -9715,16 +9719,30 @@
9715
9719
  HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
9716
9720
  return FormatUtilsService.getFormattedPercentage(value);
9717
9721
  };
9722
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
9723
+ get: function () {
9724
+ return (this.permission["incluir"]);
9725
+ },
9726
+ enumerable: true,
9727
+ configurable: true
9728
+ });
9718
9729
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
9719
9730
  get: function () {
9720
- return (this.permission["Excluir"]);
9731
+ return (this.permission["excluir"]);
9721
9732
  },
9722
9733
  enumerable: true,
9723
9734
  configurable: true
9724
9735
  });
9725
9736
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9726
9737
  get: function () {
9727
- return (this.permission["Editar"]);
9738
+ return (this.permission["editar"]);
9739
+ },
9740
+ enumerable: true,
9741
+ configurable: true
9742
+ });
9743
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9744
+ get: function () {
9745
+ return (this.permission["visualizar"]);
9728
9746
  },
9729
9747
  enumerable: true,
9730
9748
  configurable: true
@@ -10450,6 +10468,7 @@
10450
10468
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10451
10469
  this.keyPayload = "historicalEmployeePix";
10452
10470
  this.withSidebar = true;
10471
+ this.isOnlyView = new core.EventEmitter();
10453
10472
  this.enableView = new core.EventEmitter();
10454
10473
  this.ngUnsubscribe = new rxjs.Subject();
10455
10474
  this.loading = true;
@@ -10517,23 +10536,23 @@
10517
10536
  {
10518
10537
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10519
10538
  command: function () {
10520
- if (_this.isAllowToViewHistorical && rowData) {
10539
+ console.log('COMMAND CALLED');
10540
+ console.log('this.isAllowToViewHistorical', _this.isAllowToViewHistorical);
10541
+ if (_this.isAllowToViewHistorical) {
10521
10542
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10543
+ console.log('withSidebar', _this.withSidebar);
10522
10544
  if (_this.withSidebar) {
10523
10545
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10524
10546
  relativeTo: _this.activatedRoute,
10525
10547
  });
10526
10548
  }
10527
10549
  else {
10550
+ _this.isOnlyView.emit(true);
10528
10551
  _this.enableView.emit(dateChange);
10529
10552
  }
10530
10553
  }
10531
10554
  else {
10532
- _this.messageService.add({
10533
- severity: "error",
10534
- summary: _this.translateService.instant("hcm.payroll.error"),
10535
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10536
- });
10555
+ _this.isNotAllowMessage();
10537
10556
  }
10538
10557
  },
10539
10558
  },
@@ -10544,11 +10563,7 @@
10544
10563
  _this.delete(rowData.id, rowData.dateChange);
10545
10564
  }
10546
10565
  else {
10547
- _this.messageService.add({
10548
- severity: "error",
10549
- summary: _this.translateService.instant("hcm.payroll.error"),
10550
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10551
- });
10566
+ _this.isNotAllowMessage();
10552
10567
  }
10553
10568
  },
10554
10569
  },
@@ -10606,6 +10621,13 @@
10606
10621
  });
10607
10622
  }
10608
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
+ };
10609
10631
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10610
10632
  if (payload && payload.length) {
10611
10633
  this.lastRecord = payload[0];
@@ -10613,21 +10635,21 @@
10613
10635
  };
10614
10636
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10615
10637
  get: function () {
10616
- return (this.permission["Incluir"]);
10638
+ return (this.permission["incluir"]);
10617
10639
  },
10618
10640
  enumerable: true,
10619
10641
  configurable: true
10620
10642
  });
10621
10643
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10622
10644
  get: function () {
10623
- return (this.permission["Excluir"]);
10645
+ return (this.permission["excluir"]);
10624
10646
  },
10625
10647
  enumerable: true,
10626
10648
  configurable: true
10627
10649
  });
10628
10650
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10629
10651
  get: function () {
10630
- return (this.permission["Visaulizar"]);
10652
+ return (this.permission["visualizar"]);
10631
10653
  },
10632
10654
  enumerable: true,
10633
10655
  configurable: true
@@ -10682,6 +10704,9 @@
10682
10704
  __decorate([
10683
10705
  core.Input()
10684
10706
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10707
+ __decorate([
10708
+ core.Output()
10709
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10685
10710
  __decorate([
10686
10711
  core.Output()
10687
10712
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);