@senior-gestao-pessoas/payroll-core 9.5.0-f5093372-3d3f-4b82-a958-d1cdf848ce4d → 9.5.0-feature-hcmgdp-11492-21838e72

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 (42) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +467 -902
  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 -16
  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 +43 -10
  6. package/components/historical-pix-account/historical-pix-account.component.d.ts +10 -39
  7. package/components/historical-pix-account/historical-pix-account.service.d.ts +0 -1
  8. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +2 -9
  9. package/components/utils/format-utils/format-utils.service.d.ts +3 -30
  10. package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +202 -34
  11. package/esm2015/components/historical-pix-account/historical-pix-account.component.js +29 -259
  12. package/esm2015/components/historical-pix-account/historical-pix-account.module.js +1 -5
  13. package/esm2015/components/historical-pix-account/historical-pix-account.service.js +1 -8
  14. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +8 -41
  15. package/esm2015/components/utils/format-utils/format-utils.service.js +5 -88
  16. package/esm2015/public_api.js +1 -2
  17. package/esm2015/senior-gestao-pessoas-payroll-core.js +2 -3
  18. package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +217 -58
  19. package/esm5/components/historical-pix-account/historical-pix-account.component.js +58 -301
  20. package/esm5/components/historical-pix-account/historical-pix-account.module.js +1 -5
  21. package/esm5/components/historical-pix-account/historical-pix-account.service.js +1 -8
  22. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +8 -46
  23. package/esm5/components/utils/format-utils/format-utils.service.js +5 -88
  24. package/esm5/public_api.js +1 -2
  25. package/esm5/senior-gestao-pessoas-payroll-core.js +2 -3
  26. package/fesm2015/senior-gestao-pessoas-payroll-core.js +502 -897
  27. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  28. package/fesm5/senior-gestao-pessoas-payroll-core.js +464 -898
  29. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  30. package/package.json +1 -1
  31. package/public_api.d.ts +0 -1
  32. package/senior-gestao-pessoas-payroll-core.d.ts +1 -2
  33. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
  34. package/components/historical-pix-account/historical-pix-account-base.d.ts +0 -27
  35. package/components/shared/index.d.ts +0 -1
  36. package/components/shared/shared-state.service.d.ts +0 -20
  37. package/esm2015/components/historical-pix-account/historical-pix-account-base.js +0 -173
  38. package/esm2015/components/shared/index.js +0 -2
  39. package/esm2015/components/shared/shared-state.service.js +0 -46
  40. package/esm5/components/historical-pix-account/historical-pix-account-base.js +0 -186
  41. package/esm5/components/shared/index.js +0 -2
  42. package/esm5/components/shared/shared-state.service.js +0 -47
@@ -1,4 +1,4 @@
1
- import { __decorate, __assign, __spread, __awaiter, __generator, __read, __values, __extends } from 'tslib';
1
+ import { __decorate, __assign, __spread, __awaiter, __generator, __read, __values } from 'tslib';
2
2
  import { Input, Component, NgModule, EventEmitter, ViewChild, Output, ElementRef, HostListener, Directive, Injectable, ViewEncapsulation, ɵɵdefineInjectable, ɵɵinject, ChangeDetectorRef } from '@angular/core';
3
3
  import { FormsModule, ReactiveFormsModule, FormGroup, FormArray, FormControl, Validators, FormBuilder } from '@angular/forms';
4
4
  import { BlockUIModule } from 'primeng/blockui';
@@ -36,7 +36,6 @@ import { CurrencyMaskModule } from 'ng2-currency-mask';
36
36
  import { FieldsetModule } from 'primeng/fieldset';
37
37
  import { PanelModule } from 'primeng/panel';
38
38
  import { ConfirmDialogModule } from 'primeng/confirmdialog';
39
- import { TabViewModule } from 'primeng/tabview';
40
39
 
41
40
  /**
42
41
  * Created by Bruno.Curioletti on 30/05/2017.
@@ -9174,25 +9173,6 @@ var FormatUtilsService = /** @class */ (function () {
9174
9173
  }
9175
9174
  return null;
9176
9175
  };
9177
- /**
9178
- * Retorna o CPF formatado
9179
- * @param cpf CPF
9180
- */
9181
- FormatUtilsService.getFormattedCpfEdited = function (cpf) {
9182
- if (!cpf)
9183
- return '';
9184
- cpf = cpf.replace(/\D/g, '').slice(0, 11);
9185
- if (cpf.length > 9) {
9186
- cpf = cpf.replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/, "$1.$2.$3-$4");
9187
- }
9188
- else if (cpf.length > 6) {
9189
- cpf = cpf.replace(/^(\d{3})(\d{3})(\d{0,3})$/, "$1.$2.$3");
9190
- }
9191
- else if (cpf.length > 3) {
9192
- cpf = cpf.replace(/^(\d{3})(\d{0,3})$/, "$1.$2");
9193
- }
9194
- return cpf;
9195
- };
9196
9176
  /**
9197
9177
  * Retorna o CNPJ formatado
9198
9178
  * @param cnpj CNPJ
@@ -9208,28 +9188,6 @@ var FormatUtilsService = /** @class */ (function () {
9208
9188
  }
9209
9189
  return null;
9210
9190
  };
9211
- /**
9212
- * Retorna o CNPJ formatado
9213
- * @param cnpj CNPJ
9214
- */
9215
- FormatUtilsService.getFormattedCnpjEdited = function (cnpj) {
9216
- if (!cnpj)
9217
- return '';
9218
- cnpj = cnpj.replace(/\D/g, '').slice(0, 14);
9219
- if (cnpj.length > 12) {
9220
- cnpj = cnpj.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/, "$1.$2.$3/$4-$5");
9221
- }
9222
- else if (cnpj.length > 8) {
9223
- cnpj = cnpj.replace(/^(\d{2})(\d{3})(\d{3})(\d{0,4})$/, "$1.$2.$3/$4");
9224
- }
9225
- else if (cnpj.length > 5) {
9226
- cnpj = cnpj.replace(/^(\d{2})(\d{3})(\d{0,3})$/, "$1.$2.$3");
9227
- }
9228
- else if (cnpj.length > 2) {
9229
- cnpj = cnpj.replace(/^(\d{2})(\d{0,3})$/, "$1.$2");
9230
- }
9231
- return cnpj;
9232
- };
9233
9191
  /**
9234
9192
  * Retorna a mascara do CPF/CNPJ
9235
9193
  * @param key Valores possíveis são CPF ou CNPJ
@@ -9244,24 +9202,6 @@ var FormatUtilsService = /** @class */ (function () {
9244
9202
  return "";
9245
9203
  }
9246
9204
  };
9247
- /**
9248
- * Método para formatar o número de inscrição do cliente.
9249
- * @param subscriptionNumber
9250
- * @param pixKeyType
9251
- * @returns
9252
- */
9253
- FormatUtilsService.getFormattedSubscriptionNumber = function (subscriptionNumber, pixKeyType) {
9254
- if (!subscriptionNumber || !pixKeyType)
9255
- return subscriptionNumber;
9256
- switch (pixKeyType) {
9257
- case 'CNPJ':
9258
- return this.getFormattedCnpjEdited(subscriptionNumber);
9259
- case 'CPF':
9260
- return this.getFormattedCpfEdited(subscriptionNumber);
9261
- default:
9262
- return subscriptionNumber;
9263
- }
9264
- };
9265
9205
  /**
9266
9206
  * Metódo para formatar o número de telefone.
9267
9207
  * @param telephoneNumber String contendo o número de telefone.
@@ -9293,13 +9233,6 @@ var FormatUtilsService = /** @class */ (function () {
9293
9233
  }
9294
9234
  return tel;
9295
9235
  };
9296
- /**
9297
- * Metódo para formatar a porcentagem para 2 casas decimais.
9298
- * @param value Número a ser formatado.
9299
- */
9300
- FormatUtilsService.getFormattedPercentage = function (value) {
9301
- return parseFloat(value).toFixed(2).replace('.', ',') + '%';
9302
- };
9303
9236
  /**
9304
9237
  * Metódo para formatar o número de telefone de um campo Input.
9305
9238
  * @param event Evento do Input do campo de telefone.
@@ -9313,506 +9246,62 @@ var FormatUtilsService = /** @class */ (function () {
9313
9246
  event.target.value = FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
9314
9247
  };
9315
9248
  /**
9316
- * Formata o campo de input de CPF em tempo real.
9317
- * @param event Evento do input
9318
- */
9319
- FormatUtilsService.formatCpfInputEvent = function (event) {
9320
- var cpf = event.target.value;
9321
- // Permite apagar nos pontos sensíveis
9322
- if (event.keyCode === 8 && (cpf.length === 4 || cpf.length === 8 || cpf.length === 12)) {
9323
- return;
9324
- }
9325
- event.target.value = FormatUtilsService.getFormattedCpfEdited(cpf);
9326
- };
9327
- /**
9328
- * Formata o campo de input de CNPJ em tempo real.
9329
- * @param event Evento do input
9249
+ * Metódo para formatar a porcentagem para 2 casas decimais.
9250
+ * @param value Número a ser formatado.
9330
9251
  */
9331
- FormatUtilsService.formatCnpjInputEvent = function (event) {
9332
- var cnpj = event.target.value;
9333
- // Permite apagar nos pontos sensíveis
9334
- if (event.keyCode === 8 && (cnpj.length === 3 || cnpj.length === 7 || cnpj.length === 11 || cnpj.length === 16)) {
9335
- return;
9336
- }
9337
- event.target.value = FormatUtilsService.getFormattedCnpjEdited(cnpj);
9252
+ FormatUtilsService.getFormattedPercentage = function (value) {
9253
+ return parseFloat(value).toFixed(2).replace('.', ',') + '%';
9338
9254
  };
9339
9255
  return FormatUtilsService;
9340
9256
  }());
9341
9257
 
