@senior-gestao-pessoas/payroll-core 9.5.0-9545686d-02ab-4a35-97b9-d32a01062eed → 9.5.0-da89cbba-6cbd-41d9-a633-e9f0b229e923

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 +465 -918
  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 -40
  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 -264
  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 +6 -44
  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 -306
  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 +6 -49
  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 +500 -913
  27. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  28. package/fesm5/senior-gestao-pessoas-payroll-core.js +462 -914
  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 -24
  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 -54
  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 -55
@@ -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.
@@ -8441,25 +8440,6 @@ class FormatUtilsService {
8441
8440
  }
8442
8441
  return null;
8443
8442
  }
8444
- /**
8445
- * Retorna o CPF formatado
8446
- * @param cpf CPF
8447
- */
8448
- static getFormattedCpfEdited(cpf) {
8449
- if (!cpf)
8450
- return '';
8451
- cpf = cpf.replace(/\D/g, '').slice(0, 11);
8452
- if (cpf.length > 9) {
8453
- cpf = cpf.replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/, "$1.$2.$3-$4");
8454
- }
8455
- else if (cpf.length > 6) {
8456
- cpf = cpf.replace(/^(\d{3})(\d{3})(\d{0,3})$/, "$1.$2.$3");
8457
- }
8458
- else if (cpf.length > 3) {
8459
- cpf = cpf.replace(/^(\d{3})(\d{0,3})$/, "$1.$2");
8460
- }
8461
- return cpf;
8462
- }
8463
8443
  /**
8464
8444
  * Retorna o CNPJ formatado
8465
8445
  * @param cnpj CNPJ
@@ -8475,28 +8455,6 @@ class FormatUtilsService {
8475
8455
  }
8476
8456
  return null;
8477
8457
  }
8478
- /**
8479
- * Retorna o CNPJ formatado
8480
- * @param cnpj CNPJ
8481
- */
8482
- static getFormattedCnpjEdited(cnpj) {
8483
- if (!cnpj)
8484
- return '';
8485
- cnpj = cnpj.replace(/\D/g, '').slice(0, 14);
8486
- if (cnpj.length > 12) {
8487
- cnpj = cnpj.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/, "$1.$2.$3/$4-$5");
8488
- }
8489
- else if (cnpj.length > 8) {
8490
- cnpj = cnpj.replace(/^(\d{2})(\d{3})(\d{3})(\d{0,4})$/, "$1.$2.$3/$4");
8491
- }
8492
- else if (cnpj.length > 5) {
8493
- cnpj = cnpj.replace(/^(\d{2})(\d{3})(\d{0,3})$/, "$1.$2.$3");
8494
- }
8495
- else if (cnpj.length > 2) {
8496
- cnpj = cnpj.replace(/^(\d{2})(\d{0,3})$/, "$1.$2");
8497
- }
8498
- return cnpj;
8499
- }
8500
8458
  /**
8501
8459
  * Retorna a mascara do CPF/CNPJ
8502
8460
  * @param key Valores possíveis são CPF ou CNPJ
@@ -8511,24 +8469,6 @@ class FormatUtilsService {
8511
8469
  return "";
8512
8470
  }
8513
8471
  }
8514
- /**
8515
- * Método para formatar o número de inscrição do cliente.
8516
- * @param subscriptionNumber
8517
- * @param pixKeyType
8518
- * @returns
8519
- */
8520
- static getFormattedSubscriptionNumber(subscriptionNumber, pixKeyType) {
8521
- if (!subscriptionNumber || !pixKeyType)
8522
- return subscriptionNumber;
8523
- switch (pixKeyType) {
8524
- case 'CNPJ':
8525
- return this.getFormattedCnpjEdited(subscriptionNumber);
8526
- case 'CPF':
8527
- return this.getFormattedCpfEdited(subscriptionNumber);
8528
- default:
8529
- return subscriptionNumber;
8530
- }
8531
- }
8532
8472
  /**
8533
8473
  * Metódo para formatar o número de telefone.
8534
8474
  * @param telephoneNumber String contendo o número de telefone.
@@ -8560,13 +8500,6 @@ class FormatUtilsService {
8560
8500
  }
8561
8501
  return tel;
8562
8502
  }
8563
- /**
8564
- * Metódo para formatar a porcentagem para 2 casas decimais.
8565
- * @param value Número a ser formatado.
8566
- */
8567
- static getFormattedPercentage(value) {
8568
- return parseFloat(value).toFixed(2).replace('.', ',') + '%';
8569
- }
8570
8503
  /**
8571
8504
  * Metódo para formatar o número de telefone de um campo Input.
8572
8505
  * @param event Evento do Input do campo de telefone.
@@ -8580,458 +8513,31 @@ class FormatUtilsService {
8580
8513
  event.target.value = FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
8581
8514
  }
8582
8515
  /**
8583
- * Formata o campo de input de CPF em tempo real.
8584
- * @param event Evento do input
8585
- */
8586
- static formatCpfInputEvent(event) {
8587
- let cpf = event.target.value;
8588
- // Permite apagar nos pontos sensíveis
8589
- if (event.keyCode === 8 && (cpf.length === 4 || cpf.length === 8 || cpf.length === 12)) {
8590
- return;
8591
- }
8592
- event.target.value = FormatUtilsService.getFormattedCpfEdited(cpf);
8593
- }
8594
- /**
8595
- * Formata o campo de input de CNPJ em tempo real.
8596
- * @param event Evento do input
8597
- */
8598
- static formatCnpjInputEvent(event) {
8599
- let cnpj = event.target.value;
8600
- // Permite apagar nos pontos sensíveis
8601
- if (event.keyCode === 8 && (cnpj.length === 3 || cnpj.length === 7 || cnpj.length === 11 || cnpj.length === 16)) {
8602
- return;
8603
- }
8604
- event.target.value = FormatUtilsService.getFormattedCnpjEdited(cnpj);
8605
- }
8606
- }
8607
-
8608
- let SharedStateService = class SharedStateService {
8609
- constructor() {
8610
- this.hideFieldSubject = new BehaviorSubject(true);
8611
- this.hideField$ = this.hideFieldSubject.asObservable();
8612
- this.showButtonSubject = new BehaviorSubject(true);
8613
- this.showButton$ = this.showButtonSubject.asObservable();
8614
- this.saveButtonSubject = new BehaviorSubject(true);
8615
- this.saveButton$ = this.saveButtonSubject.asObservable();
8616
- this.showEditMode = new BehaviorSubject(true);
8617
- this.showEditMode$ = this.showEditMode.asObservable();
8618
- this.activeValidatorsOnEditModalOpen = new Subject();
8619
- this.activeValidatorsOnEditModalOpen$ = this.activeValidatorsOnEditModalOpen.asObservable();
8620
- this.shouldReloadWindowOnlyEditMode = new BehaviorSubject(false);
8621
- this.shouldReloadWindowOnlyEditMode$ = this.shouldReloadWindowOnlyEditMode.asObservable();
8622
- this.hideBtnAddForViewMode = new BehaviorSubject(false);
8623
- this.hideBtnAddForViewMode$ = this.hideBtnAddForViewMode.asObservable();
8624
- }
8625
- setHideField(value) {
8626
- this.hideFieldSubject.next(value);
8627
- }
8628
- setShowButton(value) {
8629
- this.showButtonSubject.next(value);
8630
- }
8631
- setSaveButton(value) {
8632
- this.saveButtonSubject.next(value);
8633
- }
8634
- setShowEditMode(value) {
8635
- this.showEditMode.next(value);
8636
- }
8637
- setShouldReloadWindowOnlyEditMode(value) {
8638
- this.shouldReloadWindowOnlyEditMode.next(value);
8639
- }
8640
- triggerActiveValidatorsOnEditModalOpen() {
8641
- this.activeValidatorsOnEditModalOpen.next();
8642
- }
8643
- setHideBtnAddForViewMode(value) {
8644
- this.hideBtnAddForViewMode.next(value);
8645
- }
8646
- resetHideField() {
8647
- this.hideFieldSubject.next(true);
8648
- }
8649
- };
8650
- SharedStateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function SharedStateService_Factory() { return new SharedStateService(); }, token: SharedStateService, providedIn: "root" });
8651
- SharedStateService = __decorate([
8652
- Injectable({
8653
- providedIn: 'root',
8654
- })
8655
- ], SharedStateService);
8656
-
8657
- class GenericValidator {
8658
- constructor() { }
8659
- /**
8660
- * Valida o CEI (Cadastro específico de INSS) digitado.
8661
- */
8662
- static isValidCei(control) {
8663
- const cei = control.value;
8664
- if (!cei)
8665
- return null;
8666
- else if (cei.length != 11)
8667
- return null;
8668
- const multiplicadorBase = "3298765432";
8669
- let total = 0;
8670
- let resto = 0;
8671
- let multiplicando = 0;
8672
- let multiplicador = 0;
8673
- if (cei.length !== 11 ||
8674
- cei === "00000000000" ||
8675
- cei === "11111111111" ||
8676
- cei === "22222222222" ||
8677
- cei === "33333333333" ||
8678
- cei === "44444444444" ||
8679
- cei === "55555555555" ||
8680
- cei === "66666666666" ||
8681
- cei === "77777777777" ||
8682
- cei === "88888888888" ||
8683
- cei === "99999999999")
8684
- return { invalidCei: true };
8685
- else {
8686
- for (let i = 0; i < 10; i++) {
8687
- multiplicando = parseInt(cei.substring(i, i + 1), 10);
8688
- multiplicador = parseInt(multiplicadorBase.substring(i, i + 1), 10);
8689
- total += multiplicando * multiplicador;
8690
- }
8691
- resto = 11 - (total % 11);
8692
- resto = resto === 10 || resto === 11 ? 0 : resto;
8693
- const digito = parseInt("" + cei.charAt(10), 10);
8694
- return resto === digito ? null : { invalidCei: true };
8695
- }
8696
- }
8697
- /**
8698
- * Valida se o CPF é valido. Deve-se ser informado o cpf sem máscara.
8699
- */
8700
- static isValidCpf(control) {
8701
- const cpf = control.value;
8702
- if (cpf) {
8703
- let numbers, digits, sum, i, result, equalDigits;
8704
- equalDigits = 1;
8705
- if (cpf.length < 11) {
8706
- return null;
8707
- }
8708
- for (i = 0; i < cpf.length - 1; i++) {
8709
- if (cpf.charAt(i) !== cpf.charAt(i + 1)) {
8710
- equalDigits = 0;
8711
- break;
8712
- }
8713
- }
8714
- if (!equalDigits) {
8715
- numbers = cpf.substring(0, 9);
8716
- digits = cpf.substring(9);
8717
- sum = 0;
8718
- for (i = 10; i > 1; i--) {
8719
- sum += numbers.charAt(10 - i) * i;
8720
- }
8721
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8722
- if (result !== Number(digits.charAt(0))) {
8723
- return { cpfNotValid: true };
8724
- }
8725
- numbers = cpf.substring(0, 10);
8726
- sum = 0;
8727
- for (i = 11; i > 1; i--) {
8728
- sum += numbers.charAt(11 - i) * i;
8729
- }
8730
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8731
- if (result !== Number(digits.charAt(1))) {
8732
- return { cpfNotValid: true };
8733
- }
8734
- return null;
8735
- }
8736
- else {
8737
- return { cpfNotValid: true };
8738
- }
8739
- }
8740
- return null;
8741
- }
8742
- /**
8743
- * Valida se o CNPJ é valido. Deve-se ser informado o cpf sem máscara.
8744
- */
8745
- static isValidCnpj(control) {
8746
- let cnpj = control.value;
8747
- if (cnpj) {
8748
- let size, numbers, digits, sum, pos, result;
8749
- cnpj = cnpj.replace(/[^\d]+/g, '');
8750
- if (cnpj.length !== 14) {
8751
- return null;
8752
- }
8753
- // Elimina CNPJs invalidos conhecidos
8754
- if (cnpj === '00000000000000' ||
8755
- cnpj === '11111111111111' ||
8756
- cnpj === '22222222222222' ||
8757
- cnpj === '33333333333333' ||
8758
- cnpj === '44444444444444' ||
8759
- cnpj === '55555555555555' ||
8760
- cnpj === '66666666666666' ||
8761
- cnpj === '77777777777777' ||
8762
- cnpj === '88888888888888' ||
8763
- cnpj === '99999999999999') {
8764
- return { cnpjNotValid: true };
8765
- }
8766
- // Valida DVs
8767
- size = cnpj.length - 2;
8768
- numbers = cnpj.substring(0, size);
8769
- digits = cnpj.substring(size);
8770
- sum = 0;
8771
- pos = size - 7;
8772
- for (let i = size; i >= 1; i--) {
8773
- sum += numbers.charAt(size - i) * pos--;
8774
- if (pos < 2) {
8775
- pos = 9;
8776
- }
8777
- }
8778
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8779
- if (result !== Number(digits.charAt(0))) {
8780
- return { cnpjNotValid: true };
8781
- }
8782
- size = size + 1;
8783
- numbers = cnpj.substring(0, size);
8784
- sum = 0;
8785
- pos = size - 7;
8786
- for (let i = size; i >= 1; i--) {
8787
- sum += numbers.charAt(size - i) * pos--;
8788
- if (pos < 2) {
8789
- pos = 9;
8790
- }
8791
- }
8792
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8793
- if (result !== Number(digits.charAt(1))) {
8794
- return { cnpjNotValid: true };
8795
- }
8796
- return null;
8797
- }
8798
- return null;
8799
- }
8800
- /**
8801
- * Válida o número de telefone da chave PIX.
8802
- */
8803
- static isValidPhoneNumber(control) {
8804
- let cellPhoneKey = control.value || '';
8805
- cellPhoneKey = cellPhoneKey.replace(/[\s()-]/g, '');
8806
- const regexNumberTelephone = /^[1-9][\d]{1,2}\d{8,10}$/;
8807
- const isValidNumberTelephone = regexNumberTelephone.test(cellPhoneKey);
8808
- return isValidNumberTelephone ? null : { invalidPhoneNumber: true };
8809
- }
8810
- /**
8811
- * Valida o email da chave PIX.
8516
+ * Metódo para formatar a porcentagem para 2 casas decimais.
8517
+ * @param value Número a ser formatado.
8812
8518
  */
8813
- static isValidEmail(control) {
8814
- const emailKey = control.value;
8815
- const regexValidEmail = /^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/;
8816
- const isValidEmail = regexValidEmail.test(emailKey);
8817
- return isValidEmail ? null : { invalidEmail: true };
8818
- }
8819
- }
8820
-
8821
- class HistoricakPixAccountBase {
8822
- constructor(formBuilder) {
8823
- this._paramsForm = new FormGroup({});
8824
- this._defaultCpfNumber = null;
8825
- this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
8826
- this.pixAccountList = [];
8827
- this.maxValuePercentage = 100.0;
8828
- this.isShowPixKeyFieldValidatorMessage = false;
8829
- this.formBuilder = formBuilder;
8830
- this.createFormGroupBase();
8831
- }
8832
- phoneMask(event) {
8833
- FormatUtilsService.formatTelephoneInputEvent(event);
8834
- }
8835
- cpfMask(event) {
8836
- FormatUtilsService.formatCpfInputEvent(event);
8837
- }
8838
- cnpjMask(event) {
8839
- FormatUtilsService.formatCnpjInputEvent(event);
8840
- }
8841
- onChangePixKeyType(item, form) {
8842
- if (!item || !item.key)
8843
- return;
8844
- this.pixKeyType = item.key;
8845
- const targetForm = (typeof form !== 'undefined' && form !== null)
8846
- ? form
8847
- : this.pixAccountFormGroup;
8848
- this.isShowPixKeyFieldValidatorMessage = true;
8849
- const pixKeyControl = targetForm.get("pixKey");
8850
- if (pixKeyControl) {
8851
- pixKeyControl.reset();
8852
- }
8853
- this.setPixKeyValidators(true, targetForm);
8854
- if (item.key === "CPF") {
8855
- this.setDefaultCpfPixKey(targetForm);
8856
- }
8857
- }
8858
- onClearPixKeyType(form) {
8859
- var targetForm = (typeof form !== 'undefined' && form !== null)
8860
- ? form
8861
- : this.pixAccountFormGroup;
8862
- this.isShowPixKeyFieldValidatorMessage = false;
8863
- if (targetForm.get("pixKey")) {
8864
- targetForm.get("pixKey").reset();
8865
- }
8866
- }
8867
- setDefaultCpfPixKey(form) {
8868
- var targetForm = (typeof form !== 'undefined' && form !== null)
8869
- ? form
8870
- : this.pixAccountFormGroup;
8871
- if (this._defaultCpfNumber) {
8872
- if (targetForm.get("pixKey")) {
8873
- targetForm.get("pixKey").setValue(this._defaultCpfNumber);
8874
- }
8875
- }
8876
- else {
8877
- var sheetDocument = this._paramsForm.get("sheetDocument");
8878
- if (sheetDocument && sheetDocument.get("cpfNumber")) {
8879
- var cpf = sheetDocument.get("cpfNumber").value;
8880
- if (cpf && targetForm.get("pixKey")) {
8881
- targetForm.get("pixKey").setValue(cpf);
8882
- }
8883
- }
8884
- }
8885
- }
8886
- createFormGroupBase() {
8887
- this.pixAccountFormGroup = this.formBuilder.group({
8888
- id: this.formBuilder.control(null),
8889
- index: this.formBuilder.control(null),
8890
- employee: this.formBuilder.control({ value: { tableId: null }, disabled: true }),
8891
- dateChange: this.formBuilder.control(null),
8892
- pixKeyType: this.formBuilder.control(null, Validators.required),
8893
- pixKey: this.formBuilder.control(null),
8894
- percentage: this.formBuilder.control(null, Validators.compose([
8895
- ...this.initialValidatorOfPercentage,
8896
- Validators.max(this.maxValuePercentage),
8897
- ])),
8898
- externalId: this.formBuilder.control(null),
8899
- customFields: this.formBuilder.control(null),
8900
- });
8901
- }
8902
- setValidatorsAccordingList(pixAccountList, index = null, isEditMode = true, form) {
8903
- var targetForm = (typeof form !== 'undefined' && form !== null)
8904
- ? form
8905
- : this.pixAccountFormGroup;
8906
- this.pixAccountList = (pixAccountList && pixAccountList.length > 0)
8907
- ? [].concat(pixAccountList)
8908
- : [];
8909
- var percentageIncluded = [];
8910
- for (var i = 0; i < this.pixAccountList.length; i++) {
8911
- var field = this.pixAccountList[i];
8912
- if (field && field.percentage && i !== index) {
8913
- percentageIncluded.push(field.percentage);
8914
- }
8915
- }
8916
- this.beforeSetPixKeyTypeValidator(targetForm);
8917
- this.setPixKeyValidators(isEditMode, targetForm);
8918
- this.validatePercentageValid(percentageIncluded, targetForm);
8919
- }
8920
- beforeSetPixKeyTypeValidator(form) {
8921
- const control = form.get("pixKeyType");
8922
- if (this.pixAccountList && this.pixAccountList.length) {
8923
- control.setValidators(Validators.compose([
8924
- Validators.required,
8925
- this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList),
8926
- ]));
8927
- }
8928
- else {
8929
- control.setValidators(Validators.required);
8930
- }
8931
- control.updateValueAndValidity();
8932
- }
8933
- setPixKeyValidators(isEditMode, form) {
8934
- const pixKey = form.get("pixKey");
8935
- switch (this.pixKeyType) {
8936
- case "TELEPHONE":
8937
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidPhoneNumber]));
8938
- break;
8939
- case "EMAIL":
8940
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidEmail]));
8941
- break;
8942
- case "CPF":
8943
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCpf]));
8944
- break;
8945
- case "CNPJ":
8946
- pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCnpj]));
8947
- break;
8948
- case "RANDOM_KEY":
8949
- pixKey.setValidators(Validators.required);
8950
- break;
8951
- default:
8952
- pixKey.clearValidators();
8953
- }
8954
- if (isEditMode) {
8955
- pixKey.enable();
8956
- }
8957
- pixKey.updateValueAndValidity();
8958
- }
8959
- validatePercentageValid(listValue, form) {
8960
- const percentage = form.get("percentage");
8961
- this.maxValuePercentage = listValue.reduce((acc, val) => acc - val, 100.0);
8962
- percentage.setValidators(Validators.compose([
8963
- ...this.initialValidatorOfPercentage,
8964
- Validators.max(this.maxValuePercentage),
8965
- ]));
8966
- percentage.updateValueAndValidity();
8967
- }
8968
- validateDuplicatePixKeyTypeBankAccount(listCompare) {
8969
- return (control) => {
8970
- const value = control.value;
8971
- const isDuplicate = listCompare.some((field) => value &&
8972
- field.pixKeyType.key === "BANK_ACCOUNT" &&
8973
- value.key === "BANK_ACCOUNT");
8974
- return isDuplicate ? { pixKeyTypeBankAccountDuplicate: true } : null;
8975
- };
8976
- }
8977
- get paramsForm() {
8978
- return this._paramsForm;
8979
- }
8980
- set paramsForm(value) {
8981
- this._paramsForm = value;
8982
- }
8983
- get defaultCpfNumber() {
8984
- return this._defaultCpfNumber;
8985
- }
8986
- set defaultCpfNumber(value) {
8987
- this._defaultCpfNumber = value;
8519
+ static getFormattedPercentage(value) {
8520
+ return parseFloat(value).toFixed(2).replace('.', ',') + '%';
8988
8521
  }
8989
8522
  }
