@senior-gestao-pessoas/payroll-core 9.3.0-06156ffc-852c-4f04-8482-5c4f9317ecff → 9.3.0-6fe87530-a4db-47c2-9330-935d415a90a5

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.
@@ -9301,16 +9301,25 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9301
9301
  visible: _this.isEditMode,
9302
9302
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9303
9303
  command: function () {
9304
- rowData["index"] = key;
9305
- _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9306
- _this.visible = true;
9304
+ if (_this.isAllowToViewHistorical) {
9305
+ rowData["index"] = key;
9306
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9307
+ _this.visible = true;
9308
+ }
9309
+ else {
9310
+ _this.messageService.add({
9311
+ severity: "error",
9312
+ summary: _this.translateService.instant("hcm.payroll.error"),
9313
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9314
+ });
9315
+ }
9307
9316
  },
9308
9317
  },
9309
9318
  {
9310
9319
  visible: !!(!_this.isEditMode && _this.withSideBar),
9311
9320
  label: _this.translateService.instant("hcm.payroll.edit"),
9312
9321
  command: function () {
9313
- if (_this.isAllowToEditHistorical && rowData) {
9322
+ if (_this.isAllowToEditHistorical) {
9314
9323
  rowData["index"] = key;
9315
9324
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9316
9325
  _this.visible = true;
@@ -9328,7 +9337,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9328
9337
  visible: !_this.isEditMode,
9329
9338
  label: _this.translateService.instant("hcm.payroll.delete"),
9330
9339
  command: function () {
9331
- if (_this.isAllowToDeleteHistorical && rowData) {
9340
+ if (_this.isAllowToDeleteHistorical) {
9332
9341
  _this.loading = true;
9333
9342
  _this.deleteAnnuityItem(key);
9334
9343
  }
@@ -9549,23 +9558,30 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9549
9558
  HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
9550
9559
  return FormatUtilsService.getFormattedPercentage(value);
9551
9560
  };
9561
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
9562
+ get: function () {
9563
+ return (this.permission["incluir"]);
9564
+ },
9565
+ enumerable: true,
9566
+ configurable: true
9567
+ });
9552
9568
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
9553
9569
  get: function () {
9554
- return (this.permission["Excluir"]);
9570
+ return (this.permission["excluir"]);
9555
9571
  },
9556
9572
  enumerable: true,
9557
9573
  configurable: true
9558
9574
  });
9559
9575
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9560
9576
  get: function () {
9561
- return (this.permission["Editar"]);
9577
+ return (this.permission["editar"]);
9562
9578
  },
9563
9579
  enumerable: true,
9564
9580
  configurable: true
9565
9581
  });
9566
9582
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9567
9583
  get: function () {
9568
- return (this.permission["Visualizar"]);
9584
+ return (this.permission["visualizar"]);
9569
9585
  },
9570
9586
  enumerable: true,
9571
9587
  configurable: true
@@ -10358,17 +10374,14 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10358
10374
  {
10359
10375
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10360
10376
  command: function () {
10361
- console.log(_this.isAllowToViewHistorical);
10362
- if (_this.isAllowToViewHistorical && rowData) {
10377
+ if (_this.isAllowToViewHistorical) {
10363
10378
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10364
- if (_this.withSidebar) {
10379
+ if (_this.withSidebar)
10365
10380
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10366
10381
  relativeTo: _this.activatedRoute,
10367
10382
  });
10368
- }
10369
- else {
10383
+ else
10370
10384
  _this.enableView.emit(dateChange);
10371
- }
10372
10385
  }
10373
10386
  else {
10374
10387
  _this.messageService.add({
@@ -10455,21 +10468,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10455
10468
  };
10456
10469
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10457
10470
  get: function () {
10458
- return (this.permission["Incluir"]);
10471
+ return (this.permission["incluir"]);
10459
10472
  },
10460
10473
  enumerable: true,
10461
10474
  configurable: true
10462
10475
  });
10463
10476
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10464
10477
  get: function () {
10465
- return (this.permission["Excluir"]);
10478
+ return (this.permission["excluir"]);
10466
10479
  },
10467
10480
  enumerable: true,
10468
10481
  configurable: true
10469
10482
  });
10470
10483
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10471
10484
  get: function () {
10472
- return (this.permission["Visualizar"]);
10485
+ return (this.permission["visualizar"]);
10473
10486
  },
10474
10487
  enumerable: true,
10475
10488
  configurable: true