9342
- var SharedStateService = /** @class */ (function () {
9343
- function SharedStateService() {
9344
- this.hideFieldSubject = new BehaviorSubject(true);
9345
- this.hideField$ = this.hideFieldSubject.asObservable();
9346
- this.showButtonSubject = new BehaviorSubject(true);
9347
- this.showButton$ = this.showButtonSubject.asObservable();
9348
- this.saveButtonSubject = new BehaviorSubject(true);
9349
- this.saveButton$ = this.saveButtonSubject.asObservable();
9350
- this.showEditMode = new BehaviorSubject(true);
9351
- this.showEditMode$ = this.showEditMode.asObservable();
9352
- this.activeValidatorsOnEditModalOpen = new Subject();
9353
- this.activeValidatorsOnEditModalOpen$ = this.activeValidatorsOnEditModalOpen.asObservable();
9354
- this.shouldReloadWindowOnlyEditMode = new BehaviorSubject(false);
9355
- this.shouldReloadWindowOnlyEditMode$ = this.shouldReloadWindowOnlyEditMode.asObservable();
9356
- }
9357
- SharedStateService.prototype.setHideField = function (value) {
9358
- this.hideFieldSubject.next(value);
9359
- };
9360
- SharedStateService.prototype.setShowButton = function (value) {
9361
- this.showButtonSubject.next(value);
9362
- };
9363
- SharedStateService.prototype.setSaveButton = function (value) {
9364
- this.saveButtonSubject.next(value);
9365
- };
9366
- SharedStateService.prototype.setShowEditMode = function (value) {
9367
- this.showEditMode.next(value);
9368
- };
9369
- SharedStateService.prototype.setShouldReloadWindowOnlyEditMode = function (value) {
9370
- this.shouldReloadWindowOnlyEditMode.next(value);
9371
- };
9372
- SharedStateService.prototype.triggerActiveValidatorsOnEditModalOpen = function () {
9373
- this.activeValidatorsOnEditModalOpen.next();
9374
- };
9375
- SharedStateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function SharedStateService_Factory() { return new SharedStateService(); }, token: SharedStateService, providedIn: "root" });
9376
- SharedStateService = __decorate([
9377
- Injectable({
9378
- providedIn: 'root',
9379
- })
9380
- ], SharedStateService);
9381
- return SharedStateService;
9382
- }());
9383
-
9384
- var GenericValidator = /** @class */ (function () {
9385
- function GenericValidator() {
9386
- }
9387
- /**
9388
- * Valida o CEI (Cadastro específico de INSS) digitado.
9389
- */
9390
- GenericValidator.isValidCei = function (control) {
9391
- var cei = control.value;
9392
- if (!cei)
9393
- return null;
9394
- else if (cei.length != 11)
9395
- return null;
9396
- var multiplicadorBase = "3298765432";
9397
- var total = 0;
9398
- var resto = 0;
9399
- var multiplicando = 0;
9400
- var multiplicador = 0;
9401
- if (cei.length !== 11 ||
9402
- cei === "00000000000" ||
9403
- cei === "11111111111" ||
9404
- cei === "22222222222" ||
9405
- cei === "33333333333" ||
9406
- cei === "44444444444" ||
9407
- cei === "55555555555" ||
9408
- cei === "66666666666" ||
9409
- cei === "77777777777" ||
9410
- cei === "88888888888" ||
9411
- cei === "99999999999")
9412
- return { invalidCei: true };
9413
- else {
9414
- for (var i = 0; i < 10; i++) {
9415
- multiplicando = parseInt(cei.substring(i, i + 1), 10);
9416
- multiplicador = parseInt(multiplicadorBase.substring(i, i + 1), 10);
9417
- total += multiplicando * multiplicador;
9418
- }
9419
- resto = 11 - (total % 11);
9420
- resto = resto === 10 || resto === 11 ? 0 : resto;
9421
- var digito = parseInt("" + cei.charAt(10), 10);
9422
- return resto === digito ? null : { invalidCei: true };
9423
- }
9424
- };
9425
- /**
9426
- * Valida se o CPF é valido. Deve-se ser informado o cpf sem máscara.
9427
- */
9428
- GenericValidator.isValidCpf = function (control) {
9429
- var cpf = control.value;
9430
- if (cpf) {
9431
- var numbers = void 0, digits = void 0, sum = void 0, i = void 0, result = void 0, equalDigits = void 0;
9432
- equalDigits = 1;
9433
- if (cpf.length < 11) {
9434
- return null;
9435
- }
9436
- for (i = 0; i < cpf.length - 1; i++) {
9437
- if (cpf.charAt(i) !== cpf.charAt(i + 1)) {
9438
- equalDigits = 0;
9439
- break;
9440
- }
9441
- }
9442
- if (!equalDigits) {
9443
- numbers = cpf.substring(0, 9);
9444
- digits = cpf.substring(9);
9445
- sum = 0;
9446
- for (i = 10; i > 1; i--) {
9447
- sum += numbers.charAt(10 - i) * i;
9448
- }
9449
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9450
- if (result !== Number(digits.charAt(0))) {
9451
- return { cpfNotValid: true };
9452
- }
9453
- numbers = cpf.substring(0, 10);
9454
- sum = 0;
9455
- for (i = 11; i > 1; i--) {
9456
- sum += numbers.charAt(11 - i) * i;
9457
- }
9458
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9459
- if (result !== Number(digits.charAt(1))) {
9460
- return { cpfNotValid: true };
9461
- }
9462
- return null;
9463
- }
9464
- else {
9465
- return { cpfNotValid: true };
9466
- }
9467
- }
9468
- return null;
9469
- };
9470
- /**
9471
- * Valida se o CNPJ é valido. Deve-se ser informado o cpf sem máscara.
9472
- */
9473
- GenericValidator.isValidCnpj = function (control) {
9474
- var cnpj = control.value;
9475
- if (cnpj) {
9476
- var size = void 0, numbers = void 0, digits = void 0, sum = void 0, pos = void 0, result = void 0;
9477
- cnpj = cnpj.replace(/[^\d]+/g, '');
9478
- if (cnpj.length !== 14) {
9479
- return null;
9480
- }
9481
- // Elimina CNPJs invalidos conhecidos
9482
- if (cnpj === '00000000000000' ||
9483
- cnpj === '11111111111111' ||
9484
- cnpj === '22222222222222' ||
9485
- cnpj === '33333333333333' ||
9486
- cnpj === '44444444444444' ||
9487
- cnpj === '55555555555555' ||
9488
- cnpj === '66666666666666' ||
9489
- cnpj === '77777777777777' ||
9490
- cnpj === '88888888888888' ||
9491
- cnpj === '99999999999999') {
9492
- return { cnpjNotValid: true };
9493
- }
9494
- // Valida DVs
9495
- size = cnpj.length - 2;
9496
- numbers = cnpj.substring(0, size);
9497
- digits = cnpj.substring(size);
9498
- sum = 0;
9499
- pos = size - 7;
9500
- for (var i = size; i >= 1; i--) {
9501
- sum += numbers.charAt(size - i) * pos--;
9502
- if (pos < 2) {
9503
- pos = 9;
9504
- }
9505
- }
9506
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9507
- if (result !== Number(digits.charAt(0))) {
9508
- return { cnpjNotValid: true };
9509
- }
9510
- size = size + 1;
9511
- numbers = cnpj.substring(0, size);
9512
- sum = 0;
9513
- pos = size - 7;
9514
- for (var i = size; i >= 1; i--) {
9515
- sum += numbers.charAt(size - i) * pos--;
9516
- if (pos < 2) {
9517
- pos = 9;
9518
- }
9519
- }
9520
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9521
- if (result !== Number(digits.charAt(1))) {
9522
- return { cnpjNotValid: true };
9523
- }
9524
- return null;
9525
- }
9526
- return null;
9527
- };
9528
- /**
9529
- * Válida o número de telefone da chave PIX.
9530
- */
9531
- GenericValidator.isValidPhoneNumber = function (control) {
9532
- var cellPhoneKey = control.value || '';
9533
- cellPhoneKey = cellPhoneKey.replace(/[\s()-]/g, '');
9534
- var regexNumberTelephone = /^[1-9][\d]{1,2}\d{8,10}$/;
9535
- var isValidNumberTelephone = regexNumberTelephone.test(cellPhoneKey);
9536
- return isValidNumberTelephone ? null : { invalidPhoneNumber: true };
9537
- };
9538
- /**
9539
- * Valida o email da chave PIX.
9540
- */
9541
- GenericValidator.isValidEmail = function (control) {
9542
- var emailKey = control.value;
9543
- var regexValidEmail = /^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/;
9544
- var isValidEmail = regexValidEmail.test(emailKey);
9545
- return isValidEmail ? null : { invalidEmail: true };
9546
- };
9547
- return GenericValidator;
9548
- }());
9549
-
9550
- var HistoricakPixAccountBase = /** @class */ (function () {
9551
- function HistoricakPixAccountBase(formBuilder) {
9552
- this._paramsForm = new FormGroup({});
9553
- this._defaultCpfNumber = null;
9554
- this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
9555
- this.pixAccountList = [];
9556
- this.maxValuePercentage = 100.0;
9557
- this.isShowPixKeyFieldValidatorMessage = false;
9258
+ var HistoricalPixAccountComponent = /** @class */ (function () {
9259
+ function HistoricalPixAccountComponent(translateService, cd, formBuilder, messageService) {
9260
+ var _this = this;
9261
+ this.translateService = translateService;
9262
+ this.cd = cd;
9558
9263
  this.formBuilder = formBuilder;
9559
- this.createFormGroupBase();
9560
- }
9561
- HistoricakPixAccountBase.prototype.phoneMask = function (event) {
9562
- FormatUtilsService.formatTelephoneInputEvent(event);
9563
- };
9564
- HistoricakPixAccountBase.prototype.cpfMask = function (event) {
9565
- FormatUtilsService.formatCpfInputEvent(event);
9566
- };
9567
- HistoricakPixAccountBase.prototype.cnpjMask = function (event) {
9568
- FormatUtilsService.formatCnpjInputEvent(event);
9569
- };
9570
- HistoricakPixAccountBase.prototype.onChangePixKeyType = function (item, form) {
9571
- if (!item || !item.key)
9572
- return;
9573
- this.pixKeyType = item.key;
9574
- var targetForm = (typeof form !== 'undefined' && form !== null)
9575
- ? form
9576
- : this.pixAccountFormGroup;
9577
- this.isShowPixKeyFieldValidatorMessage = true;
9578
- var pixKeyControl = targetForm.get("pixKey");
9579
- if (pixKeyControl) {
9580
- pixKeyControl.reset();
9581
- }
9582
- this.setPixKeyValidators(true, targetForm);
9583
- if (item.key === "CPF") {
9584
- this.setDefaultCpfPixKey(targetForm);
9585
- }
9586
- };
9587
- HistoricakPixAccountBase.prototype.onClearPixKeyType = function (form) {
9588
- var targetForm = (typeof form !== 'undefined' && form !== null)
9589
- ? form
9590
- : this.pixAccountFormGroup;
9591
- this.isShowPixKeyFieldValidatorMessage = false;
9592
- if (targetForm.get("pixKey")) {
9593
- targetForm.get("pixKey").reset();
9594
- }
9595
- };
9596
- HistoricakPixAccountBase.prototype.setDefaultCpfPixKey = function (form) {
9597
- var targetForm = (typeof form !== 'undefined' && form !== null)
9598
- ? form
9599
- : this.pixAccountFormGroup;
9600
- if (this._defaultCpfNumber) {
9601
- if (targetForm.get("pixKey")) {
9602
- targetForm.get("pixKey").setValue(this._defaultCpfNumber);
9603
- }
9604
- }
9605
- else {
9606
- var sheetDocument = this._paramsForm.get("sheetDocument");
9607
- if (sheetDocument && sheetDocument.get("cpfNumber")) {
9608
- var cpf = sheetDocument.get("cpfNumber").value;
9609
- if (cpf && targetForm.get("pixKey")) {
9610
- targetForm.get("pixKey").setValue(cpf);
9611
- }
9612
- }
9613
- }
9614
- };
9615
- HistoricakPixAccountBase.prototype.createFormGroupBase = function () {
9616
- this.pixAccountFormGroup = this.formBuilder.group({
9617
- id: this.formBuilder.control(null),
9618
- index: this.formBuilder.control(null),
9619
- employee: this.formBuilder.control({ value: { tableId: null }, disabled: true }),
9620
- dateChange: this.formBuilder.control(null),
9621
- pixKeyType: this.formBuilder.control(null, Validators.required),
9622
- pixKey: this.formBuilder.control(null),
9623
- percentage: this.formBuilder.control(null, Validators.compose(__spread(this.initialValidatorOfPercentage, [
9624
- Validators.max(this.maxValuePercentage),
9625
- ]))),
9626
- externalId: this.formBuilder.control(null),
9627
- customFields: this.formBuilder.control(null),
9628
- });
9629
- };
9630
- HistoricakPixAccountBase.prototype.setValidatorsAccordingList = function (pixAccountList, index, isEditMode, form) {
9631
- if (index === void 0) { index = null; }
9632
- if (isEditMode === void 0) { isEditMode = true; }
9633
- var targetForm = (typeof form !== 'undefined' && form !== null)
9634
- ? form
9635
- : this.pixAccountFormGroup;
9636
- this.pixAccountList = (pixAccountList && pixAccountList.length > 0)
9637
- ? [].concat(pixAccountList)
9638
- : [];
9639
- var percentageIncluded = [];
9640
- for (var i = 0; i < this.pixAccountList.length; i++) {
9641
- var field = this.pixAccountList[i];
9642
- if (field && field.percentage && i !== index) {
9643
- percentageIncluded.push(field.percentage);
9644
- }
9645
- }
9646
- this.beforeSetPixKeyTypeValidator(targetForm);
9647
- this.setPixKeyValidators(isEditMode, targetForm);
9648
- this.validatePercentageValid(percentageIncluded, targetForm);
9649
- };
9650
- HistoricakPixAccountBase.prototype.beforeSetPixKeyTypeValidator = function (form) {
9651
- var control = form.get("pixKeyType");
9652
- if (this.pixAccountList && this.pixAccountList.length) {
9653
- control.setValidators(Validators.compose([
9654
- Validators.required,
9655
- this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList),
9656
- ]));
9657
- }
9658
- else {
9659
- control.setValidators(Validators.required);
9660
- }
9661
- control.updateValueAndValidity();
9662
- };
9663
- HistoricakPixAccountBase.prototype.setPixKeyValidators = function (isEditMode, form) {
9664
- var pixKey = form.get("pixKey");
9665
- switch (this.pixKeyType) {
9666
- case "TELEPHONE":
9667
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidPhoneNumber]));
9668
- break;
9669
- case "EMAIL":
9670
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidEmail]));
9671
- break;
9672
- case "CPF":
9673
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCpf]));
9674
- break;
9675
- case "CNPJ":
9676
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCnpj]));
9677
- break;
9678
- case "RANDOM_KEY":
9679
- pixKey.setValidators(Validators.required);
9680
- break;
9681
- default:
9682
- pixKey.clearValidators();
9683
- }
9684
- if (isEditMode) {
9685
- pixKey.enable();
9686
- }
9687
- pixKey.updateValueAndValidity();
9688
- };
9689
- HistoricakPixAccountBase.prototype.validatePercentageValid = function (listValue, form) {
9690
- var percentage = form.get("percentage");
9691
- this.maxValuePercentage = listValue.reduce(function (acc, val) { return acc - val; }, 100.0);
9692
- percentage.setValidators(Validators.compose(__spread(this.initialValidatorOfPercentage, [
9693
- Validators.max(this.maxValuePercentage),
9694
- ])));
9695
- percentage.updateValueAndValidity();
9696
- };
9697
- HistoricakPixAccountBase.prototype.validateDuplicatePixKeyTypeBankAccount = function (listCompare) {
9698
- return function (control) {
9699
- var value = control.value;
9700
- var isDuplicate = listCompare.some(function (field) {
9701
- return value &&
9702
- field.pixKeyType.key === "BANK_ACCOUNT" &&
9703
- value.key === "BANK_ACCOUNT";
9704
- });
9705
- return isDuplicate ? { pixKeyTypeBankAccountDuplicate: true } : null;
9706
- };
9707
- };
9708
- Object.defineProperty(HistoricakPixAccountBase.prototype, "paramsForm", {
9709
- get: function () {
9710
- return this._paramsForm;
9711
- },
9712
- set: function (value) {
9713
- this._paramsForm = value;
9714
- },
9715
- enumerable: true,
9716
- configurable: true
9717
- });
9718
- Object.defineProperty(HistoricakPixAccountBase.prototype, "defaultCpfNumber", {
9719
- get: function () {
9720
- return this._defaultCpfNumber;
9721
- },
9722
- set: function (value) {
9723
- this._defaultCpfNumber = value;
9724
- },
9725
- enumerable: true,
9726
- configurable: true
9727
- });
9728
- return HistoricakPixAccountBase;
9729
- }());
9730
-
9731
- var HistoricalPixAccountService = /** @class */ (function () {
9732
- function HistoricalPixAccountService(http) {
9733
- this.http = http;
9734
- }
9735
- HistoricalPixAccountService.prototype.query = function (path, body, service) {
9736
- if (service === void 0) { service = ServiceType.PAYROLL; }
9737
- return this.http.query(path, body, service);
9738
- };
9739
- HistoricalPixAccountService.prototype.enumQuery = function () {
9740
- var path = 'enumQuery';
9741
- var body = {
9742
- names: ['PixKeyType']
9743
- };
9744
- return this.http.query(path, body, ServiceType.PAYROLL);
9745
- };
9746
- HistoricalPixAccountService.ctorParameters = function () { return [
9747
- { type: HttpClientService }
9748
- ]; };
9749
- HistoricalPixAccountService = __decorate([
9750
- Injectable()
9751
- ], HistoricalPixAccountService);
9752
- return HistoricalPixAccountService;
9753
- }());
9754
-
9755
- var HistoricalPixAccountComponent = /** @class */ (function (_super) {
9756
- __extends(HistoricalPixAccountComponent, _super);
9757
- function HistoricalPixAccountComponent(translateService, cd, formBuilder, sharedStateService, service) {
9758
- var _this = _super.call(this, formBuilder) || this;
9759
- _this.translateService = translateService;
9760
- _this.cd = cd;
9761
- _this.sharedStateService = sharedStateService;
9762
- _this.service = service;
9763
- _this.recordByRow = 1;
9764
- _this.showDateChange = false;
9765
- _this.isEditMode = false;
9766
- _this.isViewMode = false;
9767
- _this.withSideBar = true;
9768
- _this.listDataReciever = [];
9769
- _this.addExistentHistoricData = [];
9770
- _this.getListPixAccount = [];
9771
- _this.isEditModeForSave = false;
9772
- _this.showField = false;
9773
- _this.isViewModeActive = new EventEmitter();
9774
- _this.isEditModeActive = new EventEmitter();
9775
- _this.isDeleteModeActive = new EventEmitter();
9776
- _this.isValidChangeForm = new EventEmitter();
9777
- _this.reloadOnlyOnEdit = new EventEmitter();
9778
- _this.listFromApp = [];
9779
- _this.visibleChange = new EventEmitter();
9780
- _this.ngUnsubscribe = new Subject();
9781
- _this.orderBy = {
9264
+ this.messageService = messageService;
9265
+ this.recordByRow = 1;
9266
+ this.showDateChange = false;
9267
+ this.isEditMode = false;
9268
+ this.isViewMode = false;
9269
+ this.withSideBar = true;
9270
+ this.defaultCpfNumber = null;
9271
+ this.listDataReciever = [];
9272
+ this.showButtonEdit = false;
9273
+ this.isViewModeActive = new EventEmitter();
9274
+ this.isEditModeActive = new EventEmitter();
9275
+ this.isDeleteModeActive = new EventEmitter();
9276
+ this.listFromApp = [];
9277
+ this.visibleChange = new EventEmitter();
9278
+ this.ngUnsubscribe = new Subject();
9279
+ this.orderBy = {
9782
9280
  field: "dateChange",
9783
9281
  direction: DirectionEnumeration.DESC,
9784
9282
  };
9785
- _this.pixAccountItemInput = {};
9786
- _this.totalRecords = 0;
9787
- _this.actionLabel = _this.translateService.instant("hcm.payroll.entries_query_actions_total_title");
9788
- _this.loading = true;
9789
- _this.listData = [];
9790
- _this.listDataNoPage = [];
9791
- _this.showButtonView = true;
9792
- _this.showEditMode = false;
9793
- _this.hasRecordsPix = true;
9794
- _this.hideFields = _this.sharedStateService.hideField$;
9795
- _this.suggestions = [];
9796
- _this.formGroupByRow = {};
9797
- _this.cols = [
9283
+ this.pixAccountItemInput = {};
9284
+ this.totalRecords = 0;
9285
+ this.actionLabel = this.translateService.instant("hcm.payroll.entries_query_actions_total_title");
9286
+ this.loading = true;
9287
+ this.listData = [];
9288
+ this.listDataNoPage = [];
9289
+ this.permitsEditBankAccount = false;
9290
+ this.cols = [
9798
9291
  {
9799
- label: _this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
9292
+ label: this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
9800
9293
  field: "pixKeyType",
9801
9294
  },
9802
9295
  {
9803
- label: _this.translateService.instant("hcm.payroll.employees_addition_pix_key"),
9296
+ label: this.translateService.instant("hcm.payroll.employees_addition_pix_key"),
9804
9297
  field: "pixKey",
9805
9298
  },
9806
9299
  {
9807
- label: _this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
9300
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
9808
9301
  field: "percentage",
9809
9302
  },
9810
- {
9811
- label: _this.translateService.instant("hcm.payroll.movimentation_generic_action"),
9812
- field: "actions",
9813
- }
9814
9303
  ];
9815
- _this.actions = function (rowData, key) {
9304
+ this.actions = function (rowData, key) {
9816
9305
  if (rowData === void 0) { rowData = {}; }
9817
9306
  return [
9818
9307
  {
@@ -9830,7 +9319,7 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
9830
9319
  },
9831
9320
  },
9832
9321
  {
9833
- visible: !!(!_this.isEditMode && _this.withSideBar),
9322
+ visible: !!((!_this.isEditMode && _this.withSideBar) || _this.showButtonEdit),
9834
9323
  label: _this.translateService.instant("hcm.payroll.edit"),
9835
9324
  command: function () {
9836
9325
  if (_this.isAllowToEditHistorical) {
@@ -9849,7 +9338,7 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
9849
9338
  },
9850
9339
  },
9851
9340
  {
9852
- visible: !_this.isEditMode || _this.showEditMode,
9341
+ visible: !_this.isEditMode,
9853
9342
  label: _this.translateService.instant("hcm.payroll.delete"),
9854
9343
  command: function () {
9855
9344
  if (_this.isAllowToDeleteHistorical) {
@@ -9867,48 +9356,17 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
9867
9356
  },
9868
9357
  ];
9869
9358
  };
9870
- _this.createFormGroup();
9871
- return _this;
9359
+ this.createFormGroup();
9872
9360
  }
9873
9361
  HistoricalPixAccountComponent.prototype.ngOnInit = function () {
9874
- var _this = this;
9875
- this.showFields = this.showField;
9876
9362
  this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
9877
- this.sharedStateService.showButton$.subscribe(function (value) {
9878
- _this.showButtonView = value;
9879
- });
9880
- this.sharedStateService.showEditMode$.subscribe(function (value) {
9881
- _this.showEditMode = value;
9882
- _this.isEditModeForSave = value;
9883
- });
9884
- this.sharedStateService.shouldReloadWindowOnlyEditMode$.subscribe(function (value) {
9885
- _this.reloadOnlyOnEdit.emit(value);
9886
- });
9887
- this.sharedStateService.activeValidatorsOnEditModalOpen$
9888
- .subscribe(function () {
9889
- Object.values(_this.formGroupByRow).forEach(function (fg) {
9890
- Object.values(fg.controls).forEach(function (control) {
9891
- control.markAsTouched();
9892
- control.updateValueAndValidity();
9893
- });
9894
- });
9895
- _this.emitFormValidity();
9896
- });
9897
9363
  };
9898
9364
  HistoricalPixAccountComponent.prototype.ngOnChanges = function (changes) {
9899
9365
  if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
9900
9366
  this.listFromApp = changes['listDataReciever'].currentValue;
9901
9367
  }
9902
- if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
9903
- this.getHistoricalPixAccountList();
9904
- }
9905
- if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
9906
- var newData = changes['addExistentHistoricData'].currentValue;
9907
- this.rebuildFormGroupMap(newData);
9908
- }
9909
- if (changes['isEditMode']) {
9910
- this.isEditMode = changes['isEditMode'].currentValue;
9911
- this.cd.detectChanges();
9368
+ if (changes['showButtonEdit'] && changes['showButtonEdit'].currentValue) {
9369
+ this.permitsEditBankAccount = changes['showButtonEdit'].currentValue;
9912
9370
  }
9913
9371
  };
9914
9372
  HistoricalPixAccountComponent.prototype.createFormGroup = function () {
@@ -9923,98 +9381,6 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
9923
9381
  HistoricalPixAccountComponent.prototype.ngAfterViewInit = function () {
9924
9382
  this.cd.detectChanges();
9925
9383
  };
9926
- HistoricalPixAccountComponent.prototype.emitFormValidity = function () {
9927
- var allValid = Object.values(this.formGroupByRow).every(function (fg) {
9928
- fg.updateValueAndValidity();
9929
- return fg.valid;
9930
- });
9931
- this.isValidChangeForm.emit(allValid);
9932
- };
9933
- HistoricalPixAccountComponent.prototype.filterPixKeyType = function (event) {
9934
- var _this = this;
9935
- var query = event.query;
9936
- this.service.enumQuery().subscribe(function (response) {
9937
- var pixKeyTypeEnum = response.results.find(function (result) { return result.enumName === 'PixKeyType'; });
9938
- if (pixKeyTypeEnum) {
9939
- _this.suggestions = pixKeyTypeEnum.items.filter(function (item) {
9940
- return item.value.toLowerCase().includes(query.toLowerCase());
9941
- });
9942
- }
9943
- else {
9944
- _this.suggestions = [];
9945
- }
9946
- });
9947
- };
9948
- HistoricalPixAccountComponent.prototype.createPixRowFormGroup = function () {
9949
- return this.formBuilder.group({
9950
- pixKeyType: [null, Validators.required],
9951
- pixKey: [null],
9952
- percentage: [0, Validators.compose(__spread(this.initialValidatorOfPercentage, [
9953
- Validators.max(this.maxValuePercentage),
9954
- ]))]
9955
- });
9956
- };
9957
- HistoricalPixAccountComponent.prototype.onPixKeyInput = function (event, index) {
9958
- var inputValue = event.target.value;
9959
- var inputRawValue = inputValue.replace(/\D/g, '');
9960
- var form = this.formGroupByRow[index];
9961
- var pixKeyControl = form.get('pixKey');
9962
- if (pixKeyControl) {
9963
- pixKeyControl.setValue(inputRawValue, { emitEvent: false });
9964
- pixKeyControl.markAsDirty();
9965
- pixKeyControl.updateValueAndValidity();
9966
- }
9967
- this.setPixKeyValidators(true, form);
9968
- this.emitFormValidity();
9969
- };
9970
- HistoricalPixAccountComponent.prototype.onBlurPixCpfAndCnpj = function (index) {
9971
- var form = this.formGroupByRow[index];
9972
- var pixKeyControl = form.get('pixKey');
9973
- var pixKeyTypeControl = form.get('pixKeyType');
9974
- if (!pixKeyControl || !pixKeyTypeControl)
9975
- return;
9976
- var currentValue = pixKeyControl.value;
9977
- var pixKeyType = pixKeyTypeControl.value.key;
9978
- var rawValue = (currentValue || '').replace(/\D/g, '');
9979
- pixKeyControl.setValue(rawValue, { emitEvent: false });
9980
- if (pixKeyControl.valid) {
9981
- form.patchValue({
9982
- pixKeyFormatted: FormatUtilsService.getFormattedSubscriptionNumber(rawValue, pixKeyType)
9983
- });
9984
- }
9985
- this.emitFormValidity();
9986
- };
9987
- HistoricalPixAccountComponent.prototype.getFormattedPixKey = function (type, value) {
9988
- return FormatUtilsService.getFormattedSubscriptionNumber(value, type);
9989
- };
9990
- HistoricalPixAccountComponent.prototype.syncPixDataToParentForm = function () {
9991
- if (!this.isEditModeForSave)
9992
- return;
9993
- var values = Object.values(this.formGroupByRow).map(function (fg) {
9994
- var value = fg.getRawValue();
9995
- var pixKeyType = value.pixKeyType.key;
9996
- if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
9997
- value.pixKey = (value.pixKey || '').replace(/[.\-\/]/g, '');
9998
- }
9999
- else if (pixKeyType === 'TELEPHONE') {
10000
- value.pixKey = (value.pixKey || '').replace(/[()\s\-]/g, '');
10001
- }
10002
- return value;
10003
- });
10004
- this.formGroup
10005
- .get(this.fieldFormGroup)
10006
- .get('historicalPixAccountList')
10007
- .setValue(values);
10008
- this.emitFormValidity();
10009
- };
10010
- HistoricalPixAccountComponent.prototype.syncResetPixFormToParent = function () {
10011
- this.formGroupByRow = {};
10012
- this.historicalPixAccountList.reset();
10013
- this.historicalPixAccountList.get('historicalPixAccountList').setValue([]);
10014
- if (this.addExistentHistoricData.length) {
10015
- this.rebuildFormGroupMap(this.addExistentHistoricData);
10016
- }
10017
- };
10018
9384
  HistoricalPixAccountComponent.prototype.onLazyLoad = function (event) {
10019
9385
  var _this = this;
10020
9386
  var first = event && event.first ? event.first : 0;
@@ -10042,7 +9408,6 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10042
9408
  this.refreshCssInIE11();
10043
9409
  }
10044
9410
  this.loading = false;
10045
- this.cd.detectChanges();
10046
9411
  };
10047
9412
  /**
10048
9413
  * Um Bug de CSS que acontece nas linhas da tabela, que resolve só atualizando qualquer parte do CSS da pagina.
@@ -10060,68 +9425,12 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10060
9425
  this.pixAccountItemInput = {};
10061
9426
  this.visible = true;
10062
9427
  };
10063
- HistoricalPixAccountComponent.prototype.addPix = function () {
10064
- var newItem = {
10065
- pixKeyType: {},
10066
- pixKey: '',
10067
- percentage: 0
10068
- };
10069
- var index = this.addExistentHistoricData.length;
10070
- this.addExistentHistoricData = __spread(this.addExistentHistoricData, [
10071
- newItem
10072
- ]);
10073
- this.formGroupByRow[index] = this.createPixRowFormGroup();
10074
- this.setValidatorsAccordingList(this.addExistentHistoricData, index, true);
10075
- this.emitFormValidity();
10076
- };
10077
- HistoricalPixAccountComponent.prototype.deletePix = function (index) {
10078
- if (this.dataListPix.editingCell) {
10079
- this.dataListPix.editingCell = null;
10080
- }
10081
- this.addExistentHistoricData = this.addExistentHistoricData.filter(function (_, i) { return i !== index; });
10082
- this.rebuildFormGroupMap(this.addExistentHistoricData);
10083
- this.emitFormValidity();
10084
- };
10085
- HistoricalPixAccountComponent.prototype.rebuildFormGroupMap = function (data) {
10086
- var _this = this;
10087
- this.formGroupByRow = {};
10088
- data.forEach(function (item, index) {
10089
- var form = _this.createPixRowFormGroup();
10090
- var pixKeyType = item.pixKeyType.key;
10091
- var pixKeyRaw = item.pixKey;
10092
- if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
10093
- item.pixKey = FormatUtilsService.getFormattedSubscriptionNumber(pixKeyRaw, pixKeyType);
10094
- }
10095
- if (pixKeyType === 'TELEPHONE') {
10096
- item.pixKey = FormatUtilsService.getFormattedTelephoneNumber(pixKeyRaw);
10097
- }
10098
- form.patchValue(item);
10099
- _this.formGroupByRow[index] = form;
10100
- _this.pixKeyType = pixKeyType;
10101
- _this.setPixKeyValidators(true, form);
10102
- _this.setValidatorsAccordingList(data, index, _this.isEditMode);
10103
- var listValues = data
10104
- .filter(function (_, i) { return i !== index; })
10105
- .map(function (row) { return row.percentage ? parseFloat(row.percentage) : 0; });
10106
- _this.validatePercentageValid(listValues, form);
10107
- });
10108
- this.emitFormValidity();
10109
- };
10110
- HistoricalPixAccountComponent.prototype.onPixKeyTypeChange = function (item, index) {
10111
- var _this = this;
10112
- var form = this.formGroupByRow[index];
10113
- this.onChangePixKeyType(item, form);
10114
- this.addExistentHistoricData[index].pixKey = '';
10115
- setTimeout(function () {
10116
- if (_this.dataListPix.editingCell) {
10117
- _this.dataListPix.editingCell = null;
10118
- }
9428
+ HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
9429
+ this.messageService.add({
9430
+ severity: "error",
9431
+ summary: this.translateService.instant("hcm.payroll.error"),
9432
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10119
9433
  });
10120
- this.cd.detectChanges();
10121
- };
10122
- HistoricalPixAccountComponent.prototype.onPixKeyTypeClear = function (index) {
10123
- var form = this.formGroupByRow[index];
10124
- this.onClearPixKeyType(form);
10125
9434
  };
10126
9435
  HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
10127
9436
  var newlist = __spread(this.getHistoricalPixAccountList());
@@ -10183,23 +9492,6 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10183
9492
  this.msgTotalLimitByPercentage = null;
10184
9493
  }
10185
9494
  };
10186
- HistoricalPixAccountComponent.prototype.onSyncValue = function (field, index) {
10187
- if (this.formGroupByRow &&
10188
- this.formGroupByRow[index] &&
10189
- this.formGroupByRow[index].get(field)) {
10190
- var control = this.formGroupByRow[index].get(field);
10191
- var value = control.value;
10192
- this.addExistentHistoricData[index][field] = value;
10193
- control.markAsDirty();
10194
- control.markAsTouched();
10195
- control.updateValueAndValidity();
10196
- var currentList = this.addExistentHistoricData.map(function (item, i) {
10197
- return i === index ? 0 : item.percentage;
10198
- });
10199
- this.validatePercentageValid(currentList, this.formGroupByRow[index]);
10200
- this.emitFormValidity();
10201
- }
10202
- };
10203
9495
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "scopedActions", {
10204
9496
  get: function () {
10205
9497
  return this.actions.bind(this);
@@ -10266,20 +9558,9 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10266
9558
  set: function (value) {
10267
9559
  this._visible = value;
10268
9560
  this.visibleChange.emit(this.visible);
10269
- },
10270
- enumerable: true,
10271
- configurable: true
10272
- });
10273
- Object.defineProperty(HistoricalPixAccountComponent.prototype, "paramsForm", {
10274
- set: function (value) {
10275
- this._paramsForm = value;
10276
- },
10277
- enumerable: true,
10278
- configurable: true
10279
- });
10280
- Object.defineProperty(HistoricalPixAccountComponent.prototype, "defaultCpfNumber", {
10281
- set: function (value) {
10282
- this._defaultCpfNumber = value;
9561
+ if (!value) {
9562
+ this.pixAccountItemInput = {};
9563
+ }
10283
9564
  },
10284
9565
  enumerable: true,
10285
9566
  configurable: true
@@ -10331,15 +9612,11 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10331
9612
  { type: TranslateService },
10332
9613
  { type: ChangeDetectorRef },
10333
9614
  { type: FormBuilder },
10334
- { type: SharedStateService },
10335
- { type: HistoricalPixAccountService }
9615
+ { type: MessageService }
10336
9616
  ]; };
10337
9617
  __decorate([
10338
9618
  ViewChild(CustomFieldsComponent$1, { static: false })
10339
9619
  ], HistoricalPixAccountComponent.prototype, "customFields", void 0);
10340
- __decorate([
10341
- ViewChild('dataListPix', { static: false })
10342
- ], HistoricalPixAccountComponent.prototype, "dataListPix", void 0);
10343
9620
  __decorate([
10344
9621
  Input()
10345
9622
  ], HistoricalPixAccountComponent.prototype, "formGroup", void 0);
@@ -10381,22 +9658,19 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10381
9658
  ], HistoricalPixAccountComponent.prototype, "withSideBar", void 0);
10382
9659
  __decorate([
10383
9660
  Input()
10384
- ], HistoricalPixAccountComponent.prototype, "permission", void 0);
9661
+ ], HistoricalPixAccountComponent.prototype, "paramsForm", void 0);
10385
9662
  __decorate([
10386
9663
  Input()
10387
- ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
9664
+ ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
10388
9665
  __decorate([
10389
9666
  Input()
10390
- ], HistoricalPixAccountComponent.prototype, "addExistentHistoricData", void 0);
10391
- __decorate([
10392
- Input()
10393
- ], HistoricalPixAccountComponent.prototype, "getListPixAccount", void 0);
9667
+ ], HistoricalPixAccountComponent.prototype, "permission", void 0);
10394
9668
  __decorate([
10395
9669
  Input()
10396
- ], HistoricalPixAccountComponent.prototype, "isEditModeForSave", void 0);
9670
+ ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
10397
9671
  __decorate([
10398
9672
  Input()
10399
- ], HistoricalPixAccountComponent.prototype, "showField", void 0);
9673
+ ], HistoricalPixAccountComponent.prototype, "showButtonEdit", void 0);
10400
9674
  __decorate([
10401
9675
  Output()
10402
9676
  ], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
@@ -10406,12 +9680,6 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10406
9680
  __decorate([
10407
9681
  Output()
10408
9682
  ], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
10409
- __decorate([
10410
- Output()
10411
- ], HistoricalPixAccountComponent.prototype, "isValidChangeForm", void 0);
10412
- __decorate([
10413
- Output()
10414
- ], HistoricalPixAccountComponent.prototype, "reloadOnlyOnEdit", void 0);
10415
9683
  __decorate([
10416
9684
  Input()
10417
9685
  ], HistoricalPixAccountComponent.prototype, "dateChange", null);
@@ -10424,44 +9692,214 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
10424
9692
  __decorate([
10425
9693
  Input()
10426
9694
  ], HistoricalPixAccountComponent.prototype, "visible", null);
10427
- __decorate([
10428
- Input()
10429
- ], HistoricalPixAccountComponent.prototype, "paramsForm", null);
10430
- __decorate([
10431
- Input()
10432
- ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", null);
10433
9695
  HistoricalPixAccountComponent = __decorate([
10434
9696
  Component({
10435
9697
  // tslint:disable-next-line:component-selector
10436
9698
  selector: "c-historical-pix-account",
10437
- template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n [showField]=\"showFields\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div *ngIf=\"showFields || !showEditMode || !(hideFields | async)\" class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col *ngIf=\"showButtonView\" [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th *ngIf=\"showButtonView\" id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length && showButtonView\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"!isViewMode && actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"!isViewMode && actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n\n<!-- Template exlusivo para edi\u00E7\u00E3o de pix via modal-->\n<div *ngIf=\"!withSideBar && showEditMode && (hideFields | async)\" class=\"ui-g-12\">\n <!-- Bot\u00E3o Adicionar -->\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n id=\"btn-save\"\n label=\"{{ 'hcm.payroll.historical_pix_account_add' | translate}}\"\n priority=\"primary\"\n (onClick)=\"addPix()\">\n </s-button>\n </div>\n </div>\n\n <!-- Tabela -->\n <p-table #dataListPix sortField=\"percentage\"\n [columns]=\"cols\"\n [value]=\"addExistentHistoricData\"\n [pageLinks]=\"3\"\n [paginator]=\"true\"\n [responsive]=\"true\"\n [rows]=\"10\"\n [resetPageOnSort]=\"false\"\n [tableStyle]=\"{'margin-top': '2rem'}\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of cols\">\n {{ col.label }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item let-rowIndex=\"rowIndex\">\n <ng-container *ngIf=\"formGroupByRow[rowIndex]\" [formGroup]=\"formGroupByRow[rowIndex]\">\n <tr>\n <!-- Tipo de Chave -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.pixKeyType\" pEditableColumnField=\"pixKeyType\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <div style=\"width: 100%; position: relative;\">\n <p-autoComplete\n [suggestions]=\"suggestions\"\n (completeMethod)=\"filterPixKeyType($event)\"\n formControlName=\"pixKeyType\"\n [dropdown]=\"true\"\n (onSelect)=\"onPixKeyTypeChange($event, rowIndex)\"\n (onClear)=\"onPixKeyTypeClear(rowIndex)\"\n (ngModelChange)=\"onSyncValue('pixKeyType', rowIndex)\"\n field=\"value\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n appendTo=\"body\"\n [panelStyle]=\"{ maxWidth: '300px', width: '100%' }\"\n [inputStyle]=\"{ width: '100%' }\"\n ></p-autoComplete>\n\n <s-control-errors [control]=\"formGroupByRow[rowIndex]?.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 </ng-template>\n <ng-template pTemplate=\"output\">\n {{ item.pixKeyType?.value }}\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Chave Pix -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.pixKey\" pEditableColumnField=\"pixKey\"\n [ngClass]=\"{'required': item.pixKeyType.key !== 'BANK_ACCOUNT',\n 'disabled': item.pixKeyType && item.pixKeyType.key === 'BANK_ACCOUNT'\n }\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <ng-container [ngSwitch]=\"item.pixKeyType.key\">\n <input *ngSwitchCase=\"'TELEPHONE'\"\n only-number\n pInputText\n type=\"text\"\n formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n maxlength=\"15\"\n placeholder=\"(__) ____-____\" />\n\n <input *ngSwitchCase=\"'CPF'\"\n type=\"text\"\n pInputText\n formControlName=\"pixKey\"\n maxlength=\"14\"\n placeholder=\"___.___.___-__\"\n (input)=\"onPixKeyInput($event, rowIndex)\"\n (blur)=\"onBlurPixCpfAndCnpj(rowIndex)\"\n (keyup)=\"cpfMask($event)\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\" />\n\n <input *ngSwitchCase=\"'CNPJ'\"\n type=\"text\"\n pInputText\n formControlName=\"pixKey\"\n maxlength=\"18\"\n placeholder=\"___.___.___/____-__\"\n (input)=\"onPixKeyInput($event, rowIndex)\"\n (blur)=\"onBlurPixCpfAndCnpj(rowIndex)\"\n (keyup)=\"cnpjMask($event)\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\" />\n\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText\n type=\"email\"\n formControlName=\"pixKey\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n placeholder=\"{{ 'hcm.payroll.employees_addition_email' | translate }}\" />\n\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\"\n pInputText\n formControlName=\"pixKey\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n [disabled]=\"true\" />\n\n <input *ngSwitchDefault\n pInputText\n type=\"text\"\n formControlName=\"pixKey\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n maxlength=\"100\" />\n </ng-container>\n\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\"\n [control]=\"formGroupByRow[rowIndex]?.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: formGroupByRow[rowIndex]?.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 </ng-template>\n <ng-template pTemplate=\"output\">\n {{ getFormattedPixKey(item.pixKeyType?.key, item.pixKey) }}\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Percentual -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.percentage\" pEditableColumnField=\"percentage\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText type=\"number\"\n formControlName=\"percentage\"\n (ngModelChange)=\"onSyncValue('percentage', rowIndex)\"\n >\n <s-control-errors\n [control]=\"formGroupByRow[rowIndex]?.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 </ng-template>\n <ng-template pTemplate=\"output\">\n {{ item.percentage?.toFixed(2).replace('.', ',') }}%\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Bot\u00E3o de excluir -->\n <td>\n <s-button\n id=\"btn-delete\"\n label=\"{{ 'hcm.payroll.delete' | translate }}\"\n priority=\"default\"\n (onClick)=\"deletePix(rowIndex)\">\n </s-button>\n </td>\n </tr>\n </ng-container>\n </ng-template>\n </p-table>\n</div>\n",
9699
+ template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar && !isViewMode\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n [permitsEditBankAccountForm]=\"permitsEditBankAccount\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col *ngIf=\"!isViewMode\" [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th *ngIf=\"!isViewMode\" id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length && !isViewMode\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n",
10438
9700
  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}"]
10439
9701
  })
10440
9702
  ], HistoricalPixAccountComponent);
10441
9703
  return HistoricalPixAccountComponent;
10442
- }(HistoricakPixAccountBase));
10443
-
10444
- var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10445
- __extends(HistoricalPixAccountFormComponent, _super);
10446
- function HistoricalPixAccountFormComponent(formBuilder, cd, sharedStateService) {
10447
- var _this = _super.call(this, formBuilder) || this;
10448
- _this.cd = cd;
10449
- _this.sharedStateService = sharedStateService;
10450
- _this.withSideBar = true;
10451
- _this.isEditMode = false;
10452
- _this.showField = false;
10453
- _this.visibleChange = new EventEmitter();
10454
- _this.pixAccountItemToList = new EventEmitter();
10455
- _this.ngUnsubscribe = new Subject();
10456
- _this.labelBtnAdd = "hcm.payroll.employees_add";
10457
- _this.visibleBtnSave = true;
10458
- _this.isView = false;
10459
- _this.isShowPixKeyFieldValidatorMessage = false;
10460
- _this.hideFields = _this.sharedStateService.hideField$;
10461
- _this.registerSubjects();
10462
- return _this;
10463
- }
10464
- HistoricalPixAccountFormComponent.prototype.ngOnInit = function () { };
9704
+ }());
9705
+
9706
+ var GenericValidator = /** @class */ (function () {
9707
+ function GenericValidator() {
9708
+ }
9709
+ /**
9710
+ * Valida o CEI (Cadastro específico de INSS) digitado.
9711
+ */
9712
+ GenericValidator.isValidCei = function (control) {
9713
+ var cei = control.value;
9714
+ if (!cei)
9715
+ return null;
9716
+ else if (cei.length != 11)
9717
+ return null;
9718
+ var multiplicadorBase = "3298765432";
9719
+ var total = 0;
9720
+ var resto = 0;
9721
+ var multiplicando = 0;
9722
+ var multiplicador = 0;
9723
+ if (cei.length !== 11 ||
9724
+ cei === "00000000000" ||
9725
+ cei === "11111111111" ||
9726
+ cei === "22222222222" ||
9727
+ cei === "33333333333" ||
9728
+ cei === "44444444444" ||
9729
+ cei === "55555555555" ||
9730
+ cei === "66666666666" ||
9731
+ cei === "77777777777" ||
9732
+ cei === "88888888888" ||
9733
+ cei === "99999999999")
9734
+ return { invalidCei: true };
9735
+ else {
9736
+ for (var i = 0; i < 10; i++) {
9737
+ multiplicando = parseInt(cei.substring(i, i + 1), 10);
9738
+ multiplicador = parseInt(multiplicadorBase.substring(i, i + 1), 10);
9739
+ total += multiplicando * multiplicador;
9740
+ }
9741
+ resto = 11 - (total % 11);
9742
+ resto = resto === 10 || resto === 11 ? 0 : resto;
9743
+ var digito = parseInt("" + cei.charAt(10), 10);
9744
+ return resto === digito ? null : { invalidCei: true };
9745
+ }
9746
+ };
9747
+ /**
9748
+ * Valida se o CPF é valido. Deve-se ser informado o cpf sem máscara.
9749
+ */
9750
+ GenericValidator.isValidCpf = function (control) {
9751
+ var cpf = control.value;
9752
+ if (cpf) {
9753
+ var numbers = void 0, digits = void 0, sum = void 0, i = void 0, result = void 0, equalDigits = void 0;
9754
+ equalDigits = 1;
9755
+ if (cpf.length < 11) {
9756
+ return null;
9757
+ }
9758
+ for (i = 0; i < cpf.length - 1; i++) {
9759
+ if (cpf.charAt(i) !== cpf.charAt(i + 1)) {
9760
+ equalDigits = 0;
9761
+ break;
9762
+ }
9763
+ }
9764
+ if (!equalDigits) {
9765
+ numbers = cpf.substring(0, 9);
9766
+ digits = cpf.substring(9);
9767
+ sum = 0;
9768
+ for (i = 10; i > 1; i--) {
9769
+ sum += numbers.charAt(10 - i) * i;
9770
+ }
9771
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9772
+ if (result !== Number(digits.charAt(0))) {
9773
+ return { cpfNotValid: true };
9774
+ }
9775
+ numbers = cpf.substring(0, 10);
9776
+ sum = 0;
9777
+ for (i = 11; i > 1; i--) {
9778
+ sum += numbers.charAt(11 - i) * i;
9779
+ }
9780
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9781
+ if (result !== Number(digits.charAt(1))) {
9782
+ return { cpfNotValid: true };
9783
+ }
9784
+ return null;
9785
+ }
9786
+ else {
9787
+ return { cpfNotValid: true };
9788
+ }
9789
+ }
9790
+ return null;
9791
+ };
9792
+ /**
9793
+ * Valida se o CNPJ é valido. Deve-se ser informado o cpf sem máscara.
9794
+ */
9795
+ GenericValidator.isValidCnpj = function (control) {
9796
+ var cnpj = control.value;
9797
+ if (cnpj) {
9798
+ var size = void 0, numbers = void 0, digits = void 0, sum = void 0, pos = void 0, result = void 0;
9799
+ cnpj = cnpj.replace(/[^\d]+/g, '');
9800
+ if (cnpj.length !== 14) {
9801
+ return null;
9802
+ }
9803
+ // Elimina CNPJs invalidos conhecidos
9804
+ if (cnpj === '00000000000000' ||
9805
+ cnpj === '11111111111111' ||
9806
+ cnpj === '22222222222222' ||
9807
+ cnpj === '33333333333333' ||
9808
+ cnpj === '44444444444444' ||
9809
+ cnpj === '55555555555555' ||
9810
+ cnpj === '66666666666666' ||
9811
+ cnpj === '77777777777777' ||
9812
+ cnpj === '88888888888888' ||
9813
+ cnpj === '99999999999999') {
9814
+ return { cnpjNotValid: true };
9815
+ }
9816
+ // Valida DVs
9817
+ size = cnpj.length - 2;
9818
+ numbers = cnpj.substring(0, size);
9819
+ digits = cnpj.substring(size);
9820
+ sum = 0;
9821
+ pos = size - 7;
9822
+ for (var i = size; i >= 1; i--) {
9823
+ sum += numbers.charAt(size - i) * pos--;
9824
+ if (pos < 2) {
9825
+ pos = 9;
9826
+ }
9827
+ }
9828
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9829
+ if (result !== Number(digits.charAt(0))) {
9830
+ return { cnpjNotValid: true };
9831
+ }
9832
+ size = size + 1;
9833
+ numbers = cnpj.substring(0, size);
9834
+ sum = 0;
9835
+ pos = size - 7;
9836
+ for (var i = size; i >= 1; i--) {
9837
+ sum += numbers.charAt(size - i) * pos--;
9838
+ if (pos < 2) {
9839
+ pos = 9;
9840
+ }
9841
+ }
9842
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9843
+ if (result !== Number(digits.charAt(1))) {
9844
+ return { cnpjNotValid: true };
9845
+ }
9846
+ return null;
9847
+ }
9848
+ return null;
9849
+ };
9850
+ /**
9851
+ * Válida o número de telefone da chave PIX.
9852
+ */
9853
+ GenericValidator.isValidPhoneNumber = function (control) {
9854
+ var cellPhoneKey = control.value || '';
9855
+ cellPhoneKey = cellPhoneKey.replace(/[\s()-]/g, '');
9856
+ var regexNumberTelephone = /^[1-9][\d]{1,2}\d{8,10}$/;
9857
+ var isValidNumberTelephone = regexNumberTelephone.test(cellPhoneKey);
9858
+ return isValidNumberTelephone ? null : { invalidPhoneNumber: true };
9859
+ };
9860
+ /**
9861
+ * Valida o email da chave PIX.
9862
+ */
9863
+ GenericValidator.isValidEmail = function (control) {
9864
+ var emailKey = control.value;
9865
+ var regexValidEmail = /^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/;
9866
+ var isValidEmail = regexValidEmail.test(emailKey);
9867
+ return isValidEmail ? null : { invalidEmail: true };
9868
+ };
9869
+ return GenericValidator;
9870
+ }());
9871
+
9872
+ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9873
+ function HistoricalPixAccountFormComponent(formBuilder, cd) {
9874
+ this.formBuilder = formBuilder;
9875
+ this.cd = cd;
9876
+ this.withSideBar = true;
9877
+ this.isEditMode = false;
9878
+ this.paramsForm = new FormGroup({});
9879
+ this.defaultCpfNumber = null;
9880
+ this.permitsEditBankAccountForm = false;
9881
+ this.visibleChange = new EventEmitter();
9882
+ this.pixAccountItemToList = new EventEmitter();
9883
+ this.ngUnsubscribe = new Subject();
9884
+ this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
9885
+ this.labelBtnAdd = "hcm.payroll.employees_add";
9886
+ this.maxValuePercentage = 100.00;
9887
+ this.visibleBtnSave = true;
9888
+ this.isView = false;
9889
+ this.isShowPixKeyFieldValidatorMessage = false;
9890
+ this.createFormGroup();
9891
+ this.registerSubjects();
9892
+ }
9893
+ HistoricalPixAccountFormComponent.prototype.ngOnInit = function () {
9894
+ };
9895
+ HistoricalPixAccountFormComponent.prototype.ngDoCheck = function () {
9896
+ if (this.pixAccountFormGroup && this.pixKeyType === "BANK_ACCOUNT") {
9897
+ var pixKeyControl = this.pixAccountFormGroup.get("pixKey");
9898
+ if (pixKeyControl && !pixKeyControl.disabled) {
9899
+ pixKeyControl.disable();
9900
+ }
9901
+ }
9902
+ };
10465
9903
  HistoricalPixAccountFormComponent.prototype.ngAfterViewInit = function () {
10466
9904
  this.cd.detectChanges();
10467
9905
  };
@@ -10469,7 +9907,38 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10469
9907
  this.ngUnsubscribe.next(true);
10470
9908
  this.ngUnsubscribe.unsubscribe();
10471
9909
  };
10472
- HistoricalPixAccountFormComponent.prototype.registerSubjects = function () { };
9910
+ HistoricalPixAccountFormComponent.prototype.registerSubjects = function () {
9911
+ };
9912
+ HistoricalPixAccountFormComponent.prototype.createFormGroup = function () {
9913
+ this.pixAccountFormGroup = this.formBuilder.group({
9914
+ id: this.formBuilder.control(null),
9915
+ index: this.formBuilder.control(null),
9916
+ employee: this.formBuilder.control({ value: { tableId: null }, disabled: true }),
9917
+ dateChange: this.formBuilder.control(null),
9918
+ pixKeyType: this.formBuilder.control(null, Validators.required),
9919
+ pixKey: this.formBuilder.control(null),
9920
+ percentage: this.formBuilder.control(null, Validators.compose(__spread(this.initialValidatorOfPercentage, [
9921
+ Validators.max(this.maxValuePercentage),
9922
+ ]))),
9923
+ externalId: this.formBuilder.control(null),
9924
+ customFields: this.formBuilder.control(null),
9925
+ });
9926
+ };
9927
+ HistoricalPixAccountFormComponent.prototype.onChangePixKeyType = function (item) {
9928
+ if (item.key) {
9929
+ this.pixKeyType = item.key;
9930
+ this.isShowPixKeyFieldValidatorMessage = true;
9931
+ this.pixAccountFormGroup.get("pixKey").reset();
9932
+ this.setPixKeyValidators(true);
9933
+ if (item.key === "CPF") {
9934
+ this.setDefaultCpfPixKey();
9935
+ }
9936
+ }
9937
+ };
9938
+ HistoricalPixAccountFormComponent.prototype.onClearPixKeyType = function () {
9939
+ this.isShowPixKeyFieldValidatorMessage = false;
9940
+ this.pixAccountFormGroup.get("pixKey").reset();
9941
+ };
10473
9942
  Object.defineProperty(HistoricalPixAccountFormComponent.prototype, "visible", {
10474
9943
  get: function () {
10475
9944
  return this._visible;
@@ -10508,8 +9977,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10508
9977
  });
10509
9978
  HistoricalPixAccountFormComponent.prototype.formatPixKeyTelephoneNumber = function () {
10510
9979
  if (this.pixKeyType === "TELEPHONE") {
10511
- var pixKeyCtrl = this.pixAccountFormGroup.get("pixKey");
10512
- pixKeyCtrl.setValue(FormatUtilsService.getFormattedTelephoneNumber(pixKeyCtrl.value));
9980
+ this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
10513
9981
  }
10514
9982
  };
10515
9983
  HistoricalPixAccountFormComponent.prototype.convertDTOToShowWithCustomFields = function (data) {
@@ -10521,14 +9989,14 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10521
9989
  this.visibleBtnSave = isEditMode;
10522
9990
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
10523
9991
  this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
10524
- this.setPixKeyValidators(isEditMode, this.pixAccountFormGroup);
9992
+ this.setPixKeyValidators(isEditMode);
10525
9993
  this.formatPixKeyTelephoneNumber();
10526
9994
  }
10527
9995
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
10528
9996
  "pixKeyType",
10529
9997
  "pixKey",
10530
9998
  "percentage",
10531
- "customFields"
9999
+ "customFields",
10532
10000
  ], []);
10533
10001
  };
10534
10002
  HistoricalPixAccountFormComponent.prototype.close = function () {
@@ -10536,11 +10004,13 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10536
10004
  this.visible = false;
10537
10005
  };
10538
10006
  HistoricalPixAccountFormComponent.prototype.addItem = function () {
10007
+ this.pixAccountFormGroup.updateValueAndValidity();
10008
+ verifyValidationsForm.call(this.pixAccountFormGroup);
10539
10009
  if (this.pixAccountFormGroup.valid) {
10540
10010
  if (this.employeeId) {
10541
10011
  this.pixAccountFormGroup.get("employee").setValue({
10542
10012
  tableId: this.employeeId,
10543
- name: ""
10013
+ name: "",
10544
10014
  });
10545
10015
  }
10546
10016
  this.pixAccountItemToList.emit(this.pixAccountFormGroup.getRawValue());
@@ -10572,10 +10042,14 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10572
10042
  return {
10573
10043
  prefix: "",
10574
10044
  thousands: this.currency.thousandsSeparator,
10575
- decimal: this.currency.decimalSeparator
10045
+ decimal: this.currency.decimalSeparator,
10576
10046
  };
10577
10047
  };
10578
10048
  Object.defineProperty(HistoricalPixAccountFormComponent.prototype, "getListPixAccount", {
10049
+ /**
10050
+ * O Input que recebe a lista do component pai e chama o método de validação passando a lista recebida.
10051
+ * @param pixAccountList
10052
+ */
10579
10053
  set: function (pixAccountList) {
10580
10054
  if (pixAccountList) {
10581
10055
  this.setValidatorsAccordingList(pixAccountList, null, false);
@@ -10587,6 +10061,85 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10587
10061
  enumerable: true,
10588
10062
  configurable: true
10589
10063
  });
10064
+ /**
10065
+ * Recebe a lista de registros já inseridos na tabela adiciona em uma variável os valores que serão usados para
10066
+ * a validação dos campos "percentage" e "pixAccount".
10067
+ * Quando tem index significa que está em uma edição, os valores na posição do registro da edição (index) não serão adicionados
10068
+ * no array de comparação dos validators.
10069
+ * @param pixAccountList
10070
+ * @param index
10071
+ */
10072
+ HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index, isEditMode) {
10073
+ if (index === void 0) { index = null; }
10074
+ if (isEditMode === void 0) { isEditMode = true; }
10075
+ this.pixAccountList = pixAccountList && pixAccountList.length ? __spread(pixAccountList) : [];
10076
+ var percentageIncluded = [];
10077
+ if (this.pixAccountList && this.pixAccountList.length) {
10078
+ this.pixAccountList.filter(function (field, key) {
10079
+ if (field["percentage"] && key != index) {
10080
+ percentageIncluded.push(field["percentage"]);
10081
+ }
10082
+ });
10083
+ }
10084
+ this.beforeSetPixKeyTypeValidator();
10085
+ this.setPixKeyValidators(isEditMode);
10086
+ this.validatePercentageValid(percentageIncluded);
10087
+ };
10088
+ /**
10089
+ * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
10090
+ */
10091
+ HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode) {
10092
+ var genericPixKey = this.pixAccountFormGroup.get("pixKey");
10093
+ if (this.pixKeyType) {
10094
+ switch (this.pixKeyType) {
10095
+ case "TELEPHONE":
10096
+ genericPixKey.setValidators(Validators.compose([
10097
+ Validators.required, GenericValidator.isValidPhoneNumber,
10098
+ ]));
10099
+ break;
10100
+ case "EMAIL":
10101
+ genericPixKey.setValidators(Validators.compose([
10102
+ Validators.required, GenericValidator.isValidEmail,
10103
+ ]));
10104
+ break;
10105
+ case "CPF":
10106
+ genericPixKey.setValidators(Validators.compose([
10107
+ Validators.required, GenericValidator.isValidCpf,
10108
+ ]));
10109
+ break;
10110
+ case "CNPJ":
10111
+ genericPixKey.setValidators(Validators.compose([
10112
+ Validators.required, GenericValidator.isValidCnpj,
10113
+ ]));
10114
+ break;
10115
+ case "RANDOM_KEY":
10116
+ genericPixKey.setValidators(Validators.required);
10117
+ break;
10118
+ default:
10119
+ genericPixKey.setValidators(null);
10120
+ break;
10121
+ }
10122
+ if (isEditMode) {
10123
+ genericPixKey.enable();
10124
+ }
10125
+ genericPixKey.updateValueAndValidity();
10126
+ }
10127
+ };
10128
+ /**
10129
+ * Este método calcula as parcentagens que já foram inseridas, e seta a diferença para chegar em
10130
+ * 100% na validação do campo "percentage" como um novo maxValue;
10131
+ * @param listValue
10132
+ */
10133
+ HistoricalPixAccountFormComponent.prototype.validatePercentageValid = function (listValue) {
10134
+ var percentage = this.pixAccountFormGroup.get("percentage");
10135
+ this.maxValuePercentage = listValue
10136
+ .reduce(function (currentValue, total) { return currentValue - total; }, 100.00);
10137
+ percentage
10138
+ .setValidators(Validators.compose(__spread(this.initialValidatorOfPercentage, [
10139
+ Validators.max(this.maxValuePercentage),
10140
+ ])));
10141
+ percentage.updateValueAndValidity();
10142
+ };
10590
10143
  Object.defineProperty(HistoricalPixAccountFormComponent.prototype, "isViewMode", {
10591
10144
  set: function (condition) {
10592
10145
  this.isView = !!(condition && !this.withSideBar);
@@ -10597,24 +10150,59 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10597
10150
  enumerable: true,
10598
10151
  configurable: true
10599
10152
  });
10600
- Object.defineProperty(HistoricalPixAccountFormComponent.prototype, "paramsForm", {
10601
- set: function (value) {
10602
- this._paramsForm = value;
10603
- },
10604
- enumerable: true,
10605
- configurable: true
10606
- });
10607
- Object.defineProperty(HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", {
10608
- set: function (value) {
10609
- this._defaultCpfNumber = value;
10610
- },
10611
- enumerable: true,
10612
- configurable: true
10613
- });
10153
+ HistoricalPixAccountFormComponent.prototype.phoneMask = function (event) {
10154
+ FormatUtilsService.formatTelephoneInputEvent(event);
10155
+ };
10156
+ HistoricalPixAccountFormComponent.prototype.setDefaultCpfPixKey = function () {
10157
+ if (this.defaultCpfNumber) {
10158
+ this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);
10159
+ }
10160
+ else {
10161
+ var sheetDocument = this.paramsForm.get("sheetDocument");
10162
+ if (sheetDocument) {
10163
+ var cpf = sheetDocument.get("cpfNumber").value;
10164
+ if (cpf) {
10165
+ this.pixAccountFormGroup.get("pixKey").setValue(cpf);
10166
+ }
10167
+ }
10168
+ }
10169
+ };
10170
+ HistoricalPixAccountFormComponent.prototype.beforeSetPixKeyTypeValidator = function () {
10171
+ var pixKeyType = this.pixAccountFormGroup.get("pixKeyType");
10172
+ if (this.pixAccountList && this.pixAccountList.length && pixKeyType) {
10173
+ pixKeyType
10174
+ .setValidators(Validators.compose([
10175
+ Validators.required,
10176
+ this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList),
10177
+ ]));
10178
+ }
10179
+ else {
10180
+ pixKeyType.setValidators(Validators.required);
10181
+ }
10182
+ };
10183
+ HistoricalPixAccountFormComponent.prototype.validateDuplicatePixKeyTypeBankAccount = function (listCompare) {
10184
+ var _this = this;
10185
+ return function (control) {
10186
+ var value = control && control.value;
10187
+ var condition = false;
10188
+ listCompare.filter(function (field) {
10189
+ if (value) {
10190
+ if (field["pixKeyType"].key === 'BANK_ACCOUNT' && value.key === field["pixKeyType"].key) {
10191
+ return condition = true;
10192
+ }
10193
+ }
10194
+ });
10195
+ if (condition && !_this.permitsEditBankAccountForm) {
10196
+ return { pixKeyTypeBankAccountDuplicate: true };
10197
+ }
10198
+ else {
10199
+ return null;
10200
+ }
10201
+ };
10202
+ };
10614
10203
  HistoricalPixAccountFormComponent.ctorParameters = function () { return [
10615
10204
  { type: FormBuilder },
10616
- { type: ChangeDetectorRef },
10617
- { type: SharedStateService }
10205
+ { type: ChangeDetectorRef }
10618
10206
  ]; };