8990
8523
 
8991
- let HistoricalPixAccountService = class HistoricalPixAccountService {
8992
- constructor(http) {
8993
- this.http = http;
8994
- }
8995
- query(path, body, service = ServiceType.PAYROLL) {
8996
- return this.http.query(path, body, service);
8997
- }
8998
- enumQuery() {
8999
- const path = 'enumQuery';
9000
- const body = {
9001
- names: ['PixKeyType']
9002
- };
9003
- return this.http.query(path, body, ServiceType.PAYROLL);
9004
- }
9005
- };
9006
- HistoricalPixAccountService.ctorParameters = () => [
9007
- { type: HttpClientService }
9008
- ];
9009
- HistoricalPixAccountService = __decorate([
9010
- Injectable()
9011
- ], HistoricalPixAccountService);
9012
-
9013
- let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends HistoricakPixAccountBase {
9014
- constructor(translateService, cd, formBuilder, sharedStateService, service) {
9015
- super(formBuilder);
8524
+ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8525
+ constructor(translateService, cd, formBuilder, messageService) {
9016
8526
  this.translateService = translateService;
9017
8527
  this.cd = cd;
9018
- this.sharedStateService = sharedStateService;
9019
- this.service = service;
8528
+ this.formBuilder = formBuilder;
8529
+ this.messageService = messageService;
9020
8530
  this.recordByRow = 1;
9021
8531
  this.showDateChange = false;
9022
8532
  this.isEditMode = false;
9023
8533
  this.isViewMode = false;
9024
8534
  this.withSideBar = true;
8535
+ this.defaultCpfNumber = null;
9025
8536
  this.listDataReciever = [];
9026
- this.addExistentHistoricData = [];
9027
- this.getListPixAccount = [];
9028
- this.isEditModeForSave = false;
9029
- this.showField = false;
8537
+ this.showButtonEdit = false;
9030
8538
  this.isViewModeActive = new EventEmitter();
9031
8539
  this.isEditModeActive = new EventEmitter();
9032
8540
  this.isDeleteModeActive = new EventEmitter();
9033
- this.isValidChangeForm = new EventEmitter();
9034
- this.reloadOnlyOnEdit = new EventEmitter();
9035
8541
  this.listFromApp = [];
9036
8542
  this.visibleChange = new EventEmitter();
9037
8543
  this.ngUnsubscribe = new Subject();
@@ -9045,12 +8551,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9045
8551
  this.loading = true;
9046
8552
  this.listData = [];
9047
8553
  this.listDataNoPage = [];
9048
- this.showButtonView = true;
9049
- this.showEditMode = false;
9050
- this.hasRecordsPix = true;
9051
- this.hideFields = this.sharedStateService.hideField$;
9052
- this.suggestions = [];
9053
- this.formGroupByRow = {};
8554
+ this.permitsEditBankAccount = false;
9054
8555
  this.cols = [
9055
8556
  {
9056
8557
  label: this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
@@ -9064,10 +8565,6 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9064
8565
  label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
9065
8566
  field: "percentage",
9066
8567
  },
9067
- {
9068
- label: this.translateService.instant("hcm.payroll.movimentation_generic_action"),
9069
- field: "actions",
9070
- }
9071
8568
  ];
9072
8569
  this.actions = (rowData = {}, key) => {
9073
8570
  return [
@@ -9086,7 +8583,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9086
8583
  },
9087
8584
  },
9088
8585
  {
9089
- visible: !!(!this.isEditMode && this.withSideBar),
8586
+ visible: !!((!this.isEditMode && this.withSideBar) || this.showButtonEdit),
9090
8587
  label: this.translateService.instant("hcm.payroll.edit"),
9091
8588
  command: () => {
9092
8589
  if (this.isAllowToEditHistorical) {
@@ -9105,7 +8602,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9105
8602
  },
9106
8603
  },
9107
8604
  {
9108
- visible: !this.isEditMode || this.showEditMode,
8605
+ visible: !this.isEditMode,
9109
8606
  label: this.translateService.instant("hcm.payroll.delete"),
9110
8607
  command: () => {
9111
8608
  if (this.isAllowToDeleteHistorical) {
@@ -9126,46 +8623,14 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9126
8623
  this.createFormGroup();
9127
8624
  }
9128
8625
  ngOnInit() {
9129
- this.showFields = this.showField;
9130
8626
  this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
9131
- this.sharedStateService.showButton$.subscribe((value) => {
9132
- this.showButtonView = value;
9133
- });
9134
- this.sharedStateService.showEditMode$.subscribe((value) => {
9135
- this.showEditMode = value;
9136
- this.isEditModeForSave = value;
9137
- });
9138
- this.sharedStateService.shouldReloadWindowOnlyEditMode$.subscribe((value) => {
9139
- this.reloadOnlyOnEdit.emit(value);
9140
- });
9141
- this.sharedStateService.hideBtnAddForViewMode$.subscribe((value) => {
9142
- this.hideBtnAddForViewMode = value;
9143
- });
9144
- this.sharedStateService.activeValidatorsOnEditModalOpen$
9145
- .subscribe(() => {
9146
- Object.values(this.formGroupByRow).forEach(fg => {
9147
- Object.values(fg.controls).forEach(control => {
9148
- control.markAsTouched();
9149
- control.updateValueAndValidity();
9150
- });
9151
- });
9152
- this.emitFormValidity();
9153
- });
9154
8627
  }
9155
8628
  ngOnChanges(changes) {
9156
8629
  if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
9157
8630
  this.listFromApp = changes['listDataReciever'].currentValue;
9158
8631
  }
9159
- if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
9160
- this.getHistoricalPixAccountList();
9161
- }
9162
- if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
9163
- const newData = changes['addExistentHistoricData'].currentValue;
9164
- this.rebuildFormGroupMap(newData);
9165
- }
9166
- if (changes['isEditMode']) {
9167
- this.isEditMode = changes['isEditMode'].currentValue;
9168
- this.cd.detectChanges();
8632
+ if (changes['showButtonEdit'] && changes['showButtonEdit'].currentValue) {
8633
+ this.permitsEditBankAccount = changes['showButtonEdit'].currentValue;
9169
8634
  }
9170
8635
  }
9171
8636
  createFormGroup() {
@@ -9180,97 +8645,6 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9180
8645
  ngAfterViewInit() {
9181
8646
  this.cd.detectChanges();
9182
8647
  }
9183
- emitFormValidity() {
9184
- const allValid = Object.values(this.formGroupByRow).every(fg => {
9185
- fg.updateValueAndValidity();
9186
- return fg.valid;
9187
- });
9188
- this.isValidChangeForm.emit(allValid);
9189
- }
9190
- filterPixKeyType(event) {
9191
- const query = event.query;
9192
- this.service.enumQuery().subscribe((response) => {
9193
- const pixKeyTypeEnum = response.results.find((result) => result.enumName === 'PixKeyType');
9194
- if (pixKeyTypeEnum) {
9195
- this.suggestions = pixKeyTypeEnum.items.filter((item) => item.value.toLowerCase().includes(query.toLowerCase()));
9196
- }
9197
- else {
9198
- this.suggestions = [];
9199
- }
9200
- });
9201
- }
9202
- createPixRowFormGroup() {
9203
- return this.formBuilder.group({
9204
- id: [null],
9205
- pixKeyType: [null, Validators.required],
9206
- pixKey: [null],
9207
- percentage: [0, Validators.compose([
9208
- ...this.initialValidatorOfPercentage,
9209
- Validators.max(this.maxValuePercentage),
9210
- ])]
9211
- });
9212
- }
9213
- onPixKeyInput(event, index) {
9214
- const inputValue = event.target.value;
9215
- const inputRawValue = inputValue.replace(/\D/g, '');
9216
- const form = this.formGroupByRow[index];
9217
- const pixKeyControl = form.get('pixKey');
9218
- if (pixKeyControl) {
9219
- pixKeyControl.setValue(inputRawValue, { emitEvent: false });
9220
- pixKeyControl.markAsDirty();
9221
- pixKeyControl.updateValueAndValidity();
9222
- }
9223
- this.setPixKeyValidators(true, form);
9224
- this.emitFormValidity();
9225
- }
9226
- onBlurPixCpfAndCnpj(index) {
9227
- const form = this.formGroupByRow[index];
9228
- const pixKeyControl = form.get('pixKey');
9229
- const pixKeyTypeControl = form.get('pixKeyType');
9230
- if (!pixKeyControl || !pixKeyTypeControl)
9231
- return;
9232
- const currentValue = pixKeyControl.value;
9233
- const pixKeyType = pixKeyTypeControl.value.key;
9234
- const rawValue = (currentValue || '').replace(/\D/g, '');
9235
- pixKeyControl.setValue(rawValue, { emitEvent: false });
9236
- if (pixKeyControl.valid) {
9237
- form.patchValue({
9238
- pixKeyFormatted: FormatUtilsService.getFormattedSubscriptionNumber(rawValue, pixKeyType)
9239
- });
9240
- }
9241
- this.emitFormValidity();
9242
- }
9243
- getFormattedPixKey(type, value) {
9244
- return FormatUtilsService.getFormattedSubscriptionNumber(value, type);
9245
- }
9246
- syncPixDataToParentForm() {
9247
- if (!this.isEditModeForSave)
9248
- return;
9249
- const values = Object.values(this.formGroupByRow).map(fg => {
9250
- const value = fg.getRawValue();
9251
- const pixKeyType = value.pixKeyType.key;
9252
- if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
9253
- value.pixKey = (value.pixKey || '').replace(/[.\-\/]/g, '');
9254
- }
9255
- else if (pixKeyType === 'TELEPHONE') {
9256
- value.pixKey = (value.pixKey || '').replace(/[()\s\-]/g, '');
9257
- }
9258
- return value;
9259
- });
9260
- this.formGroup
9261
- .get(this.fieldFormGroup)
9262
- .get('historicalPixAccountList')
9263
- .setValue(values);
9264
- this.emitFormValidity();
9265
- }
9266
- syncResetPixFormToParent() {
9267
- this.formGroupByRow = {};
9268
- this.historicalPixAccountList.reset();
9269
- this.historicalPixAccountList.get('historicalPixAccountList').setValue([]);
9270
- if (this.addExistentHistoricData.length) {
9271
- this.rebuildFormGroupMap(this.addExistentHistoricData);
9272
- }
9273
- }
9274
8648
  onLazyLoad(event) {
9275
8649
  const first = event && event.first ? event.first : 0;
9276
8650
  const rows = event && event.rows ? event.rows : this.recordByRow;
@@ -9297,7 +8671,6 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9297
8671
  this.refreshCssInIE11();
9298
8672
  }
9299
8673
  this.loading = false;
9300
- this.cd.detectChanges();
9301
8674
  }
9302
8675
  /**
9303
8676
  * Um Bug de CSS que acontece nas linhas da tabela, que resolve só atualizando qualquer parte do CSS da pagina.
@@ -9313,70 +8686,14 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9313
8686
  }
9314
8687
  add() {
9315
8688
  this.pixAccountItemInput = {};
9316
- this.visible = true;
9317
- }
9318
- addPix() {
9319
- const newItem = {
9320
- id: null,
9321
- pixKeyType: {},
9322
- pixKey: '',
9323
- percentage: 0
9324
- };
9325
- const index = this.addExistentHistoricData.length;
9326
- this.addExistentHistoricData = [
9327
- ...this.addExistentHistoricData,
9328
- newItem
9329
- ];
9330
- this.formGroupByRow[index] = this.createPixRowFormGroup();
9331
- this.setValidatorsAccordingList(this.addExistentHistoricData, index, true);
9332
- this.emitFormValidity();
9333
- }
9334
- deletePix(index) {
9335
- if (this.dataListPix.editingCell) {
9336
- this.dataListPix.editingCell = null;
9337
- }
9338
- this.addExistentHistoricData = this.addExistentHistoricData.filter((_, i) => i !== index);
9339
- this.rebuildFormGroupMap(this.addExistentHistoricData);
9340
- this.emitFormValidity();
9341
- }
9342
- rebuildFormGroupMap(data) {
9343
- this.formGroupByRow = {};
9344
- data.forEach((item, index) => {
9345
- const form = this.createPixRowFormGroup();
9346
- const pixKeyType = item.pixKeyType.key;
9347
- const pixKeyRaw = item.pixKey;
9348
- if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
9349
- item.pixKey = FormatUtilsService.getFormattedSubscriptionNumber(pixKeyRaw, pixKeyType);
9350
- }
9351
- if (pixKeyType === 'TELEPHONE') {
9352
- item.pixKey = FormatUtilsService.getFormattedTelephoneNumber(pixKeyRaw);
9353
- }
9354
- form.patchValue(item);
9355
- this.formGroupByRow[index] = form;
9356
- this.pixKeyType = pixKeyType;
9357
- this.setPixKeyValidators(true, form);
9358
- this.setValidatorsAccordingList(data, index, this.isEditMode);
9359
- const listValues = data
9360
- .filter((_, i) => i !== index)
9361
- .map(row => row.percentage ? parseFloat(row.percentage) : 0);
9362
- this.validatePercentageValid(listValues, form);
9363
- });
9364
- this.emitFormValidity();
9365
- }
9366
- onPixKeyTypeChange(item, index) {
9367
- const form = this.formGroupByRow[index];
9368
- this.onChangePixKeyType(item, form);
9369
- this.addExistentHistoricData[index].pixKey = '';
9370
- setTimeout(() => {
9371
- if (this.dataListPix.editingCell) {
9372
- this.dataListPix.editingCell = null;
9373
- }
9374
- });
9375
- this.cd.detectChanges();
8689
+ this.visible = true;
9376
8690
  }
9377
- onPixKeyTypeClear(index) {
9378
- const form = this.formGroupByRow[index];
9379
- this.onClearPixKeyType(form);
8691
+ isNotAllowMessage() {
8692
+ this.messageService.add({
8693
+ severity: "error",
8694
+ summary: this.translateService.instant("hcm.payroll.error"),
8695
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
8696
+ });
9380
8697
  }
9381
8698
  deleteAnnuityItem(index) {
9382
8699
  let newlist = [...this.getHistoricalPixAccountList()];
@@ -9438,23 +8755,6 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9438
8755
  this.msgTotalLimitByPercentage = null;
9439
8756
  }
9440
8757
  }
9441
- onSyncValue(field, index) {
9442
- if (this.formGroupByRow &&
9443
- this.formGroupByRow[index] &&
9444
- this.formGroupByRow[index].get(field)) {
9445
- const control = this.formGroupByRow[index].get(field);
9446
- const value = control.value;
9447
- this.addExistentHistoricData[index][field] = value;
9448
- control.markAsDirty();
9449
- control.markAsTouched();
9450
- control.updateValueAndValidity();
9451
- const currentList = this.addExistentHistoricData.map((item, i) => {
9452
- return i === index ? 0 : item.percentage;
9453
- });
9454
- this.validatePercentageValid(currentList, this.formGroupByRow[index]);
9455
- this.emitFormValidity();
9456
- }
9457
- }
9458
8758
  get scopedActions() {
9459
8759
  return this.actions.bind(this);
9460
8760
  }
@@ -9491,15 +8791,12 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9491
8791
  get visible() {
9492
8792
  return this._visible;
9493
8793
  }
9494
- set paramsForm(value) {
9495
- this._paramsForm = value;
9496
- }
9497
- set defaultCpfNumber(value) {
9498
- this._defaultCpfNumber = value;
9499
- }
9500
8794
  set visible(value) {
9501
8795
  this._visible = value;
9502
8796
  this.visibleChange.emit(this.visible);
8797
+ if (!value) {
8798
+ this.pixAccountItemInput = {};
8799
+ }
9503
8800
  }
9504
8801
  close() {
9505
8802
  this.visible = false;
@@ -9528,138 +8825,295 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends
9528
8825
  get isAllowToViewHistorical() {
9529
8826
  return (this.permission["visualizar"]);
9530
8827
  }
9531
- };
9532
- HistoricalPixAccountComponent.ctorParameters = () => [
9533
- { type: TranslateService },
9534
- { type: ChangeDetectorRef },
9535
- { type: FormBuilder },
9536
- { type: SharedStateService },
9537
- { type: HistoricalPixAccountService }
9538
- ];
9539
- __decorate([
9540
- ViewChild(CustomFieldsComponent$1, { static: false })
9541
- ], HistoricalPixAccountComponent.prototype, "customFields", void 0);
9542
- __decorate([
9543
- ViewChild('dataListPix', { static: false })
9544
- ], HistoricalPixAccountComponent.prototype, "dataListPix", void 0);
9545
- __decorate([
9546
- Input()
9547
- ], HistoricalPixAccountComponent.prototype, "formGroup", void 0);
9548
- __decorate([
9549
- Input()
9550
- ], HistoricalPixAccountComponent.prototype, "fieldFormGroup", void 0);
9551
- __decorate([
9552
- Input()
9553
- ], HistoricalPixAccountComponent.prototype, "_dateChange", void 0);
9554
- __decorate([
9555
- Input()
9556
- ], HistoricalPixAccountComponent.prototype, "_displayDateChange", void 0);
9557
- __decorate([
9558
- Input()
9559
- ], HistoricalPixAccountComponent.prototype, "recordByRow", void 0);
9560
- __decorate([
9561
- Input()
9562
- ], HistoricalPixAccountComponent.prototype, "showDateChange", void 0);
9563
- __decorate([
9564
- Input()
9565
- ], HistoricalPixAccountComponent.prototype, "msgTooltipAdd", void 0);
9566
- __decorate([
9567
- Input()
9568
- ], HistoricalPixAccountComponent.prototype, "isEditMode", void 0);
9569
- __decorate([
9570
- Input()
9571
- ], HistoricalPixAccountComponent.prototype, "isViewMode", void 0);
9572
- __decorate([
9573
- Input()
9574
- ], HistoricalPixAccountComponent.prototype, "currency", void 0);
9575
- __decorate([
9576
- Input()
9577
- ], HistoricalPixAccountComponent.prototype, "customEntity", void 0);
9578
- __decorate([
9579
- Input()
9580
- ], HistoricalPixAccountComponent.prototype, "customService", void 0);
9581
- __decorate([
9582
- Input()
9583
- ], HistoricalPixAccountComponent.prototype, "withSideBar", void 0);
9584
- __decorate([
9585
- Input()
9586
- ], HistoricalPixAccountComponent.prototype, "permission", void 0);
9587
- __decorate([
9588
- Input()
9589
- ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
9590
- __decorate([
9591
- Input()
9592
- ], HistoricalPixAccountComponent.prototype, "addExistentHistoricData", void 0);
9593
- __decorate([
9594
- Input()
9595
- ], HistoricalPixAccountComponent.prototype, "getListPixAccount", void 0);
9596
- __decorate([
9597
- Input()
9598
- ], HistoricalPixAccountComponent.prototype, "isEditModeForSave", void 0);
9599
- __decorate([
9600
- Input()
9601
- ], HistoricalPixAccountComponent.prototype, "showField", void 0);
9602
- __decorate([
9603
- Output()
9604
- ], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
9605
- __decorate([
9606
- Output()
9607
- ], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
9608
- __decorate([
9609
- Output()
9610
- ], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
9611
- __decorate([
9612
- Output()
9613
- ], HistoricalPixAccountComponent.prototype, "isValidChangeForm", void 0);
9614
- __decorate([
9615
- Output()
9616
- ], HistoricalPixAccountComponent.prototype, "reloadOnlyOnEdit", void 0);
9617
- __decorate([
9618
- Input()
9619
- ], HistoricalPixAccountComponent.prototype, "dateChange", null);
9620
- __decorate([
9621
- Input()
9622
- ], HistoricalPixAccountComponent.prototype, "displayDateChange", null);
9623
- __decorate([
9624
- Input()
9625
- ], HistoricalPixAccountComponent.prototype, "addListData", null);
9626
- __decorate([
9627
- Input()
9628
- ], HistoricalPixAccountComponent.prototype, "visible", null);
9629
- __decorate([
9630
- Input()
9631
- ], HistoricalPixAccountComponent.prototype, "paramsForm", null);
9632
- __decorate([
9633
- Input()
9634
- ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", null);
9635
- HistoricalPixAccountComponent = __decorate([
9636
- Component({
9637
- // tslint:disable-next-line:component-selector
9638
- selector: "c-historical-pix-account",
9639
- 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<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode && !hideBtnAddForViewMode\">\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",
9640
- 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}"]
9641
- })
9642
- ], HistoricalPixAccountComponent);
8828
+ };
8829
+ HistoricalPixAccountComponent.ctorParameters = () => [
8830
+ { type: TranslateService },
8831
+ { type: ChangeDetectorRef },
8832
+ { type: FormBuilder },
8833
+ { type: MessageService }
8834
+ ];
8835
+ __decorate([
8836
+ ViewChild(CustomFieldsComponent$1, { static: false })
8837
+ ], HistoricalPixAccountComponent.prototype, "customFields", void 0);
8838
+ __decorate([
8839
+ Input()
8840
+ ], HistoricalPixAccountComponent.prototype, "formGroup", void 0);
8841
+ __decorate([
8842
+ Input()
8843
+ ], HistoricalPixAccountComponent.prototype, "fieldFormGroup", void 0);
8844
+ __decorate([
8845
+ Input()
8846
+ ], HistoricalPixAccountComponent.prototype, "_dateChange", void 0);
8847
+ __decorate([
8848
+ Input()
8849
+ ], HistoricalPixAccountComponent.prototype, "_displayDateChange", void 0);
8850
+ __decorate([
8851
+ Input()
8852
+ ], HistoricalPixAccountComponent.prototype, "recordByRow", void 0);
8853
+ __decorate([
8854
+ Input()
8855
+ ], HistoricalPixAccountComponent.prototype, "showDateChange", void 0);
8856
+ __decorate([
8857
+ Input()
8858
+ ], HistoricalPixAccountComponent.prototype, "msgTooltipAdd", void 0);
8859
+ __decorate([
8860
+ Input()
8861
+ ], HistoricalPixAccountComponent.prototype, "isEditMode", void 0);
8862
+ __decorate([
8863
+ Input()
8864
+ ], HistoricalPixAccountComponent.prototype, "isViewMode", void 0);
8865
+ __decorate([
8866
+ Input()
8867
+ ], HistoricalPixAccountComponent.prototype, "currency", void 0);
8868
+ __decorate([
8869
+ Input()
8870
+ ], HistoricalPixAccountComponent.prototype, "customEntity", void 0);
8871
+ __decorate([
8872
+ Input()
8873
+ ], HistoricalPixAccountComponent.prototype, "customService", void 0);
8874
+ __decorate([
8875
+ Input()
8876
+ ], HistoricalPixAccountComponent.prototype, "withSideBar", void 0);
8877
+ __decorate([
8878
+ Input()
8879
+ ], HistoricalPixAccountComponent.prototype, "paramsForm", void 0);
8880
+ __decorate([
8881
+ Input()
8882
+ ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
8883
+ __decorate([
8884
+ Input()
8885
+ ], HistoricalPixAccountComponent.prototype, "permission", void 0);
8886
+ __decorate([
8887
+ Input()
8888
+ ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
8889
+ __decorate([
8890
+ Input()
8891
+ ], HistoricalPixAccountComponent.prototype, "showButtonEdit", void 0);
8892
+ __decorate([
8893
+ Output()
8894
+ ], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
8895
+ __decorate([
8896
+ Output()
8897
+ ], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
8898
+ __decorate([
8899
+ Output()
8900
+ ], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
8901
+ __decorate([
8902
+ Input()
8903
+ ], HistoricalPixAccountComponent.prototype, "dateChange", null);
8904
+ __decorate([
8905
+ Input()
8906
+ ], HistoricalPixAccountComponent.prototype, "displayDateChange", null);
8907
+ __decorate([
8908
+ Input()
8909
+ ], HistoricalPixAccountComponent.prototype, "addListData", null);
8910
+ __decorate([
8911
+ Input()
8912
+ ], HistoricalPixAccountComponent.prototype, "visible", null);
8913
+ HistoricalPixAccountComponent = __decorate([
8914
+ Component({
8915
+ // tslint:disable-next-line:component-selector
8916
+ selector: "c-historical-pix-account",
8917
+ 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",
8918
+ 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}"]
8919
+ })
8920
+ ], HistoricalPixAccountComponent);
8921
+
8922
+ class GenericValidator {
8923
+ constructor() { }
8924
+ /**
8925
+ * Valida o CEI (Cadastro específico de INSS) digitado.
8926
+ */
8927
+ static isValidCei(control) {
8928
+ const cei = control.value;
8929
+ if (!cei)
8930
+ return null;
8931
+ else if (cei.length != 11)
8932
+ return null;
8933
+ const multiplicadorBase = "3298765432";
8934
+ let total = 0;
8935
+ let resto = 0;
8936
+ let multiplicando = 0;
8937
+ let multiplicador = 0;
8938
+ if (cei.length !== 11 ||
8939
+ cei === "00000000000" ||
8940
+ cei === "11111111111" ||
8941
+ cei === "22222222222" ||
8942
+ cei === "33333333333" ||
8943
+ cei === "44444444444" ||
8944
+ cei === "55555555555" ||
8945
+ cei === "66666666666" ||
8946
+ cei === "77777777777" ||
8947
+ cei === "88888888888" ||
8948
+ cei === "99999999999")
8949
+ return { invalidCei: true };
8950
+ else {
8951
+ for (let i = 0; i < 10; i++) {
8952
+ multiplicando = parseInt(cei.substring(i, i + 1), 10);
8953
+ multiplicador = parseInt(multiplicadorBase.substring(i, i + 1), 10);
8954
+ total += multiplicando * multiplicador;
8955
+ }
8956
+ resto = 11 - (total % 11);
8957
+ resto = resto === 10 || resto === 11 ? 0 : resto;
8958
+ const digito = parseInt("" + cei.charAt(10), 10);
8959
+ return resto === digito ? null : { invalidCei: true };
8960
+ }
8961
+ }
8962
+ /**
8963
+ * Valida se o CPF é valido. Deve-se ser informado o cpf sem máscara.
8964
+ */
8965
+ static isValidCpf(control) {
8966
+ const cpf = control.value;
8967
+ if (cpf) {
8968
+ let numbers, digits, sum, i, result, equalDigits;
8969
+ equalDigits = 1;
8970
+ if (cpf.length < 11) {
8971
+ return null;
8972
+ }
8973
+ for (i = 0; i < cpf.length - 1; i++) {
8974
+ if (cpf.charAt(i) !== cpf.charAt(i + 1)) {
8975
+ equalDigits = 0;
8976
+ break;
8977
+ }
8978
+ }
8979
+ if (!equalDigits) {
8980
+ numbers = cpf.substring(0, 9);
8981
+ digits = cpf.substring(9);
8982
+ sum = 0;
8983
+ for (i = 10; i > 1; i--) {
8984
+ sum += numbers.charAt(10 - i) * i;
8985
+ }
8986
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8987
+ if (result !== Number(digits.charAt(0))) {
8988
+ return { cpfNotValid: true };
8989
+ }
8990
+ numbers = cpf.substring(0, 10);
8991
+ sum = 0;
8992
+ for (i = 11; i > 1; i--) {
8993
+ sum += numbers.charAt(11 - i) * i;
8994
+ }
8995
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8996
+ if (result !== Number(digits.charAt(1))) {
8997
+ return { cpfNotValid: true };
8998
+ }
8999
+ return null;
9000
+ }
9001
+ else {
9002
+ return { cpfNotValid: true };
9003
+ }
9004
+ }
9005
+ return null;
9006
+ }
9007
+ /**
9008
+ * Valida se o CNPJ é valido. Deve-se ser informado o cpf sem máscara.
9009
+ */
9010
+ static isValidCnpj(control) {
9011
+ let cnpj = control.value;
9012
+ if (cnpj) {
9013
+ let size, numbers, digits, sum, pos, result;
9014
+ cnpj = cnpj.replace(/[^\d]+/g, '');
9015
+ if (cnpj.length !== 14) {
9016
+ return null;
9017
+ }
9018
+ // Elimina CNPJs invalidos conhecidos
9019
+ if (cnpj === '00000000000000' ||
9020
+ cnpj === '11111111111111' ||
9021
+ cnpj === '22222222222222' ||
9022
+ cnpj === '33333333333333' ||
9023
+ cnpj === '44444444444444' ||
9024
+ cnpj === '55555555555555' ||
9025
+ cnpj === '66666666666666' ||
9026
+ cnpj === '77777777777777' ||
9027
+ cnpj === '88888888888888' ||
9028
+ cnpj === '99999999999999') {
9029
+ return { cnpjNotValid: true };
9030
+ }
9031
+ // Valida DVs
9032
+ size = cnpj.length - 2;
9033
+ numbers = cnpj.substring(0, size);
9034
+ digits = cnpj.substring(size);
9035
+ sum = 0;
9036
+ pos = size - 7;
9037
+ for (let i = size; i >= 1; i--) {
9038
+ sum += numbers.charAt(size - i) * pos--;
9039
+ if (pos < 2) {
9040
+ pos = 9;
9041
+ }
9042
+ }
9043
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9044
+ if (result !== Number(digits.charAt(0))) {
9045
+ return { cnpjNotValid: true };
9046
+ }
9047
+ size = size + 1;
9048
+ numbers = cnpj.substring(0, size);
9049
+ sum = 0;
9050
+ pos = size - 7;
9051
+ for (let i = size; i >= 1; i--) {
9052
+ sum += numbers.charAt(size - i) * pos--;
9053
+ if (pos < 2) {
9054
+ pos = 9;
9055
+ }
9056
+ }
9057
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9058
+ if (result !== Number(digits.charAt(1))) {
9059
+ return { cnpjNotValid: true };
9060
+ }
9061
+ return null;
9062
+ }
9063
+ return null;
9064
+ }
9065
+ /**
9066
+ * Válida o número de telefone da chave PIX.
9067
+ */
9068
+ static isValidPhoneNumber(control) {
9069
+ let cellPhoneKey = control.value || '';
9070
+ cellPhoneKey = cellPhoneKey.replace(/[\s()-]/g, '');
9071
+ const regexNumberTelephone = /^[1-9][\d]{1,2}\d{8,10}$/;
9072
+ const isValidNumberTelephone = regexNumberTelephone.test(cellPhoneKey);
9073
+ return isValidNumberTelephone ? null : { invalidPhoneNumber: true };
9074
+ }
9075
+ /**
9076
+ * Valida o email da chave PIX.
9077
+ */
9078
+ static isValidEmail(control) {
9079
+ const emailKey = control.value;
9080
+ const regexValidEmail = /^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/;
9081
+ const isValidEmail = regexValidEmail.test(emailKey);
9082
+ return isValidEmail ? null : { invalidEmail: true };
9083
+ }
9084
+ }
9643
9085
 
9644
- let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent extends HistoricakPixAccountBase {
9645
- constructor(formBuilder, cd, sharedStateService) {
9646
- super(formBuilder);
9086
+ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent {
9087
+ constructor(formBuilder, cd) {
9088
+ this.formBuilder = formBuilder;
9647
9089
  this.cd = cd;
9648
- this.sharedStateService = sharedStateService;
9649
9090
  this.withSideBar = true;
9650
9091
  this.isEditMode = false;
9651
- this.showField = false;
9092
+ this.paramsForm = new FormGroup({});
9093
+ this.defaultCpfNumber = null;
9094
+ this.permitsEditBankAccountForm = false;
9652
9095
  this.visibleChange = new EventEmitter();
9653
9096
  this.pixAccountItemToList = new EventEmitter();
9654
9097
  this.ngUnsubscribe = new Subject();
9098
+ this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
9655
9099
  this.labelBtnAdd = "hcm.payroll.employees_add";
9100
+ this.maxValuePercentage = 100.00;
9656
9101
  this.visibleBtnSave = true;
9657
9102
  this.isView = false;
9658
9103
  this.isShowPixKeyFieldValidatorMessage = false;
9659
- this.hideFields = this.sharedStateService.hideField$;
9104
+ this.createFormGroup();
9660
9105
  this.registerSubjects();
9661
9106
  }
9662
- ngOnInit() { }
9107
+ ngOnInit() {
9108
+ }
9109
+ ngDoCheck() {
9110
+ if (this.pixAccountFormGroup && this.pixKeyType === "BANK_ACCOUNT") {
9111
+ const pixKeyControl = this.pixAccountFormGroup.get("pixKey");
9112
+ if (pixKeyControl && !pixKeyControl.disabled) {
9113
+ pixKeyControl.disable();
9114
+ }
9115
+ }
9116
+ }
9663
9117
  ngAfterViewInit() {
9664
9118
  this.cd.detectChanges();
9665
9119
  }
@@ -9667,7 +9121,39 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9667
9121
  this.ngUnsubscribe.next(true);
9668
9122
  this.ngUnsubscribe.unsubscribe();
9669
9123
  }
9670
- registerSubjects() { }
9124
+ registerSubjects() {
9125
+ }
9126
+ createFormGroup() {
9127
+ this.pixAccountFormGroup = this.formBuilder.group({
9128
+ id: this.formBuilder.control(null),
9129
+ index: this.formBuilder.control(null),
9130
+ employee: this.formBuilder.control({ value: { tableId: null }, disabled: true }),
9131
+ dateChange: this.formBuilder.control(null),
9132
+ pixKeyType: this.formBuilder.control(null, Validators.required),
9133
+ pixKey: this.formBuilder.control(null),
9134
+ percentage: this.formBuilder.control(null, Validators.compose([
9135
+ ...this.initialValidatorOfPercentage,
9136
+ Validators.max(this.maxValuePercentage),
9137
+ ])),
9138
+ externalId: this.formBuilder.control(null),
9139
+ customFields: this.formBuilder.control(null),
9140
+ });
9141
+ }
9142
+ onChangePixKeyType(item) {
9143
+ if (item.key) {
9144
+ this.pixKeyType = item.key;
9145
+ this.isShowPixKeyFieldValidatorMessage = true;
9146
+ this.pixAccountFormGroup.get("pixKey").reset();
9147
+ this.setPixKeyValidators(true);
9148
+ if (item.key === "CPF") {
9149
+ this.setDefaultCpfPixKey();
9150
+ }
9151
+ }
9152
+ }
9153
+ onClearPixKeyType() {
9154
+ this.isShowPixKeyFieldValidatorMessage = false;
9155
+ this.pixAccountFormGroup.get("pixKey").reset();
9156
+ }
9671
9157
  get visible() {
9672
9158
  return this._visible;
9673
9159
  }
@@ -9698,8 +9184,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9698
9184
  }
9699
9185
  formatPixKeyTelephoneNumber() {
9700
9186
  if (this.pixKeyType === "TELEPHONE") {
9701
- const pixKeyCtrl = this.pixAccountFormGroup.get("pixKey");
9702
- pixKeyCtrl.setValue(FormatUtilsService.getFormattedTelephoneNumber(pixKeyCtrl.value));
9187
+ this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
9703
9188
  }
9704
9189
  }
9705
9190
  convertDTOToShowWithCustomFields(data) {
@@ -9711,14 +9196,14 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9711
9196
  this.visibleBtnSave = isEditMode;
9712
9197
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
9713
9198
  this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
9714
- this.setPixKeyValidators(isEditMode, this.pixAccountFormGroup);
9199
+ this.setPixKeyValidators(isEditMode);
9715
9200
  this.formatPixKeyTelephoneNumber();
9716
9201
  }
9717
9202
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
9718
9203
  "pixKeyType",
9719
9204
  "pixKey",
9720
9205
  "percentage",
9721
- "customFields"
9206
+ "customFields",
9722
9207
  ], []);
9723
9208
  }
