@senior-gestao-pessoas/payroll-core 9.3.0-d99b0dbd-5fc0-4b98-979b-fe30c751fa36 → 9.3.0-ee19ef91-03e0-4a39-923b-12f0b8cf42cc

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,9 +9467,18 @@
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 && rowData) {
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
  {
@@ -9729,6 +9738,13 @@
9729
9738
  enumerable: true,
9730
9739
  configurable: true
9731
9740
  });
9741
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9742
+ get: function () {
9743
+ return (this.permission["Visualizar"]);
9744
+ },
9745
+ enumerable: true,
9746
+ configurable: true
9747
+ });
9732
9748
  HistoricalPixAccountComponent.ctorParameters = function () { return [
9733
9749
  { type: core$1.TranslateService },
9734
9750
  { type: core.ChangeDetectorRef },