@senior-gestao-pessoas/payroll-core 9.3.0-3956a1cf-41cb-4c73-952b-4f96be631787 → 9.3.0-57601500-80d3-4392-a75e-35abea58468a

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,7 +9298,6 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9298
9298
  if (rowData === void 0) { rowData = {}; }
9299
9299
  return [
9300
9300
  {
9301
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToViewHistorical),
9302
9301
  visible: _this.isEditMode,
9303
9302
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9304
9303
  command: function () {
@@ -9308,12 +9307,11 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9308
9307
  _this.visible = true;
9309
9308
  }
9310
9309
  else {
9311
- return;
9310
+ _this.isNotAllowMessage();
9312
9311
  }
9313
9312
  },
9314
9313
  },
9315
9314
  {
9316
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToEditHistorical),
9317
9315
  visible: !!(!_this.isEditMode && _this.withSideBar),
9318
9316
  label: _this.translateService.instant("hcm.payroll.edit"),
9319
9317
  command: function () {
@@ -9323,12 +9321,11 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9323
9321
  _this.visible = true;
9324
9322
  }
9325
9323
  else {
9326
- return;
9324
+ _this.isNotAllowMessage();
9327
9325
  }
9328
9326
  },
9329
9327
  },
9330
9328
  {
9331
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToDeleteHistorical),
9332
9329
  visible: !_this.isEditMode,
9333
9330
  label: _this.translateService.instant("hcm.payroll.delete"),
9334
9331
  command: function () {
@@ -9337,7 +9334,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9337
9334
  _this.deleteAnnuityItem(key);
9338
9335
  }
9339
9336
  else {
9340
- return;
9337
+ _this.isNotAllowMessage();
9341
9338
  }
9342
9339
  },
9343
9340
  },
@@ -9404,14 +9401,12 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9404
9401
  this.pixAccountItemInput = {};
9405
9402
  this.visible = true;
9406
9403
  };
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
- }
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
+ });
9415
9410
  };
9416
9411
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9417
9412
  var newlist = __spread(this.getHistoricalPixAccountList());
@@ -10307,6 +10302,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10307
10302
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10308
10303
  this.keyPayload = "historicalEmployeePix";
10309
10304
  this.withSidebar = true;
10305
+ this.isOnlyView = new EventEmitter();
10310
10306
  this.enableView = new EventEmitter();
10311
10307
  this.ngUnsubscribe = new Subject();
10312
10308
  this.loading = true;
@@ -10374,21 +10370,23 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10374
10370
  {
10375
10371
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10376
10372
  command: function () {
10373
+ console.log('COMMAND CALLED');
10374
+ console.log('this.isAllowToViewHistorical', _this.isAllowToViewHistorical);
10377
10375
  if (_this.isAllowToViewHistorical) {
10378
10376
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10379
- if (_this.withSidebar)
10377
+ console.log('withSidebar', _this.withSidebar);
10378
+ if (_this.withSidebar) {
10380
10379
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10381
10380
  relativeTo: _this.activatedRoute,
10382
10381
  });
10383
- else
10382
+ }
10383
+ else {
10384
+ _this.isOnlyView.emit(true);
10384
10385
  _this.enableView.emit(dateChange);
10386
+ }
10385
10387
  }
10386
10388
  else {
10387
- _this.messageService.add({
10388
- severity: "error",
10389
- summary: _this.translateService.instant("hcm.payroll.error"),
10390
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10391
- });
10389
+ _this.isNotAllowMessage();
10392
10390
  }
10393
10391
  },
10394
10392
  },
@@ -10399,11 +10397,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10399
10397
  _this.delete(rowData.id, rowData.dateChange);
10400
10398
  }
10401
10399
  else {
10402
- _this.messageService.add({
10403
- severity: "error",
10404
- summary: _this.translateService.instant("hcm.payroll.error"),
10405
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10406
- });
10400
+ _this.isNotAllowMessage();
10407
10401
  }
10408
10402
  },
10409
10403
  },
@@ -10461,6 +10455,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10461
10455
  });
10462
10456
  }
10463
10457
  };
10458
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10459
+ this.messageService.add({
10460
+ severity: "error",
10461
+ summary: this.translateService.instant("hcm.payroll.error"),
10462
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10463
+ });
10464
+ };
10464
10465
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10465
10466
  if (payload && payload.length) {
10466
10467
  this.lastRecord = payload[0];
@@ -10537,6 +10538,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10537
10538
  __decorate([
10538
10539
  Input()
10539
10540
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10541
+ __decorate([
10542
+ Output()
10543
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10540
10544
  __decorate([
10541
10545
  Output()
10542
10546
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);