9724
9209
  close() {
@@ -9726,11 +9211,13 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9726
9211
  this.visible = false;
9727
9212
  }
9728
9213
  addItem() {
9214
+ this.pixAccountFormGroup.updateValueAndValidity();
9215
+ verifyValidationsForm.call(this.pixAccountFormGroup);
9729
9216
  if (this.pixAccountFormGroup.valid) {
9730
9217
  if (this.employeeId) {
9731
9218
  this.pixAccountFormGroup.get("employee").setValue({
9732
9219
  tableId: this.employeeId,
9733
- name: ""
9220
+ name: "",
9734
9221
  });
9735
9222
  }
9736
9223
  this.pixAccountItemToList.emit(this.pixAccountFormGroup.getRawValue());
@@ -9754,9 +9241,13 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9754
9241
  return {
9755
9242
  prefix: "",
9756
9243
  thousands: this.currency.thousandsSeparator,
9757
- decimal: this.currency.decimalSeparator
9244
+ decimal: this.currency.decimalSeparator,
9758
9245
  };
9759
9246
  }
9247
+ /**
9248
+ * O Input que recebe a lista do component pai e chama o método de validação passando a lista recebida.
9249
+ * @param pixAccountList
9250
+ */
9760
9251
  set getListPixAccount(pixAccountList) {
9761
9252
  if (pixAccountList) {
9762
9253
  this.setValidatorsAccordingList(pixAccountList, null, false);
@@ -9765,23 +9256,143 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9765
9256
  this.resetForm();
9766
9257
  }
9767
9258
  }
9259
+ /**
9260
+ * Recebe a lista de registros já inseridos na tabela adiciona em uma variável os valores que serão usados para
9261
+ * a validação dos campos "percentage" e "pixAccount".
9262
+ * 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
9263
+ * no array de comparação dos validators.
9264
+ * @param pixAccountList
9265
+ * @param index
9266
+ */
9267
+ setValidatorsAccordingList(pixAccountList, index = null, isEditMode = true) {
9268
+ this.pixAccountList = pixAccountList && pixAccountList.length ? [...pixAccountList] : [];
9269
+ const percentageIncluded = [];
9270
+ if (this.pixAccountList && this.pixAccountList.length) {
9271
+ this.pixAccountList.filter((field, key) => {
9272
+ if (field["percentage"] && key != index) {
9273
+ percentageIncluded.push(field["percentage"]);
9274
+ }
9275
+ });
9276
+ }
9277
+ this.beforeSetPixKeyTypeValidator();
9278
+ this.setPixKeyValidators(isEditMode);
9279
+ this.validatePercentageValid(percentageIncluded);
9280
+ }
9281
+ /**
9282
+ * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
9283
+ */
9284
+ setPixKeyValidators(isEditMode) {
9285
+ const genericPixKey = this.pixAccountFormGroup.get("pixKey");
9286
+ if (this.pixKeyType) {
9287
+ switch (this.pixKeyType) {
9288
+ case "TELEPHONE":
9289
+ genericPixKey.setValidators(Validators.compose([
9290
+ Validators.required, GenericValidator.isValidPhoneNumber,
9291
+ ]));
9292
+ break;
9293
+ case "EMAIL":
9294
+ genericPixKey.setValidators(Validators.compose([
9295
+ Validators.required, GenericValidator.isValidEmail,
9296
+ ]));
9297
+ break;
9298
+ case "CPF":
9299
+ genericPixKey.setValidators(Validators.compose([
9300
+ Validators.required, GenericValidator.isValidCpf,
9301
+ ]));
9302
+ break;
9303
+ case "CNPJ":
9304
+ genericPixKey.setValidators(Validators.compose([
9305
+ Validators.required, GenericValidator.isValidCnpj,
9306
+ ]));
9307
+ break;
9308
+ case "RANDOM_KEY":
9309
+ genericPixKey.setValidators(Validators.required);
9310
+ break;
9311
+ default:
9312
+ genericPixKey.setValidators(null);
9313
+ break;
9314
+ }
9315
+ if (isEditMode) {
9316
+ genericPixKey.enable();
9317
+ }
9318
+ genericPixKey.updateValueAndValidity();
9319
+ }
9320
+ }
9321
+ /**
9322
+ * Este método calcula as parcentagens que já foram inseridas, e seta a diferença para chegar em
9323
+ * 100% na validação do campo "percentage" como um novo maxValue;
9324
+ * @param listValue
9325
+ */
9326
+ validatePercentageValid(listValue) {
9327
+ const percentage = this.pixAccountFormGroup.get("percentage");
9328
+ this.maxValuePercentage = listValue
9329
+ .reduce((currentValue, total) => currentValue - total, 100.00);
9330
+ percentage
9331
+ .setValidators(Validators.compose([
9332
+ ...this.initialValidatorOfPercentage,
9333
+ Validators.max(this.maxValuePercentage),
9334
+ ]));
9335
+ percentage.updateValueAndValidity();
9336
+ }
9768
9337
  set isViewMode(condition) {
9769
9338
  this.isView = !!(condition && !this.withSideBar);
9770
9339
  this.configEnableFields(!this.isView);
9771
9340
  if (!this.isView)
9772
9341
  this.resetForm();
9773
9342
  }
9774
- set paramsForm(value) {
9775
- this._paramsForm = value;
9343
+ phoneMask(event) {
9344
+ FormatUtilsService.formatTelephoneInputEvent(event);
9345
+ }
9346
+ setDefaultCpfPixKey() {
9347
+ if (this.defaultCpfNumber) {
9348
+ this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);
9349
+ }
9350
+ else {
9351
+ const sheetDocument = this.paramsForm.get("sheetDocument");
9352
+ if (sheetDocument) {
9353
+ const cpf = sheetDocument.get("cpfNumber").value;
9354
+ if (cpf) {
9355
+ this.pixAccountFormGroup.get("pixKey").setValue(cpf);
9356
+ }
9357
+ }
9358
+ }
9359
+ }
9360
+ beforeSetPixKeyTypeValidator() {
9361
+ const pixKeyType = this.pixAccountFormGroup.get("pixKeyType");
9362
+ if (this.pixAccountList && this.pixAccountList.length && pixKeyType) {
9363
+ pixKeyType
9364
+ .setValidators(Validators.compose([
9365
+ Validators.required,
9366
+ this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList),
9367
+ ]));
9368
+ }
9369
+ else {
9370
+ pixKeyType.setValidators(Validators.required);
9371
+ }
9776
9372
  }
