@senior-gestao-pessoas/payroll-core 9.3.0-4d39b464-875a-426e-94a5-e9a89ba0079c → 9.3.0-67156c70-a6d2-48ad-bbe1-7e90a9c21e6f

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,43 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9298
9298
  if (rowData === void 0) { rowData = {}; }
9299
9299
  return [
9300
9300
  {
9301
- visible: _this.isEditMode,
9302
9301
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9303
9302
  command: function () {
9304
- rowData["index"] = key;
9305
- _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9306
- _this.visible = true;
9303
+ if (_this.isAllowToViewHistorical) {
9304
+ rowData["index"] = key;
9305
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9306
+ _this.visible = true;
9307
+ }
9308
+ else {
9309
+ _this.visible = false;
9310
+ _this.isNotAllowMessage();
9311
+ }
9307
9312
  },
9308
9313
  },
9309
9314
  {
9310
- visible: !!(!_this.isEditMode && _this.withSideBar),
9311
9315
  label: _this.translateService.instant("hcm.payroll.edit"),
9312
9316
  command: function () {
9313
- if (_this.isAllowToEditHistorical && rowData) {
9317
+ if (_this.isAllowToEditHistorical) {
9314
9318
  rowData["index"] = key;
9315
9319
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9316
9320
  _this.visible = true;
9317
9321
  }
9318
9322
  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
- });
9323
+ _this.visible = false;
9324
+ _this.isNotAllowMessage();
9324
9325
  }
9325
9326
  },
9326
9327
  },
9327
9328
  {
9328
- visible: !_this.isEditMode,
9329
9329
  label: _this.translateService.instant("hcm.payroll.delete"),
9330
9330
  command: function () {
9331
- if (_this.isAllowToDeleteHistorical && rowData) {
9331
+ if (_this.isAllowToDeleteHistorical) {
9332
9332
  _this.loading = true;
9333
9333
  _this.deleteAnnuityItem(key);
9334
9334
  }
9335
9335
  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
- });
9336
+ _this.visible = false;
9337
+ _this.isNotAllowMessage();
9341
9338
  }
9342
9339
  },
9343
9340
  },
@@ -9404,6 +9401,13 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9404
9401
  this.pixAccountItemInput = {};
9405
9402
  this.visible = true;
9406
9403
  };
9404
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
9405
+ this.messageService.add({
9406
+ severity: "error",
9407
+ summary: this.translateService.instant("hcm.payroll.error"),
9408
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9409
+ });
9410
+ };
9407
9411
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9408
9412
  var newlist = __spread(this.getHistoricalPixAccountList());
9409
9413
  newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
@@ -9549,16 +9553,30 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9549
9553
  HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
9550
9554
  return FormatUtilsService.getFormattedPercentage(value);
9551
9555
  };
9556
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
9557
+ get: function () {
9558
+ return (this.permission["incluir"]);
9559
+ },
9560
+ enumerable: true,
9561
+ configurable: true
9562
+ });
9552
9563
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
9553
9564
  get: function () {
9554
- return (this.permission["Excluir"]);
9565
+ return (this.permission["excluir"]);
9555
9566
  },
9556
9567
  enumerable: true,
9557
9568
  configurable: true
9558
9569
  });
9559
9570
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9560
9571
  get: function () {
9561
- return (this.permission["Editar"]);
9572
+ return (this.permission["editar"]);
9573
+ },
9574
+ enumerable: true,
9575
+ configurable: true
9576
+ });
9577
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9578
+ get: function () {
9579
+ return (this.permission["visualizar"]);
9562
9580
  },
9563
9581
  enumerable: true,
9564
9582
  configurable: true
@@ -10351,23 +10369,17 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10351
10369
  {
10352
10370
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10353
10371
  command: function () {
10354
- if (_this.isAllowToViewHistorical && rowData) {
10372
+ if (_this.isAllowToViewHistorical) {
10355
10373
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10356
- if (_this.withSidebar) {
10374
+ if (_this.withSidebar)
10357
10375
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10358
10376
  relativeTo: _this.activatedRoute,
10359
10377
  });
10360
- }
10361
- else {
10378
+ else
10362
10379
  _this.enableView.emit(dateChange);
10363
- }
10364
10380
  }
10365
10381
  else {
10366
- _this.messageService.add({
10367
- severity: "error",
10368
- summary: _this.translateService.instant("hcm.payroll.error"),
10369
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10370
- });
10382
+ _this.isNotAllowMessage();
10371
10383
  }
10372
10384
  },
10373
10385
  },
@@ -10378,11 +10390,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10378
10390
  _this.delete(rowData.id, rowData.dateChange);
10379
10391
  }
10380
10392
  else {
10381
- _this.messageService.add({
10382
- severity: "error",
10383
- summary: _this.translateService.instant("hcm.payroll.error"),
10384
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10385
- });
10393
+ _this.isNotAllowMessage();
10386
10394
  }
10387
10395
  },
10388
10396
  },
@@ -10440,6 +10448,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10440
10448
  });
10441
10449
  }
10442
10450
  };
10451
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10452
+ this.messageService.add({
10453
+ severity: "error",
10454
+ summary: this.translateService.instant("hcm.payroll.error"),
10455
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10456
+ });
10457
+ };
10443
10458
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10444
10459
  if (payload && payload.length) {
10445
10460
  this.lastRecord = payload[0];
@@ -10447,21 +10462,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10447
10462
  };
10448
10463
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10449
10464
  get: function () {
10450
- return (this.permission["Incluir"]);
10465
+ return (this.permission["incluir"]);
10451
10466
  },
10452
10467
  enumerable: true,
10453
10468
  configurable: true
10454
10469
  });
10455
10470
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10456
10471
  get: function () {
10457
- return (this.permission["Excluir"]);
10472
+ return (this.permission["excluir"]);
10458
10473
  },
10459
10474
  enumerable: true,
10460
10475
  configurable: true
10461
10476
  });
10462
10477
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10463
10478
  get: function () {
10464
- return (this.permission["Visaulizar"]);
10479
+ return (this.permission["visualizar"]);
10465
10480
  },
10466
10481
  enumerable: true,
10467
10482
  configurable: true