@senior-gestao-pessoas/payroll-core 9.3.0-d99b0dbd-5fc0-4b98-979b-fe30c751fa36 → 9.3.0-ed0a821c-6503-4447-b346-cf05b6d53b8f

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
+ return 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,9 +10536,10 @@
10517
10536
  {
10518
10537
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10519
10538
  command: function () {
10520
- if (_this.isAllowToViewHistorical && rowData) {
10539
+ if (_this.isAllowToViewHistorical) {
10521
10540
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10522
10541
  if (_this.withSidebar) {
10542
+ _this.isOnlyView.emit(true);
10523
10543
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10524
10544
  relativeTo: _this.activatedRoute,
10525
10545
  });
@@ -10529,11 +10549,7 @@
10529
10549
  }
10530
10550
  }
10531
10551
  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
- });
10552
+ _this.isNotAllowMessage();
10537
10553
  }
10538
10554
  },
10539
10555
  },
@@ -10544,11 +10560,7 @@
10544
10560
  _this.delete(rowData.id, rowData.dateChange);
10545
10561
  }
10546
10562
  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
- });
10563
+ _this.isNotAllowMessage();
10552
10564
  }
10553
10565
  },
10554
10566
  },
@@ -10606,6 +10618,13 @@
10606
10618
  });
10607
10619
  }
10608
10620
  };
10621
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10622
+ this.messageService.add({
10623
+ severity: "error",
10624
+ summary: this.translateService.instant("hcm.payroll.error"),
10625
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10626
+ });
10627
+ };
10609
10628
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10610
10629
  if (payload && payload.length) {
10611
10630
  this.lastRecord = payload[0];
@@ -10613,21 +10632,21 @@
10613
10632
  };
10614
10633
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10615
10634
  get: function () {
10616
- return (this.permission["Incluir"]);
10635
+ return (this.permission["incluir"]);
10617
10636
  },
10618
10637
  enumerable: true,
10619
10638
  configurable: true
10620
10639
  });
10621
10640
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10622
10641
  get: function () {
10623
- return (this.permission["Excluir"]);
10642
+ return (this.permission["excluir"]);
10624
10643
  },
10625
10644
  enumerable: true,
10626
10645
  configurable: true
10627
10646
  });
10628
10647
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10629
10648
  get: function () {
10630
- return (this.permission["Visualizar"]);
10649
+ return (this.permission["visualizar"]);
10631
10650
  },
10632
10651
  enumerable: true,
10633
10652
  configurable: true
@@ -10682,6 +10701,9 @@
10682
10701
  __decorate([
10683
10702
  core.Input()
10684
10703
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10704
+ __decorate([
10705
+ core.Output()
10706
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10685
10707
  __decorate([
10686
10708
  core.Output()
10687
10709
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);