@senior-gestao-pessoas/payroll-core 9.3.0-06156ffc-852c-4f04-8482-5c4f9317ecff → 9.3.0-3956a1cf-41cb-4c73-952b-4f96be631787

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,46 +9464,46 @@
9464
9464
  if (rowData === void 0) { rowData = {}; }
9465
9465
  return [
9466
9466
  {
9467
+ isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToViewHistorical),
9467
9468
  visible: _this.isEditMode,
9468
9469
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9469
9470
  command: function () {
9470
- rowData["index"] = key;
9471
- _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9472
- _this.visible = true;
9471
+ if (_this.isAllowToViewHistorical) {
9472
+ rowData["index"] = key;
9473
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9474
+ _this.visible = true;
9475
+ }
9476
+ else {
9477
+ return;
9478
+ }
9473
9479
  },
9474
9480
  },
9475
9481
  {
9482
+ isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToEditHistorical),
9476
9483
  visible: !!(!_this.isEditMode && _this.withSideBar),
9477
9484
  label: _this.translateService.instant("hcm.payroll.edit"),
9478
9485
  command: function () {
9479
- if (_this.isAllowToEditHistorical && rowData) {
9486
+ if (_this.isAllowToEditHistorical) {
9480
9487
  rowData["index"] = key;
9481
9488
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9482
9489
  _this.visible = true;
9483
9490
  }
9484
9491
  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
- });
9492
+ return;
9490
9493
  }
9491
9494
  },
9492
9495
  },
9493
9496
  {
9497
+ isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToDeleteHistorical),
9494
9498
  visible: !_this.isEditMode,
9495
9499
  label: _this.translateService.instant("hcm.payroll.delete"),
9496
9500
  command: function () {
9497
- if (_this.isAllowToDeleteHistorical && rowData) {
9501
+ if (_this.isAllowToDeleteHistorical) {
9498
9502
  _this.loading = true;
9499
9503
  _this.deleteAnnuityItem(key);
9500
9504
  }
9501
9505
  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
- });
9506
+ return;
9507
9507
  }
9508
9508
  },
9509
9509
  },
@@ -9570,6 +9570,15 @@
9570
9570
  this.pixAccountItemInput = {};
9571
9571
  this.visible = true;
9572
9572
  };
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
+ }
9581
+ };
9573
9582
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9574
9583
  var newlist = __spread(this.getHistoricalPixAccountList());
9575
9584
  newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
@@ -9715,23 +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"]);
9728
9744
  },
9729
9745
  enumerable: true,
9730
9746
  configurable: true
9731
9747
  });
9732
9748
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9733
9749
  get: function () {
9734
- return (this.permission["Visualizar"]);
9750
+ return (this.permission["visualizar"]);
9735
9751
  },
9736
9752
  enumerable: true,
9737
9753
  configurable: true
@@ -10524,17 +10540,14 @@
10524
10540
  {
10525
10541
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10526
10542
  command: function () {
10527
- console.log(_this.isAllowToViewHistorical);
10528
- if (_this.isAllowToViewHistorical && rowData) {
10543
+ if (_this.isAllowToViewHistorical) {
10529
10544
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10530
- if (_this.withSidebar) {
10545
+ if (_this.withSidebar)
10531
10546
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10532
10547
  relativeTo: _this.activatedRoute,
10533
10548
  });
10534
- }
10535
- else {
10549
+ else
10536
10550
  _this.enableView.emit(dateChange);
10537
- }
10538
10551
  }
10539
10552
  else {
10540
10553
  _this.messageService.add({
@@ -10621,21 +10634,21 @@
10621
10634
  };
10622
10635
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10623
10636
  get: function () {
10624
- return (this.permission["Incluir"]);
10637
+ return (this.permission["incluir"]);
10625
10638
  },
10626
10639
  enumerable: true,
10627
10640
  configurable: true
10628
10641
  });
10629
10642
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10630
10643
  get: function () {
10631
- return (this.permission["Excluir"]);
10644
+ return (this.permission["excluir"]);
10632
10645
  },
10633
10646
  enumerable: true,
10634
10647
  configurable: true
10635
10648
  });
10636
10649
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10637
10650
  get: function () {
10638
- return (this.permission["Visualizar"]);
10651
+ return (this.permission["visualizar"]);
10639
10652
  },
10640
10653
  enumerable: true,
10641
10654
  configurable: true