@senior-gestao-pessoas/payroll-core 9.3.0-8e3650be-79b5-4803-9eab-ad01b4739d46 → 9.3.0-91e42bbe-0783-45c0-91c2-ac243803cb3c

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,26 +9301,27 @@ 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.isNotAllowMessage();
9311
+ }
9307
9312
  },
9308
9313
  },
9309
9314
  {
9310
9315
  visible: !!(!_this.isEditMode && _this.withSideBar),
9311
9316
  label: _this.translateService.instant("hcm.payroll.edit"),
9312
9317
  command: function () {
9313
- if (_this.isAllowToEditHistorical && rowData) {
9318
+ if (_this.isAllowToEditHistorical) {
9314
9319
  rowData["index"] = key;
9315
9320
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9316
9321
  _this.visible = true;
9317
9322
  }
9318
9323
  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
- });
9324
+ _this.isNotAllowMessage();
9324
9325
  }
9325
9326
  },
9326
9327
  },
@@ -9328,16 +9329,12 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9328
9329
  visible: !_this.isEditMode,
9329
9330
  label: _this.translateService.instant("hcm.payroll.delete"),
9330
9331
  command: function () {
9331
- if (_this.isAllowToDeleteHistorical && rowData) {
9332
+ if (_this.isAllowToDeleteHistorical) {
9332
9333
  _this.loading = true;
9333
9334
  _this.deleteAnnuityItem(key);
9334
9335
  }
9335
9336
  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
- });
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,6 +9553,13 @@ 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
9565
  return (this.permission["excluir"]);
@@ -9563,6 +9574,13 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9563
9574
  enumerable: true,
9564
9575
  configurable: true
9565
9576
  });
9577
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9578
+ get: function () {
9579
+ return (this.permission["visualizar"]);
9580
+ },
9581
+ enumerable: true,
9582
+ configurable: true
9583
+ });
9566
9584
  HistoricalPixAccountComponent.ctorParameters = function () { return [
9567
9585
  { type: TranslateService },
9568
9586
  { type: ChangeDetectorRef },
@@ -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];
@@ -10461,7 +10476,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
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