@senior-gestao-pessoas/payroll-core 9.4.0 → 9.5.0-3888ac21-edb9-4553-82f4-3a69943e1d42

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 (45) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +996 -514
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +16 -1
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/historical-pix-account/historical-pix-account-base.d.ts +27 -0
  6. package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +9 -40
  7. package/components/historical-pix-account/historical-pix-account.component.d.ts +39 -8
  8. package/components/historical-pix-account/historical-pix-account.service.d.ts +1 -0
  9. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +13 -2
  10. package/components/shared/index.d.ts +1 -0
  11. package/components/shared/shared-state.service.d.ts +21 -0
  12. package/components/utils/format-utils/format-utils.service.d.ts +30 -3
  13. package/esm2015/components/historical-pix-account/historical-pix-account-base.js +173 -0
  14. package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +33 -189
  15. package/esm2015/components/historical-pix-account/historical-pix-account.component.js +260 -20
  16. package/esm2015/components/historical-pix-account/historical-pix-account.module.js +5 -1
  17. package/esm2015/components/historical-pix-account/historical-pix-account.service.js +8 -1
  18. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +83 -34
  19. package/esm2015/components/shared/index.js +2 -0
  20. package/esm2015/components/shared/shared-state.service.js +49 -0
  21. package/esm2015/components/utils/format-utils/format-utils.service.js +88 -5
  22. package/esm2015/public_api.js +2 -1
  23. package/esm2015/senior-gestao-pessoas-payroll-core.js +3 -2
  24. package/esm5/components/historical-pix-account/historical-pix-account-base.js +186 -0
  25. package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +57 -203
  26. package/esm5/components/historical-pix-account/historical-pix-account.component.js +302 -49
  27. package/esm5/components/historical-pix-account/historical-pix-account.module.js +5 -1
  28. package/esm5/components/historical-pix-account/historical-pix-account.service.js +8 -1
  29. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +92 -34
  30. package/esm5/components/shared/index.js +2 -0
  31. package/esm5/components/shared/shared-state.service.js +50 -0
  32. package/esm5/components/utils/format-utils/format-utils.service.js +88 -5
  33. package/esm5/public_api.js +2 -1
  34. package/esm5/senior-gestao-pessoas-payroll-core.js +3 -2
  35. package/fesm2015/senior-gestao-pessoas-payroll-core.js +917 -480
  36. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  37. package/fesm5/senior-gestao-pessoas-payroll-core.js +992 -511
  38. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  39. package/locale/en-US.json +1 -1
  40. package/locale/es-ES.json +1 -1
  41. package/locale/pt-BR.json +1 -1
  42. package/package.json +2 -32
  43. package/public_api.d.ts +1 -0
  44. package/senior-gestao-pessoas-payroll-core.d.ts +2 -1
  45. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
@@ -36,6 +36,7 @@ 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';
39
40
 
40
41
  /**
41
42
  * Created by Bruno.Curioletti on 30/05/2017.
@@ -8440,6 +8441,25 @@ class FormatUtilsService {
8440
8441
  }
8441
8442
  return null;
8442
8443
  }
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
+ }
8443
8463
  /**
8444
8464
  * Retorna o CNPJ formatado
8445
8465
  * @param cnpj CNPJ
@@ -8455,6 +8475,28 @@ class FormatUtilsService {
8455
8475
  }
8456
8476
  return null;
8457
8477
  }
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
+ }
8458
8500
  /**
8459
8501
  * Retorna a mascara do CPF/CNPJ
8460
8502
  * @param key Valores possíveis são CPF ou CNPJ
@@ -8469,6 +8511,24 @@ class FormatUtilsService {
8469
8511
  return "";
8470
8512
  }
8471
8513
  }
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
+ }
8472
8532
  /**
8473
8533
  * Metódo para formatar o número de telefone.
8474
8534
  * @param telephoneNumber String contendo o número de telefone.
@@ -8500,6 +8560,13 @@ class FormatUtilsService {
8500
8560
  }
8501
8561
  return tel;
8502
8562
  }
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
+ }
8503
8570
  /**
8504
8571
  * Metódo para formatar o número de telefone de um campo Input.
8505
8572
  * @param event Evento do Input do campo de telefone.
@@ -8513,30 +8580,454 @@ class FormatUtilsService {
8513
8580
  event.target.value = FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
8514
8581
  }
8515
8582
  /**
8516
- * Metódo para formatar a porcentagem para 2 casas decimais.
8517
- * @param value Número a ser formatado.
8583
+ * Formata o campo de input de CPF em tempo real.
8584
+ * @param event Evento do input
8518
8585
  */
8519
- static getFormattedPercentage(value) {
8520
- return parseFloat(value).toFixed(2).replace('.', ',') + '%';
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.hideBtnAddForViewMode = new BehaviorSubject(false);
8621
+ this.hideBtnAddForViewMode$ = this.hideBtnAddForViewMode.asObservable();
8622
+ }
8623
+ setHideField(value) {
8624
+ this.hideFieldSubject.next(value);
8625
+ }
8626
+ setShowButton(value) {
8627
+ this.showButtonSubject.next(value);
8628
+ }
8629
+ setSaveButton(value) {
8630
+ this.saveButtonSubject.next(value);
8631
+ }
8632
+ setShowEditMode(value) {
8633
+ this.showEditMode.next(value);
8634
+ }
8635
+ triggerActiveValidatorsOnEditModalOpen() {
8636
+ this.activeValidatorsOnEditModalOpen.next();
8637
+ }
8638
+ setHideBtnAddForViewMode(value) {
8639
+ this.hideBtnAddForViewMode.next(value);
8640
+ }
8641
+ resetHideField() {
8642
+ this.hideFieldSubject.next(true);
8643
+ }
8644
+ };
8645
+ SharedStateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function SharedStateService_Factory() { return new SharedStateService(); }, token: SharedStateService, providedIn: "root" });
8646
+ SharedStateService = __decorate([
8647
+ Injectable({
8648
+ providedIn: 'root',
8649
+ })
8650
+ ], SharedStateService);
8651
+
8652
+ class GenericValidator {
8653
+ constructor() { }
8654
+ /**
8655
+ * Valida o CEI (Cadastro específico de INSS) digitado.
8656
+ */
8657
+ static isValidCei(control) {
8658
+ const cei = control.value;
8659
+ if (!cei)
8660
+ return null;
8661
+ else if (cei.length != 11)
8662
+ return null;
8663
+ const multiplicadorBase = "3298765432";
8664
+ let total = 0;
8665
+ let resto = 0;
8666
+ let multiplicando = 0;
8667
+ let multiplicador = 0;
8668
+ if (cei.length !== 11 ||
8669
+ cei === "00000000000" ||
8670
+ cei === "11111111111" ||
8671
+ cei === "22222222222" ||
8672
+ cei === "33333333333" ||
8673
+ cei === "44444444444" ||
8674
+ cei === "55555555555" ||
8675
+ cei === "66666666666" ||
8676
+ cei === "77777777777" ||
8677
+ cei === "88888888888" ||
8678
+ cei === "99999999999")
8679
+ return { invalidCei: true };
8680
+ else {
8681
+ for (let i = 0; i < 10; i++) {
8682
+ multiplicando = parseInt(cei.substring(i, i + 1), 10);
8683
+ multiplicador = parseInt(multiplicadorBase.substring(i, i + 1), 10);
8684
+ total += multiplicando * multiplicador;
8685
+ }
8686
+ resto = 11 - (total % 11);
8687
+ resto = resto === 10 || resto === 11 ? 0 : resto;
8688
+ const digito = parseInt("" + cei.charAt(10), 10);
8689
+ return resto === digito ? null : { invalidCei: true };
8690
+ }
8691
+ }
8692
+ /**
8693
+ * Valida se o CPF é valido. Deve-se ser informado o cpf sem máscara.
8694
+ */
8695
+ static isValidCpf(control) {
8696
+ const cpf = control.value;
8697
+ if (cpf) {
8698
+ let numbers, digits, sum, i, result, equalDigits;
8699
+ equalDigits = 1;
8700
+ if (cpf.length < 11) {
8701
+ return null;
8702
+ }
8703
+ for (i = 0; i < cpf.length - 1; i++) {
8704
+ if (cpf.charAt(i) !== cpf.charAt(i + 1)) {
8705
+ equalDigits = 0;
8706
+ break;
8707
+ }
8708
+ }
8709
+ if (!equalDigits) {
8710
+ numbers = cpf.substring(0, 9);
8711
+ digits = cpf.substring(9);
8712
+ sum = 0;
8713
+ for (i = 10; i > 1; i--) {
8714
+ sum += numbers.charAt(10 - i) * i;
8715
+ }
8716
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8717
+ if (result !== Number(digits.charAt(0))) {
8718
+ return { cpfNotValid: true };
8719
+ }
8720
+ numbers = cpf.substring(0, 10);
8721
+ sum = 0;
8722
+ for (i = 11; i > 1; i--) {
8723
+ sum += numbers.charAt(11 - i) * i;
8724
+ }
8725
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8726
+ if (result !== Number(digits.charAt(1))) {
8727
+ return { cpfNotValid: true };
8728
+ }
8729
+ return null;
8730
+ }
8731
+ else {
8732
+ return { cpfNotValid: true };
8733
+ }
8734
+ }
8735
+ return null;
8736
+ }
8737
+ /**
8738
+ * Valida se o CNPJ é valido. Deve-se ser informado o cpf sem máscara.
8739
+ */
8740
+ static isValidCnpj(control) {
8741
+ let cnpj = control.value;
8742
+ if (cnpj) {
8743
+ let size, numbers, digits, sum, pos, result;
8744
+ cnpj = cnpj.replace(/[^\d]+/g, '');
8745
+ if (cnpj.length !== 14) {
8746
+ return null;
8747
+ }
8748
+ // Elimina CNPJs invalidos conhecidos
8749
+ if (cnpj === '00000000000000' ||
8750
+ cnpj === '11111111111111' ||
8751
+ cnpj === '22222222222222' ||
8752
+ cnpj === '33333333333333' ||
8753
+ cnpj === '44444444444444' ||
8754
+ cnpj === '55555555555555' ||
8755
+ cnpj === '66666666666666' ||
8756
+ cnpj === '77777777777777' ||
8757
+ cnpj === '88888888888888' ||
8758
+ cnpj === '99999999999999') {
8759
+ return { cnpjNotValid: true };
8760
+ }
8761
+ // Valida DVs
8762
+ size = cnpj.length - 2;
8763
+ numbers = cnpj.substring(0, size);
8764
+ digits = cnpj.substring(size);
8765
+ sum = 0;
8766
+ pos = size - 7;
8767
+ for (let i = size; i >= 1; i--) {
8768
+ sum += numbers.charAt(size - i) * pos--;
8769
+ if (pos < 2) {
8770
+ pos = 9;
8771
+ }
8772
+ }
8773
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8774
+ if (result !== Number(digits.charAt(0))) {
8775
+ return { cnpjNotValid: true };
8776
+ }
8777
+ size = size + 1;
8778
+ numbers = cnpj.substring(0, size);
8779
+ sum = 0;
8780
+ pos = size - 7;
8781
+ for (let i = size; i >= 1; i--) {
8782
+ sum += numbers.charAt(size - i) * pos--;
8783
+ if (pos < 2) {
8784
+ pos = 9;
8785
+ }
8786
+ }
8787
+ result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8788
+ if (result !== Number(digits.charAt(1))) {
8789
+ return { cnpjNotValid: true };
8790
+ }
8791
+ return null;
8792
+ }
8793
+ return null;
8794
+ }
8795
+ /**
8796
+ * Válida o número de telefone da chave PIX.
8797
+ */
8798
+ static isValidPhoneNumber(control) {
8799
+ let cellPhoneKey = control.value || '';
8800
+ cellPhoneKey = cellPhoneKey.replace(/[\s()-]/g, '');
8801
+ const regexNumberTelephone = /^[1-9][\d]{1,2}\d{8,10}$/;
8802
+ const isValidNumberTelephone = regexNumberTelephone.test(cellPhoneKey);
8803
+ return isValidNumberTelephone ? null : { invalidPhoneNumber: true };
8804
+ }
8805
+ /**
8806
+ * Valida o email da chave PIX.
8807
+ */
8808
+ static isValidEmail(control) {
8809
+ const emailKey = control.value;
8810
+ const regexValidEmail = /^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/;
8811
+ const isValidEmail = regexValidEmail.test(emailKey);
8812
+ return isValidEmail ? null : { invalidEmail: true };
8521
8813
  }
8522
8814
  }
