@senior-gestao-pessoas/payroll-core 9.2.0-f1576e5d-10f9-432e-b073-1aa58ae3cbc8 → 9.3.0

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.
Files changed (29) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +309 -4
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +1 -1
  6. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +50 -0
  7. package/components/historical-pix-account-list/historical-pix-account-list.module.d.ts +2 -0
  8. package/components/historical-pix-account-list/historical-pix-account-list.service.d.ts +9 -0
  9. package/components/historical-pix-account-list/index.d.ts +3 -0
  10. package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +5 -5
  11. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +237 -0
  12. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.module.js +39 -0
  13. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.service.js +35 -0
  14. package/esm2015/components/historical-pix-account-list/index.js +4 -0
  15. package/esm2015/public_api.js +2 -1
  16. package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +5 -5
  17. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +257 -0
  18. package/esm5/components/historical-pix-account-list/historical-pix-account-list.module.js +42 -0
  19. package/esm5/components/historical-pix-account-list/historical-pix-account-list.service.js +37 -0
  20. package/esm5/components/historical-pix-account-list/index.js +4 -0
  21. package/esm5/public_api.js +2 -1
  22. package/fesm2015/senior-gestao-pessoas-payroll-core.js +282 -5
  23. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  24. package/fesm5/senior-gestao-pessoas-payroll-core.js +307 -5
  25. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  26. package/locale/es-ES.json +1 -1
  27. package/package.json +1 -1
  28. package/public_api.d.ts +1 -0
  29. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
@@ -10023,7 +10023,7 @@
10023
10023
  else {
10024
10024
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
10025
10025
  this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
10026
- this.formatPixKeyTelehponeNumber();
10026
+ this.formatPixKeyTelephoneNumber();
10027
10027
  }
10028
10028
  }
10029
10029
  }
@@ -10034,7 +10034,7 @@
10034
10034
  enumerable: true,
10035
10035
  configurable: true
10036
10036
  });
