@senior-gestao-pessoas/payroll-core 9.4.0-da523d13-bda8-40be-a1f7-c0d945546f1c → 9.4.0-f9d3c09b-0079-4f7c-94cf-dd79338e7089

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.
@@ -10342,18 +10342,6 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10342
10342
  label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
10343
10343
  field: "dateChange",
10344
10344
  },
10345
- {
10346
- label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
10347
- field: "pixKeyType.value",
10348
- },
10349
- {
10350
- label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
10351
- field: "pixKey",
10352
- },
10353
- {
10354
- label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
10355
- field: "percentage",
10356
- },
10357
10345
  {
10358
10346
  label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
10359
10347
  field: "numberOfPixAccount",
@@ -10374,27 +10362,10 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10374
10362
  var _this = this;
10375
10363
  payload.forEach(function (value) {
10376
10364
  value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
10377
- value.pixKey = _this.formatPixKeyByType(value.pixKeyType, value.pixKey);
10378
- value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
10379
10365
  });
10380
10366
  this.onGridLoad(payload);
10381
10367
  this.loading = false;
10382
10368
  };
10383
- HistoricalPixAccountListComponent.prototype.formatPixKeyByType = function (pixKeyType, pixKey) {
10384
- var keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
10385
- if (keyType === "TELEPHONE") {
10386
- return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
10387
- }
10388
- else if (keyType === "CPF") {
10389
- return FormatUtilsService.getFormattedCpf(pixKey);
10390
- }
10391
- else if (keyType === "CNPJ") {
10392
- return FormatUtilsService.getFormattedCnpj(pixKey);
10393
- }
10394
- else {
10395
- return pixKey;
10396
- }
10397
- };
10398
10369
  HistoricalPixAccountListComponent.prototype.getMenuActions = function (rowData) {
10399
10370
  var _this = this;
10400
10371
  return [
@@ -10418,6 +10389,26 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10418
10389
  }
10419
10390
  },
10420
10391
  },
10392
+ {
10393
+ label: this.translateService.instant("hcm.payroll.edit"),
10394
+ command: function () {
10395
+ if (_this.isAllowToEditHistorical) {
10396
+ var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10397
+ if (_this.withSidebar) {
10398
+ _this.isOnlyView.emit(false);
10399
+ _this.router.navigate(["historical-pix-account/" + dateChange], {
10400
+ relativeTo: _this.activatedRoute,
10401
+ });
10402
+ }
10403
+ else {
10404
+ _this.enableView.emit(dateChange);
10405
+ }
10406
+ }
10407
+ else {
10408
+ _this.isNotAllowMessage();
10409
+ }
10410
+ },
10411
+ },
10421
10412
  {
10422
10413
  label: this.translateService.instant("hcm.payroll.delete"),
10423
10414
  command: function () {
@@ -10428,7 +10419,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10428
10419
  _this.isNotAllowMessage();
10429
10420
  }
10430
10421
  },
10431
- },
10422
+ }
10432
10423
  ];
10433
10424
  };
10434
10425
  HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
@@ -10516,6 +10507,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10516
10507
  enumerable: true,
10517
10508
  configurable: true
10518
10509
  });
10510
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToEditHistorical", {
10511
+ get: function () {
10512
+ return (this.permission["editar"]);
10513
+ },
10514
+ enumerable: true,
10515
+ configurable: true
10516
+ });
10519
10517
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
10520
10518
  get: function () {
10521
10519
  return this.getMenuActions.bind(this);