@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.
@@ -9298,46 +9298,46 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9298
9298
  if (rowData === void 0) { rowData = {}; }
9299
9299
  return [
9300
9300
  {
9301
+ isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToViewHistorical),
9301
9302
  visible: _this.isEditMode,
9302
9303
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9303
9304
  command: function () {
9304
- rowData["index"] = key;
9305
- _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9306
- _this.visible = true;
9305
+ if (_this.isAllowToViewHistorical) {
9306
+ rowData["index"] = key;
9307
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9308
+ _this.visible = true;
9309
+ }
9310
+ else {
9311
+ return;
9312
+ }
9307
9313
  },
9308
9314
  },
9309
9315
  {
9316
+ isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToEditHistorical),
9310
9317
  visible: !!(!_this.isEditMode && _this.withSideBar),
9311
9318
  label: _this.translateService.instant("hcm.payroll.edit"),
9312
9319
  command: function () {
9313
- if (_this.isAllowToEditHistorical && rowData) {
9320
+ if (_this.isAllowToEditHistorical) {
9314
9321
  rowData["index"] = key;
9315
9322
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9316
9323
  _this.visible = true;
9317
9324
  }
9318
9325
  else {
9319
- _this.messageService.add({
9320
- severity: "error",
9321
- summary: _this.translateService.instant("hcm.payroll.error"),
9322
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9323
- });
9326
+ return;
9324
9327
  }
9325
9328
  },
9326
9329
  },
9327
9330
  {
9331
+ isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToDeleteHistorical),
9328
9332
  visible: !_this.isEditMode,
9329
9333
  label: _this.translateService.instant("hcm.payroll.delete"),
9330
9334
  command: function () {
9331
- if (_this.isAllowToDeleteHistorical && rowData) {
9335
+ if (_this.isAllowToDeleteHistorical) {
9332
9336
  _this.loading = true;
9333
9337
  _this.deleteAnnuityItem(key);
9334
9338
  }
9335
9339
  else {
9336
- _this.messageService.add({
9337
- severity: "error",
9338
- summary: _this.translateService.instant("hcm.payroll.error"),
9339
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9340
- });
9340
+ return;
9341
9341
  }
9342
9342
  },
9343
9343
  },
@@ -9404,6 +9404,15 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9404
9404
  this.pixAccountItemInput = {};
9405
9405
  this.visible = true;
9406
9406
  };
9407
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function (isAllowHistorical) {
9408
+ if (!isAllowHistorical) {
9409
+ this.messageService.add({
9410
+ severity: "error",
9411
+ summary: this.translateService.instant("hcm.payroll.error"),
9412
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9413
+ });
9414
+ }
9415
+ };
9407
9416
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9408
9417
  var newlist = __spread(this.getHistoricalPixAccountList());
9409
9418
  newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
@@ -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