10037
- HistoricalPixAccountFormComponent.prototype.formatPixKeyTelehponeNumber = function () {
10037
+ HistoricalPixAccountFormComponent.prototype.formatPixKeyTelephoneNumber = function () {
10038
10038
  if (this.pixKeyType === "TELEPHONE") {
10039
10039
  this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
10040
10040
  }
@@ -10049,7 +10049,7 @@
10049
10049
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
10050
10050
  this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
10051
10051
  this.setPixKeyValidators(isEditMode);
10052
- this.formatPixKeyTelehponeNumber();
10052
+ this.formatPixKeyTelephoneNumber();
10053
10053
  }
10054
10054
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
10055
10055
  "pixKeyType",
@@ -10307,7 +10307,7 @@
10307
10307
  HistoricalPixAccountFormComponent = __decorate([
10308
10308
  core.Component({
10309
10309
  selector: "pix-account",
10310
- template: "<div id=\"main\">\n <form [formGroup]=\"pixAccountFormGroup\" autocomplete=\"off\">\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <!-- Tipo de chave -->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label>{{'hcm.payroll.employees_addition_pix_key_type'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]=\"true\" server=\"payroll\"\n enumeration=\"PixKeyType\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n name=\"pixKeyType\" [form]=\"pixAccountFormGroup\"\n (onSelect)=\"onChangePixKeyType($event)\"\n (onClear)=\"onClearPixKeyType()\"\n id=\"ta-pixKeyType\"></input-rest-auto-complete-enum>\n <s-control-errors [control]=\"pixAccountFormGroup.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Chave Pix-->\n <div class=\"ui-md-6 ui-sm-12\" [ngClass]=\"{'required': pixKeyType !== 'BANK_ACCOUNT'}\">\n <label>{{'hcm.payroll.employees_addition_pix_key' | translate}}</label>\n <ng-container [ngSwitch]=\"pixKeyType\">\n <input *ngSwitchCase=\"'TELEPHONE'\" only-number\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\" maxlength=\"15\"\n placeholder=\"(__) ____-____\">\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"___.___.___-__\"\n mask=\"999.999.999-99\" [unmask]=\"true\"></p-inputMask>\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"__.___.___/____-__\"\n mask=\"99.999.999/9999-99\" [unmask]=\"true\"></p-inputMask>\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"{{'hcm.payroll.employees_addition_email'|translate}}\"/>\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\" disabled\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n <input *ngSwitchDefault\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n </ng-container>\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\" id=\"er-pix-key\"\n [control]=\"pixAccountFormGroup.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: pixAccountFormGroup.get('pixKey').value },\n invalidEmail: 'hcm.payroll.employees_addition_email_invalid' | translate,\n cpfNotValid: 'hcm.payroll.employees_addition_cpf_error' | translate,\n cnpjNotValid: 'hcm.payroll.employees_addition_cnpj_error' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Percentual-->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label id=\"lb-percentage\"\n for=\"ff-percentage\">{{ 'hcm.payroll.historical_bank_account_label_percentage' | translate }}</label>\n <div class=\"ui-inputgroup\">\n <span class=\"ui-inputgroup-addon\">%</span>\n <input pInputText id=\"ff-percentage\" name=\"percentage\"\n formControlName=\"percentage\"\n currencyMask\n [options]=\"optionsPercentage\"\n [placeholder]=\"percentagePlaceholder\"/>\n </div>\n <s-control-errors [control]=\"pixAccountFormGroup.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <p-fieldset\n legend=\"{{ 'hcm.payroll.custom_fields' | translate }}\"\n [attr.data-hidden]=\"!customFields || !customFields.fields.length\"\n >\n <s-custom-fields\n domain=\"hcm\"\n service=\"{{customService}}\"\n entity=\"{{customEntity}}\"\n formControlName=\"customFields\"\n [invalidErrorLabel]=\"'hcm.payroll.employees_invalid_field' | translate\"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]=\"withSideBar ? 'footer' : 'footer-s-border'\">\n <div class=\"form-group\">\n <s-button id=\"btn-save\" label=\"{{ labelBtnAdd | translate}}\" priority=\"primary\"\n (onClick)=\"addItem()\" *ngIf=\"visibleBtnSave && !this.isView\"></s-button>\n <s-button *ngIf=\"withSideBar\" id=\"btn-close\" label=\"{{'hcm.payroll.cancel'|translate}}\" priority=\"secondary\"\n priority=\"link\" (onClick)=\"close()\"></s-button>\n </div>\n </div>\n</div>\n",
10310
+ template: "<div id=\"main\">\n <form [formGroup]=\"pixAccountFormGroup\" autocomplete=\"off\">\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <!-- Tipo de chave -->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label>{{'hcm.payroll.employees_addition_pix_key_type'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]=\"true\" server=\"payroll\"\n enumeration=\"PixKeyType\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n name=\"pixKeyType\" [form]=\"pixAccountFormGroup\"\n (onSelect)=\"onChangePixKeyType($event)\"\n (onClear)=\"onClearPixKeyType()\"\n id=\"ta-pixKeyType\"></input-rest-auto-complete-enum>\n <s-control-errors [control]=\"pixAccountFormGroup.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Chave Pix-->\n <div class=\"ui-md-6 ui-sm-12\" [ngClass]=\"{'required': pixKeyType !== 'BANK_ACCOUNT'}\">\n <label>{{'hcm.payroll.employees_addition_pix_key' | translate}}</label>\n <ng-container [ngSwitch]=\"pixKeyType\">\n <input *ngSwitchCase=\"'TELEPHONE'\" only-number\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\" maxlength=\"15\"\n placeholder=\"(__) ____-____\">\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"___.___.___-__\"\n mask=\"999.999.999-99\" [unmask]=\"true\"></p-inputMask>\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"__.___.___/____-__\"\n mask=\"99.999.999/9999-99\" [unmask]=\"true\"></p-inputMask>\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"{{'hcm.payroll.employees_addition_email'|translate}}\"/>\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\" disabled\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n <input *ngSwitchDefault\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\" maxlength=\"100\" />\n </ng-container>\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\" id=\"er-pix-key\"\n [control]=\"pixAccountFormGroup.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: pixAccountFormGroup.get('pixKey').value },\n invalidEmail: 'hcm.payroll.employees_addition_email_invalid' | translate,\n cpfNotValid: 'hcm.payroll.employees_addition_cpf_error' | translate,\n cnpjNotValid: 'hcm.payroll.employees_addition_cnpj_error' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Percentual-->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label id=\"lb-percentage\"\n for=\"ff-percentage\">{{ 'hcm.payroll.historical_bank_account_label_percentage' | translate }}</label>\n <div class=\"ui-inputgroup\">\n <span class=\"ui-inputgroup-addon\">%</span>\n <input pInputText id=\"ff-percentage\" name=\"percentage\"\n formControlName=\"percentage\"\n currencyMask\n [options]=\"optionsPercentage\"\n [placeholder]=\"percentagePlaceholder\"/>\n </div>\n <s-control-errors [control]=\"pixAccountFormGroup.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <p-fieldset\n legend=\"{{ 'hcm.payroll.custom_fields' | translate }}\"\n [attr.data-hidden]=\"!customFields || !customFields.fields.length\"\n >\n <s-custom-fields\n domain=\"hcm\"\n service=\"{{customService}}\"\n entity=\"{{customEntity}}\"\n formControlName=\"customFields\"\n [invalidErrorLabel]=\"'hcm.payroll.employees_invalid_field' | translate\"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]=\"withSideBar ? 'footer' : 'footer-s-border'\">\n <div class=\"form-group\">\n <s-button id=\"btn-save\" label=\"{{ labelBtnAdd | translate}}\" priority=\"primary\"\n (onClick)=\"addItem()\" *ngIf=\"visibleBtnSave && !this.isView\"></s-button>\n <s-button *ngIf=\"withSideBar\" id=\"btn-close\" label=\"{{'hcm.payroll.cancel'|translate}}\" priority=\"secondary\"\n priority=\"link\" (onClick)=\"close()\"></s-button>\n </div>\n </div>\n</div>\n",
10311
10311
  styles: [".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]
10312
10312
  })
10313
10313
  ], HistoricalPixAccountFormComponent);
@@ -10368,6 +10368,308 @@
10368
10368
  return HistoricalPixAccountModule;
10369
10369
  }());
