@senior-gestao-pessoas/payroll-core 9.3.0-d99b0dbd-5fc0-4b98-979b-fe30c751fa36 → 9.3.0-ed0a821c-6503-4447-b346-cf05b6d53b8f

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
+ return 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,16 +9553,30 @@ 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
- return (this.permission["Excluir"]);
9565
+ return (this.permission["excluir"]);
9555
9566
  },
9556
9567
  enumerable: true,
9557
9568
  configurable: true
9558
9569
  });
9559
9570
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9560
9571
  get: function () {
9561
- return (this.permission["Editar"]);
9572
+ return (this.permission["editar"]);
9573
+ },
9574
+ enumerable: true,
9575
+ configurable: true
9576
+ });
9577
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9578
+ get: function () {
9579
+ return (this.permission["visualizar"]);
9562
9580
  },
9563
9581
  enumerable: true,
9564
9582
  configurable: true
@@ -10284,6 +10302,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10284
10302
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10285
10303
  this.keyPayload = "historicalEmployeePix";
10286
10304
  this.withSidebar = true;
10305
+ this.isOnlyView = new EventEmitter();
10287
10306
  this.enableView = new EventEmitter();
10288
10307
  this.ngUnsubscribe = new Subject();
10289
10308
  this.loading = true;
@@ -10351,9 +10370,10 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10351
10370
  {
10352
10371
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10353
10372
  command: function () {
10354
- if (_this.isAllowToViewHistorical && rowData) {
10373
+ if (_this.isAllowToViewHistorical) {
10355
10374
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10356
10375
  if (_this.withSidebar) {
10376
+ _this.isOnlyView.emit(true);
10357
10377
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10358
10378
  relativeTo: _this.activatedRoute,
10359
10379
  });
@@ -10363,11 +10383,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10363
10383
  }
10364
10384
  }
10365
10385
  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
- });
10386
+ _this.isNotAllowMessage();
10371
10387
  }
10372
10388
  },
10373
10389
  },
@@ -10378,11 +10394,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10378
10394
  _this.delete(rowData.id, rowData.dateChange);
10379
10395
  }
10380
10396
  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
- });
10397
+ _this.isNotAllowMessage();
10386
10398
  }
10387
10399
  },
10388
10400
  },
@@ -10440,6 +10452,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10440
10452
  });
10441
10453
  }
10442
10454
  };
10455
+ HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
10456
+ this.messageService.add({
10457
+ severity: "error",
10458
+ summary: this.translateService.instant("hcm.payroll.error"),
10459
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10460
+ });
10461
+ };
10443
10462
  HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10444
10463
  if (payload && payload.length) {
10445
10464
  this.lastRecord = payload[0];
@@ -10447,21 +10466,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10447
10466
  };
10448
10467
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10449
10468
  get: function () {
10450
- return (this.permission["Incluir"]);
10469
+ return (this.permission["incluir"]);
10451
10470
  },
10452
10471
  enumerable: true,
10453
10472
  configurable: true
10454
10473
  });
10455
10474
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10456
10475
  get: function () {
10457
- return (this.permission["Excluir"]);
10476
+ return (this.permission["excluir"]);
10458
10477
  },
10459
10478
  enumerable: true,
10460
10479
  configurable: true
10461
10480
  });
10462
10481
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10463
10482
  get: function () {
10464
- return (this.permission["Visualizar"]);
10483
+ return (this.permission["visualizar"]);
10465
10484
  },
10466
10485
  enumerable: true,
10467
10486
  configurable: true
@@ -10516,6 +10535,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10516
10535
  __decorate([
10517
10536
  Input()
10518
10537
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10538
+ __decorate([
10539
+ Output()
10540
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10519
10541
  __decorate([
10520
10542
  Output()
10521
10543
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);