@senior-gestao-pessoas/payroll-core 9.3.0-4d39b464-875a-426e-94a5-e9a89ba0079c → 9.3.0-6fe87530-a4db-47c2-9330-935d415a90a5

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,16 +9467,25 @@
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.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
+ });
9481
+ }
9473
9482
  },
9474
9483
  },
9475
9484
  {
9476
9485
  visible: !!(!_this.isEditMode && _this.withSideBar),
9477
9486
  label: _this.translateService.instant("hcm.payroll.edit"),
9478
9487
  command: function () {
9479
- if (_this.isAllowToEditHistorical && rowData) {
9488
+ if (_this.isAllowToEditHistorical) {
9480
9489
  rowData["index"] = key;
9481
9490
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9482
9491
  _this.visible = true;
@@ -9494,7 +9503,7 @@
9494
9503
  visible: !_this.isEditMode,
9495
9504
  label: _this.translateService.instant("hcm.payroll.delete"),
9496
9505
  command: function () {
9497
- if (_this.isAllowToDeleteHistorical && rowData) {
9506
+ if (_this.isAllowToDeleteHistorical) {
9498
9507
  _this.loading = true;
9499
9508
  _this.deleteAnnuityItem(key);
9500
9509
  }
@@ -9715,16 +9724,30 @@
9715
9724
  HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
9716
9725
  return FormatUtilsService.getFormattedPercentage(value);
9717
9726
  };
9727
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
9728
+ get: function () {
9729
+ return (this.permission["incluir"]);
9730
+ },
9731
+ enumerable: true,
9732
+ configurable: true
9733
+ });
9718
9734
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
9719
9735
  get: function () {
9720
- return (this.permission["Excluir"]);
9736
+ return (this.permission["excluir"]);
9721
9737
  },
9722
9738
  enumerable: true,
9723
9739
  configurable: true
9724
9740
  });
9725
9741
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9726
9742
  get: function () {
9727
- return (this.permission["Editar"]);
9743
+ return (this.permission["editar"]);
9744
+ },
9745
+ enumerable: true,
9746
+ configurable: true
9747
+ });
9748
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9749
+ get: function () {
9750
+ return (this.permission["visualizar"]);
9728
9751
  },
9729
9752
  enumerable: true,
9730
9753
  configurable: true
@@ -10517,16 +10540,14 @@
10517
10540
  {
10518
10541
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10519
10542
  command: function () {
10520
- if (_this.isAllowToViewHistorical && rowData) {
10543
+ if (_this.isAllowToViewHistorical) {
10521
10544
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10522
- if (_this.withSidebar) {
10545
+ if (_this.withSidebar)
10523
10546
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10524
10547
  relativeTo: _this.activatedRoute,
10525
10548
  });
10526
- }
10527
- else {
10549
+ else
10528
10550
  _this.enableView.emit(dateChange);
10529
- }
10530
10551
  }
10531
10552
  else {
10532
10553
  _this.messageService.add({
@@ -10613,21 +10634,21 @@
10613
10634
  };
10614
10635
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10615
10636
  get: function () {
10616
- return (this.permission["Incluir"]);
10637
+ return (this.permission["incluir"]);
10617
10638
  },
10618
10639
  enumerable: true,
10619
10640
  configurable: true
10620
10641
  });
10621
10642
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10622
10643
  get: function () {
10623
- return (this.permission["Excluir"]);
10644
+ return (this.permission["excluir"]);
10624
10645
  },
10625
10646
  enumerable: true,
10626
10647
  configurable: true
10627
10648
  });
10628
10649
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10629
10650
  get: function () {
10630
- return (this.permission["Visaulizar"]);
10651
+ return (this.permission["visualizar"]);
10631
10652
  },
10632
10653
  enumerable: true,
10633
10654
  configurable: true