@senior-gestao-pessoas/payroll-core 9.3.0-8e3650be-79b5-4803-9eab-ad01b4739d46 → 9.3.0-91e42bbe-0783-45c0-91c2-ac243803cb3c

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,6 +9719,13 @@
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
9731
  return (this.permission["excluir"]);
@@ -9729,6 +9740,13 @@
9729
9740
  enumerable: true,
9730
9741
  configurable: true
9731
9742
  });
9743
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9744
+ get: function () {
9745
+ return (this.permission["visualizar"]);
9746
+ },
9747
+ enumerable: true,
9748
+ configurable: true
9749
+ });
9732
9750
  HistoricalPixAccountComponent.ctorParameters = function () { return [
9733
9751
  { type: core$1.TranslateService },
9734
9752
  { type: core.ChangeDetectorRef },
@@ -10517,23 +10535,17 @@
10517
10535
  {
10518
10536
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10519
10537
  command: function () {
10520
- if (_this.isAllowToViewHistorical && rowData) {
10538
+ if (_this.isAllowToViewHistorical) {
10521
10539
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10522
- if (_this.withSidebar) {
10540
+ if (_this.withSidebar)
10523
10541
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10524
10542
  relativeTo: _this.activatedRoute,
10525
10543
  });
10526
- }
10527
- else {
10544
+ else
10528
10545
  _this.enableView.emit(dateChange);
10529
- }
10530
10546
  }
10531
10547
  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
- });
10548
+ _this.isNotAllowMessage();
10537
10549
  }
10538
10550
  },
10539
10551
  },
@@ -10544,11 +10556,7 @@
10544
10556
  _this.delete(rowData.id, rowData.dateChange);
10545
10557
  }
10546
10558
  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
- });
10559
+ _this.isNotAllowMessage();
10552
10560
  }
10553
10561
  },
10554
10562
  },
@@ -10606,6 +10614,13 @@
10606
10614
  });
10607
10615
  }
10608
10616
  };
10617
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10618
+ this.messageService.add({
10619
+ severity: "error",
10620
+ summary: this.translateService.instant("hcm.payroll.error"),
10621
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10622
+ });
10623
+ };
10609
10624
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10610
10625
  if (payload && payload.length) {
10611
10626
  this.lastRecord = payload[0];
@@ -10627,7 +10642,7 @@
10627
10642
  });
10628
10643
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10629
10644
  get: function () {
10630
- return (this.permission["visaulizar"]);
10645
+ return (this.permission["visualizar"]);
10631
10646
  },
10632
10647
  enumerable: true,
10633
10648
  configurable: true