10370
10370
 
10371
+ var HistoricalPixAccountListService = /** @class */ (function () {
10372
+ function HistoricalPixAccountListService(http, httpClient) {
10373
+ this.http = http;
10374
+ this.httpClient = httpClient;
10375
+ }
10376
+ HistoricalPixAccountListService.prototype.remove = function (id, dateWhen, service, dependentId) {
10377
+ if (service === void 0) { service = exports.ServiceType.PAYROLL; }
10378
+ if (service === exports.ServiceType.DEPENDENT) {
10379
+ return this.httpClient
10380
+ .post("hcm/dependent/queries/historicalDependentJudicialPensionPixDelete", {
10381
+ dependentId: dependentId,
10382
+ dateWhen: dateWhen,
10383
+ });
10384
+ }
10385
+ else {
10386
+ return this.http.post("actions/historicalEmployeePixDelete", {
10387
+ employeeId: id,
10388
+ dateWhen: dateWhen
10389
+ });
10390
+ }
10391
+ };
10392
+ HistoricalPixAccountListService.ctorParameters = function () { return [
10393
+ { type: HttpClientService },
10394
+ { type: http.HttpClient }
10395
+ ]; };
10396
+ HistoricalPixAccountListService = __decorate([
10397
+ core.Injectable()
10398
+ ], HistoricalPixAccountListService);
10399
+ return HistoricalPixAccountListService;
10400
+ }());
10401
+
10402
+ var moment$e = moment_;
10403
+ var HistoricalPixAccountListComponent = /** @class */ (function () {
10404
+ function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10405
+ this.confirmationService = confirmationService;
10406
+ this.translateService = translateService;
10407
+ this.activatedRoute = activatedRoute;
10408
+ this.cd = cd;
10409
+ this.router = router;
10410
+ this.messageService = messageService;
10411
+ this.historicalPixAccountListService = historicalPixAccountListService;
10412
+ this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10413
+ this.keyPayload = "historicalEmployeePix";
10414
+ this.withSidebar = true;
10415
+ this.enableView = new core.EventEmitter();
10416
+ this.ngUnsubscribe = new rxjs.Subject();
10417
+ this.loading = true;
10418
+ this.columns = [
10419
+ {
10420
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
10421
+ field: "dateChange",
10422
+ },
10423
+ {
10424
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
10425
+ field: "pixKeyType.value",
10426
+ },
10427
+ {
10428
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
10429
+ field: "pixKey",
10430
+ },
10431
+ {
10432
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
10433
+ field: "percentage",
10434
+ },
10435
+ {
10436
+ label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
10437
+ field: "numberOfPixAccount",
10438
+ },
10439
+ ];
10440
+ }
10441
+ HistoricalPixAccountListComponent.prototype.ngOnInit = function () {
10442
+ this.initParameters = { employeeId: this.employeeId, dependentId: this.dependentId };
10443
+ };
10444
+ HistoricalPixAccountListComponent.prototype.ngOnDestroy = function () {
10445
+ this.ngUnsubscribe.next();
10446
+ this.ngUnsubscribe.complete();
10447
+ };
10448
+ HistoricalPixAccountListComponent.prototype.ngAfterViewInit = function () {
10449
+ this.cd.detectChanges();
10450
+ };
10451
+ HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
10452
+ var _this = this;
10453
+ payload.forEach(function (value) {
10454
+ value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
10455
+ value.pixKey = _this.formatPixKeyByType(value.pixKeyType, value.pixKey);
10456
+ value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
10457
+ });
10458
+ this.onGridLoad(payload);
10459
+ this.loading = false;
10460
+ };
10461
+ HistoricalPixAccountListComponent.prototype.formatPixKeyByType = function (pixKeyType, pixKey) {
10462
+ var keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
10463
+ if (keyType === "TELEPHONE") {
10464
+ return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
10465
+ }
10466
+ else if (keyType === "CPF") {
10467
+ return FormatUtilsService.getFormattedCpf(pixKey);
10468
+ }
10469
+ else if (keyType === "CNPJ") {
10470
+ return FormatUtilsService.getFormattedCnpj(pixKey);
10471
+ }
10472
+ else {
10473
+ return pixKey;
10474
+ }
10475
+ };
10476
+ HistoricalPixAccountListComponent.prototype.getMenuActions = function (rowData) {
10477
+ var _this = this;
10478
+ return [
10479
+ {
10480
+ label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10481
+ command: function () {
10482
+ var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10483
+ if (_this.withSidebar)
10484
+ _this.router.navigate(["historical-pix-account/" + dateChange], {
10485
+ relativeTo: _this.activatedRoute,
10486
+ });
10487
+ else
10488
+ _this.enableView.emit(dateChange);
10489
+ },
10490
+ },
10491
+ {
10492
+ label: this.translateService.instant("hcm.payroll.delete"),
10493
+ command: function () {
10494
+ if (_this.isAllowToDeleteHistorical && rowData) {
10495
+ _this.delete(rowData.id, rowData.dateChange);
10496
+ }
10497
+ else {
10498
+ _this.messageService.add({
10499
+ severity: "error",
10500
+ summary: _this.translateService.instant("hcm.payroll.error"),
10501
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10502
+ });
10503
+ }
10504
+ },
10505
+ },
10506
+ ];
10507
+ };
10508
+ HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
10509
+ var _this = this;
10510
+ if (id === this.lastRecord.id) {
10511
+ var dateChangeToDto_1 = moment$e(dateChange, this.dateFormat).format("YYYY-MM-DD");
10512
+ this.confirmationService.confirm({
10513
+ message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
10514
+ accept: function () {
10515
+ _this.loading = true;
10516
+ var service = _this.withSidebar ? exports.ServiceType.PAYROLL : exports.ServiceType.DEPENDENT;
10517
+ _this.historicalPixAccountListService
10518
+ .remove(_this.employeeId, dateChangeToDto_1, service, _this.dependentId)
10519
+ .pipe(operators.takeUntil(_this.ngUnsubscribe))
10520
+ .subscribe(function () {
10521
+ _this.messageService.add({
10522
+ severity: "success",
10523
+ summary: _this.translateService.instant("hcm.payroll.success"),
10524
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_remove"),
10525
+ });
10526
+ _this.parameters = (_this.parameters && __assign({}, _this.parameters)) || {};
10527
+ }, function () {
10528
+ _this.messageService.add({
10529
+ severity: "error",
10530
+ summary: _this.translateService.instant("hcm.payroll.error"),
10531
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_error_remove"),
10532
+ });
10533
+ _this.loading = false;
10534
+ });
10535
+ },
10536
+ });
10537
+ }
10538
+ else {
10539
+ this.messageService.add({
10540
+ severity: "error",
10541
+ summary: this.translateService.instant("hcm.payroll.error"),
10542
+ detail: this.translateService.instant("hcm.payroll.not_allowed_delete_last"),
10543
+ });
10544
+ }
10545
+ };
10546
+ HistoricalPixAccountListComponent.prototype.add = function () {
10547
+ if (this.isAllowToAddHistorical) {
10548
+ this.router.navigate(["historical-pix-account-new"], {
10549
+ relativeTo: this.activatedRoute,
10550
+ });
10551
+ }
10552
+ else {
10553
+ this.messageService.add({
10554
+ severity: "error",
10555
+ summary: this.translateService.instant("hcm.payroll.error"),
10556
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10557
+ });
10558
+ }
10559
+ };
10560
+ HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10561
+ if (payload && payload.length) {
10562
+ this.lastRecord = payload[0];
10563
+ }
10564
+ };
10565
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10566
+ get: function () {
10567
+ return (this.permission["incluir"]);
10568
+ },
10569
+ enumerable: true,
10570
+ configurable: true
10571
+ });
10572
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10573
+ get: function () {
10574
+ return (this.permission["excluir"]);
10575
+ },
10576
+ enumerable: true,
10577
+ configurable: true
10578
+ });
10579
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
10580
+ get: function () {
10581
+ return this.getMenuActions.bind(this);
10582
+ },
10583
+ enumerable: true,
10584
+ configurable: true
10585
+ });
10586
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "reloadList", {
10587
+ set: function (condition) {
10588
+ if (condition) {
10589
+ this.loading = true;
10590
+ this.parameters = (this.parameters && __assign({}, this.parameters)) || {};
10591
+ }
10592
+ },
10593
+ enumerable: true,
10594
+ configurable: true
10595
+ });
10596
+ HistoricalPixAccountListComponent.ctorParameters = function () { return [
10597
+ { type: api.ConfirmationService },
10598
+ { type: core$1.TranslateService },
10599
+ { type: router.ActivatedRoute },
10600
+ { type: core.ChangeDetectorRef },
10601
+ { type: router.Router },
10602
+ { type: api.MessageService },
10603
+ { type: HistoricalPixAccountListService }
10604
+ ]; };
10605
+ __decorate([
10606
+ core.ViewChild(angularComponents.CustomFieldsComponent, { static: false })
10607
+ ], HistoricalPixAccountListComponent.prototype, "customFields", void 0);
10608
+ __decorate([
10609
+ core.Input()
10610
+ ], HistoricalPixAccountListComponent.prototype, "permission", void 0);
10611
+ __decorate([
10612
+ core.Input()
10613
+ ], HistoricalPixAccountListComponent.prototype, "employeeId", void 0);
10614
+ __decorate([
10615
+ core.Input()
10616
+ ], HistoricalPixAccountListComponent.prototype, "dependentId", void 0);
10617
+ __decorate([
10618
+ core.Input()
10619
+ ], HistoricalPixAccountListComponent.prototype, "dateFormat", void 0);
10620
+ __decorate([
10621
+ core.Input()
10622
+ ], HistoricalPixAccountListComponent.prototype, "endPoint", void 0);
10623
+ __decorate([
10624
+ core.Input()
10625
+ ], HistoricalPixAccountListComponent.prototype, "keyPayload", void 0);
10626
+ __decorate([
10627
+ core.Input()
10628
+ ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10629
+ __decorate([
10630
+ core.Output()
10631
+ ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
10632
+ __decorate([
10633
+ core.Input()
10634
+ ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
10635
+ HistoricalPixAccountListComponent = __decorate([
10636
+ core.Component({
10637
+ // tslint:disable-next-line:component-selector
10638
+ selector: "c-historical-pix-account-list",
10639
+ template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <c-data-list-rest\n id=\"ta-historical-pix-account-list\"\n [columns]=\"columns\"\n actionLabel=\"{{ 'hcm.payroll.movimentation_generic_action' | translate }}\"\n emptyMessage=\"{{ 'hcm.payroll.admission_empty_message' | translate }}\"\n [endpoint]=\"endPoint\"\n singularMessageRecords=\"{{\n 'hcm.payroll.admission_register' | translate\n }}\"\n [actions]=\"scopedActions\"\n pluralMessageRecords=\"{{\n 'hcm.payroll.admission_registers' | translate\n }}\"\n [keyPayload]=\"keyPayload\"\n [lazy]=\"true\"\n (lazyLoad)=\"onLazyLoad($event)\"\n [(loading)]=\"loading\"\n [initParameters]=\"initParameters\"\n [parameters]=\"parameters\"\n [isSortable]=\"false\"\n ></c-data-list-rest>\n </div>\n</div>\n\n",
10640
+ styles: [""]
10641
+ })
10642
+ ], HistoricalPixAccountListComponent);
10643
+ return HistoricalPixAccountListComponent;
10644
+ }());
10645
+
10646
+ var HistoricalPixAccountListModule = /** @class */ (function () {
10647
+ function HistoricalPixAccountListModule() {
10648
+ }
10649
+ HistoricalPixAccountListModule = __decorate([
10650
+ core.NgModule({
10651
+ imports: [
10652
+ common.CommonModule,
10653
+ forms.FormsModule,
10654
+ http.HttpClientModule,
10655
+ autocomplete.AutoCompleteModule,
10656
+ SharedModule,
10657
+ forms.ReactiveFormsModule,
10658
+ table.TableModule,
10659
+ angularComponents.ButtonModule,
10660
+ tooltip.TooltipModule,
10661
+ angularComponents.LoadingStateModule,
10662
+ DataListRestModule,
10663
+ confirmdialog.ConfirmDialogModule,
10664
+ ],
10665
+ declarations: [HistoricalPixAccountListComponent],
10666
+ providers: [HistoricalPixAccountListService],
10667
+ exports: [HistoricalPixAccountListComponent],
10668
+ })
10669
+ ], HistoricalPixAccountListModule);
10670
+ return HistoricalPixAccountListModule;
10671
+ }());
10672
+
10371
10673
  exports.AdmissionDraftSummaryComponent = AdmissionDraftSummaryComponent;
10372
10674
  exports.AdmissionDraftSummaryModule = AdmissionDraftSummaryModule;
10373
10675
  exports.AdmissionDraftSummaryService = AdmissionDraftSummaryService;
@@ -10409,6 +10711,9 @@
10409
10711
  exports.HistoricalBankAccountModule = HistoricalBankAccountModule;
10410
10712
  exports.HistoricalBankAccountService = HistoricalBankAccountService;
10411
10713
  exports.HistoricalPixAccountComponent = HistoricalPixAccountComponent;
10714
+ exports.HistoricalPixAccountListComponent = HistoricalPixAccountListComponent;
10715
+ exports.HistoricalPixAccountListModule = HistoricalPixAccountListModule;
10716
+ exports.HistoricalPixAccountListService = HistoricalPixAccountListService;
10412
10717
  exports.HistoricalPixAccountModule = HistoricalPixAccountModule;
10413
10718
  exports.HistoricalPixAccountService = HistoricalPixAccountService;
10414
10719
  exports.HttpClientService = HttpClientService;