@senior-gestao-pessoas/payroll-core 9.3.0-3956a1cf-41cb-4c73-952b-4f96be631787 → 9.3.0-4c27311d-4594-4495-a90c-0e9e0ba69675

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.
@@ -9268,6 +9268,11 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9268
9268
  this.isViewMode = false;
9269
9269
  this.withSideBar = true;
9270
9270
  this.defaultCpfNumber = null;
9271
+ this.listDataReciever = [];
9272
+ this.isOnlyView = new EventEmitter();
9273
+ this.isOnlyEdit = new EventEmitter();
9274
+ this.isOnlyDelete = new EventEmitter();
9275
+ this.listFromApp = [];
9271
9276
  this.visibleChange = new EventEmitter();
9272
9277
  this.ngUnsubscribe = new Subject();
9273
9278
  this.orderBy = {
@@ -9298,7 +9303,6 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9298
9303
  if (rowData === void 0) { rowData = {}; }
9299
9304
  return [
9300
9305
  {
9301
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToViewHistorical),
9302
9306
  visible: _this.isEditMode,
9303
9307
  label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9304
9308
  command: function () {
@@ -9308,12 +9312,11 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9308
9312
  _this.visible = true;
9309
9313
  }
9310
9314
  else {
9311
- return;
9315
+ _this.isOnlyView.emit(true);
9312
9316
  }
9313
9317
  },
9314
9318
  },
9315
9319
  {
9316
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToEditHistorical),
9317
9320
  visible: !!(!_this.isEditMode && _this.withSideBar),
9318
9321
  label: _this.translateService.instant("hcm.payroll.edit"),
9319
9322
  command: function () {
@@ -9323,12 +9326,16 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9323
9326
  _this.visible = true;
9324
9327
  }
9325
9328
  else {
9326
- return;
9329
+ _this.isOnlyEdit.emit(true);
9330
+ if (_this.listFromApp.length == 0) {
9331
+ rowData["index"] = key;
9332
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9333
+ _this.visible = true;
9334
+ }
9327
9335
  }
9328
9336
  },
9329
9337
  },
9330
9338
  {
9331
- isNotAllowMessage: _this.isNotAllowMessage(_this.isAllowToDeleteHistorical),
9332
9339
  visible: !_this.isEditMode,
9333
9340
  label: _this.translateService.instant("hcm.payroll.delete"),
9334
9341
  command: function () {
@@ -9337,7 +9344,11 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9337
9344
  _this.deleteAnnuityItem(key);
9338
9345
  }
9339
9346
  else {
9340
- return;
9347
+ _this.isOnlyDelete.emit(true);
9348
+ if (_this.listFromApp.length == 0) {
9349
+ _this.loading = true;
9350
+ _this.deleteAnnuityItem(key);
9351
+ }
9341
9352
  }
9342
9353
  },
9343
9354
  },
@@ -9348,6 +9359,11 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9348
9359
  HistoricalPixAccountComponent.prototype.ngOnInit = function () {
9349
9360
  this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
9350
9361
  };
9362
+ HistoricalPixAccountComponent.prototype.ngOnChanges = function (changes) {
9363
+ if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
9364
+ this.listFromApp = changes['listDataReciever'].currentValue;
9365
+ }
9366
+ };
9351
9367
  HistoricalPixAccountComponent.prototype.createFormGroup = function () {
9352
9368
  this.historicalPixAccountList = this.formBuilder.group({
9353
9369
  historicalPixAccountList: this.formBuilder.control(null),
@@ -9404,14 +9420,12 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9404
9420
  this.pixAccountItemInput = {};
9405
9421
  this.visible = true;
9406
9422
  };
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
- }
9423
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
9424
+ this.messageService.add({
9425
+ severity: "error",
9426
+ summary: this.translateService.instant("hcm.payroll.error"),
9427
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9428
+ });
9415
9429
  };
9416
9430
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9417
9431
  var newlist = __spread(this.getHistoricalPixAccountList());
@@ -9643,6 +9657,18 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9643
9657
  __decorate([
9644
9658
  Input()
9645
9659
  ], HistoricalPixAccountComponent.prototype, "permission", void 0);
9660
+ __decorate([
9661
+ Input()
9662
+ ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
9663
+ __decorate([
9664
+ Output()
9665
+ ], HistoricalPixAccountComponent.prototype, "isOnlyView", void 0);
9666
+ __decorate([
9667
+ Output()
9668
+ ], HistoricalPixAccountComponent.prototype, "isOnlyEdit", void 0);
9669
+ __decorate([
9670
+ Output()
9671
+ ], HistoricalPixAccountComponent.prototype, "isOnlyDelete", void 0);
9646
9672
  __decorate([
9647
9673
  Input()
9648
9674
  ], HistoricalPixAccountComponent.prototype, "dateChange", null);
@@ -10307,6 +10333,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10307
10333
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10308
10334
  this.keyPayload = "historicalEmployeePix";
10309
10335
  this.withSidebar = true;
10336
+ this.isOnlyView = new EventEmitter();
10310
10337
  this.enableView = new EventEmitter();
10311
10338
  this.ngUnsubscribe = new Subject();
10312
10339
  this.loading = true;
@@ -10376,19 +10403,18 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10376
10403
  command: function () {
10377
10404
  if (_this.isAllowToViewHistorical) {
10378
10405
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10379
- if (_this.withSidebar)
10406
+ if (_this.withSidebar) {
10407
+ _this.isOnlyView.emit(true);
10380
10408
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10381
10409
  relativeTo: _this.activatedRoute,
10382
10410
  });
10383
- else
10411
+ }
10412
+ else {
10384
10413
  _this.enableView.emit(dateChange);
10414
+ }
10385
10415
  }
10386
10416
  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
- });
10417
+ _this.isNotAllowMessage();
10392
10418
  }
10393
10419
  },
10394
10420
  },
@@ -10399,11 +10425,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10399
10425
  _this.delete(rowData.id, rowData.dateChange);
10400
10426
  }
10401
10427
  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
- });
10428
+ _this.isNotAllowMessage();
10407
10429
  }
10408
10430
  },
10409
10431
  },
@@ -10461,6 +10483,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10461
10483
  });
10462
10484
  }
10463
10485
  };
10486
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10487
+ this.messageService.add({
10488
+ severity: "error",
10489
+ summary: this.translateService.instant("hcm.payroll.error"),
10490
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10491
+ });
10492
+ };
10464
10493
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10465
10494
  if (payload && payload.length) {
10466
10495
  this.lastRecord = payload[0];
@@ -10537,6 +10566,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10537
10566
  __decorate([
10538
10567
  Input()
10539
10568
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10569
+ __decorate([
10570
+ Output()
10571
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10540
10572
  __decorate([
10541
10573
  Output()
10542
10574
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);