@senior-gestao-pessoas/payroll-core 9.3.0-06156ffc-852c-4f04-8482-5c4f9317ecff → 9.3.0-0a28751a-09d5-4c6f-ad82-be2566554925

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,33 @@ 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
+ console.log('CAALING VIEW');
9305
+ if (_this.isAllowToViewHistorical) {
9306
+ console.log('IS ALLOW TO VIEW');
9307
+ rowData["index"] = key;
9308
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
9309
+ _this.visible = true;
9310
+ }
9311
+ else {
9312
+ console.log('IS NOT ALLOW TO VIEW');
9313
+ _this.isNotAllowMessage();
9314
+ }
9307
9315
  },
9308
9316
  },
9309
9317
  {
9310
9318
  visible: !!(!_this.isEditMode && _this.withSideBar),
9311
9319
  label: _this.translateService.instant("hcm.payroll.edit"),
9312
9320
  command: function () {
9313
- if (_this.isAllowToEditHistorical && rowData) {
9321
+ console.log('CAALING EDIT');
9322
+ if (_this.isAllowToEditHistorical) {
9323
+ console.log('IS ALLOW TO EDIT');
9314
9324
  rowData["index"] = key;
9315
9325
  _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9316
9326
  _this.visible = true;
9317
9327
  }
9318
9328
  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
- });
9329
+ console.log('IS NOT ALLOW TO EDIT');
9330
+ _this.isNotAllowMessage();
9324
9331
  }
9325
9332
  },
9326
9333
  },
@@ -9328,16 +9335,15 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9328
9335
  visible: !_this.isEditMode,
9329
9336
  label: _this.translateService.instant("hcm.payroll.delete"),
9330
9337
  command: function () {
9331
- if (_this.isAllowToDeleteHistorical && rowData) {
9338
+ console.log('CAALING DELETE');
9339
+ if (_this.isAllowToDeleteHistorical) {
9340
+ console.log('IS ALLOW TO DELETE');
9332
9341
  _this.loading = true;
9333
9342
  _this.deleteAnnuityItem(key);
9334
9343
  }
9335
9344
  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
- });
9345
+ console.log('IS NOT ALLOW TO DELETE');
9346
+ _this.isNotAllowMessage();
9341
9347
  }
9342
9348
  },
9343
9349
  },
@@ -9404,6 +9410,13 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9404
9410
  this.pixAccountItemInput = {};
9405
9411
  this.visible = true;
9406
9412
  };
9413
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
9414
+ this.messageService.add({
9415
+ severity: "error",
9416
+ summary: this.translateService.instant("hcm.payroll.error"),
9417
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9418
+ });
9419
+ };
9407
9420
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
9408
9421
  var newlist = __spread(this.getHistoricalPixAccountList());
9409
9422
  newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
@@ -9549,23 +9562,30 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9549
9562
  HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
9550
9563
  return FormatUtilsService.getFormattedPercentage(value);
9551
9564
  };
9565
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
9566
+ get: function () {
9567
+ return (this.permission["incluir"]);
9568
+ },
9569
+ enumerable: true,
9570
+ configurable: true
9571
+ });
9552
9572
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
9553
9573
  get: function () {
9554
- return (this.permission["Excluir"]);
9574
+ return (this.permission["excluir"]);
9555
9575
  },
9556
9576
  enumerable: true,
9557
9577
  configurable: true
9558
9578
  });
9559
9579
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9560
9580
  get: function () {
9561
- return (this.permission["Editar"]);
9581
+ return (this.permission["editar"]);
9562
9582
  },
9563
9583
  enumerable: true,
9564
9584
  configurable: true
9565
9585
  });
9566
9586
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9567
9587
  get: function () {
9568
- return (this.permission["Visualizar"]);
9588
+ return (this.permission["visualizar"]);
9569
9589
  },
9570
9590
  enumerable: true,
9571
9591
  configurable: true
@@ -10291,6 +10311,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10291
10311
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10292
10312
  this.keyPayload = "historicalEmployeePix";
10293
10313
  this.withSidebar = true;
10314
+ this.isOnlyView = new EventEmitter();
10294
10315
  this.enableView = new EventEmitter();
10295
10316
  this.ngUnsubscribe = new Subject();
10296
10317
  this.loading = true;
@@ -10358,10 +10379,10 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10358
10379
  {
10359
10380
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10360
10381
  command: function () {
10361
- console.log(_this.isAllowToViewHistorical);
10362
- if (_this.isAllowToViewHistorical && rowData) {
10382
+ if (_this.isAllowToViewHistorical) {
10363
10383
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10364
10384
  if (_this.withSidebar) {
10385
+ _this.isOnlyView.emit(true);
10365
10386
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10366
10387
  relativeTo: _this.activatedRoute,
10367
10388
  });
@@ -10371,11 +10392,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10371
10392
  }
10372
10393
  }
10373
10394
  else {
10374
- _this.messageService.add({
10375
- severity: "error",
10376
- summary: _this.translateService.instant("hcm.payroll.error"),
10377
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10378
- });
10395
+ _this.isNotAllowMessage();
10379
10396
  }
10380
10397
  },
10381
10398
  },
@@ -10386,11 +10403,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10386
10403
  _this.delete(rowData.id, rowData.dateChange);
10387
10404
  }
10388
10405
  else {
10389
- _this.messageService.add({
10390
- severity: "error",
10391
- summary: _this.translateService.instant("hcm.payroll.error"),
10392
- detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10393
- });
10406
+ _this.isNotAllowMessage();
10394
10407
  }
10395
10408
  },
10396
10409
  },
@@ -10448,6 +10461,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10448
10461
  });
10449
10462
  }
10450
10463
  };
10464
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10465
+ this.messageService.add({
10466
+ severity: "error",
10467
+ summary: this.translateService.instant("hcm.payroll.error"),
10468
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10469
+ });
10470
+ };
10451
10471
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10452
10472
  if (payload && payload.length) {
10453
10473
  this.lastRecord = payload[0];
@@ -10455,21 +10475,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10455
10475
  };
10456
10476
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10457
10477
  get: function () {
10458
- return (this.permission["Incluir"]);
10478
+ return (this.permission["incluir"]);
10459
10479
  },
10460
10480
  enumerable: true,
10461
10481
  configurable: true
10462
10482
  });
10463
10483
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10464
10484
  get: function () {
10465
- return (this.permission["Excluir"]);
10485
+ return (this.permission["excluir"]);
10466
10486
  },
10467
10487
  enumerable: true,
10468
10488
  configurable: true
10469
10489
  });
10470
10490
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10471
10491
  get: function () {
10472
- return (this.permission["Visualizar"]);
10492
+ return (this.permission["visualizar"]);
10473
10493
  },
10474
10494
  enumerable: true,
10475
10495
  configurable: true
@@ -10524,6 +10544,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10524
10544
  __decorate([
10525
10545
  Input()
10526
10546
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10547
+ __decorate([
10548
+ Output()
10549
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10527
10550
  __decorate([
10528
10551
  Output()
10529
10552
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);