9777
- set defaultCpfNumber(value) {
9778
- this._defaultCpfNumber = value;
9373
+ validateDuplicatePixKeyTypeBankAccount(listCompare) {
9374
+ return (control) => {
9375
+ const value = control && control.value;
9376
+ let condition = false;
9377
+ listCompare.filter((field) => {
9378
+ if (value) {
9379
+ if (field["pixKeyType"].key === 'BANK_ACCOUNT' && value.key === field["pixKeyType"].key) {
9380
+ return condition = true;
9381
+ }
9382
+ }
9383
+ });
9384
+ if (condition && !this.permitsEditBankAccountForm) {
9385
+ return { pixKeyTypeBankAccountDuplicate: true };
9386
+ }
9387
+ else {
9388
+ return null;
9389
+ }
9390
+ };
9779
9391
  }
9780
9392
  };
9781
9393
  HistoricalPixAccountFormComponent.ctorParameters = () => [
9782
9394
  { type: FormBuilder },
9783
- { type: ChangeDetectorRef },
9784
- { type: SharedStateService }
9395
+ { type: ChangeDetectorRef }
9785
9396
  ];
9786
9397
  __decorate([
9787
9398
  ViewChild(CustomFieldsComponent$1, { static: true })
@@ -9803,7 +9414,13 @@ __decorate([
9803
9414
  ], HistoricalPixAccountFormComponent.prototype, "isEditMode", void 0);
9804
9415
  __decorate([
9805
9416
  Input()
9806
- ], HistoricalPixAccountFormComponent.prototype, "showField", void 0);
9417
+ ], HistoricalPixAccountFormComponent.prototype, "paramsForm", void 0);
9418
+ __decorate([
9419
+ Input()
9420
+ ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
9421
+ __decorate([
9422
+ Input()
9423
+ ], HistoricalPixAccountFormComponent.prototype, "permitsEditBankAccountForm", void 0);
9807
9424
  __decorate([
9808
9425
  Output()
9809
9426
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -9822,20 +9439,29 @@ __decorate([
9822
9439
  __decorate([
9823
9440
  Input()
9824
9441
  ], HistoricalPixAccountFormComponent.prototype, "isViewMode", null);
9825
- __decorate([
9826
- Input()
9827
- ], HistoricalPixAccountFormComponent.prototype, "paramsForm", null);
9828
- __decorate([
9829
- Input()
9830
- ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", null);
9831
9442
  HistoricalPixAccountFormComponent = __decorate([
9832
9443
  Component({
9833
9444
  selector: "pix-account",
9834
- 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",
9445
+ 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",
9835
9446
  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}"]
9836
9447
  })
9837
9448
  ], HistoricalPixAccountFormComponent);
9838
9449
 
9450
+ let HistoricalPixAccountService = class HistoricalPixAccountService {
9451
+ constructor(http) {
9452
+ this.http = http;
9453
+ }
9454
+ query(path, body, service = ServiceType.PAYROLL) {
9455
+ return this.http.query(path, body, service);
9456
+ }
9457
+ };
9458
+ HistoricalPixAccountService.ctorParameters = () => [
9459
+ { type: HttpClientService }
9460
+ ];
9461
+ HistoricalPixAccountService = __decorate([
9462
+ Injectable()
9463
+ ], HistoricalPixAccountService);
9464
+
9839
9465
  let HistoricalPixAccountModule = class HistoricalPixAccountModule {
9840
9466
  };
9841
9467
  HistoricalPixAccountModule = __decorate([
@@ -9863,8 +9489,6 @@ HistoricalPixAccountModule = __decorate([
9863
9489
  CustomFieldsModule$1,
9864
9490
  PanelModule,
9865
9491
  InputMaskModule,
9866
- DropdownModule,
9867
- TabViewModule,
9868
9492
  ],
9869
9493
  declarations: [HistoricalPixAccountComponent, HistoricalPixAccountFormComponent],
9870
9494
  providers: [HistoricalPixAccountService, ConfirmationService],
@@ -9903,7 +9527,7 @@ HistoricalPixAccountListService = __decorate([
9903
9527
 
9904
9528
  const moment$e = moment_;
9905
9529
  let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent {
9906
- constructor(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService, sharedStateService) {
9530
+ constructor(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
9907
9531
  this.confirmationService = confirmationService;
9908
9532
  this.translateService = translateService;
9909
9533
  this.activatedRoute = activatedRoute;
@@ -9911,14 +9535,13 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9911
9535
  this.router = router;
9912
9536
  this.messageService = messageService;
9913
9537
  this.historicalPixAccountListService = historicalPixAccountListService;
9914
- this.sharedStateService = sharedStateService;
9915
9538
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
9916
9539
  this.keyPayload = "historicalEmployeePix";
9917
9540
  this.withSidebar = true;
9918
9541
  this.isOnlyView = new EventEmitter();
9919
9542
  this.isOnlyEdit = new EventEmitter();
9920
9543
  this.enableView = new EventEmitter();
9921
- this.isEditJudicialDependentPix = new EventEmitter();
9544
+ this.enableEdit = new EventEmitter();
9922
9545
  this.ngUnsubscribe = new Subject();
9923
9546
  this.loading = true;
9924
9547
  this.columns = [
@@ -9938,7 +9561,6 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9938
9561
  ngOnDestroy() {
9939
9562
  this.ngUnsubscribe.next();
9940
9563
  this.ngUnsubscribe.complete();
9941
- this.unsubscribe();
9942
9564
  }
9943
9565
  ngAfterViewInit() {
9944
9566
  this.cd.detectChanges();
@@ -9956,20 +9578,14 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9956
9578
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9957
9579
  command: () => {
9958
9580
  if (this.isAllowToViewHistorical) {
9959
- this.sharedStateService.setHideField(true);
9960
- this.sharedStateService.setShowButton(false);
9961
- this.sharedStateService.setShowEditMode(false);
9962
9581
  const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
9963
9582
  if (this.withSidebar) {
9964
9583
  this.isOnlyView.emit(true);
9965
- this.isOnlyEdit.emit(false);
9966
- this.sharedStateService.setHideBtnAddForViewMode(true);
9967
9584
  this.router.navigate([`historical-pix-account/${dateChange}`], {
9968
9585
  relativeTo: this.activatedRoute,
9969
9586
  });
9970
9587
  }
9971
9588
  else {
9972
- this.sharedStateService.setSaveButton(false);
9973
9589
  this.enableView.emit(dateChange);
9974
9590
  }
9975
9591
  }
@@ -9982,25 +9598,16 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9982
9598
  label: this.translateService.instant("hcm.payroll.edit"),
9983
9599
  command: () => {
9984
9600
  if (this.isAllowToEditHistorical) {
9985
- this.sharedStateService.setHideField(true);
9986
- this.sharedStateService.setShowButton(false);
9987
- this.sharedStateService.setShowEditMode(true);
9988
9601
  const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
9989
9602
  if (this.withSidebar) {
9990
9603
  this.isOnlyView.emit(false);
9991
9604
  this.isOnlyEdit.emit(true);
9992
- this.sharedStateService.setHideBtnAddForViewMode(false);
9993
9605
  this.router.navigate([`historical-pix-account/${dateChange}`], {
9994
9606
  relativeTo: this.activatedRoute,
9995
9607
  });
9996
- this.sharedStateService.setShouldReloadWindowOnlyEditMode(true);
9997
9608
  }
9998
9609
  else {
9999
- setTimeout(() => {
10000
- this.sharedStateService.triggerActiveValidatorsOnEditModalOpen();
10001
- });
10002
- this.sharedStateService.setSaveButton(true);
10003
- this.enableView.emit(dateChange);
9610
+ this.enableEdit.emit(dateChange);
10004
9611
  }
10005
9612
  }
10006
9613
  else {
@@ -10084,19 +9691,6 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
10084
9691
  this.lastRecord = payload[0];
10085
9692
  }
10086
9693
  }
10087
- unsubscribe() {
10088
- if (this._subscription) {
10089
- this._subscription.unsubscribe();
10090
- }
10091
- }
10092
- set hideFieldsOnAdd$(subject) {
10093
- this.unsubscribe();
10094
- if (subject) {
10095
- this._subscription = subject.subscribe((value) => {
10096
- this.sharedStateService.setHideField(value);
10097
- });
10098
- }
10099
- }
10100
9694
  get isAllowToAddHistorical() {
10101
9695
  return (this.permission["incluir"]);
10102
9696
  }
@@ -10126,8 +9720,7 @@ HistoricalPixAccountListComponent.ctorParameters = () => [
10126
9720
  { type: ChangeDetectorRef },
10127
9721
  { type: Router },
10128
9722
  { type: MessageService },
10129
- { type: HistoricalPixAccountListService },
10130
- { type: SharedStateService }
9723
+ { type: HistoricalPixAccountListService }
10131
9724
  ];
10132
9725
  __decorate([
10133
9726
  ViewChild(CustomFieldsComponent$1, { static: false })
@@ -10153,9 +9746,6 @@ __decorate([
10153
9746
  __decorate([
10154
9747
  Input()
10155
9748
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10156
- __decorate([
10157
- Input()
10158
- ], HistoricalPixAccountListComponent.prototype, "hideField", void 0);
10159
9749
  __decorate([
10160
9750
  Output()
10161
9751
  ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
@@ -10167,10 +9757,7 @@ __decorate([
10167
9757
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
10168
9758
  __decorate([
10169
9759
  Output()
10170
- ], HistoricalPixAccountListComponent.prototype, "isEditJudicialDependentPix", void 0);
10171
- __decorate([
10172
- Input()
10173
- ], HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", null);
9760
+ ], HistoricalPixAccountListComponent.prototype, "enableEdit", void 0);
10174
9761
  __decorate([
10175
9762
  Input()
10176
9763
  ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
@@ -10215,5 +9802,5 @@ HistoricalPixAccountListModule = __decorate([
10215
9802
  * Generated bundle index. Do not edit.
10216
9803
  */
10217
9804
 
10218
- 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 };
9805
+ 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 };
10219
9806
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map