8523
8815
 
8524
- let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8525
- constructor(translateService, cd, formBuilder, messageService) {
8816
+ class HistoricakPixAccountBase {
8817
+ constructor(formBuilder) {
8818
+ this._paramsForm = new FormGroup({});
8819
+ this._defaultCpfNumber = null;
8820
+ this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
8821
+ this.pixAccountList = [];
8822
+ this.maxValuePercentage = 100.0;
8823
+ this.isShowPixKeyFieldValidatorMessage = false;
8824
+ this.formBuilder = formBuilder;
8825
+ this.createFormGroupBase();
8826
+ }
8827
+ phoneMask(event) {
8828
+ FormatUtilsService.formatTelephoneInputEvent(event);
8829
+ }
8830
+ cpfMask(event) {
8831
+ FormatUtilsService.formatCpfInputEvent(event);
8832
+ }
8833
+ cnpjMask(event) {
8834
+ FormatUtilsService.formatCnpjInputEvent(event);
8835
+ }
8836
+ onChangePixKeyType(item, form) {
8837
+ if (!item || !item.key)
8838
+ return;
8839
+ this.pixKeyType = item.key;
8840
+ const targetForm = (typeof form !== 'undefined' && form !== null)
8841
+ ? form
8842
+ : this.pixAccountFormGroup;
8843
+ this.isShowPixKeyFieldValidatorMessage = true;
8844
+ const pixKeyControl = targetForm.get("pixKey");
8845
+ if (pixKeyControl) {
8846
+ pixKeyControl.reset();
8847
+ }
8848
+ this.setPixKeyValidators(true, targetForm);
8849
+ if (item.key === "CPF") {
8850
+ this.setDefaultCpfPixKey(targetForm);
8851
+ }
8852
+ }
8853
+ onClearPixKeyType(form) {
8854
+ var targetForm = (typeof form !== 'undefined' && form !== null)
8855
+ ? form
8856
+ : this.pixAccountFormGroup;
8857
+ this.isShowPixKeyFieldValidatorMessage = false;
8858
+ if (targetForm.get("pixKey")) {
8859
+ targetForm.get("pixKey").reset();
8860
+ }
8861
+ }
8862
+ setDefaultCpfPixKey(form) {
8863
+ var targetForm = (typeof form !== 'undefined' && form !== null)
8864
+ ? form
8865
+ : this.pixAccountFormGroup;
8866
+ if (this._defaultCpfNumber) {
8867
+ if (targetForm.get("pixKey")) {
8868
+ targetForm.get("pixKey").setValue(this._defaultCpfNumber);
8869
+ }
8870
+ }
8871
+ else {
8872
+ var sheetDocument = this._paramsForm.get("sheetDocument");
8873
+ if (sheetDocument && sheetDocument.get("cpfNumber")) {
8874
+ var cpf = sheetDocument.get("cpfNumber").value;
8875
+ if (cpf && targetForm.get("pixKey")) {
8876
+ targetForm.get("pixKey").setValue(cpf);
8877
+ }
8878
+ }
8879
+ }
8880
+ }
8881
+ createFormGroupBase() {
8882
+ this.pixAccountFormGroup = this.formBuilder.group({
8883
+ id: this.formBuilder.control(null),
8884
+ index: this.formBuilder.control(null),
8885
+ employee: this.formBuilder.control({ value: { tableId: null }, disabled: true }),
8886
+ dateChange: this.formBuilder.control(null),
8887
+ pixKeyType: this.formBuilder.control(null, Validators.required),
8888
+ pixKey: this.formBuilder.control(null),
8889
+ percentage: this.formBuilder.control(null, Validators.compose([
8890
+ ...this.initialValidatorOfPercentage,
8891
+ Validators.max(this.maxValuePercentage),
8892
+ ])),
8893
+ externalId: this.formBuilder.control(null),
8894
+ customFields: this.formBuilder.control(null),
8895
+ });
8896
+ }
8897
+ setValidatorsAccordingList(pixAccountList, index = null, isEditMode = true, form) {
8898
+ var targetForm = (typeof form !== 'undefined' && form !== null)
8899
+ ? form
8900
+ : this.pixAccountFormGroup;
8901
+ this.pixAccountList = (pixAccountList && pixAccountList.length > 0)
8902
+ ? [].concat(pixAccountList)
8903
+ : [];
8904
+ var percentageIncluded = [];
8905
+ for (var i = 0; i < this.pixAccountList.length; i++) {
8906
+ var field = this.pixAccountList[i];
8907
+ if (field && field.percentage && i !== index) {
8908
+ percentageIncluded.push(field.percentage);
8909
+ }
8910
+ }
8911
+ this.beforeSetPixKeyTypeValidator(targetForm);
8912
+ this.setPixKeyValidators(isEditMode, targetForm);
8913
+ this.validatePercentageValid(percentageIncluded, targetForm);
8914
+ }
8915
+ beforeSetPixKeyTypeValidator(form) {
8916
+ const control = form.get("pixKeyType");
8917
+ if (this.pixAccountList && this.pixAccountList.length) {
8918
+ control.setValidators(Validators.compose([
8919
+ Validators.required,
8920
+ this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList),
8921
+ ]));
8922
+ }
8923
+ else {
8924
+ control.setValidators(Validators.required);
8925
+ }
8926
+ control.updateValueAndValidity();
8927
+ }
8928
+ setPixKeyValidators(isEditMode, form) {
8929
+ const pixKey = form.get("pixKey");
8930
+ switch (this.pixKeyType) {
8931
+ case "TELEPHONE":
8932
+ pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidPhoneNumber]));
8933
+ break;
8934
+ case "EMAIL":
8935
+ pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidEmail]));
8936
+ break;
8937
+ case "CPF":
8938
+ pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCpf]));
8939
+ break;
8940
+ case "CNPJ":
8941
+ pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCnpj]));
8942
+ break;
8943
+ case "RANDOM_KEY":
8944
+ pixKey.setValidators(Validators.required);
8945
+ break;
8946
+ default:
8947
+ pixKey.clearValidators();
8948
+ }
8949
+ if (isEditMode) {
8950
+ pixKey.enable();
8951
+ }
8952
+ pixKey.updateValueAndValidity();
8953
+ }
8954
+ validatePercentageValid(listValue, form) {
8955
+ const percentage = form.get("percentage");
8956
+ this.maxValuePercentage = listValue.reduce((acc, val) => acc - val, 100.0);
8957
+ percentage.setValidators(Validators.compose([
8958
+ ...this.initialValidatorOfPercentage,
8959
+ Validators.max(this.maxValuePercentage),
8960
+ ]));
8961
+ percentage.updateValueAndValidity();
8962
+ }
8963
+ validateDuplicatePixKeyTypeBankAccount(listCompare) {
8964
+ return (control) => {
8965
+ const value = control.value;
8966
+ const isDuplicate = listCompare.some((field) => value &&
8967
+ field.pixKeyType.key === "BANK_ACCOUNT" &&
8968
+ value.key === "BANK_ACCOUNT");
8969
+ return isDuplicate ? { pixKeyTypeBankAccountDuplicate: true } : null;
8970
+ };
8971
+ }
8972
+ get paramsForm() {
8973
+ return this._paramsForm;
8974
+ }
8975
+ set paramsForm(value) {
8976
+ this._paramsForm = value;
8977
+ }
8978
+ get defaultCpfNumber() {
8979
+ return this._defaultCpfNumber;
8980
+ }
8981
+ set defaultCpfNumber(value) {
8982
+ this._defaultCpfNumber = value;
8983
+ }
8984
+ }
8985
+
8986
+ let HistoricalPixAccountService = class HistoricalPixAccountService {
8987
+ constructor(http) {
8988
+ this.http = http;
8989
+ }
8990
+ query(path, body, service = ServiceType.PAYROLL) {
8991
+ return this.http.query(path, body, service);
8992
+ }
8993
+ enumQuery() {
8994
+ const path = 'enumQuery';
8995
+ const body = {
8996
+ names: ['PixKeyType']
8997
+ };
8998
+ return this.http.query(path, body, ServiceType.PAYROLL);
8999
+ }
9000
+ };
9001
+ HistoricalPixAccountService.ctorParameters = () => [
9002
+ { type: HttpClientService }
9003
+ ];
9004
+ HistoricalPixAccountService = __decorate([
9005
+ Injectable()
9006
+ ], HistoricalPixAccountService);
9007
+
9008
+ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends HistoricakPixAccountBase {
9009
+ constructor(translateService, cd, formBuilder, sharedStateService, service) {
9010
+ super(formBuilder);
8526
9011
  this.translateService = translateService;
8527
9012
  this.cd = cd;
8528
- this.formBuilder = formBuilder;
8529
- this.messageService = messageService;
9013
+ this.sharedStateService = sharedStateService;
9014
+ this.service = service;
8530
9015
  this.recordByRow = 1;
8531
9016
  this.showDateChange = false;
8532
9017
  this.isEditMode = false;
8533
9018
  this.isViewMode = false;
8534
9019
  this.withSideBar = true;
8535
- this.defaultCpfNumber = null;
8536
9020
  this.listDataReciever = [];
9021
+ this.addExistentHistoricData = [];
9022
+ this.getListPixAccount = [];
9023
+ this.isEditModeForSave = false;
9024
+ this.showField = false;
9025
+ this.hideBtnAddForViewMode = false;
9026
+ this.showButtonView = true;
8537
9027
  this.isViewModeActive = new EventEmitter();
8538
9028
  this.isEditModeActive = new EventEmitter();
8539
9029
  this.isDeleteModeActive = new EventEmitter();
9030
+ this.isValidChangeForm = new EventEmitter();
8540
9031
  this.listFromApp = [];
8541
9032
  this.visibleChange = new EventEmitter();
8542
9033
  this.ngUnsubscribe = new Subject();
@@ -8550,6 +9041,11 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8550
9041
  this.loading = true;
8551
9042
  this.listData = [];
8552
9043
  this.listDataNoPage = [];
9044
+ this.showEditMode = false;
9045
+ this.hasRecordsPix = true;
9046
+ this.hideFields = this.sharedStateService.hideField$;
9047
+ this.suggestions = [];
9048
+ this.formGroupByRow = {};
8553
9049
  this.cols = [
8554
9050
  {
8555
9051
  label: this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
@@ -8563,6 +9059,10 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8563
9059
  label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
8564
9060
  field: "percentage",
8565
9061
  },
9062
+ {
9063
+ label: this.translateService.instant("hcm.payroll.movimentation_generic_action"),
9064
+ field: "actions",
9065
+ }
8566
9066
  ];
8567
9067
  this.actions = (rowData = {}, key) => {
8568
9068
  return [
@@ -8600,7 +9100,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8600
9100
  },
8601
9101
  },
8602
9102
  {
8603
- visible: !this.isEditMode,
9103
+ visible: !this.isEditMode || this.showEditMode,
8604
9104
  label: this.translateService.instant("hcm.payroll.delete"),
8605
9105
  command: () => {
8606
9106
  if (this.isAllowToDeleteHistorical) {
@@ -8621,24 +9121,141 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8621
9121
  this.createFormGroup();
8622
9122
  }
8623
9123
  ngOnInit() {
9124
+ this.showFields = this.showField;
8624
9125
  this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
9126
+ this.sharedStateService.showEditMode$.subscribe((value) => {
9127
+ this.showEditMode = value;
9128
+ this.isEditModeForSave = value;
9129
+ });
9130
+ this.sharedStateService.activeValidatorsOnEditModalOpen$
9131
+ .subscribe(() => {
9132
+ Object.values(this.formGroupByRow).forEach(fg => {
9133
+ Object.values(fg.controls).forEach(control => {
9134
+ control.markAsTouched();
9135
+ control.updateValueAndValidity();
9136
+ });
9137
+ });
9138
+ this.emitFormValidity();
9139
+ });
8625
9140
  }
8626
9141
  ngOnChanges(changes) {
8627
9142
  if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
8628
9143
  this.listFromApp = changes['listDataReciever'].currentValue;
8629
9144
  }
9145
+ if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
9146
+ this.getHistoricalPixAccountList();
9147
+ }
9148
+ if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
9149
+ const newData = changes['addExistentHistoricData'].currentValue;
9150
+ this.rebuildFormGroupMap(newData);
9151
+ }
9152
+ if (changes['isEditMode']) {
9153
+ this.isEditMode = changes['isEditMode'].currentValue;
9154
+ this.cd.detectChanges();
9155
+ }
9156
+ }
9157
+ createFormGroup() {
9158
+ this.historicalPixAccountList = this.formBuilder.group({
9159
+ historicalPixAccountList: this.formBuilder.control(null),
9160
+ });
9161
+ }
9162
+ ngOnDestroy() {
9163
+ this.ngUnsubscribe.next();
9164
+ this.ngUnsubscribe.complete();
9165
+ }
9166
+ ngAfterViewInit() {
9167
+ this.cd.detectChanges();
9168
+ }
9169
+ emitFormValidity() {
9170
+ const allValid = Object.values(this.formGroupByRow).every(fg => {
9171
+ fg.updateValueAndValidity();
9172
+ return fg.valid;
9173
+ });
9174
+ this.isValidChangeForm.emit(allValid);
9175
+ }
9176
+ filterPixKeyType(event) {
9177
+ const query = event.query;
9178
+ this.service.enumQuery().subscribe((response) => {
9179
+ const pixKeyTypeEnum = response.results.find((result) => result.enumName === 'PixKeyType');
9180
+ if (pixKeyTypeEnum) {
9181
+ this.suggestions = pixKeyTypeEnum.items.filter((item) => item.value.toLowerCase().includes(query.toLowerCase()));
9182
+ }
9183
+ else {
9184
+ this.suggestions = [];
9185
+ }
9186
+ });
9187
+ }
9188
+ createPixRowFormGroup() {
9189
+ return this.formBuilder.group({
9190
+ id: [null],
9191
+ pixKeyType: [null, Validators.required],
9192
+ pixKey: [null],
9193
+ percentage: [0, Validators.compose([
9194
+ ...this.initialValidatorOfPercentage,
9195
+ Validators.max(this.maxValuePercentage),
9196
+ ])]
9197
+ });
9198
+ }
9199
+ onPixKeyInput(event, index) {
9200
+ const inputValue = event.target.value;
9201
+ const inputRawValue = inputValue.replace(/\D/g, '');
9202
+ const form = this.formGroupByRow[index];
9203
+ const pixKeyControl = form.get('pixKey');
9204
+ if (pixKeyControl) {
9205
+ pixKeyControl.setValue(inputRawValue, { emitEvent: false });
9206
+ pixKeyControl.markAsDirty();
9207
+ pixKeyControl.updateValueAndValidity();
9208
+ }
9209
+ this.setPixKeyValidators(true, form);
9210
+ this.emitFormValidity();
9211
+ }
9212
+ onBlurPixCpfAndCnpj(index) {
9213
+ const form = this.formGroupByRow[index];
9214
+ const pixKeyControl = form.get('pixKey');
9215
+ const pixKeyTypeControl = form.get('pixKeyType');
9216
+ if (!pixKeyControl || !pixKeyTypeControl)
9217
+ return;
9218
+ const currentValue = pixKeyControl.value;
9219
+ const pixKeyType = pixKeyTypeControl.value.key;
9220
+ const rawValue = (currentValue || '').replace(/\D/g, '');
9221
+ pixKeyControl.setValue(rawValue, { emitEvent: false });
9222
+ if (pixKeyControl.valid) {
9223
+ form.patchValue({
9224
+ pixKeyFormatted: FormatUtilsService.getFormattedSubscriptionNumber(rawValue, pixKeyType)
9225
+ });
9226
+ }
9227
+ this.emitFormValidity();
8630
9228
  }
8631
- createFormGroup() {
8632
- this.historicalPixAccountList = this.formBuilder.group({
8633
- historicalPixAccountList: this.formBuilder.control(null),
8634
- });
9229
+ getFormattedPixKey(type, value) {
9230
+ return FormatUtilsService.getFormattedSubscriptionNumber(value, type);
8635
9231
  }
8636
- ngOnDestroy() {
8637
- this.ngUnsubscribe.next();
8638
- this.ngUnsubscribe.complete();
9232
+ syncPixDataToParentForm() {
9233
+ if (!this.isEditModeForSave)
9234
+ return;
9235
+ const values = Object.values(this.formGroupByRow).map(fg => {
9236
+ const value = fg.getRawValue();
9237
+ const pixKeyType = value.pixKeyType.key;
9238
+ if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
9239
+ value.pixKey = (value.pixKey || '').replace(/[.\-\/]/g, '');
9240
+ }
9241
+ else if (pixKeyType === 'TELEPHONE') {
9242
+ value.pixKey = (value.pixKey || '').replace(/[()\s\-]/g, '');
9243
+ }
9244
+ return value;
9245
+ });
9246
+ this.formGroup
9247
+ .get(this.fieldFormGroup)
9248
+ .get('historicalPixAccountList')
9249
+ .setValue(values);
9250
+ this.emitFormValidity();
8639
9251
  }
8640
- ngAfterViewInit() {
8641
- this.cd.detectChanges();
9252
+ syncResetPixFormToParent() {
9253
+ this.formGroupByRow = {};
9254
+ this.historicalPixAccountList.reset();
9255
+ this.historicalPixAccountList.get('historicalPixAccountList').setValue([]);
9256
+ if (this.addExistentHistoricData.length) {
9257
+ this.rebuildFormGroupMap(this.addExistentHistoricData);
9258
+ }
8642
9259
  }
8643
9260
  onLazyLoad(event) {
8644
9261
  const first = event && event.first ? event.first : 0;
@@ -8666,6 +9283,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8666
9283
  this.refreshCssInIE11();
8667
9284
  }
8668
9285
  this.loading = false;
9286
+ this.cd.detectChanges();
8669
9287
  }
8670
9288
  /**
8671
9289
  * Um Bug de CSS que acontece nas linhas da tabela, que resolve só atualizando qualquer parte do CSS da pagina.
@@ -8683,12 +9301,68 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8683
9301
  this.pixAccountItemInput = {};
8684
9302
  this.visible = true;
8685
9303
  }
8686
- isNotAllowMessage() {
8687
- this.messageService.add({
8688
- severity: "error",
8689
- summary: this.translateService.instant("hcm.payroll.error"),
8690
- detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9304
+ addPix() {
9305
+ const newItem = {
9306
+ id: null,
9307
+ pixKeyType: {},
9308
+ pixKey: '',
9309
+ percentage: 0
9310
+ };
9311
+ const index = this.addExistentHistoricData.length;
9312
+ this.addExistentHistoricData = [
9313
+ ...this.addExistentHistoricData,
9314
+ newItem
9315
+ ];
9316
+ this.formGroupByRow[index] = this.createPixRowFormGroup();
9317
+ this.setValidatorsAccordingList(this.addExistentHistoricData, index, true);
9318
+ this.emitFormValidity();
9319
+ }
9320
+ deletePix(index) {
9321
+ if (this.dataListPix.editingCell) {
9322
+ this.dataListPix.editingCell = null;
9323
+ }
9324
+ this.addExistentHistoricData = this.addExistentHistoricData.filter((_, i) => i !== index);
9325
+ this.rebuildFormGroupMap(this.addExistentHistoricData);
9326
+ this.emitFormValidity();
9327
+ }
9328
+ rebuildFormGroupMap(data) {
9329
+ this.formGroupByRow = {};
9330
+ data.forEach((item, index) => {
9331
+ const form = this.createPixRowFormGroup();
9332
+ const pixKeyType = item.pixKeyType.key;
9333
+ const pixKeyRaw = item.pixKey;
9334
+ if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
9335
+ item.pixKey = FormatUtilsService.getFormattedSubscriptionNumber(pixKeyRaw, pixKeyType);
9336
+ }
9337
+ if (pixKeyType === 'TELEPHONE') {
9338
+ item.pixKey = FormatUtilsService.getFormattedTelephoneNumber(pixKeyRaw);
9339
+ }
9340
+ form.patchValue(item);
9341
+ this.formGroupByRow[index] = form;
9342
+ this.pixKeyType = pixKeyType;
9343
+ this.setPixKeyValidators(true, form);
9344
+ this.setValidatorsAccordingList(data, index, this.isEditMode);
9345
+ const listValues = data
9346
+ .filter((_, i) => i !== index)
9347
+ .map(row => row.percentage ? parseFloat(row.percentage) : 0);
9348
+ this.validatePercentageValid(listValues, form);
9349
+ });
9350
+ this.emitFormValidity();
9351
+ }
9352
+ onPixKeyTypeChange(item, index) {
9353
+ const form = this.formGroupByRow[index];
9354
+ this.onChangePixKeyType(item, form);
9355
+ this.addExistentHistoricData[index].pixKey = '';
9356
+ setTimeout(() => {
9357
+ if (this.dataListPix.editingCell) {
9358
+ this.dataListPix.editingCell = null;
9359
+ }
8691
9360
  });
9361
+ this.cd.detectChanges();
9362
+ }
9363
+ onPixKeyTypeClear(index) {
9364
+ const form = this.formGroupByRow[index];
9365
+ this.onClearPixKeyType(form);
8692
9366
  }
8693
9367
  deleteAnnuityItem(index) {
8694
9368
  let newlist = [...this.getHistoricalPixAccountList()];
@@ -8750,6 +9424,23 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8750
9424
  this.msgTotalLimitByPercentage = null;
8751
9425
  }
8752
9426
  }
9427
+ onSyncValue(field, index) {
9428
+ if (this.formGroupByRow &&
9429
+ this.formGroupByRow[index] &&
9430
+ this.formGroupByRow[index].get(field)) {
9431
+ const control = this.formGroupByRow[index].get(field);
9432
+ const value = control.value;
9433
+ this.addExistentHistoricData[index][field] = value;
9434
+ control.markAsDirty();
9435
+ control.markAsTouched();
9436
+ control.updateValueAndValidity();
9437
+ const currentList = this.addExistentHistoricData.map((item, i) => {
9438
+ return i === index ? 0 : item.percentage;
9439
+ });
9440
+ this.validatePercentageValid(currentList, this.formGroupByRow[index]);
9441
+ this.emitFormValidity();
9442
+ }
9443
+ }
8753
9444
  get scopedActions() {
8754
9445
  return this.actions.bind(this);
8755
9446
  }
@@ -8786,6 +9477,12 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
8786
9477
  get visible() {
8787
9478
  return this._visible;
8788
9479
  }
9480
+ set paramsForm(value) {
9481
+ this._paramsForm = value;
9482
+ }
9483
+ set defaultCpfNumber(value) {
9484
+ this._defaultCpfNumber = value;
9485
+ }
8789
9486
  set visible(value) {
8790
9487
  this._visible = value;
8791
9488
  this.visibleChange.emit(this.visible);
@@ -8822,11 +9519,15 @@ HistoricalPixAccountComponent.ctorParameters = () => [
8822
9519
  { type: TranslateService },
8823
9520
  { type: ChangeDetectorRef },
8824
9521
  { type: FormBuilder },
8825
- { type: MessageService }
9522
+ { type: SharedStateService },
9523
+ { type: HistoricalPixAccountService }
8826
9524
  ];
8827
9525
  __decorate([
8828
9526
  ViewChild(CustomFieldsComponent$1, { static: false })
8829
9527
  ], HistoricalPixAccountComponent.prototype, "customFields", void 0);
9528
+ __decorate([
9529
+ ViewChild('dataListPix', { static: false })
9530
+ ], HistoricalPixAccountComponent.prototype, "dataListPix", void 0);
8830
9531
  __decorate([
8831
9532
  Input()
8832
9533
  ], HistoricalPixAccountComponent.prototype, "formGroup", void 0);
@@ -8849,251 +9550,105 @@ __decorate([
8849
9550
  Input()
8850
9551
  ], HistoricalPixAccountComponent.prototype, "msgTooltipAdd", void 0);
8851
9552
  __decorate([
8852
- Input()
8853
- ], HistoricalPixAccountComponent.prototype, "isEditMode", void 0);
8854
- __decorate([
8855
- Input()
8856
- ], HistoricalPixAccountComponent.prototype, "isViewMode", void 0);
8857
- __decorate([
8858
- Input()
8859
- ], HistoricalPixAccountComponent.prototype, "currency", void 0);
8860
- __decorate([
8861
- Input()
8862
- ], HistoricalPixAccountComponent.prototype, "customEntity", void 0);
8863
- __decorate([
8864
- Input()
8865
- ], HistoricalPixAccountComponent.prototype, "customService", void 0);
8866
- __decorate([
8867
- Input()
8868
- ], HistoricalPixAccountComponent.prototype, "withSideBar", void 0);
8869
- __decorate([
8870
- Input()
8871
- ], HistoricalPixAccountComponent.prototype, "paramsForm", void 0);
8872
- __decorate([
8873
- Input()
8874
- ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
8875
- __decorate([
8876
- Input()
8877
- ], HistoricalPixAccountComponent.prototype, "permission", void 0);
8878
- __decorate([
8879
- Input()
8880
- ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
8881
- __decorate([
8882
- Output()
8883
- ], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
8884
- __decorate([
8885
- Output()
8886
- ], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
8887
- __decorate([
8888
- Output()
8889
- ], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
8890
- __decorate([
8891
- Input()
8892
- ], HistoricalPixAccountComponent.prototype, "dateChange", null);
8893
- __decorate([
8894
- Input()
8895
- ], HistoricalPixAccountComponent.prototype, "displayDateChange", null);
8896
- __decorate([
8897
- Input()
8898
- ], HistoricalPixAccountComponent.prototype, "addListData", null);
8899
- __decorate([
8900
- Input()
8901
- ], HistoricalPixAccountComponent.prototype, "visible", null);
8902
- HistoricalPixAccountComponent = __decorate([
8903
- Component({
8904
- // tslint:disable-next-line:component-selector
8905
- selector: "c-historical-pix-account",
8906
- 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\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div 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 [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 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\">\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",
8907
- 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}"]
8908
- })
8909
- ], HistoricalPixAccountComponent);
8910
-
8911
- class GenericValidator {
8912
- constructor() { }
8913
- /**
8914
- * Valida o CEI (Cadastro específico de INSS) digitado.
8915
- */
8916
- static isValidCei(control) {
8917
- const cei = control.value;
8918
- if (!cei)
8919
- return null;
8920
- else if (cei.length != 11)
8921
- return null;
8922
- const multiplicadorBase = "3298765432";
8923
- let total = 0;
8924
- let resto = 0;
8925
- let multiplicando = 0;
8926
- let multiplicador = 0;
8927
- if (cei.length !== 11 ||
8928
- cei === "00000000000" ||
8929
- cei === "11111111111" ||
8930
- cei === "22222222222" ||
8931
- cei === "33333333333" ||
8932
- cei === "44444444444" ||
8933
- cei === "55555555555" ||
8934
- cei === "66666666666" ||
8935
- cei === "77777777777" ||
8936
- cei === "88888888888" ||
8937
- cei === "99999999999")
8938
- return { invalidCei: true };
8939
- else {
8940
- for (let i = 0; i < 10; i++) {
8941
- multiplicando = parseInt(cei.substring(i, i + 1), 10);
8942
- multiplicador = parseInt(multiplicadorBase.substring(i, i + 1), 10);
8943
- total += multiplicando * multiplicador;
8944
- }
8945
- resto = 11 - (total % 11);
8946
- resto = resto === 10 || resto === 11 ? 0 : resto;
8947
- const digito = parseInt("" + cei.charAt(10), 10);
8948
- return resto === digito ? null : { invalidCei: true };
8949
- }
8950
- }
8951
- /**
8952
- * Valida se o CPF é valido. Deve-se ser informado o cpf sem máscara.
8953
- */
8954
- static isValidCpf(control) {
8955
- const cpf = control.value;
8956
- if (cpf) {
8957
- let numbers, digits, sum, i, result, equalDigits;
8958
- equalDigits = 1;
8959
- if (cpf.length < 11) {
8960
- return null;
8961
- }
8962
- for (i = 0; i < cpf.length - 1; i++) {
8963
- if (cpf.charAt(i) !== cpf.charAt(i + 1)) {
8964
- equalDigits = 0;
8965
- break;
8966
- }
8967
- }
8968
- if (!equalDigits) {
8969
- numbers = cpf.substring(0, 9);
8970
- digits = cpf.substring(9);
8971
- sum = 0;
8972
- for (i = 10; i > 1; i--) {
8973
- sum += numbers.charAt(10 - i) * i;
8974
- }
8975
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8976
- if (result !== Number(digits.charAt(0))) {
8977
- return { cpfNotValid: true };
8978
- }
8979
- numbers = cpf.substring(0, 10);
8980
- sum = 0;
8981
- for (i = 11; i > 1; i--) {
8982
- sum += numbers.charAt(11 - i) * i;
8983
- }
8984
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
8985
- if (result !== Number(digits.charAt(1))) {
8986
- return { cpfNotValid: true };
8987
- }
8988
- return null;
8989
- }
8990
- else {
8991
- return { cpfNotValid: true };
8992
- }
8993
- }
8994
- return null;
8995
- }
8996
- /**
8997
- * Valida se o CNPJ é valido. Deve-se ser informado o cpf sem máscara.
8998
- */
8999
- static isValidCnpj(control) {
9000
- let cnpj = control.value;
9001
- if (cnpj) {
9002
- let size, numbers, digits, sum, pos, result;
9003
- cnpj = cnpj.replace(/[^\d]+/g, '');
9004
- if (cnpj.length !== 14) {
9005
- return null;
9006
- }
9007
- // Elimina CNPJs invalidos conhecidos
9008
- if (cnpj === '00000000000000' ||
9009
- cnpj === '11111111111111' ||
9010
- cnpj === '22222222222222' ||
9011
- cnpj === '33333333333333' ||
9012
- cnpj === '44444444444444' ||
9013
- cnpj === '55555555555555' ||
9014
- cnpj === '66666666666666' ||
9015
- cnpj === '77777777777777' ||
9016
- cnpj === '88888888888888' ||
9017
- cnpj === '99999999999999') {
9018
- return { cnpjNotValid: true };
9019
- }
9020
- // Valida DVs
9021
- size = cnpj.length - 2;
9022
- numbers = cnpj.substring(0, size);
9023
- digits = cnpj.substring(size);
9024
- sum = 0;
9025
- pos = size - 7;
9026
- for (let i = size; i >= 1; i--) {
9027
- sum += numbers.charAt(size - i) * pos--;
9028
- if (pos < 2) {
9029
- pos = 9;
9030
- }
9031
- }
9032
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9033
- if (result !== Number(digits.charAt(0))) {
9034
- return { cnpjNotValid: true };
9035
- }
9036
- size = size + 1;
9037
- numbers = cnpj.substring(0, size);
9038
- sum = 0;
9039
- pos = size - 7;
9040
- for (let i = size; i >= 1; i--) {
9041
- sum += numbers.charAt(size - i) * pos--;
9042
- if (pos < 2) {
9043
- pos = 9;
9044
- }
9045
- }
9046
- result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
9047
- if (result !== Number(digits.charAt(1))) {
9048
- return { cnpjNotValid: true };
9049
- }
9050
- return null;
9051
- }
9052
- return null;
9053
- }
9054
- /**
9055
- * Válida o número de telefone da chave PIX.
9056
- */
9057
- static isValidPhoneNumber(control) {
9058
- let cellPhoneKey = control.value || '';
9059
- cellPhoneKey = cellPhoneKey.replace(/[\s()-]/g, '');
9060
- const regexNumberTelephone = /^[1-9][\d]{1,2}\d{8,10}$/;
9061
- const isValidNumberTelephone = regexNumberTelephone.test(cellPhoneKey);
9062
- return isValidNumberTelephone ? null : { invalidPhoneNumber: true };
9063
- }
9064
- /**
9065
- * Valida o email da chave PIX.
9066
- */
9067
- static isValidEmail(control) {
9068
- const emailKey = control.value;
9069
- const regexValidEmail = /^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/;
9070
- const isValidEmail = regexValidEmail.test(emailKey);
9071
- return isValidEmail ? null : { invalidEmail: true };
9072
- }
9073
- }
9553
+ Input()
9554
+ ], HistoricalPixAccountComponent.prototype, "isEditMode", void 0);
9555
+ __decorate([
9556
+ Input()
9557
+ ], HistoricalPixAccountComponent.prototype, "isViewMode", void 0);
9558
+ __decorate([
9559
+ Input()
9560
+ ], HistoricalPixAccountComponent.prototype, "currency", void 0);
9561
+ __decorate([
9562
+ Input()
9563
+ ], HistoricalPixAccountComponent.prototype, "customEntity", void 0);
9564
+ __decorate([
9565
+ Input()
9566
+ ], HistoricalPixAccountComponent.prototype, "customService", void 0);
9567
+ __decorate([
9568
+ Input()
9569
+ ], HistoricalPixAccountComponent.prototype, "withSideBar", void 0);
9570
+ __decorate([
9571
+ Input()
9572
+ ], HistoricalPixAccountComponent.prototype, "permission", void 0);
9573
+ __decorate([
9574
+ Input()
9575
+ ], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
9576
+ __decorate([
9577
+ Input()
9578
+ ], HistoricalPixAccountComponent.prototype, "addExistentHistoricData", void 0);
9579
+ __decorate([
9580
+ Input()
9581
+ ], HistoricalPixAccountComponent.prototype, "getListPixAccount", void 0);
9582
+ __decorate([
9583
+ Input()
9584
+ ], HistoricalPixAccountComponent.prototype, "isEditModeForSave", void 0);
9585
+ __decorate([
9586
+ Input()
9587
+ ], HistoricalPixAccountComponent.prototype, "showField", void 0);
9588
+ __decorate([
9589
+ Input()
9590
+ ], HistoricalPixAccountComponent.prototype, "hideBtnAddForViewMode", void 0);
9591
+ __decorate([
9592
+ Input()
9593
+ ], HistoricalPixAccountComponent.prototype, "showButtonView", void 0);
9594
+ __decorate([
9595
+ Output()
9596
+ ], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
9597
+ __decorate([
9598
+ Output()
9599
+ ], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
9600
+ __decorate([
9601
+ Output()
9602
+ ], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
9603
+ __decorate([
9604
+ Output()
9605
+ ], HistoricalPixAccountComponent.prototype, "isValidChangeForm", void 0);
9606
+ __decorate([
9607
+ Input()
9608
+ ], HistoricalPixAccountComponent.prototype, "dateChange", null);
9609
+ __decorate([
9610
+ Input()
9611
+ ], HistoricalPixAccountComponent.prototype, "displayDateChange", null);
9612
+ __decorate([
9613
+ Input()
9614
+ ], HistoricalPixAccountComponent.prototype, "addListData", null);
9615
+ __decorate([
9616
+ Input()
9617
+ ], HistoricalPixAccountComponent.prototype, "visible", null);
9618
+ __decorate([
9619
+ Input()
9620
+ ], HistoricalPixAccountComponent.prototype, "paramsForm", null);
9621
+ __decorate([
9622
+ Input()
9623
+ ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", null);
9624
+ HistoricalPixAccountComponent = __decorate([
9625
+ Component({
9626
+ // tslint:disable-next-line:component-selector
9627
+ selector: "c-historical-pix-account",
9628
+ 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",
9629
+ 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}"]
9630
+ })
9631
+ ], HistoricalPixAccountComponent);
9074
9632
 
9075
- let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent {
9076
- constructor(formBuilder, cd) {
9077
- this.formBuilder = formBuilder;
9633
+ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent extends HistoricakPixAccountBase {
9634
+ constructor(formBuilder, cd, sharedStateService) {
9635
+ super(formBuilder);
9078
9636
  this.cd = cd;
9637
+ this.sharedStateService = sharedStateService;
9079
9638
  this.withSideBar = true;
9080
9639
  this.isEditMode = false;
9081
- this.paramsForm = new FormGroup({});
9082
- this.defaultCpfNumber = null;
9640
+ this.showField = false;
9083
9641
  this.visibleChange = new EventEmitter();
9084
9642
  this.pixAccountItemToList = new EventEmitter();
9085
9643
  this.ngUnsubscribe = new Subject();
9086
- this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
9087
9644
  this.labelBtnAdd = "hcm.payroll.employees_add";
9088
- this.maxValuePercentage = 100.00;
9089
9645
  this.visibleBtnSave = true;
9090
9646
  this.isView = false;
9091
9647
  this.isShowPixKeyFieldValidatorMessage = false;
9092
- this.createFormGroup();
9648
+ this.hideFields = this.sharedStateService.hideField$;
9093
9649
  this.registerSubjects();
9094
9650
  }
9095
- ngOnInit() {
9096
- }
9651
+ ngOnInit() { }
9097
9652
  ngAfterViewInit() {
9098
9653
  this.cd.detectChanges();
9099
9654
  }
@@ -9101,39 +9656,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9101
9656
  this.ngUnsubscribe.next(true);
9102
9657
  this.ngUnsubscribe.unsubscribe();
9103
9658
  }
9104
- registerSubjects() {
9105
- }
9106
- createFormGroup() {
9107
- this.pixAccountFormGroup = this.formBuilder.group({
9108
- id: this.formBuilder.control(null),
9109
- index: this.formBuilder.control(null),
9110
- employee: this.formBuilder.control({ value: { tableId: null }, disabled: true }),
9111
- dateChange: this.formBuilder.control(null),
9112
- pixKeyType: this.formBuilder.control(null, Validators.required),
9113
- pixKey: this.formBuilder.control(null),
9114
- percentage: this.formBuilder.control(null, Validators.compose([
9115
- ...this.initialValidatorOfPercentage,
9116
- Validators.max(this.maxValuePercentage),
9117
- ])),
9118
- externalId: this.formBuilder.control(null),
9119
- customFields: this.formBuilder.control(null),
9120
- });
9121
- }
9122
- onChangePixKeyType(item) {
9123
- if (item.key) {
9124
- this.pixKeyType = item.key;
9125
- this.isShowPixKeyFieldValidatorMessage = true;
9126
- this.pixAccountFormGroup.get("pixKey").reset();
9127
- this.setPixKeyValidators(true);
9128
- if (item.key === "CPF") {
9129
- this.setDefaultCpfPixKey();
9130
- }
9131
- }
9132
- }
9133
- onClearPixKeyType() {
9134
- this.isShowPixKeyFieldValidatorMessage = false;
9135
- this.pixAccountFormGroup.get("pixKey").reset();
9136
- }
9659
+ registerSubjects() { }
9137
9660
  get visible() {
9138
9661
  return this._visible;
9139
9662
  }
@@ -9164,7 +9687,8 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9164
9687
  }
9165
9688
  formatPixKeyTelephoneNumber() {
9166
9689
  if (this.pixKeyType === "TELEPHONE") {
9167
- this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
9690
+ const pixKeyCtrl = this.pixAccountFormGroup.get("pixKey");
9691
+ pixKeyCtrl.setValue(FormatUtilsService.getFormattedTelephoneNumber(pixKeyCtrl.value));
9168
9692
  }
9169
9693
  }
9170
9694
  convertDTOToShowWithCustomFields(data) {
@@ -9176,14 +9700,14 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9176
9700
  this.visibleBtnSave = isEditMode;
9177
9701
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
9178
9702
  this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
9179
- this.setPixKeyValidators(isEditMode);
9703
+ this.setPixKeyValidators(isEditMode, this.pixAccountFormGroup);
9180
9704
  this.formatPixKeyTelephoneNumber();
9181
9705
  }
9182
9706
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
9183
9707
  "pixKeyType",
9184
9708
  "pixKey",
9185
9709
  "percentage",
9186
- "customFields",
9710
+ "customFields"
9187
9711
  ], []);
9188
9712
  }
9189
9713
  close() {
@@ -9191,13 +9715,11 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9191
9715
  this.visible = false;
9192
9716
  }
9193
9717
  addItem() {
9194
- this.pixAccountFormGroup.updateValueAndValidity();
9195
- verifyValidationsForm.call(this.pixAccountFormGroup);
9196
9718
  if (this.pixAccountFormGroup.valid) {
9197
9719
  if (this.employeeId) {
9198
9720
  this.pixAccountFormGroup.get("employee").setValue({
9199
9721
  tableId: this.employeeId,
9200
- name: "",
9722
+ name: ""
9201
9723
  });
9202
9724
  }
9203
9725
  this.pixAccountItemToList.emit(this.pixAccountFormGroup.getRawValue());
@@ -9221,13 +9743,9 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9221
9743
  return {
9222
9744
  prefix: "",
9223
9745
  thousands: this.currency.thousandsSeparator,
9224
- decimal: this.currency.decimalSeparator,
9746
+ decimal: this.currency.decimalSeparator
9225
9747
  };
9226
9748
  }
9227
- /**
9228
- * O Input que recebe a lista do component pai e chama o método de validação passando a lista recebida.
9229
- * @param pixAccountList
9230
- */
9231
9749
  set getListPixAccount(pixAccountList) {
9232
9750
  if (pixAccountList) {
9233
9751
  this.setValidatorsAccordingList(pixAccountList, null, false);
@@ -9236,143 +9754,23 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
9236
9754
  this.resetForm();
9237
9755
  }
9238
9756
  }
9239
- /**
9240
- * Recebe a lista de registros já inseridos na tabela adiciona em uma variável os valores que serão usados para
9241
- * a validação dos campos "percentage" e "pixAccount".
9242
- * 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
9243
- * no array de comparação dos validators.
9244
- * @param pixAccountList
9245
- * @param index
9246
- */
9247
- setValidatorsAccordingList(pixAccountList, index = null, isEditMode = true) {
9248
- this.pixAccountList = pixAccountList && pixAccountList.length ? [...pixAccountList] : [];
9249
- const percentageIncluded = [];
9250
- if (this.pixAccountList && this.pixAccountList.length) {
9251
- this.pixAccountList.filter((field, key) => {
9252
- if (field["percentage"] && key != index) {
9253
- percentageIncluded.push(field["percentage"]);
9254
- }
9255
- });
9256
- }
9257
- this.beforeSetPixKeyTypeValidator();
9258
- this.setPixKeyValidators(isEditMode);
9259
- this.validatePercentageValid(percentageIncluded);
9260
- }
9261
- /**
9262
- * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
9263
- */
9264
- setPixKeyValidators(isEditMode) {
9265
- const genericPixKey = this.pixAccountFormGroup.get("pixKey");
9266
- if (this.pixKeyType) {
9267
- switch (this.pixKeyType) {
9268
- case "TELEPHONE":
9269
- genericPixKey.setValidators(Validators.compose([
9270
- Validators.required, GenericValidator.isValidPhoneNumber,
9271
- ]));
9272
- break;
9273
- case "EMAIL":
9274
- genericPixKey.setValidators(Validators.compose([
9275
- Validators.required, GenericValidator.isValidEmail,
9276
- ]));
9277
- break;
9278
- case "CPF":
9279
- genericPixKey.setValidators(Validators.compose([
9280
- Validators.required, GenericValidator.isValidCpf,
9281
- ]));
9282
- break;
9283
- case "CNPJ":
9284
- genericPixKey.setValidators(Validators.compose([
9285
- Validators.required, GenericValidator.isValidCnpj,
9286
- ]));
9287
- break;
9288
- case "RANDOM_KEY":
9289
- genericPixKey.setValidators(Validators.required);
9290
- break;
9291
- default:
9292
- genericPixKey.setValidators(null);
9293
- break;
9294
- }
9295
- if (isEditMode) {
9296
- genericPixKey.enable();
9297
- }
9298
- genericPixKey.updateValueAndValidity();
9299
- }
9300
- }
9301
- /**
9302
- * Este método calcula as parcentagens que já foram inseridas, e seta a diferença para chegar em
9303
- * 100% na validação do campo "percentage" como um novo maxValue;
9304
- * @param listValue
9305
- */
9306
- validatePercentageValid(listValue) {
9307
- const percentage = this.pixAccountFormGroup.get("percentage");
9308
- this.maxValuePercentage = listValue
9309
- .reduce((currentValue, total) => currentValue - total, 100.00);
9310
- percentage
9311
- .setValidators(Validators.compose([
9312
- ...this.initialValidatorOfPercentage,
9313
- Validators.max(this.maxValuePercentage),
9314
- ]));
9315
- percentage.updateValueAndValidity();
9316
- }
9317
9757
  set isViewMode(condition) {
9318
9758
  this.isView = !!(condition && !this.withSideBar);
9319
9759
  this.configEnableFields(!this.isView);
9320
9760
  if (!this.isView)
9321
9761
  this.resetForm();
9322
9762
  }
9323
- phoneMask(event) {
9324
- FormatUtilsService.formatTelephoneInputEvent(event);
9325
- }
9326
- setDefaultCpfPixKey() {
9327
- if (this.defaultCpfNumber) {
9328
- this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);
9329
- }
9330
- else {
9331
- const sheetDocument = this.paramsForm.get("sheetDocument");
9332
- if (sheetDocument) {
9333
- const cpf = sheetDocument.get("cpfNumber").value;
9334
- if (cpf) {
9335
- this.pixAccountFormGroup.get("pixKey").setValue(cpf);
9336
- }
9337
- }
9338
- }
9339
- }
9340
- beforeSetPixKeyTypeValidator() {
9341
- const pixKeyType = this.pixAccountFormGroup.get("pixKeyType");
9342
- if (this.pixAccountList && this.pixAccountList.length && pixKeyType) {
9343
- pixKeyType
9344
- .setValidators(Validators.compose([
9345
- Validators.required,
9346
- this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList),
9347
- ]));
9348
- }
9349
- else {
9350
- pixKeyType.setValidators(Validators.required);
9351
- }
9763
+ set paramsForm(value) {
9764
+ this._paramsForm = value;
9352
9765
  }
9353
- validateDuplicatePixKeyTypeBankAccount(listCompare) {
9354
- return (control) => {
9355
- const value = control && control.value;
9356
- let condition = false;
9357
- listCompare.filter((field) => {
9358
- if (value) {
9359
- if (field["pixKeyType"].key === 'BANK_ACCOUNT' && value.key === field["pixKeyType"].key) {
9360
- return condition = true;
9361
- }
9362
- }
9363
- });
9364
- if (condition) {
9365
- return { pixKeyTypeBankAccountDuplicate: true };
9366
- }
9367
- else {
9368
- return null;
9369
- }
9370
- };
9766
+ set defaultCpfNumber(value) {
9767
+ this._defaultCpfNumber = value;
9371
9768
  }
9372
9769
  };
9373
9770
  HistoricalPixAccountFormComponent.ctorParameters = () => [
9374
9771
  { type: FormBuilder },
9375
- { type: ChangeDetectorRef }
9772
+ { type: ChangeDetectorRef },
9773
+ { type: SharedStateService }
9376
9774
  ];
9377
9775
  __decorate([
9378
9776
  ViewChild(CustomFieldsComponent$1, { static: true })
@@ -9394,10 +9792,7 @@ __decorate([
9394
9792
  ], HistoricalPixAccountFormComponent.prototype, "isEditMode", void 0);
9395
9793
  __decorate([
9396
9794
  Input()
9397
- ], HistoricalPixAccountFormComponent.prototype, "paramsForm", void 0);
9398
- __decorate([
9399
- Input()
9400
- ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
9795
+ ], HistoricalPixAccountFormComponent.prototype, "showField", void 0);
9401
9796
  __decorate([
9402
9797
  Output()
9403
9798
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -9416,29 +9811,20 @@ __decorate([
9416
9811
  __decorate([
9417
9812
  Input()
9418
9813
  ], HistoricalPixAccountFormComponent.prototype, "isViewMode", null);
9814
+ __decorate([
9815
+ Input()
9816
+ ], HistoricalPixAccountFormComponent.prototype, "paramsForm", null);
9817
+ __decorate([
9818
+ Input()
9819
+ ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", null);
9419
9820
  HistoricalPixAccountFormComponent = __decorate([
9420
9821
  Component({
9421
9822
  selector: "pix-account",
9422
- 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",
9823
+ 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",
9423
9824
  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}"]
9424
9825
  })
9425
9826
  ], HistoricalPixAccountFormComponent);
9426
9827
 
9427
- let HistoricalPixAccountService = class HistoricalPixAccountService {
9428
- constructor(http) {
9429
- this.http = http;
9430
- }
9431
- query(path, body, service = ServiceType.PAYROLL) {
9432
- return this.http.query(path, body, service);
9433
- }
9434
- };
9435
- HistoricalPixAccountService.ctorParameters = () => [
9436
- { type: HttpClientService }
9437
- ];
9438
- HistoricalPixAccountService = __decorate([
9439
- Injectable()
9440
- ], HistoricalPixAccountService);
9441
-
9442
9828
  let HistoricalPixAccountModule = class HistoricalPixAccountModule {
9443
9829
  };
9444
9830
  HistoricalPixAccountModule = __decorate([
@@ -9466,6 +9852,8 @@ HistoricalPixAccountModule = __decorate([
9466
9852
  CustomFieldsModule$1,
9467
9853
  PanelModule,
9468
9854
  InputMaskModule,
9855
+ DropdownModule,
9856
+ TabViewModule,
9469
9857
  ],
9470
9858
  declarations: [HistoricalPixAccountComponent, HistoricalPixAccountFormComponent],
9471
9859
  providers: [HistoricalPixAccountService, ConfirmationService],
@@ -9504,7 +9892,7 @@ HistoricalPixAccountListService = __decorate([
9504
9892
 
9505
9893
  const moment$e = moment_;
9506
9894
  let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent {
9507
- constructor(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
9895
+ constructor(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService, sharedStateService) {
9508
9896
  this.confirmationService = confirmationService;
9509
9897
  this.translateService = translateService;
9510
9898
  this.activatedRoute = activatedRoute;
@@ -9512,11 +9900,16 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9512
9900
  this.router = router;
9513
9901
  this.messageService = messageService;
9514
9902
  this.historicalPixAccountListService = historicalPixAccountListService;
9903
+ this.sharedStateService = sharedStateService;
9515
9904
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
9516
9905
  this.keyPayload = "historicalEmployeePix";
9517
9906
  this.withSidebar = true;
9518
9907
  this.isOnlyView = new EventEmitter();
9908
+ this.isOnlyEdit = new EventEmitter();
9519
9909
  this.enableView = new EventEmitter();
9910
+ this.isEditJudicialDependentPix = new EventEmitter();
9911
+ this.isHideBtnAddForViewMode = new EventEmitter();
9912
+ this.isShowActionsButton = new EventEmitter();
9520
9913
  this.ngUnsubscribe = new Subject();
9521
9914
  this.loading = true;
9522
9915
  this.columns = [
@@ -9524,18 +9917,6 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9524
9917
  label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
9525
9918
  field: "dateChange",
9526
9919
  },
9527
- {
9528
- label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
9529
- field: "pixKeyType.value",
9530
- },
9531
- {
9532
- label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
9533
- field: "pixKey",
9534
- },
9535
- {
9536
- label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
9537
- field: "percentage",
9538
- },
9539
9920
  {
9540
9921
  label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
9541
9922
  field: "numberOfPixAccount",
@@ -9548,6 +9929,7 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9548
9929
  ngOnDestroy() {
9549
9930
  this.ngUnsubscribe.next();
9550
9931
  this.ngUnsubscribe.complete();
9932
+ this.unsubscribe();
9551
9933
  }
9552
9934
  ngAfterViewInit() {
9553
9935
  this.cd.detectChanges();
@@ -9555,41 +9937,61 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9555
9937
  onLazyLoad(payload) {
9556
9938
  payload.forEach((value) => {
9557
9939
  value.dateChange = moment$e(value.dateChange).format(this.dateFormat);
9558
- value.pixKey = this.formatPixKeyByType(value.pixKeyType, value.pixKey);
9559
- value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
9560
9940
  });
9561
9941
  this.onGridLoad(payload);
9562
9942
  this.loading = false;
9563
9943
  }
9564
- formatPixKeyByType(pixKeyType, pixKey) {
9565
- const keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
9566
- if (keyType === "TELEPHONE") {
9567
- return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
9568
- }
9569
- else if (keyType === "CPF") {
9570
- return FormatUtilsService.getFormattedCpf(pixKey);
9571
- }
9572
- else if (keyType === "CNPJ") {
9573
- return FormatUtilsService.getFormattedCnpj(pixKey);
9574
- }
9575
- else {
9576
- return pixKey;
9577
- }
9578
- }
9579
9944
  getMenuActions(rowData) {
9580
9945
  return [
9581
9946
  {
9582
9947
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
9583
9948
  command: () => {
9584
9949
  if (this.isAllowToViewHistorical) {
9950
+ this.sharedStateService.setHideField(true);
9951
+ this.isShowActionsButton.emit(false);
9952
+ this.sharedStateService.setShowEditMode(false);
9585
9953
  const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
9586
9954
  if (this.withSidebar) {
9587
9955
  this.isOnlyView.emit(true);
9956
+ this.isOnlyEdit.emit(false);
9957
+ this.isHideBtnAddForViewMode.emit(true);
9958
+ this.sharedStateService.setHideBtnAddForViewMode(true);
9959
+ this.router.navigate([`historical-pix-account/${dateChange}`], {
9960
+ relativeTo: this.activatedRoute,
9961
+ });
9962
+ }
9963
+ else {
9964
+ this.sharedStateService.setSaveButton(false);
9965
+ this.enableView.emit(dateChange);
9966
+ }
9967
+ }
9968
+ else {
9969
+ this.isNotAllowMessage();
9970
+ }
9971
+ },
9972
+ },
9973
+ {
9974
+ label: this.translateService.instant("hcm.payroll.edit"),
9975
+ command: () => {
9976
+ if (this.isAllowToEditHistorical) {
9977
+ this.sharedStateService.setHideField(true);
9978
+ this.isShowActionsButton.emit(true);
9979
+ this.sharedStateService.setShowEditMode(true);
9980
+ const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
9981
+ if (this.withSidebar) {
9982
+ this.isOnlyView.emit(false);
9983
+ this.isOnlyEdit.emit(true);
9984
+ this.isHideBtnAddForViewMode.emit(false);
9985
+ this.sharedStateService.setHideBtnAddForViewMode(false);
9588
9986
  this.router.navigate([`historical-pix-account/${dateChange}`], {
9589
9987
  relativeTo: this.activatedRoute,
9590
9988
  });
9591
9989
  }
9592
9990
  else {
9991
+ setTimeout(() => {
9992
+ this.sharedStateService.triggerActiveValidatorsOnEditModalOpen();
9993
+ });
9994
+ this.sharedStateService.setSaveButton(true);
9593
9995
  this.enableView.emit(dateChange);
9594
9996
  }
9595
9997
  }
@@ -9608,7 +10010,7 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9608
10010
  this.isNotAllowMessage();
9609
10011
  }
9610
10012
  },
9611
- },
10013
+ }
9612
10014
  ];
9613
10015
  }
9614
10016
  delete(id, dateChange) {
@@ -9674,6 +10076,19 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9674
10076
  this.lastRecord = payload[0];
9675
10077
  }
9676
10078
  }
10079
+ unsubscribe() {
10080
+ if (this._subscription) {
10081
+ this._subscription.unsubscribe();
10082
+ }
10083
+ }
10084
+ set hideFieldsOnAdd$(subject) {
10085
+ this.unsubscribe();
10086
+ if (subject) {
10087
+ this._subscription = subject.subscribe((value) => {
10088
+ this.sharedStateService.setHideField(value);
10089
+ });
10090
+ }
10091
+ }
9677
10092
  get isAllowToAddHistorical() {
9678
10093
  return (this.permission["incluir"]);
9679
10094
  }
@@ -9683,6 +10098,9 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
9683
10098
  get isAllowToViewHistorical() {
9684
10099
  return (this.permission["visualizar"]);
9685
10100
  }
10101
+ get isAllowToEditHistorical() {
10102
+ return (this.permission["editar"]);
10103
+ }
9686
10104
  get scopedActions() {
9687
10105
  return this.getMenuActions.bind(this);
9688
10106
  }
@@ -9700,7 +10118,8 @@ HistoricalPixAccountListComponent.ctorParameters = () => [
9700
10118
  { type: ChangeDetectorRef },
9701
10119
  { type: Router },
9702
10120
  { type: MessageService },
9703
- { type: HistoricalPixAccountListService }
10121
+ { type: HistoricalPixAccountListService },
10122
+ { type: SharedStateService }
9704
10123
  ];
9705
10124
  __decorate([
9706
10125
  ViewChild(CustomFieldsComponent$1, { static: false })
@@ -9726,12 +10145,30 @@ __decorate([
9726
10145
  __decorate([
9727
10146
  Input()
9728
10147
  ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10148
+ __decorate([
10149
+ Input()
10150
+ ], HistoricalPixAccountListComponent.prototype, "hideField", void 0);
9729
10151
  __decorate([
9730
10152
  Output()
9731
10153
  ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
10154
+ __decorate([
10155
+ Output()
10156
+ ], HistoricalPixAccountListComponent.prototype, "isOnlyEdit", void 0);
9732
10157
  __decorate([
9733
10158
  Output()
9734
10159
  ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
10160
+ __decorate([
10161
+ Output()
10162
+ ], HistoricalPixAccountListComponent.prototype, "isEditJudicialDependentPix", void 0);
10163
+ __decorate([
10164
+ Output()
10165
+ ], HistoricalPixAccountListComponent.prototype, "isHideBtnAddForViewMode", void 0);
10166
+ __decorate([
10167
+ Output()
10168
+ ], HistoricalPixAccountListComponent.prototype, "isShowActionsButton", void 0);
10169
+ __decorate([
10170
+ Input()
10171
+ ], HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", null);
9735
10172
  __decorate([
9736
10173
  Input()
9737
10174
  ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
@@ -9776,5 +10213,5 @@ HistoricalPixAccountListModule = __decorate([
9776
10213
  * Generated bundle index. Do not edit.
9777
10214
  */
9778
10215
 
9779
- 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 };
10216
+ 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 };
9780
10217
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map