10619
10207
  __decorate([
10620
10208
  ViewChild(CustomFieldsComponent$1, { static: true })
@@ -10636,7 +10224,13 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10636
10224
  ], HistoricalPixAccountFormComponent.prototype, "isEditMode", void 0);
10637
10225
  __decorate([
10638
10226
  Input()
10639
- ], HistoricalPixAccountFormComponent.prototype, "showField", void 0);
10227
+ ], HistoricalPixAccountFormComponent.prototype, "paramsForm", void 0);
10228
+ __decorate([
10229
+ Input()
10230
+ ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
10231
+ __decorate([
10232
+ Input()
10233
+ ], HistoricalPixAccountFormComponent.prototype, "permitsEditBankAccountForm", void 0);
10640
10234
  __decorate([
10641
10235
  Output()
10642
10236
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -10655,21 +10249,32 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
10655
10249
  __decorate([
10656
10250
  Input()
10657
10251
  ], HistoricalPixAccountFormComponent.prototype, "isViewMode", null);
10658
- __decorate([
10659
- Input()
10660
- ], HistoricalPixAccountFormComponent.prototype, "paramsForm", null);
10661
- __decorate([
10662
- Input()
10663
- ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", null);
10664
10252
  HistoricalPixAccountFormComponent = __decorate([
10665
10253
  Component({
10666
10254
  selector: "pix-account",
10667
- template: "<div id=\"main\">\n <form *ngIf=\"showField || !(hideFields | async)\" [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",
10255
+ 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",
10668
10256
  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}"]
10669
10257
  })
10670
10258
  ], HistoricalPixAccountFormComponent);
10671
10259
  return HistoricalPixAccountFormComponent;
10672
- }(HistoricakPixAccountBase));
10260
+ }());
10261
+
10262
+ var HistoricalPixAccountService = /** @class */ (function () {
10263
+ function HistoricalPixAccountService(http) {
10264
+ this.http = http;
10265
+ }
10266
+ HistoricalPixAccountService.prototype.query = function (path, body, service) {
10267
+ if (service === void 0) { service = ServiceType.PAYROLL; }
10268
+ return this.http.query(path, body, service);
10269
+ };
10270
+ HistoricalPixAccountService.ctorParameters = function () { return [
10271
+ { type: HttpClientService }
10272
+ ]; };
10273
+ HistoricalPixAccountService = __decorate([
10274
+ Injectable()
10275
+ ], HistoricalPixAccountService);
10276
+ return HistoricalPixAccountService;
10277
+ }());
10673
10278
 
10674
10279
  var HistoricalPixAccountModule = /** @class */ (function () {
10675
10280
  function HistoricalPixAccountModule() {
@@ -10699,8 +10304,6 @@ var HistoricalPixAccountModule = /** @class */ (function () {
10699
10304
  CustomFieldsModule$1,
10700
10305
  PanelModule,
10701
10306
  InputMaskModule,
10702
- DropdownModule,
10703
- TabViewModule,
10704
10307
  ],
10705
10308
  declarations: [HistoricalPixAccountComponent, HistoricalPixAccountFormComponent],
10706
10309
  providers: [HistoricalPixAccountService, ConfirmationService],
@@ -10743,7 +10346,7 @@ var HistoricalPixAccountListService = /** @class */ (function () {
10743
10346
 
10744
10347
  var moment$e = moment_;
10745
10348
  var HistoricalPixAccountListComponent = /** @class */ (function () {
10746
- function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService, sharedStateService) {
10349
+ function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10747
10350
  this.confirmationService = confirmationService;
10748
10351
  this.translateService = translateService;
10749
10352
  this.activatedRoute = activatedRoute;
@@ -10751,14 +10354,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10751
10354
  this.router = router;
10752
10355
  this.messageService = messageService;
10753
10356
  this.historicalPixAccountListService = historicalPixAccountListService;
10754
- this.sharedStateService = sharedStateService;
10755
10357
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10756
10358
  this.keyPayload = "historicalEmployeePix";
10757
10359
  this.withSidebar = true;
10758
10360
  this.isOnlyView = new EventEmitter();
10759
10361
  this.isOnlyEdit = new EventEmitter();
10760
10362
  this.enableView = new EventEmitter();
10761
- this.isEditJudicialDependentPix = new EventEmitter();
10363
+ this.enableEdit = new EventEmitter();
10762
10364
  this.ngUnsubscribe = new Subject();
10763
10365
  this.loading = true;
10764
10366
  this.columns = [
@@ -10778,7 +10380,6 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10778
10380
  HistoricalPixAccountListComponent.prototype.ngOnDestroy = function () {
10779
10381
  this.ngUnsubscribe.next();
10780
10382
  this.ngUnsubscribe.complete();
10781
- this.unsubscribe();
10782
10383
  };
10783
10384
  HistoricalPixAccountListComponent.prototype.ngAfterViewInit = function () {
10784
10385
  this.cd.detectChanges();
@@ -10798,9 +10399,6 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10798
10399
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10799
10400
  command: function () {
10800
10401
  if (_this.isAllowToViewHistorical) {
10801
- _this.sharedStateService.setHideField(true);
10802
- _this.sharedStateService.setShowButton(false);
10803
- _this.sharedStateService.setShowEditMode(false);
10804
10402
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10805
10403
  if (_this.withSidebar) {
10806
10404
  _this.isOnlyView.emit(true);
@@ -10809,7 +10407,6 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10809
10407
  });
10810
10408
  }
10811
10409
  else {
10812
- _this.sharedStateService.setSaveButton(false);
10813
10410
  _this.enableView.emit(dateChange);
10814
10411
  }
10815
10412
  }
@@ -10822,22 +10419,16 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10822
10419
  label: this.translateService.instant("hcm.payroll.edit"),
10823
10420
  command: function () {
10824
10421
  if (_this.isAllowToEditHistorical) {
10825
- _this.sharedStateService.setHideField(true);
10826
- _this.sharedStateService.setShowButton(false);
10827
- _this.sharedStateService.setShowEditMode(true);
10828
10422
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10829
10423
  if (_this.withSidebar) {
10424
+ _this.isOnlyView.emit(false);
10425
+ _this.isOnlyEdit.emit(true);
10830
10426
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10831
10427
  relativeTo: _this.activatedRoute,
10832
10428
  });
10833
- _this.sharedStateService.setShouldReloadWindowOnlyEditMode(true);
10834
10429
  }
10835
10430
  else {
10836
- setTimeout(function () {
10837
- _this.sharedStateService.triggerActiveValidatorsOnEditModalOpen();
10838
- });
10839
- _this.sharedStateService.setSaveButton(true);
10840
- _this.enableView.emit(dateChange);
10431
+ _this.enableEdit.emit(dateChange);
10841
10432
  }
10842
10433
  }
10843
10434
  else {
@@ -10922,24 +10513,6 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10922
10513
  this.lastRecord = payload[0];
10923
10514
  }
10924
10515
  };
10925
- HistoricalPixAccountListComponent.prototype.unsubscribe = function () {
10926
- if (this._subscription) {
10927
- this._subscription.unsubscribe();
10928
- }
10929
- };
10930
- Object.defineProperty(HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", {
10931
- set: function (subject) {
10932
- var _this = this;
10933
- this.unsubscribe();
10934
- if (subject) {
10935
- this._subscription = subject.subscribe(function (value) {
10936
- _this.sharedStateService.setHideField(value);
10937
- });
10938
- }
10939
- },
10940
- enumerable: true,
10941
- configurable: true
10942
- });
10943
10516
  Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10944
10517
  get: function () {
10945
10518
  return (this.permission["incluir"]);
@@ -10992,8 +10565,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10992
10565
  { type: ChangeDetectorRef },
10993
10566
  { type: Router },
10994
10567
  { type: MessageService },
10995
- { type: HistoricalPixAccountListService },
10996
- { type: SharedStateService }
10568
+ { type: HistoricalPixAccountListService }
10997
10569
  ]; };
10998
10570
  __decorate([
10999
10571
  ViewChild(CustomFieldsComponent$1, { static: false })
@@ -11019,9 +10591,6 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
11019
10591
  __decorate([
11020
10592
  Input()
11021
10593
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
11022
- __decorate([
11023
- Input()
11024
- ], HistoricalPixAccountListComponent.prototype, "hideField", void 0);
11025
10594
  __decorate([
11026
10595
  Output()
11027
10596
  ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
@@ -11033,10 +10602,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
11033
10602
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
11034
10603
  __decorate([
11035
10604
  Output()
11036
- ], HistoricalPixAccountListComponent.prototype, "isEditJudicialDependentPix", void 0);
11037
- __decorate([
11038
- Input()
11039
- ], HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", null);
10605
+ ], HistoricalPixAccountListComponent.prototype, "enableEdit", void 0);
11040
10606
  __decorate([
11041
10607
  Input()
11042
10608
  ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
@@ -11086,5 +10652,5 @@ var HistoricalPixAccountListModule = /** @class */ (function () {
11086
10652
  * Generated bundle index. Do not edit.
11087
10653
  */
11088
10654
 
11089
- export { AdmissionDraftSummaryComponent, AdmissionDraftSummaryModule, AdmissionDraftSummaryService, AutocompleteParametersService, BlockUiComponent, BlockUiModule, BreadcrumbComponent, BreadcrumbSDSModule, CNPJValidator, CPFValidator, CompanyIndicationType, CompanyIndicationsService, CompareType, ControlMessagesErrorComponent, ControlMessagesErrorModule, CoreDirectives, CoreFieldType, CustomFieldsComponent, CustomFieldsModule, DataListModule, DataListRestModule, DateValidator, DirectionEnumeration, EmployeeSelectorComponent, EmployeeSelectorModule, EmployeeSummaryComponent, EmployeeSummaryModule, EmployeeSummaryService, EntityODataParameter, ErrorPageComponent, ErrorPageModule, FieldValidatorComponent, FieldValidatorModule, FileUploadComponent, FileUploadCoreModule, FormComparatorService, FromToComponent, FromToModule, HistoricalBankAccountComponent, HistoricalBankAccountListComponent, HistoricalBankAccountListModule, HistoricalBankAccountListService, HistoricalBankAccountModule, HistoricalBankAccountService, HistoricalPixAccountComponent, HistoricalPixAccountListComponent, HistoricalPixAccountListModule, HistoricalPixAccountListService, HistoricalPixAccountModule, HistoricalPixAccountService, HttpClientService, HttpRequestType, ImageCropComponent, ImageCropModule, ImageCropService, InputDateComponent, InputDateModelComponent, InputDateModelModule, InputDateModule, InputRestAutoCompleteComponent, InputRestAutoCompleteEmployeeModelModule, InputRestAutoCompleteEmployeeModelService, InputRestAutoCompleteEmployeeModule, InputRestAutoCompleteEmployeeService, InputRestAutoCompleteEnumComponent, InputRestAutoCompleteEnumModule, InputRestAutoCompleteEnumService, InputRestAutoCompleteJobpositionComponent, InputRestAutoCompleteJobpositionModule, InputRestAutoCompleteJobpositionService, InputRestAutoCompleteModelEnumModule, InputRestAutoCompleteModelEnumService, InputRestAutoCompleteModelModule, InputRestAutoCompleteModelService, InputRestAutoCompleteModule, InputRestAutoCompleteService, IntegrationService, ListRestComponent, ListRestModule, LookupModule, LookupParametersService, MenuType, ModuleType, NameNotSpacesDirective, OnlyNumberDirective, Operators, ParameterType, PermissionService, ReportFormat, ReportService, ReportStage, ServiceType, ServicesModule, SharedStateService, SpinnerLoaderComponent, SpinnerLoaderModule, StringMethods, ToastComponent, ToastModule, ToastService, TypeAdmissionModule, TypeAdmissionServices, UsingType, WorkflowDataService, WorkflowIntegrator, WorkstationgroupLookupDto, WorkstationgroupLookupModule, _moment, assign, autoCompleteObjectForIdObject, clearValues, cnpjValidator, compareValues, configEnabledFields, containsMoreThanOneConsecutiveAbbreviation, containsMoreThanOneConsecutiveBlankSpace, containsMoreThanTwoRepeatedCharacters, containsSpecialCharacters, convertBooleanString, convertStringToBoolean, cpfValidator, firstNameIsValid, firstNameLengthIsValid, formatMoney, fullNameLengthIsValid, getAddWeekDaysBusiness, getFormat, getFormatDate, getMoment, getNowDate, getObjValids, getQueryParams, getWeekDaysBusiness, getYears, invertFieldDate, isBirthDayValid, isDateCompare, isDateExpirationBeforeExpeditionDate, isDateField, isDateSameOrAfterCurrentDate, isFullDate, isMax, isNumber, isObject, isRequired, isShallow, isValid, isValidDate, isValidPIS, mountCustomForSave, mountCustomForShow, mountCustomToSave, mountCustomToShow, mountGeneratedCustomToSave, ngCalendarFormat, notEmpty, numberOrZero, removeCharacteresSpecials, removeEmpty, removeWhiteSpaces, setCustonFields, setDisableField, setErrors, setRequired, setRequiredFields, setValidator, setValidatorsAndDisableFields, setValueCustom, stringMethods, sun, uiid, validateBirthDate, verifyValidationsForm, SharedModule as ɵa, DataListRestComponent as ɵb, DataListRestService as ɵc, FileUploadService as ɵd, InputRestAutoCompleteEmployeeComponent as ɵe, InputRestAutoCompleteEmployeeModelComponent as ɵf, InputRestAutoCompleteModelComponent as ɵg, InputRestAutoCompleteModelEnumComponent as ɵh, ListRestService as ɵi, DataListComponent as ɵj, DataListService as ɵk, LookupComponent as ɵl, LookupService as ɵm, WorkstationgroupLookupComponent as ɵn, AutocompleteService as ɵo, LookupService$1 as ɵp, HistoricalBankAccountFormComponent as ɵq, HistoricakPixAccountBase as ɵr, HistoricalPixAccountFormComponent as ɵs };
10655
+ export { AdmissionDraftSummaryComponent, AdmissionDraftSummaryModule, AdmissionDraftSummaryService, AutocompleteParametersService, BlockUiComponent, BlockUiModule, BreadcrumbComponent, BreadcrumbSDSModule, CNPJValidator, CPFValidator, CompanyIndicationType, CompanyIndicationsService, CompareType, ControlMessagesErrorComponent, ControlMessagesErrorModule, CoreDirectives, CoreFieldType, CustomFieldsComponent, CustomFieldsModule, DataListModule, DataListRestModule, DateValidator, DirectionEnumeration, EmployeeSelectorComponent, EmployeeSelectorModule, EmployeeSummaryComponent, EmployeeSummaryModule, EmployeeSummaryService, EntityODataParameter, ErrorPageComponent, ErrorPageModule, FieldValidatorComponent, FieldValidatorModule, FileUploadComponent, FileUploadCoreModule, FormComparatorService, FromToComponent, FromToModule, HistoricalBankAccountComponent, HistoricalBankAccountListComponent, HistoricalBankAccountListModule, HistoricalBankAccountListService, HistoricalBankAccountModule, HistoricalBankAccountService, HistoricalPixAccountComponent, HistoricalPixAccountListComponent, HistoricalPixAccountListModule, HistoricalPixAccountListService, HistoricalPixAccountModule, HistoricalPixAccountService, HttpClientService, HttpRequestType, ImageCropComponent, ImageCropModule, ImageCropService, InputDateComponent, InputDateModelComponent, InputDateModelModule, InputDateModule, InputRestAutoCompleteComponent, InputRestAutoCompleteEmployeeModelModule, InputRestAutoCompleteEmployeeModelService, InputRestAutoCompleteEmployeeModule, InputRestAutoCompleteEmployeeService, InputRestAutoCompleteEnumComponent, InputRestAutoCompleteEnumModule, InputRestAutoCompleteEnumService, InputRestAutoCompleteJobpositionComponent, InputRestAutoCompleteJobpositionModule, InputRestAutoCompleteJobpositionService, InputRestAutoCompleteModelEnumModule, InputRestAutoCompleteModelEnumService, InputRestAutoCompleteModelModule, InputRestAutoCompleteModelService, InputRestAutoCompleteModule, InputRestAutoCompleteService, IntegrationService, ListRestComponent, ListRestModule, LookupModule, LookupParametersService, MenuType, ModuleType, NameNotSpacesDirective, OnlyNumberDirective, Operators, ParameterType, PermissionService, ReportFormat, ReportService, ReportStage, ServiceType, ServicesModule, SpinnerLoaderComponent, SpinnerLoaderModule, StringMethods, ToastComponent, ToastModule, ToastService, TypeAdmissionModule, TypeAdmissionServices, UsingType, WorkflowDataService, WorkflowIntegrator, WorkstationgroupLookupDto, WorkstationgroupLookupModule, _moment, assign, autoCompleteObjectForIdObject, clearValues, cnpjValidator, compareValues, configEnabledFields, containsMoreThanOneConsecutiveAbbreviation, containsMoreThanOneConsecutiveBlankSpace, containsMoreThanTwoRepeatedCharacters, containsSpecialCharacters, convertBooleanString, convertStringToBoolean, cpfValidator, firstNameIsValid, firstNameLengthIsValid, formatMoney, fullNameLengthIsValid, getAddWeekDaysBusiness, getFormat, getFormatDate, getMoment, getNowDate, getObjValids, getQueryParams, getWeekDaysBusiness, getYears, invertFieldDate, isBirthDayValid, isDateCompare, isDateExpirationBeforeExpeditionDate, isDateField, isDateSameOrAfterCurrentDate, isFullDate, isMax, isNumber, isObject, isRequired, isShallow, isValid, isValidDate, isValidPIS, mountCustomForSave, mountCustomForShow, mountCustomToSave, mountCustomToShow, mountGeneratedCustomToSave, ngCalendarFormat, notEmpty, numberOrZero, removeCharacteresSpecials, removeEmpty, removeWhiteSpaces, setCustonFields, setDisableField, setErrors, setRequired, setRequiredFields, setValidator, setValidatorsAndDisableFields, setValueCustom, stringMethods, sun, uiid, validateBirthDate, verifyValidationsForm, SharedModule as ɵa, DataListRestComponent as ɵb, DataListRestService as ɵc, FileUploadService as ɵd, InputRestAutoCompleteEmployeeComponent as ɵe, InputRestAutoCompleteEmployeeModelComponent as ɵf, InputRestAutoCompleteModelComponent as ɵg, InputRestAutoCompleteModelEnumComponent as ɵh, ListRestService as ɵi, DataListComponent as ɵj, DataListService as ɵk, LookupComponent as ɵl, LookupService as ɵm, WorkstationgroupLookupComponent as ɵn, AutocompleteService as ɵo, LookupService$1 as ɵp, HistoricalBankAccountFormComponent as ɵq, HistoricalPixAccountFormComponent as ɵr };
11090
10656
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map