@senior-gestao-pessoas/payroll-core 9.3.0-06156ffc-852c-4f04-8482-5c4f9317ecff → 9.3.0-0a28751a-09d5-4c6f-ad82-be2566554925

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,33 @@
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
+ console.log('CAALING VIEW');
9471
+ if (_this.isAllowToViewHistorical) {
9472
+ console.log('IS ALLOW TO VIEW');
9473
+ rowData["index"] = key;
9474
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9475
+ _this.visible = true;
9476
+ }
9477
+ else {
9478
+ console.log('IS NOT ALLOW TO VIEW');
9479
+ _this.isNotAllowMessage();
9480
+ }
9473
9481
  },
9474
9482
  },
9475
9483
  {
9476
9484
  visible: !!(!_this.isEditMode && _this.withSideBar),
9477
9485
  label: _this.translateService.instant("hcm.payroll.edit"),
9478
9486
  command: function () {
9479
- if (_this.isAllowToEditHistorical && rowData) {
9487
+ console.log('CAALING EDIT');
9488
+ if (_this.isAllowToEditHistorical) {
9489
+ console.log('IS ALLOW TO EDIT');
9480
9490
  rowData["index"] = key;
9481
9491
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9482
9492
  _this.visible = true;
9483
9493
  }
9484
9494
  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
- });
9495
+ console.log('IS NOT ALLOW TO EDIT');
9496
+ _this.isNotAllowMessage();
9490
9497
  }
9491
9498
  },
9492
9499
  },
@@ -9494,16 +9501,15 @@
9494
9501
  visible: !_this.isEditMode,
9495
9502
  label: _this.translateService.instant("hcm.payroll.delete"),
9496
9503
  command: function () {
9497
- if (_this.isAllowToDeleteHistorical && rowData) {
9504
+ console.log('CAALING DELETE');
9505
+ if (_this.isAllowToDeleteHistorical) {
9506
+ console.log('IS ALLOW TO DELETE');
9498
9507
  _this.loading = true;
9499
9508
  _this.deleteAnnuityItem(key);
9500
9509
  }
9501
9510
  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
- });
9511
+ console.log('IS NOT ALLOW TO DELETE');
9512
+ _this.isNotAllowMessage();
9507
9513
  }
9508
9514
  },
9509
9515
  },
@@ -9570,6 +9576,13 @@
9570
9576
  this.pixAccountItemInput = {};
9571
9577
  this.visible = true;
9572
9578
  };
9579
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
9580
+ this.messageService.add({
9581
+ severity: "error",
9582
+ summary: this.translateService.instant("hcm.payroll.error"),
9583
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9584
+ });
9585
+ };
9573
9586
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9574
9587
  var newlist = __spread(this.getHistoricalPixAccountList());
9575
9588
  newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
@@ -9715,23 +9728,30 @@
9715
9728
  HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
9716
9729
  return FormatUtilsService.getFormattedPercentage(value);
9717
9730
  };
9731
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
9732
+ get: function () {
9733
+ return (this.permission["incluir"]);
9734
+ },
9735
+ enumerable: true,
9736
+ configurable: true
9737
+ });
9718
9738
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
9719
9739
  get: function () {
9720
- return (this.permission["Excluir"]);
9740
+ return (this.permission["excluir"]);
9721
9741
  },
9722
9742
  enumerable: true,
9723
9743
  configurable: true
9724
9744
  });
9725
9745
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9726
9746
  get: function () {
9727
- return (this.permission["Editar"]);
9747
+ return (this.permission["editar"]);
9728
9748
  },
9729
9749
  enumerable: true,
9730
9750
  configurable: true
9731
9751
  });
9732
9752
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9733
9753
  get: function () {
9734
- return (this.permission["Visualizar"]);
9754
+ return (this.permission["visualizar"]);
9735
9755
  },
9736
9756
  enumerable: true,
9737
9757
  configurable: true
@@ -10457,6 +10477,7 @@
10457
10477
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10458
10478
  this.keyPayload = "historicalEmployeePix";
10459
10479
  this.withSidebar = true;
10480
+ this.isOnlyView = new core.EventEmitter();
10460
10481
  this.enableView = new core.EventEmitter();
10461
10482
  this.ngUnsubscribe = new rxjs.Subject();
10462
10483
  this.loading = true;
@@ -10524,10 +10545,10 @@
10524
10545
  {
10525
10546
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10526
10547
  command: function () {
10527
- console.log(_this.isAllowToViewHistorical);
10528
- if (_this.isAllowToViewHistorical && rowData) {
10548
+ if (_this.isAllowToViewHistorical) {
10529
10549
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10530
10550
  if (_this.withSidebar) {
10551
+ _this.isOnlyView.emit(true);
10531
10552
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10532
10553
  relativeTo: _this.activatedRoute,
10533
10554
  });
@@ -10537,11 +10558,7 @@
10537
10558
  }
10538
10559
  }
10539
10560
  else {
10540
- _this.messageService.add({
10541
- severity: "error",
10542
- summary: _this.translateService.instant("hcm.payroll.error"),
10543
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10544
- });
10561
+ _this.isNotAllowMessage();
10545
10562
  }
10546
10563
  },
10547
10564
  },
@@ -10552,11 +10569,7 @@
10552
10569
  _this.delete(rowData.id, rowData.dateChange);
10553
10570
  }
10554
10571
  else {
10555
- _this.messageService.add({
10556
- severity: "error",
10557
- summary: _this.translateService.instant("hcm.payroll.error"),
10558
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10559
- });
10572
+ _this.isNotAllowMessage();
10560
10573
  }
10561
10574
  },
10562
10575
  },
@@ -10614,6 +10627,13 @@
10614
10627
  });
10615
10628
  }
10616
10629
  };
10630
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10631
+ this.messageService.add({
10632
+ severity: "error",
10633
+ summary: this.translateService.instant("hcm.payroll.error"),
10634
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10635
+ });
10636
+ };
10617
10637
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10618
10638
  if (payload && payload.length) {
10619
10639
  this.lastRecord = payload[0];
@@ -10621,21 +10641,21 @@
10621
10641
  };
10622
10642
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10623
10643
  get: function () {
10624
- return (this.permission["Incluir"]);
10644
+ return (this.permission["incluir"]);
10625
10645
  },
10626
10646
  enumerable: true,
10627
10647
  configurable: true
10628
10648
  });
10629
10649
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10630
10650
  get: function () {
10631
- return (this.permission["Excluir"]);
10651
+ return (this.permission["excluir"]);
10632
10652
  },
10633
10653
  enumerable: true,
10634
10654
  configurable: true
10635
10655
  });
10636
10656
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10637
10657
  get: function () {
10638
- return (this.permission["Visualizar"]);
10658
+ return (this.permission["visualizar"]);
10639
10659
  },
10640
10660
  enumerable: true,
10641
10661
  configurable: true
@@ -10690,6 +10710,9 @@
10690
10710
  __decorate([
10691
10711
  core.Input()
10692
10712
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10713
+ __decorate([
10714
+ core.Output()
10715
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10693
10716
  __decorate([
10694
10717
  core.Output()
10695
10718
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);