@senior-gestao-pessoas/payroll-core 9.4.0 → 9.5.0-32c4c8b1-bb0c-491c-8ec0-0eef83fe1088
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.
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js +1419 -533
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +16 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
- package/components/historical-pix-account/historical-pix-account-base.d.ts +27 -0
- package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +9 -40
- package/components/historical-pix-account/historical-pix-account.component.d.ts +103 -14
- package/components/historical-pix-account/historical-pix-account.service.d.ts +1 -0
- package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +14 -2
- package/components/shared/index.d.ts +1 -0
- package/components/shared/shared-state.service.d.ts +25 -0
- package/components/utils/format-utils/format-utils.service.d.ts +30 -3
- package/esm2015/components/historical-pix-account/historical-pix-account-base.js +180 -0
- package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +34 -190
- package/esm2015/components/historical-pix-account/historical-pix-account.component.js +647 -37
- package/esm2015/components/historical-pix-account/historical-pix-account.module.js +5 -1
- package/esm2015/components/historical-pix-account/historical-pix-account.service.js +8 -1
- package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +91 -34
- package/esm2015/components/shared/index.js +2 -0
- package/esm2015/components/shared/shared-state.service.js +57 -0
- package/esm2015/components/utils/format-utils/format-utils.service.js +90 -5
- package/esm2015/public_api.js +2 -1
- package/esm2015/senior-gestao-pessoas-payroll-core.js +3 -2
- package/esm5/components/historical-pix-account/historical-pix-account-base.js +193 -0
- package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +58 -204
- package/esm5/components/historical-pix-account/historical-pix-account.component.js +699 -66
- package/esm5/components/historical-pix-account/historical-pix-account.module.js +5 -1
- package/esm5/components/historical-pix-account/historical-pix-account.service.js +8 -1
- package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +100 -34
- package/esm5/components/shared/index.js +2 -0
- package/esm5/components/shared/shared-state.service.js +58 -0
- package/esm5/components/utils/format-utils/format-utils.service.js +90 -5
- package/esm5/public_api.js +2 -1
- package/esm5/senior-gestao-pessoas-payroll-core.js +3 -2
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +1330 -499
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +1415 -530
- package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/locale/en-US.json +1 -1
- package/locale/es-ES.json +1 -1
- package/locale/pt-BR.json +1 -1
- package/package.json +2 -32
- package/public_api.d.ts +1 -0
- package/senior-gestao-pessoas-payroll-core.d.ts +2 -1
- 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,471 @@ class FormatUtilsService {
|
|
|
8513
8580
|
event.target.value = FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
|
|
8514
8581
|
}
|
|
8515
8582
|
/**
|
|
8516
|
-
*
|
|
8517
|
-
* @param
|
|
8583
|
+
* Formata o campo de input de CPF em tempo real.
|
|
8584
|
+
* @param event Evento do input
|
|
8518
8585
|
*/
|
|
8519
|
-
static
|
|
8520
|
-
|
|
8586
|
+
static formatCpfInputEvent(event) {
|
|
8587
|
+
let cpf = event.target.value;
|
|
8588
|
+
console.log("FormatUtilsService.formatCpfInputEvent.cpf: " + cpf);
|
|
8589
|
+
// Permite apagar nos pontos sensíveis
|
|
8590
|
+
if (event.keyCode === 8 && (cpf.length === 4 || cpf.length === 8 || cpf.length === 12)) {
|
|
8591
|
+
return;
|
|
8592
|
+
}
|
|
8593
|
+
event.target.value = FormatUtilsService.getFormattedCpfEdited(cpf);
|
|
8594
|
+
}
|
|
8595
|
+
/**
|
|
8596
|
+
* Formata o campo de input de CNPJ em tempo real.
|
|
8597
|
+
* @param event Evento do input
|
|
8598
|
+
*/
|
|
8599
|
+
static formatCnpjInputEvent(event) {
|
|
8600
|
+
let cnpj = event.target.value;
|
|
8601
|
+
console.log("FormatUtilsService.formatCnpjInputEvent.cnpj: " + cnpj);
|
|
8602
|
+
// Permite apagar nos pontos sensíveis
|
|
8603
|
+
if (event.keyCode === 8 && (cnpj.length === 3 || cnpj.length === 7 || cnpj.length === 11 || cnpj.length === 16)) {
|
|
8604
|
+
return;
|
|
8605
|
+
}
|
|
8606
|
+
event.target.value = FormatUtilsService.getFormattedCnpjEdited(cnpj);
|
|
8607
|
+
}
|
|
8608
|
+
}
|
|
8609
|
+
|
|
8610
|
+
let SharedStateService = class SharedStateService {
|
|
8611
|
+
constructor() {
|
|
8612
|
+
this.hideFieldSubject = new BehaviorSubject(true);
|
|
8613
|
+
this.hideField$ = this.hideFieldSubject.asObservable();
|
|
8614
|
+
this.showButtonSubject = new BehaviorSubject(true);
|
|
8615
|
+
this.showButton$ = this.showButtonSubject.asObservable();
|
|
8616
|
+
this.saveButtonSubject = new BehaviorSubject(true);
|
|
8617
|
+
this.saveButton$ = this.saveButtonSubject.asObservable();
|
|
8618
|
+
this.showEditMode = new BehaviorSubject(true);
|
|
8619
|
+
this.showEditMode$ = this.showEditMode.asObservable();
|
|
8620
|
+
this.activeValidatorsOnEditModalOpen = new Subject();
|
|
8621
|
+
this.activeValidatorsOnEditModalOpen$ = this.activeValidatorsOnEditModalOpen.asObservable();
|
|
8622
|
+
this.hideBtnAddForViewMode = new BehaviorSubject(false);
|
|
8623
|
+
this.hideBtnAddForViewMode$ = this.hideBtnAddForViewMode.asObservable();
|
|
8624
|
+
this.activeHideOptionsOnView = new BehaviorSubject(true);
|
|
8625
|
+
this.activeHideOptionsOnView$ = this.activeHideOptionsOnView.asObservable();
|
|
8626
|
+
}
|
|
8627
|
+
setHideField(value) {
|
|
8628
|
+
this.hideFieldSubject.next(value);
|
|
8629
|
+
}
|
|
8630
|
+
setShowButton(value) {
|
|
8631
|
+
this.showButtonSubject.next(value);
|
|
8632
|
+
}
|
|
8633
|
+
setSaveButton(value) {
|
|
8634
|
+
this.saveButtonSubject.next(value);
|
|
8635
|
+
}
|
|
8636
|
+
setShowEditMode(value) {
|
|
8637
|
+
this.showEditMode.next(value);
|
|
8638
|
+
}
|
|
8639
|
+
triggerActiveValidatorsOnEditModalOpen() {
|
|
8640
|
+
this.activeValidatorsOnEditModalOpen.next();
|
|
8641
|
+
}
|
|
8642
|
+
setHideBtnAddForViewMode(value) {
|
|
8643
|
+
this.hideBtnAddForViewMode.next(value);
|
|
8644
|
+
}
|
|
8645
|
+
resetHideField() {
|
|
8646
|
+
this.hideFieldSubject.next(true);
|
|
8647
|
+
}
|
|
8648
|
+
setActiveHideOptionsOnView(value) {
|
|
8649
|
+
this.activeHideOptionsOnView.next(value);
|
|
8650
|
+
}
|
|
8651
|
+
getActiveHideOptionsOnView() {
|
|
8652
|
+
return this.activeHideOptionsOnView.getValue();
|
|
8653
|
+
}
|
|
8654
|
+
};
|
|
8655
|
+
SharedStateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function SharedStateService_Factory() { return new SharedStateService(); }, token: SharedStateService, providedIn: "root" });
|
|
8656
|
+
SharedStateService = __decorate([
|
|
8657
|
+
Injectable({
|
|
8658
|
+
providedIn: 'root',
|
|
8659
|
+
})
|
|
8660
|
+
], SharedStateService);
|
|
8661
|
+
|
|
8662
|
+
class GenericValidator {
|
|
8663
|
+
constructor() { }
|
|
8664
|
+
/**
|
|
8665
|
+
* Valida o CEI (Cadastro específico de INSS) digitado.
|
|
8666
|
+
*/
|
|
8667
|
+
static isValidCei(control) {
|
|
8668
|
+
const cei = control.value;
|
|
8669
|
+
if (!cei)
|
|
8670
|
+
return null;
|
|
8671
|
+
else if (cei.length != 11)
|
|
8672
|
+
return null;
|
|
8673
|
+
const multiplicadorBase = "3298765432";
|
|
8674
|
+
let total = 0;
|
|
8675
|
+
let resto = 0;
|
|
8676
|
+
let multiplicando = 0;
|
|
8677
|
+
let multiplicador = 0;
|
|
8678
|
+
if (cei.length !== 11 ||
|
|
8679
|
+
cei === "00000000000" ||
|
|
8680
|
+
cei === "11111111111" ||
|
|
8681
|
+
cei === "22222222222" ||
|
|
8682
|
+
cei === "33333333333" ||
|
|
8683
|
+
cei === "44444444444" ||
|
|
8684
|
+
cei === "55555555555" ||
|
|
8685
|
+
cei === "66666666666" ||
|
|
8686
|
+
cei === "77777777777" ||
|
|
8687
|
+
cei === "88888888888" ||
|
|
8688
|
+
cei === "99999999999")
|
|
8689
|
+
return { invalidCei: true };
|
|
8690
|
+
else {
|
|
8691
|
+
for (let i = 0; i < 10; i++) {
|
|
8692
|
+
multiplicando = parseInt(cei.substring(i, i + 1), 10);
|
|
8693
|
+
multiplicador = parseInt(multiplicadorBase.substring(i, i + 1), 10);
|
|
8694
|
+
total += multiplicando * multiplicador;
|
|
8695
|
+
}
|
|
8696
|
+
resto = 11 - (total % 11);
|
|
8697
|
+
resto = resto === 10 || resto === 11 ? 0 : resto;
|
|
8698
|
+
const digito = parseInt("" + cei.charAt(10), 10);
|
|
8699
|
+
return resto === digito ? null : { invalidCei: true };
|
|
8700
|
+
}
|
|
8701
|
+
}
|
|
8702
|
+
/**
|
|
8703
|
+
* Valida se o CPF é valido. Deve-se ser informado o cpf sem máscara.
|
|
8704
|
+
*/
|
|
8705
|
+
static isValidCpf(control) {
|
|
8706
|
+
const cpf = control.value;
|
|
8707
|
+
if (cpf) {
|
|
8708
|
+
let numbers, digits, sum, i, result, equalDigits;
|
|
8709
|
+
equalDigits = 1;
|
|
8710
|
+
if (cpf.length < 11) {
|
|
8711
|
+
return null;
|
|
8712
|
+
}
|
|
8713
|
+
for (i = 0; i < cpf.length - 1; i++) {
|
|
8714
|
+
if (cpf.charAt(i) !== cpf.charAt(i + 1)) {
|
|
8715
|
+
equalDigits = 0;
|
|
8716
|
+
break;
|
|
8717
|
+
}
|
|
8718
|
+
}
|
|
8719
|
+
if (!equalDigits) {
|
|
8720
|
+
numbers = cpf.substring(0, 9);
|
|
8721
|
+
digits = cpf.substring(9);
|
|
8722
|
+
sum = 0;
|
|
8723
|
+
for (i = 10; i > 1; i--) {
|
|
8724
|
+
sum += numbers.charAt(10 - i) * i;
|
|
8725
|
+
}
|
|
8726
|
+
result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
8727
|
+
if (result !== Number(digits.charAt(0))) {
|
|
8728
|
+
return { cpfNotValid: true };
|
|
8729
|
+
}
|
|
8730
|
+
numbers = cpf.substring(0, 10);
|
|
8731
|
+
sum = 0;
|
|
8732
|
+
for (i = 11; i > 1; i--) {
|
|
8733
|
+
sum += numbers.charAt(11 - i) * i;
|
|
8734
|
+
}
|
|
8735
|
+
result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
8736
|
+
if (result !== Number(digits.charAt(1))) {
|
|
8737
|
+
return { cpfNotValid: true };
|
|
8738
|
+
}
|
|
8739
|
+
return null;
|
|
8740
|
+
}
|
|
8741
|
+
else {
|
|
8742
|
+
return { cpfNotValid: true };
|
|
8743
|
+
}
|
|
8744
|
+
}
|
|
8745
|
+
return null;
|
|
8746
|
+
}
|
|
8747
|
+
/**
|
|
8748
|
+
* Valida se o CNPJ é valido. Deve-se ser informado o cpf sem máscara.
|
|
8749
|
+
*/
|
|
8750
|
+
static isValidCnpj(control) {
|
|
8751
|
+
let cnpj = control.value;
|
|
8752
|
+
if (cnpj) {
|
|
8753
|
+
let size, numbers, digits, sum, pos, result;
|
|
8754
|
+
cnpj = cnpj.replace(/[^\d]+/g, '');
|
|
8755
|
+
if (cnpj.length !== 14) {
|
|
8756
|
+
return null;
|
|
8757
|
+
}
|
|
8758
|
+
// Elimina CNPJs invalidos conhecidos
|
|
8759
|
+
if (cnpj === '00000000000000' ||
|
|
8760
|
+
cnpj === '11111111111111' ||
|
|
8761
|
+
cnpj === '22222222222222' ||
|
|
8762
|
+
cnpj === '33333333333333' ||
|
|
8763
|
+
cnpj === '44444444444444' ||
|
|
8764
|
+
cnpj === '55555555555555' ||
|
|
8765
|
+
cnpj === '66666666666666' ||
|
|
8766
|
+
cnpj === '77777777777777' ||
|
|
8767
|
+
cnpj === '88888888888888' ||
|
|
8768
|
+
cnpj === '99999999999999') {
|
|
8769
|
+
return { cnpjNotValid: true };
|
|
8770
|
+
}
|
|
8771
|
+
// Valida DVs
|
|
8772
|
+
size = cnpj.length - 2;
|
|
8773
|
+
numbers = cnpj.substring(0, size);
|
|
8774
|
+
digits = cnpj.substring(size);
|
|
8775
|
+
sum = 0;
|
|
8776
|
+
pos = size - 7;
|
|
8777
|
+
for (let i = size; i >= 1; i--) {
|
|
8778
|
+
sum += numbers.charAt(size - i) * pos--;
|
|
8779
|
+
if (pos < 2) {
|
|
8780
|
+
pos = 9;
|
|
8781
|
+
}
|
|
8782
|
+
}
|
|
8783
|
+
result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
8784
|
+
if (result !== Number(digits.charAt(0))) {
|
|
8785
|
+
return { cnpjNotValid: true };
|
|
8786
|
+
}
|
|
8787
|
+
size = size + 1;
|
|
8788
|
+
numbers = cnpj.substring(0, size);
|
|
8789
|
+
sum = 0;
|
|
8790
|
+
pos = size - 7;
|
|
8791
|
+
for (let i = size; i >= 1; i--) {
|
|
8792
|
+
sum += numbers.charAt(size - i) * pos--;
|
|
8793
|
+
if (pos < 2) {
|
|
8794
|
+
pos = 9;
|
|
8795
|
+
}
|
|
8796
|
+
}
|
|
8797
|
+
result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
8798
|
+
if (result !== Number(digits.charAt(1))) {
|
|
8799
|
+
return { cnpjNotValid: true };
|
|
8800
|
+
}
|
|
8801
|
+
return null;
|
|
8802
|
+
}
|
|
8803
|
+
return null;
|
|
8804
|
+
}
|
|
8805
|
+
/**
|
|
8806
|
+
* Válida o número de telefone da chave PIX.
|
|
8807
|
+
*/
|
|
8808
|
+
static isValidPhoneNumber(control) {
|
|
8809
|
+
let cellPhoneKey = control.value || '';
|
|
8810
|
+
cellPhoneKey = cellPhoneKey.replace(/[\s()-]/g, '');
|
|
8811
|
+
const regexNumberTelephone = /^[1-9][\d]{1,2}\d{8,10}$/;
|
|
8812
|
+
const isValidNumberTelephone = regexNumberTelephone.test(cellPhoneKey);
|
|
8813
|
+
return isValidNumberTelephone ? null : { invalidPhoneNumber: true };
|
|
8814
|
+
}
|
|
8815
|
+
/**
|
|
8816
|
+
* Valida o email da chave PIX.
|
|
8817
|
+
*/
|
|
8818
|
+
static isValidEmail(control) {
|
|
8819
|
+
const emailKey = control.value;
|
|
8820
|
+
const regexValidEmail = /^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/;
|
|
8821
|
+
const isValidEmail = regexValidEmail.test(emailKey);
|
|
8822
|
+
return isValidEmail ? null : { invalidEmail: true };
|
|
8521
8823
|
}
|
|
8522
8824
|
}
|
|
8523
8825
|
|
|
8524
|
-
|
|
8525
|
-
constructor(
|
|
8826
|
+
class HistoricakPixAccountBase {
|
|
8827
|
+
constructor(formBuilder) {
|
|
8828
|
+
this._paramsForm = new FormGroup({});
|
|
8829
|
+
this._defaultCpfNumber = null;
|
|
8830
|
+
this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
|
|
8831
|
+
this.pixAccountList = [];
|
|
8832
|
+
this.maxValuePercentage = 100.0;
|
|
8833
|
+
this.isShowPixKeyFieldValidatorMessage = false;
|
|
8834
|
+
this.formBuilder = formBuilder;
|
|
8835
|
+
this.createFormGroupBase();
|
|
8836
|
+
}
|
|
8837
|
+
phoneMask(event) {
|
|
8838
|
+
FormatUtilsService.formatTelephoneInputEvent(event);
|
|
8839
|
+
}
|
|
8840
|
+
cpfMask(event) {
|
|
8841
|
+
FormatUtilsService.formatCpfInputEvent(event);
|
|
8842
|
+
}
|
|
8843
|
+
cnpjMask(event) {
|
|
8844
|
+
FormatUtilsService.formatCnpjInputEvent(event);
|
|
8845
|
+
}
|
|
8846
|
+
onChangePixKeyType(item, form) {
|
|
8847
|
+
if (!item || !item.key)
|
|
8848
|
+
return;
|
|
8849
|
+
this.pixKeyType = item.key;
|
|
8850
|
+
const targetForm = (typeof form !== 'undefined' && form !== null)
|
|
8851
|
+
? form
|
|
8852
|
+
: this.pixAccountFormGroup;
|
|
8853
|
+
this.isShowPixKeyFieldValidatorMessage = true;
|
|
8854
|
+
const pixKeyControl = targetForm.get("pixKey");
|
|
8855
|
+
if (pixKeyControl) {
|
|
8856
|
+
pixKeyControl.reset();
|
|
8857
|
+
}
|
|
8858
|
+
this.setPixKeyValidators(true, targetForm);
|
|
8859
|
+
if (item.key === "CPF") {
|
|
8860
|
+
this.setDefaultCpfPixKey(targetForm);
|
|
8861
|
+
}
|
|
8862
|
+
}
|
|
8863
|
+
onClearPixKeyType(form) {
|
|
8864
|
+
var targetForm = (typeof form !== 'undefined' && form !== null)
|
|
8865
|
+
? form
|
|
8866
|
+
: this.pixAccountFormGroup;
|
|
8867
|
+
this.isShowPixKeyFieldValidatorMessage = false;
|
|
8868
|
+
if (targetForm.get("pixKey")) {
|
|
8869
|
+
targetForm.get("pixKey").reset();
|
|
8870
|
+
}
|
|
8871
|
+
}
|
|
8872
|
+
setDefaultCpfPixKey(form) {
|
|
8873
|
+
var targetForm = (typeof form !== 'undefined' && form !== null)
|
|
8874
|
+
? form
|
|
8875
|
+
: this.pixAccountFormGroup;
|
|
8876
|
+
if (this._defaultCpfNumber) {
|
|
8877
|
+
if (targetForm.get("pixKey")) {
|
|
8878
|
+
targetForm.get("pixKey").setValue(this._defaultCpfNumber);
|
|
8879
|
+
}
|
|
8880
|
+
}
|
|
8881
|
+
else {
|
|
8882
|
+
var sheetDocument = this._paramsForm.get("sheetDocument");
|
|
8883
|
+
if (sheetDocument && sheetDocument.get("cpfNumber")) {
|
|
8884
|
+
var cpf = sheetDocument.get("cpfNumber").value;
|
|
8885
|
+
if (cpf && targetForm.get("pixKey")) {
|
|
8886
|
+
targetForm.get("pixKey").setValue(cpf);
|
|
8887
|
+
}
|
|
8888
|
+
}
|
|
8889
|
+
}
|
|
8890
|
+
}
|
|
8891
|
+
createFormGroupBase() {
|
|
8892
|
+
this.pixAccountFormGroup = this.formBuilder.group({
|
|
8893
|
+
id: this.formBuilder.control(null),
|
|
8894
|
+
index: this.formBuilder.control(null),
|
|
8895
|
+
employee: this.formBuilder.control({ value: { tableId: null }, disabled: true }),
|
|
8896
|
+
dateChange: this.formBuilder.control(null),
|
|
8897
|
+
pixKeyType: this.formBuilder.control(null, Validators.required),
|
|
8898
|
+
pixKey: this.formBuilder.control(null),
|
|
8899
|
+
percentage: this.formBuilder.control(null, Validators.compose([
|
|
8900
|
+
...this.initialValidatorOfPercentage,
|
|
8901
|
+
Validators.max(this.maxValuePercentage),
|
|
8902
|
+
])),
|
|
8903
|
+
externalId: this.formBuilder.control(null),
|
|
8904
|
+
customFields: this.formBuilder.control(null),
|
|
8905
|
+
});
|
|
8906
|
+
}
|
|
8907
|
+
setValidatorsAccordingList(pixAccountList, index = null, isEditMode = true, form) {
|
|
8908
|
+
var targetForm = (typeof form !== 'undefined' && form !== null)
|
|
8909
|
+
? form
|
|
8910
|
+
: this.pixAccountFormGroup;
|
|
8911
|
+
this.pixAccountList = (pixAccountList && pixAccountList.length > 0)
|
|
8912
|
+
? [].concat(pixAccountList)
|
|
8913
|
+
: [];
|
|
8914
|
+
var percentageIncluded = [];
|
|
8915
|
+
for (var i = 0; i < this.pixAccountList.length; i++) {
|
|
8916
|
+
var field = this.pixAccountList[i];
|
|
8917
|
+
if (field && field.percentage && i !== index) {
|
|
8918
|
+
percentageIncluded.push(field.percentage);
|
|
8919
|
+
}
|
|
8920
|
+
}
|
|
8921
|
+
this.beforeSetPixKeyTypeValidator(targetForm);
|
|
8922
|
+
this.setPixKeyValidators(isEditMode, targetForm);
|
|
8923
|
+
this.validatePercentageValid(percentageIncluded, targetForm);
|
|
8924
|
+
}
|
|
8925
|
+
beforeSetPixKeyTypeValidator(form) {
|
|
8926
|
+
const control = form.get("pixKeyType");
|
|
8927
|
+
if (this.pixAccountList && this.pixAccountList.length) {
|
|
8928
|
+
control.setValidators(Validators.compose([
|
|
8929
|
+
Validators.required,
|
|
8930
|
+
this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList),
|
|
8931
|
+
]));
|
|
8932
|
+
}
|
|
8933
|
+
else {
|
|
8934
|
+
control.setValidators(Validators.required);
|
|
8935
|
+
}
|
|
8936
|
+
control.updateValueAndValidity();
|
|
8937
|
+
}
|
|
8938
|
+
setPixKeyValidators(isEditMode, form) {
|
|
8939
|
+
const pixKey = form.get("pixKey");
|
|
8940
|
+
switch (this.pixKeyType) {
|
|
8941
|
+
case "TELEPHONE":
|
|
8942
|
+
pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidPhoneNumber]));
|
|
8943
|
+
break;
|
|
8944
|
+
case "EMAIL":
|
|
8945
|
+
pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidEmail]));
|
|
8946
|
+
break;
|
|
8947
|
+
case "CPF":
|
|
8948
|
+
pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCpf]));
|
|
8949
|
+
break;
|
|
8950
|
+
case "CNPJ":
|
|
8951
|
+
pixKey.setValidators(Validators.compose([Validators.required, GenericValidator.isValidCnpj]));
|
|
8952
|
+
break;
|
|
8953
|
+
case "RANDOM_KEY":
|
|
8954
|
+
pixKey.setValidators(Validators.required);
|
|
8955
|
+
break;
|
|
8956
|
+
case "BANK_ACCOUNT":
|
|
8957
|
+
pixKey.clearValidators();
|
|
8958
|
+
pixKey.setValue('');
|
|
8959
|
+
break;
|
|
8960
|
+
default:
|
|
8961
|
+
pixKey.clearValidators();
|
|
8962
|
+
}
|
|
8963
|
+
if (this.pixKeyType === "BANK_ACCOUNT") {
|
|
8964
|
+
pixKey.disable();
|
|
8965
|
+
}
|
|
8966
|
+
else if (isEditMode) {
|
|
8967
|
+
pixKey.enable();
|
|
8968
|
+
}
|
|
8969
|
+
pixKey.updateValueAndValidity();
|
|
8970
|
+
}
|
|
8971
|
+
validatePercentageValid(listValue, form) {
|
|
8972
|
+
const percentage = form.get("percentage");
|
|
8973
|
+
this.maxValuePercentage = listValue.reduce((acc, val) => acc - val, 100.0);
|
|
8974
|
+
percentage.setValidators(Validators.compose([
|
|
8975
|
+
...this.initialValidatorOfPercentage,
|
|
8976
|
+
Validators.max(this.maxValuePercentage),
|
|
8977
|
+
]));
|
|
8978
|
+
percentage.updateValueAndValidity();
|
|
8979
|
+
}
|
|
8980
|
+
validateDuplicatePixKeyTypeBankAccount(listCompare) {
|
|
8981
|
+
return (control) => {
|
|
8982
|
+
const value = control.value;
|
|
8983
|
+
const isDuplicate = listCompare.some((field) => value &&
|
|
8984
|
+
field.pixKeyType.key === "BANK_ACCOUNT" &&
|
|
8985
|
+
value.key === "BANK_ACCOUNT");
|
|
8986
|
+
return isDuplicate ? { pixKeyTypeBankAccountDuplicate: true } : null;
|
|
8987
|
+
};
|
|
8988
|
+
}
|
|
8989
|
+
get paramsForm() {
|
|
8990
|
+
return this._paramsForm;
|
|
8991
|
+
}
|
|
8992
|
+
set paramsForm(value) {
|
|
8993
|
+
this._paramsForm = value;
|
|
8994
|
+
}
|
|
8995
|
+
get defaultCpfNumber() {
|
|
8996
|
+
return this._defaultCpfNumber;
|
|
8997
|
+
}
|
|
8998
|
+
set defaultCpfNumber(value) {
|
|
8999
|
+
this._defaultCpfNumber = value;
|
|
9000
|
+
}
|
|
9001
|
+
}
|
|
9002
|
+
|
|
9003
|
+
let HistoricalPixAccountService = class HistoricalPixAccountService {
|
|
9004
|
+
constructor(http) {
|
|
9005
|
+
this.http = http;
|
|
9006
|
+
}
|
|
9007
|
+
query(path, body, service = ServiceType.PAYROLL) {
|
|
9008
|
+
return this.http.query(path, body, service);
|
|
9009
|
+
}
|
|
9010
|
+
enumQuery() {
|
|
9011
|
+
const path = 'enumQuery';
|
|
9012
|
+
const body = {
|
|
9013
|
+
names: ['PixKeyType']
|
|
9014
|
+
};
|
|
9015
|
+
return this.http.query(path, body, ServiceType.PAYROLL);
|
|
9016
|
+
}
|
|
9017
|
+
};
|
|
9018
|
+
HistoricalPixAccountService.ctorParameters = () => [
|
|
9019
|
+
{ type: HttpClientService }
|
|
9020
|
+
];
|
|
9021
|
+
HistoricalPixAccountService = __decorate([
|
|
9022
|
+
Injectable()
|
|
9023
|
+
], HistoricalPixAccountService);
|
|
9024
|
+
|
|
9025
|
+
let HistoricalPixAccountComponent = class HistoricalPixAccountComponent extends HistoricakPixAccountBase {
|
|
9026
|
+
constructor(translateService, cd, formBuilder, sharedStateService, service) {
|
|
9027
|
+
super(formBuilder);
|
|
8526
9028
|
this.translateService = translateService;
|
|
8527
9029
|
this.cd = cd;
|
|
8528
|
-
this.
|
|
8529
|
-
this.
|
|
9030
|
+
this.sharedStateService = sharedStateService;
|
|
9031
|
+
this.service = service;
|
|
8530
9032
|
this.recordByRow = 1;
|
|
8531
9033
|
this.showDateChange = false;
|
|
8532
9034
|
this.isEditMode = false;
|
|
8533
9035
|
this.isViewMode = false;
|
|
8534
9036
|
this.withSideBar = true;
|
|
8535
|
-
this.defaultCpfNumber = null;
|
|
8536
9037
|
this.listDataReciever = [];
|
|
9038
|
+
this.addExistentHistoricData = [];
|
|
9039
|
+
this.getListPixAccount = [];
|
|
9040
|
+
this.isEditModeForSave = false;
|
|
9041
|
+
this.showField = false;
|
|
9042
|
+
this.hideBtnAddForViewMode = false;
|
|
9043
|
+
this.showButtonView = true;
|
|
8537
9044
|
this.isViewModeActive = new EventEmitter();
|
|
8538
9045
|
this.isEditModeActive = new EventEmitter();
|
|
8539
9046
|
this.isDeleteModeActive = new EventEmitter();
|
|
9047
|
+
this.isValidChangeForm = new EventEmitter();
|
|
8540
9048
|
this.listFromApp = [];
|
|
8541
9049
|
this.visibleChange = new EventEmitter();
|
|
8542
9050
|
this.ngUnsubscribe = new Subject();
|
|
@@ -8550,6 +9058,12 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8550
9058
|
this.loading = true;
|
|
8551
9059
|
this.listData = [];
|
|
8552
9060
|
this.listDataNoPage = [];
|
|
9061
|
+
this.showEditMode = false;
|
|
9062
|
+
this.hasRecordsPix = true;
|
|
9063
|
+
this.hideFields = this.sharedStateService.hideField$;
|
|
9064
|
+
this.suggestions = [];
|
|
9065
|
+
this.formGroupByRow = {};
|
|
9066
|
+
this.isSyncingPercentage = false;
|
|
8553
9067
|
this.cols = [
|
|
8554
9068
|
{
|
|
8555
9069
|
label: this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
|
|
@@ -8563,6 +9077,10 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8563
9077
|
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
|
|
8564
9078
|
field: "percentage",
|
|
8565
9079
|
},
|
|
9080
|
+
{
|
|
9081
|
+
label: this.translateService.instant("hcm.payroll.movimentation_generic_action"),
|
|
9082
|
+
field: "actions",
|
|
9083
|
+
}
|
|
8566
9084
|
];
|
|
8567
9085
|
this.actions = (rowData = {}, key) => {
|
|
8568
9086
|
return [
|
|
@@ -8600,7 +9118,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8600
9118
|
},
|
|
8601
9119
|
},
|
|
8602
9120
|
{
|
|
8603
|
-
visible: !this.isEditMode,
|
|
9121
|
+
visible: !this.isEditMode || this.showEditMode,
|
|
8604
9122
|
label: this.translateService.instant("hcm.payroll.delete"),
|
|
8605
9123
|
command: () => {
|
|
8606
9124
|
if (this.isAllowToDeleteHistorical) {
|
|
@@ -8621,12 +9139,44 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8621
9139
|
this.createFormGroup();
|
|
8622
9140
|
}
|
|
8623
9141
|
ngOnInit() {
|
|
9142
|
+
this.showFields = this.showField;
|
|
8624
9143
|
this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
|
|
9144
|
+
this.sharedStateService.showEditMode$.subscribe((value) => {
|
|
9145
|
+
this.showEditMode = value;
|
|
9146
|
+
this.isEditModeForSave = value;
|
|
9147
|
+
});
|
|
9148
|
+
this.sharedStateService.activeHideOptionsOnView$.subscribe((value) => {
|
|
9149
|
+
if (value) {
|
|
9150
|
+
this.showButtonView = false;
|
|
9151
|
+
}
|
|
9152
|
+
});
|
|
9153
|
+
this.sharedStateService.activeValidatorsOnEditModalOpen$
|
|
9154
|
+
.subscribe(() => {
|
|
9155
|
+
Object.values(this.formGroupByRow).forEach(fg => {
|
|
9156
|
+
Object.values(fg.controls).forEach(control => {
|
|
9157
|
+
control.markAsTouched();
|
|
9158
|
+
control.updateValueAndValidity();
|
|
9159
|
+
});
|
|
9160
|
+
});
|
|
9161
|
+
this.emitFormValidity();
|
|
9162
|
+
});
|
|
9163
|
+
this.resetFormState();
|
|
8625
9164
|
}
|
|
8626
9165
|
ngOnChanges(changes) {
|
|
8627
9166
|
if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
|
|
8628
9167
|
this.listFromApp = changes['listDataReciever'].currentValue;
|
|
8629
9168
|
}
|
|
9169
|
+
if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
|
|
9170
|
+
this.getHistoricalPixAccountList();
|
|
9171
|
+
}
|
|
9172
|
+
if (changes['addExistentHistoricData'] && changes['addExistentHistoricData'].currentValue) {
|
|
9173
|
+
const newData = changes['addExistentHistoricData'].currentValue;
|
|
9174
|
+
this.rebuildFormGroupMap(newData);
|
|
9175
|
+
}
|
|
9176
|
+
if (changes['isEditMode']) {
|
|
9177
|
+
this.isEditMode = changes['isEditMode'].currentValue;
|
|
9178
|
+
this.cd.detectChanges();
|
|
9179
|
+
}
|
|
8630
9180
|
}
|
|
8631
9181
|
createFormGroup() {
|
|
8632
9182
|
this.historicalPixAccountList = this.formBuilder.group({
|
|
@@ -8640,6 +9190,119 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8640
9190
|
ngAfterViewInit() {
|
|
8641
9191
|
this.cd.detectChanges();
|
|
8642
9192
|
}
|
|
9193
|
+
emitFormValidity() {
|
|
9194
|
+
if (!this.formGroupByRow || Object.keys(this.formGroupByRow).length === 0) {
|
|
9195
|
+
this.isValidChangeForm.emit(false);
|
|
9196
|
+
return;
|
|
9197
|
+
}
|
|
9198
|
+
let allValid = true;
|
|
9199
|
+
Object.values(this.formGroupByRow).forEach(fg => {
|
|
9200
|
+
// Verifica cada controle individualmente
|
|
9201
|
+
Object.keys(fg.controls).forEach(key => {
|
|
9202
|
+
const control = fg.get(key);
|
|
9203
|
+
// Verifica se o controle é obrigatório e está vazio
|
|
9204
|
+
if (control.validator && control.validator({})) {
|
|
9205
|
+
const validatorFn = control.validator({});
|
|
9206
|
+
if (validatorFn && validatorFn.required && !control.value) {
|
|
9207
|
+
allValid = false;
|
|
9208
|
+
}
|
|
9209
|
+
}
|
|
9210
|
+
// Verifica se o controle tem erros
|
|
9211
|
+
if (control.errors) {
|
|
9212
|
+
allValid = false;
|
|
9213
|
+
}
|
|
9214
|
+
});
|
|
9215
|
+
fg.updateValueAndValidity();
|
|
9216
|
+
if (!fg.valid) {
|
|
9217
|
+
allValid = false;
|
|
9218
|
+
}
|
|
9219
|
+
});
|
|
9220
|
+
this.isValidChangeForm.emit(allValid);
|
|
9221
|
+
}
|
|
9222
|
+
filterPixKeyType(event) {
|
|
9223
|
+
const query = event.query;
|
|
9224
|
+
this.service.enumQuery().subscribe((response) => {
|
|
9225
|
+
const pixKeyTypeEnum = response.results.find((result) => result.enumName === 'PixKeyType');
|
|
9226
|
+
if (pixKeyTypeEnum) {
|
|
9227
|
+
this.suggestions = pixKeyTypeEnum.items.filter((item) => item.value.toLowerCase().includes(query.toLowerCase()));
|
|
9228
|
+
}
|
|
9229
|
+
else {
|
|
9230
|
+
this.suggestions = [];
|
|
9231
|
+
}
|
|
9232
|
+
});
|
|
9233
|
+
}
|
|
9234
|
+
createPixRowFormGroup() {
|
|
9235
|
+
return this.formBuilder.group({
|
|
9236
|
+
id: [null],
|
|
9237
|
+
pixKeyType: [null, Validators.required],
|
|
9238
|
+
pixKey: [null],
|
|
9239
|
+
percentage: [0, Validators.compose([
|
|
9240
|
+
...this.initialValidatorOfPercentage,
|
|
9241
|
+
Validators.max(this.maxValuePercentage),
|
|
9242
|
+
])],
|
|
9243
|
+
externalId: [null],
|
|
9244
|
+
});
|
|
9245
|
+
}
|
|
9246
|
+
/**
|
|
9247
|
+
* Sincroniza todos os dados do NgModel para os FormGroups antes de enviar ao componente pai
|
|
9248
|
+
*/
|
|
9249
|
+
syncPixDataToParentForm() {
|
|
9250
|
+
this.syncAllModelToForm();
|
|
9251
|
+
const historicalPix = [...this.addExistentHistoricData];
|
|
9252
|
+
this.historicalPixAccountList.get("historicalPixAccountList").setValue(historicalPix);
|
|
9253
|
+
if (this.formGroup) {
|
|
9254
|
+
this.formGroup.get(this.fieldFormGroup).patchValue({
|
|
9255
|
+
historicalPixAccountList: historicalPix
|
|
9256
|
+
});
|
|
9257
|
+
}
|
|
9258
|
+
}
|
|
9259
|
+
syncResetPixFormToParent() {
|
|
9260
|
+
this.formGroupByRow = {};
|
|
9261
|
+
this.historicalPixAccountList.reset();
|
|
9262
|
+
this.historicalPixAccountList.get('historicalPixAccountList').setValue([]);
|
|
9263
|
+
if (this.addExistentHistoricData.length) {
|
|
9264
|
+
this.rebuildFormGroupMap(this.addExistentHistoricData);
|
|
9265
|
+
}
|
|
9266
|
+
}
|
|
9267
|
+
/**
|
|
9268
|
+
* Valida todos os formulários
|
|
9269
|
+
*/
|
|
9270
|
+
validateAllForms() {
|
|
9271
|
+
this.forceCloseAllCellEditors();
|
|
9272
|
+
this.syncAllModelToForm();
|
|
9273
|
+
if (!this.formGroupByRow || Object.keys(this.formGroupByRow).length === 0) {
|
|
9274
|
+
return true;
|
|
9275
|
+
}
|
|
9276
|
+
let isAllValid = true;
|
|
9277
|
+
Object.keys(this.formGroupByRow).forEach(indexKey => {
|
|
9278
|
+
const index = Number(indexKey);
|
|
9279
|
+
const form = this.formGroupByRow[index];
|
|
9280
|
+
if (form) {
|
|
9281
|
+
Object.keys(form.controls).forEach(controlName => {
|
|
9282
|
+
const control = form.get(controlName);
|
|
9283
|
+
control.markAsTouched();
|
|
9284
|
+
if (controlName === 'pixKey') {
|
|
9285
|
+
const pixKeyTypeControl = form.get('pixKeyType');
|
|
9286
|
+
if (pixKeyTypeControl.value) {
|
|
9287
|
+
this.validateDocumentField(index, pixKeyTypeControl.value.key);
|
|
9288
|
+
}
|
|
9289
|
+
}
|
|
9290
|
+
});
|
|
9291
|
+
form.updateValueAndValidity();
|
|
9292
|
+
if (form.invalid) {
|
|
9293
|
+
isAllValid = false;
|
|
9294
|
+
}
|
|
9295
|
+
}
|
|
9296
|
+
});
|
|
9297
|
+
if (isAllValid && this.addExistentHistoricData && this.addExistentHistoricData.length > 0) {
|
|
9298
|
+
const totalPercentage = this.addExistentHistoricData.reduce((sum, item) => sum + (parseFloat(item.percentage) || 0), 0);
|
|
9299
|
+
if (Math.abs(totalPercentage - 100) > 0.01) {
|
|
9300
|
+
isAllValid = false;
|
|
9301
|
+
}
|
|
9302
|
+
}
|
|
9303
|
+
this.isValidChangeForm.emit(isAllValid);
|
|
9304
|
+
return isAllValid;
|
|
9305
|
+
}
|
|
8643
9306
|
onLazyLoad(event) {
|
|
8644
9307
|
const first = event && event.first ? event.first : 0;
|
|
8645
9308
|
const rows = event && event.rows ? event.rows : this.recordByRow;
|
|
@@ -8666,6 +9329,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8666
9329
|
this.refreshCssInIE11();
|
|
8667
9330
|
}
|
|
8668
9331
|
this.loading = false;
|
|
9332
|
+
this.cd.detectChanges();
|
|
8669
9333
|
}
|
|
8670
9334
|
/**
|
|
8671
9335
|
* Um Bug de CSS que acontece nas linhas da tabela, que resolve só atualizando qualquer parte do CSS da pagina.
|
|
@@ -8683,12 +9347,84 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8683
9347
|
this.pixAccountItemInput = {};
|
|
8684
9348
|
this.visible = true;
|
|
8685
9349
|
}
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
9350
|
+
addPix() {
|
|
9351
|
+
const newItem = {
|
|
9352
|
+
id: null,
|
|
9353
|
+
pixKeyType: {},
|
|
9354
|
+
pixKey: '',
|
|
9355
|
+
percentage: '',
|
|
9356
|
+
externalId: '',
|
|
9357
|
+
};
|
|
9358
|
+
const index = this.addExistentHistoricData.length;
|
|
9359
|
+
this.addExistentHistoricData = [
|
|
9360
|
+
...this.addExistentHistoricData,
|
|
9361
|
+
newItem
|
|
9362
|
+
];
|
|
9363
|
+
this.formGroupByRow[index] = this.createPixRowFormGroup();
|
|
9364
|
+
this.setValidatorsAccordingList(this.addExistentHistoricData, index, true);
|
|
9365
|
+
this.emitFormValidity();
|
|
9366
|
+
}
|
|
9367
|
+
deletePix(index) {
|
|
9368
|
+
if (this.dataListPix.editingCell) {
|
|
9369
|
+
this.dataListPix.editingCell = null;
|
|
9370
|
+
}
|
|
9371
|
+
this.addExistentHistoricData = this.addExistentHistoricData.filter((_, i) => i !== index);
|
|
9372
|
+
const currentList = this.historicalPixAccountList.get("historicalPixAccountList").value || [];
|
|
9373
|
+
const updatedList = currentList.filter((_, i) => i !== index);
|
|
9374
|
+
this.historicalPixAccountList.get("historicalPixAccountList").setValue(updatedList);
|
|
9375
|
+
if (this.formGroup) {
|
|
9376
|
+
this.formGroup.get(this.fieldFormGroup).patchValue({
|
|
9377
|
+
historicalPixAccountList: updatedList
|
|
9378
|
+
});
|
|
9379
|
+
}
|
|
9380
|
+
this.rebuildFormGroupMap(this.addExistentHistoricData);
|
|
9381
|
+
this.addExistentHistoricData.forEach((_, i) => {
|
|
9382
|
+
if (this.formGroupByRow[i]) {
|
|
9383
|
+
const allValues = this.addExistentHistoricData
|
|
9384
|
+
.map((item, idx) => idx === i ? 0 : (parseFloat(item.percentage) || 0));
|
|
9385
|
+
this.validatePercentageValid(allValues, this.formGroupByRow[i]);
|
|
9386
|
+
}
|
|
9387
|
+
});
|
|
9388
|
+
this.emitFormValidity();
|
|
9389
|
+
}
|
|
9390
|
+
rebuildFormGroupMap(data) {
|
|
9391
|
+
this.formGroupByRow = {};
|
|
9392
|
+
data.forEach((item, index) => {
|
|
9393
|
+
const form = this.createPixRowFormGroup();
|
|
9394
|
+
const pixKeyType = item.pixKeyType.key;
|
|
9395
|
+
const pixKeyRaw = item.pixKey;
|
|
9396
|
+
if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
|
|
9397
|
+
item.pixKey = FormatUtilsService.getFormattedSubscriptionNumber(pixKeyRaw, pixKeyType);
|
|
9398
|
+
}
|
|
9399
|
+
if (pixKeyType === 'TELEPHONE') {
|
|
9400
|
+
item.pixKey = FormatUtilsService.getFormattedTelephoneNumber(pixKeyRaw);
|
|
9401
|
+
}
|
|
9402
|
+
form.patchValue(item);
|
|
9403
|
+
this.formGroupByRow[index] = form;
|
|
9404
|
+
this.pixKeyType = pixKeyType;
|
|
9405
|
+
this.setPixKeyValidators(true, form);
|
|
9406
|
+
this.setValidatorsAccordingList(data, index, this.isEditMode);
|
|
9407
|
+
const listValues = data
|
|
9408
|
+
.filter((_, i) => i !== index)
|
|
9409
|
+
.map(row => row.percentage ? parseFloat(row.percentage) : 0);
|
|
9410
|
+
this.validatePercentageValid(listValues, form);
|
|
8691
9411
|
});
|
|
9412
|
+
this.emitFormValidity();
|
|
9413
|
+
}
|
|
9414
|
+
onPixKeyTypeChange(item, index) {
|
|
9415
|
+
const form = this.formGroupByRow[index];
|
|
9416
|
+
this.onChangePixKeyType(item, form);
|
|
9417
|
+
this.addExistentHistoricData[index].pixKey = '';
|
|
9418
|
+
setTimeout(() => {
|
|
9419
|
+
if (this.dataListPix.editingCell) {
|
|
9420
|
+
this.dataListPix.editingCell = null;
|
|
9421
|
+
}
|
|
9422
|
+
});
|
|
9423
|
+
this.cd.detectChanges();
|
|
9424
|
+
}
|
|
9425
|
+
onPixKeyTypeClear(index) {
|
|
9426
|
+
const form = this.formGroupByRow[index];
|
|
9427
|
+
this.onClearPixKeyType(form);
|
|
8692
9428
|
}
|
|
8693
9429
|
deleteAnnuityItem(index) {
|
|
8694
9430
|
let newlist = [...this.getHistoricalPixAccountList()];
|
|
@@ -8721,6 +9457,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8721
9457
|
}
|
|
8722
9458
|
$event["dateChange"] = this.dateChange;
|
|
8723
9459
|
newDataList.push($event);
|
|
9460
|
+
this.addExistentHistoricData.push(Object.assign({}, $event));
|
|
8724
9461
|
}
|
|
8725
9462
|
this.historicalPixAccountList.get("historicalPixAccountList").setValue(newDataList);
|
|
8726
9463
|
this.verifyTotalPercentage();
|
|
@@ -8734,27 +9471,382 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8734
9471
|
}
|
|
8735
9472
|
return null;
|
|
8736
9473
|
}
|
|
8737
|
-
verifyTotalPercentage() {
|
|
8738
|
-
const list = this.getHistoricalPixAccountList() ? this.getHistoricalPixAccountList() : [];
|
|
8739
|
-
const arrayPercentage = [];
|
|
8740
|
-
if (!list.length)
|
|
8741
|
-
return this.msgTotalLimitByPercentage = null;
|
|
8742
|
-
list.filter((item) => arrayPercentage.push(item && item["percentage"]));
|
|
8743
|
-
const sumPercentage = arrayPercentage.reduce((total, percentage) => {
|
|
8744
|
-
return total + percentage;
|
|
8745
|
-
}, 0);
|
|
8746
|
-
if (sumPercentage === 100) {
|
|
8747
|
-
this.msgTotalLimitByPercentage = this.translateService.instant("hcm.payroll.historical_pix_account_msg_limit_total_by_percentage");
|
|
9474
|
+
verifyTotalPercentage() {
|
|
9475
|
+
const list = this.getHistoricalPixAccountList() ? this.getHistoricalPixAccountList() : [];
|
|
9476
|
+
const arrayPercentage = [];
|
|
9477
|
+
if (!list.length)
|
|
9478
|
+
return this.msgTotalLimitByPercentage = null;
|
|
9479
|
+
list.filter((item) => arrayPercentage.push(item && item["percentage"]));
|
|
9480
|
+
const sumPercentage = arrayPercentage.reduce((total, percentage) => {
|
|
9481
|
+
return total + percentage;
|
|
9482
|
+
}, 0);
|
|
9483
|
+
if (sumPercentage === 100) {
|
|
9484
|
+
this.msgTotalLimitByPercentage = this.translateService.instant("hcm.payroll.historical_pix_account_msg_limit_total_by_percentage");
|
|
9485
|
+
}
|
|
9486
|
+
else {
|
|
9487
|
+
this.msgTotalLimitByPercentage = null;
|
|
9488
|
+
}
|
|
9489
|
+
}
|
|
9490
|
+
formatPercentage(value) {
|
|
9491
|
+
if (value == null || value === '' || isNaN(Number(value))) {
|
|
9492
|
+
return '0.00';
|
|
9493
|
+
}
|
|
9494
|
+
return Number(value).toFixed(2);
|
|
9495
|
+
}
|
|
9496
|
+
onSyncValue(field, index) {
|
|
9497
|
+
if (this.formGroupByRow &&
|
|
9498
|
+
this.formGroupByRow[index] &&
|
|
9499
|
+
this.formGroupByRow[index].get(field)) {
|
|
9500
|
+
const control = this.formGroupByRow[index].get(field);
|
|
9501
|
+
const value = control.value;
|
|
9502
|
+
this.addExistentHistoricData[index][field] = value;
|
|
9503
|
+
control.markAsDirty();
|
|
9504
|
+
control.markAsTouched();
|
|
9505
|
+
if (field === 'percentage') {
|
|
9506
|
+
const currentList = this.addExistentHistoricData
|
|
9507
|
+
.map((item, i) => i === index ? 0 : (parseFloat(item.percentage) || 0));
|
|
9508
|
+
this.validatePercentageValid(currentList, this.formGroupByRow[index]);
|
|
9509
|
+
if (!this.isSyncingPercentage) {
|
|
9510
|
+
this.isSyncingPercentage = true;
|
|
9511
|
+
setTimeout(() => {
|
|
9512
|
+
this.syncPixDataToParentForm();
|
|
9513
|
+
this.isSyncingPercentage = false;
|
|
9514
|
+
}, 0);
|
|
9515
|
+
}
|
|
9516
|
+
}
|
|
9517
|
+
control.updateValueAndValidity();
|
|
9518
|
+
this.formGroupByRow[index].updateValueAndValidity();
|
|
9519
|
+
this.emitFormValidity();
|
|
9520
|
+
}
|
|
9521
|
+
}
|
|
9522
|
+
close() {
|
|
9523
|
+
this.visible = false;
|
|
9524
|
+
}
|
|
9525
|
+
getFormattedTelephoneNumber(telephoneNumber) {
|
|
9526
|
+
return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
|
|
9527
|
+
}
|
|
9528
|
+
getFormattedCpf(cpf) {
|
|
9529
|
+
return FormatUtilsService.getFormattedCpf(cpf);
|
|
9530
|
+
}
|
|
9531
|
+
getFormattedCnpj(cnpj) {
|
|
9532
|
+
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
9533
|
+
}
|
|
9534
|
+
getFormattedPercentage(value) {
|
|
9535
|
+
return FormatUtilsService.getFormattedPercentage(value);
|
|
9536
|
+
}
|
|
9537
|
+
/**
|
|
9538
|
+
* Reseta completamente o estado do formulário e controles
|
|
9539
|
+
*/
|
|
9540
|
+
resetFormState() {
|
|
9541
|
+
if (this.formGroupByRow) {
|
|
9542
|
+
Object.values(this.formGroupByRow).forEach(form => {
|
|
9543
|
+
if (form) {
|
|
9544
|
+
Object.keys(form.controls).forEach(controlName => {
|
|
9545
|
+
const control = form.get(controlName);
|
|
9546
|
+
if (control) {
|
|
9547
|
+
control.setErrors(null);
|
|
9548
|
+
control.markAsUntouched();
|
|
9549
|
+
control.markAsPristine();
|
|
9550
|
+
}
|
|
9551
|
+
});
|
|
9552
|
+
form.updateValueAndValidity();
|
|
9553
|
+
}
|
|
9554
|
+
});
|
|
9555
|
+
}
|
|
9556
|
+
if (this.dataListPix) {
|
|
9557
|
+
if (typeof this.dataListPix.closeAllCellEditors === 'function') {
|
|
9558
|
+
try {
|
|
9559
|
+
this.dataListPix.closeAllCellEditors();
|
|
9560
|
+
}
|
|
9561
|
+
catch (e) {
|
|
9562
|
+
console.error('Erro ao tentar fechar cell editors:', e);
|
|
9563
|
+
}
|
|
9564
|
+
}
|
|
9565
|
+
else if (this.dataListPix.editingCell) {
|
|
9566
|
+
this.dataListPix.editingCell = null;
|
|
9567
|
+
}
|
|
9568
|
+
if (this.dataListPix.editing !== undefined) {
|
|
9569
|
+
this.dataListPix.editing = false;
|
|
9570
|
+
}
|
|
9571
|
+
}
|
|
9572
|
+
this.cd.detectChanges();
|
|
9573
|
+
}
|
|
9574
|
+
/**
|
|
9575
|
+
* Formata a chave PIX para exibição baseada no tipo
|
|
9576
|
+
*/
|
|
9577
|
+
getFormattedPixKey(pixKeyType, pixKey) {
|
|
9578
|
+
if (!pixKey)
|
|
9579
|
+
return '';
|
|
9580
|
+
switch (pixKeyType) {
|
|
9581
|
+
case 'CPF':
|
|
9582
|
+
return FormatUtilsService.getFormattedCpf(pixKey);
|
|
9583
|
+
case 'CNPJ':
|
|
9584
|
+
return FormatUtilsService.getFormattedCnpj(pixKey);
|
|
9585
|
+
case 'TELEPHONE':
|
|
9586
|
+
return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
|
|
9587
|
+
case 'EMAIL':
|
|
9588
|
+
case 'RANDOM_KEY':
|
|
9589
|
+
default:
|
|
9590
|
+
return pixKey;
|
|
9591
|
+
}
|
|
9592
|
+
}
|
|
9593
|
+
/**
|
|
9594
|
+
* Obtém o tipo de chave PIX do item atual
|
|
9595
|
+
*/
|
|
9596
|
+
getPixKeyType(item) {
|
|
9597
|
+
return item && item.pixKeyType && item.pixKeyType.key || '';
|
|
9598
|
+
}
|
|
9599
|
+
/**
|
|
9600
|
+
* Verifica se um controle está inválido para os campos editáveis
|
|
9601
|
+
*/
|
|
9602
|
+
isInvalid(index, controlName) {
|
|
9603
|
+
const form = this.formGroupByRow[index];
|
|
9604
|
+
if (!form)
|
|
9605
|
+
return false;
|
|
9606
|
+
const control = form.get(controlName);
|
|
9607
|
+
if (!control)
|
|
9608
|
+
return false;
|
|
9609
|
+
return control.invalid && (control.touched || control.dirty);
|
|
9610
|
+
}
|
|
9611
|
+
/**
|
|
9612
|
+
* Método chamado quando uma célula entra no modo de edição
|
|
9613
|
+
*/
|
|
9614
|
+
onCellEditInit(event) {
|
|
9615
|
+
const rowIndex = this.addExistentHistoricData.findIndex(item => item === event.data);
|
|
9616
|
+
if (rowIndex < 0)
|
|
9617
|
+
return;
|
|
9618
|
+
const form = this.formGroupByRow[rowIndex];
|
|
9619
|
+
if (form && form.get('pixKey')) {
|
|
9620
|
+
const pixKeyControl = form.get('pixKey');
|
|
9621
|
+
const currentValue = this.addExistentHistoricData[rowIndex].pixKey;
|
|
9622
|
+
pixKeyControl.setValue(currentValue);
|
|
9623
|
+
}
|
|
9624
|
+
}
|
|
9625
|
+
/**
|
|
9626
|
+
* Recupera o FormControl específico para um campo em determinado índice
|
|
9627
|
+
*/
|
|
9628
|
+
getFormControl(index, controlName) {
|
|
9629
|
+
const form = this.formGroupByRow[index];
|
|
9630
|
+
if (!form)
|
|
9631
|
+
return null;
|
|
9632
|
+
return form.get(controlName);
|
|
9633
|
+
}
|
|
9634
|
+
/**
|
|
9635
|
+
* Valida campos de documento (CPF, CNPJ) quando o usuário termina de digitar no form de edição
|
|
9636
|
+
*/
|
|
9637
|
+
validateDocumentField(index, fieldType) {
|
|
9638
|
+
const form = this.formGroupByRow[index];
|
|
9639
|
+
const item = this.addExistentHistoricData[index];
|
|
9640
|
+
if (!form || !item)
|
|
9641
|
+
return;
|
|
9642
|
+
const pixKeyControl = form.get('pixKey');
|
|
9643
|
+
if (!pixKeyControl)
|
|
9644
|
+
return;
|
|
9645
|
+
let value = item.pixKey;
|
|
9646
|
+
pixKeyControl.setValue(value);
|
|
9647
|
+
if (fieldType === 'CPF' || fieldType === 'CNPJ' || fieldType === 'TELEPHONE') {
|
|
9648
|
+
value = value ? value.toString().replace(/\D/g, '') : '';
|
|
9649
|
+
item.pixKey = value;
|
|
9650
|
+
pixKeyControl.setValue(value);
|
|
9651
|
+
}
|
|
9652
|
+
if (!value || value.toString().trim() === '') {
|
|
9653
|
+
pixKeyControl.setErrors({ required: true });
|
|
9654
|
+
pixKeyControl.markAsTouched();
|
|
9655
|
+
form.updateValueAndValidity();
|
|
9656
|
+
this.emitFormValidity();
|
|
9657
|
+
return;
|
|
9658
|
+
}
|
|
9659
|
+
let cleanValue = value;
|
|
9660
|
+
if (fieldType === 'CPF' || fieldType === 'CNPJ') {
|
|
9661
|
+
cleanValue = value.toString().replace(/\D/g, '');
|
|
9662
|
+
item.pixKey = cleanValue;
|
|
9663
|
+
pixKeyControl.setValue(cleanValue);
|
|
9664
|
+
}
|
|
9665
|
+
let isValid = false;
|
|
9666
|
+
switch (fieldType) {
|
|
9667
|
+
case 'CPF':
|
|
9668
|
+
isValid = cleanValue.length === 11 && GenericValidator.isValidCpf({ value: cleanValue }) === null;
|
|
9669
|
+
break;
|
|
9670
|
+
case 'CNPJ':
|
|
9671
|
+
isValid = cleanValue.length === 14 && GenericValidator.isValidCnpj({ value: cleanValue }) === null;
|
|
9672
|
+
break;
|
|
9673
|
+
case 'TELEPHONE':
|
|
9674
|
+
cleanValue = value.toString().replace(/\D/g, '');
|
|
9675
|
+
isValid = GenericValidator.isValidPhoneNumber({ value: cleanValue }) === null;
|
|
9676
|
+
break;
|
|
9677
|
+
case 'EMAIL':
|
|
9678
|
+
isValid = GenericValidator.isValidEmail({ value }) === null;
|
|
9679
|
+
break;
|
|
9680
|
+
case 'RANDOM_KEY':
|
|
9681
|
+
isValid = true;
|
|
9682
|
+
break;
|
|
9683
|
+
default:
|
|
9684
|
+
isValid = true;
|
|
9685
|
+
}
|
|
9686
|
+
pixKeyControl.markAsTouched();
|
|
9687
|
+
if (isValid) {
|
|
9688
|
+
pixKeyControl.setErrors(null);
|
|
9689
|
+
}
|
|
9690
|
+
else {
|
|
9691
|
+
const errorType = this.getErrorTypeForField(fieldType);
|
|
9692
|
+
pixKeyControl.setErrors({ [errorType]: true });
|
|
9693
|
+
}
|
|
9694
|
+
form.updateValueAndValidity();
|
|
9695
|
+
this.emitFormValidity();
|
|
9696
|
+
this.cd.detectChanges();
|
|
9697
|
+
}
|
|
9698
|
+
/**
|
|
9699
|
+
* Obtém o tipo de erro para cada tipo de campo editável
|
|
9700
|
+
*/
|
|
9701
|
+
getErrorTypeForField(fieldType) {
|
|
9702
|
+
switch (fieldType) {
|
|
9703
|
+
case 'CPF': return 'invalidCpf';
|
|
9704
|
+
case 'CNPJ': return 'invalidCnpj';
|
|
9705
|
+
case 'TELEPHONE': return 'invalidPhoneNumber';
|
|
9706
|
+
case 'EMAIL': return 'invalidEmail';
|
|
9707
|
+
default: return 'required';
|
|
9708
|
+
}
|
|
9709
|
+
}
|
|
9710
|
+
/**
|
|
9711
|
+
* Retorna a mensagem de erro apropriada para um campo
|
|
9712
|
+
*/
|
|
9713
|
+
getErrorMessage(index, controlName) {
|
|
9714
|
+
const form = this.formGroupByRow[index];
|
|
9715
|
+
if (!form)
|
|
9716
|
+
return '';
|
|
9717
|
+
const control = form.get(controlName);
|
|
9718
|
+
if (!control || !control.errors)
|
|
9719
|
+
return '';
|
|
9720
|
+
const fieldValue = control.value || '';
|
|
9721
|
+
if (control.hasError('required')) {
|
|
9722
|
+
return this.translateService.instant('hcm.payroll.required');
|
|
9723
|
+
}
|
|
9724
|
+
if (control.hasError('invalidCpf')) {
|
|
9725
|
+
return this.translateService.instant('hcm.payroll.employees_addition_cpf_error');
|
|
9726
|
+
}
|
|
9727
|
+
else if (control.hasError('invalidCnpj')) {
|
|
9728
|
+
return this.translateService.instant('hcm.payroll.employees_addition_cnpj_error');
|
|
9729
|
+
}
|
|
9730
|
+
else if (control.hasError('invalidEmail')) {
|
|
9731
|
+
return this.translateService.instant('hcm.payroll.employees_addition_email_invalid');
|
|
9732
|
+
}
|
|
9733
|
+
else if (control.hasError('invalidPhoneNumber')) {
|
|
9734
|
+
return this.translateService.instant('hcm.payroll.employees_addition_invalid_phone_number', { value: fieldValue });
|
|
9735
|
+
}
|
|
9736
|
+
return '';
|
|
9737
|
+
}
|
|
9738
|
+
/**
|
|
9739
|
+
* Tratamento ao perder o foco em campos de documento
|
|
9740
|
+
*/
|
|
9741
|
+
onDocumentBlur(index) {
|
|
9742
|
+
const form = this.formGroupByRow[index];
|
|
9743
|
+
const item = this.addExistentHistoricData[index];
|
|
9744
|
+
if (!form || !item)
|
|
9745
|
+
return;
|
|
9746
|
+
const pixKeyControl = form.get('pixKey');
|
|
9747
|
+
const pixKeyTypeControl = form.get('pixKeyType');
|
|
9748
|
+
if (!pixKeyControl || !pixKeyTypeControl.value)
|
|
9749
|
+
return;
|
|
9750
|
+
const pixKeyType = pixKeyTypeControl.value.key;
|
|
9751
|
+
let value = item.pixKey;
|
|
9752
|
+
if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ' || pixKeyType === 'TELEPHONE') {
|
|
9753
|
+
value = value ? value.toString().replace(/\D/g, '') : '';
|
|
9754
|
+
item.pixKey = value;
|
|
9755
|
+
}
|
|
9756
|
+
pixKeyControl.setValue(value);
|
|
9757
|
+
this.validateDocumentField(index, pixKeyType);
|
|
9758
|
+
if (value) {
|
|
9759
|
+
if (pixKeyType === 'CPF') {
|
|
9760
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedCpf(value);
|
|
9761
|
+
}
|
|
9762
|
+
else if (pixKeyType === 'CNPJ') {
|
|
9763
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedCnpj(value);
|
|
9764
|
+
}
|
|
9765
|
+
else if (pixKeyType === 'TELEPHONE') {
|
|
9766
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedTelephoneNumber(value);
|
|
9767
|
+
}
|
|
9768
|
+
else {
|
|
9769
|
+
item.pixKeyFormatted = value;
|
|
9770
|
+
}
|
|
9771
|
+
}
|
|
9772
|
+
this.finishEditing();
|
|
9773
|
+
}
|
|
9774
|
+
finishEditing() {
|
|
9775
|
+
this.syncAllModelToForm();
|
|
9776
|
+
this.cd.detectChanges();
|
|
9777
|
+
}
|
|
9778
|
+
clearErrorsTemporarily(rowIndex) {
|
|
9779
|
+
const form = this.formGroupByRow[rowIndex];
|
|
9780
|
+
if (form && form.get('pixKey')) {
|
|
9781
|
+
const currentValue = form.get('pixKey').value;
|
|
9782
|
+
form.get('pixKey').setErrors(null);
|
|
9783
|
+
form.get('pixKey').setValue(currentValue);
|
|
9784
|
+
}
|
|
9785
|
+
}
|
|
9786
|
+
closeEditModeManually() {
|
|
9787
|
+
setTimeout(() => {
|
|
9788
|
+
if (this.dataListPix) {
|
|
9789
|
+
if (typeof this.dataListPix.closeAllCellEditors === 'function') {
|
|
9790
|
+
this.dataListPix.closeAllCellEditors();
|
|
9791
|
+
}
|
|
9792
|
+
else if (this.dataListPix.editingCell) {
|
|
9793
|
+
this.dataListPix.editingCell = null;
|
|
9794
|
+
}
|
|
9795
|
+
this.cd.detectChanges();
|
|
9796
|
+
}
|
|
9797
|
+
}, 100);
|
|
9798
|
+
}
|
|
9799
|
+
syncAllModelToForm() {
|
|
9800
|
+
if (!this.addExistentHistoricData || !this.formGroupByRow)
|
|
9801
|
+
return;
|
|
9802
|
+
this.addExistentHistoricData.forEach((item, index) => {
|
|
9803
|
+
const form = this.formGroupByRow[index];
|
|
9804
|
+
if (form) {
|
|
9805
|
+
Object.keys(form.controls).forEach(controlName => {
|
|
9806
|
+
const control = form.get(controlName);
|
|
9807
|
+
if (control && item[controlName] !== undefined) {
|
|
9808
|
+
control.setValue(item[controlName]);
|
|
9809
|
+
}
|
|
9810
|
+
});
|
|
9811
|
+
const pixKeyTypeControl = form.get('pixKeyType');
|
|
9812
|
+
if (pixKeyTypeControl.value) {
|
|
9813
|
+
this.validateDocumentField(index, pixKeyTypeControl.value.key);
|
|
9814
|
+
}
|
|
9815
|
+
}
|
|
9816
|
+
});
|
|
9817
|
+
}
|
|
9818
|
+
/**
|
|
9819
|
+
* Método para forçar o fechamento de todas as células em edição
|
|
9820
|
+
*/
|
|
9821
|
+
forceCloseAllCellEditors() {
|
|
9822
|
+
this.finishEditing();
|
|
9823
|
+
this.syncAllModelToForm();
|
|
9824
|
+
}
|
|
9825
|
+
isPixKeyType(item, type) {
|
|
9826
|
+
return item && item.pixKeyType && item.pixKeyType.key === type;
|
|
9827
|
+
}
|
|
9828
|
+
getPixKey(rowData) {
|
|
9829
|
+
return rowData ? rowData.pixKey : null;
|
|
9830
|
+
}
|
|
9831
|
+
setPixKey(rowData, value) {
|
|
9832
|
+
if (rowData) {
|
|
9833
|
+
rowData.pixKey = value;
|
|
8748
9834
|
}
|
|
8749
|
-
|
|
8750
|
-
|
|
9835
|
+
}
|
|
9836
|
+
get isTotalPercentage100() {
|
|
9837
|
+
if (!this.addExistentHistoricData || this.addExistentHistoricData.length === 0) {
|
|
9838
|
+
return false;
|
|
8751
9839
|
}
|
|
9840
|
+
const totalPercentage = this.addExistentHistoricData
|
|
9841
|
+
.reduce((sum, item) => sum + (parseFloat(item.percentage) || 0), 0);
|
|
9842
|
+
return totalPercentage >= 100;
|
|
8752
9843
|
}
|
|
8753
9844
|
get scopedActions() {
|
|
8754
9845
|
return this.actions.bind(this);
|
|
8755
9846
|
}
|
|
8756
9847
|
get recordsMessage() {
|
|
8757
|
-
return `${this.totalRecords || 0} ${this.totalRecords === 1 ?
|
|
9848
|
+
return `${this.totalRecords || 0} ${this.totalRecords === 1 ?
|
|
9849
|
+
this.translateService.instant("hcm.payroll.admission_register") : this.translateService.instant("hcm.payroll.admission_registers")}`;
|
|
8758
9850
|
}
|
|
8759
9851
|
get getTooltipAndDisableButtonAdd() {
|
|
8760
9852
|
return this.dateChange ? null : this.msgTooltipAdd;
|
|
@@ -8786,25 +9878,16 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
8786
9878
|
get visible() {
|
|
8787
9879
|
return this._visible;
|
|
8788
9880
|
}
|
|
9881
|
+
set paramsForm(value) {
|
|
9882
|
+
this._paramsForm = value;
|
|
9883
|
+
}
|
|
9884
|
+
set defaultCpfNumber(value) {
|
|
9885
|
+
this._defaultCpfNumber = value;
|
|
9886
|
+
}
|
|
8789
9887
|
set visible(value) {
|
|
8790
9888
|
this._visible = value;
|
|
8791
9889
|
this.visibleChange.emit(this.visible);
|
|
8792
9890
|
}
|
|
8793
|
-
close() {
|
|
8794
|
-
this.visible = false;
|
|
8795
|
-
}
|
|
8796
|
-
getFormattedTelephoneNumber(telephoneNumber) {
|
|
8797
|
-
return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
|
|
8798
|
-
}
|
|
8799
|
-
getFormattedCpf(cpf) {
|
|
8800
|
-
return FormatUtilsService.getFormattedCpf(cpf);
|
|
8801
|
-
}
|
|
8802
|
-
getFormattedCnpj(cnpj) {
|
|
8803
|
-
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
8804
|
-
}
|
|
8805
|
-
getFormattedPercentage(value) {
|
|
8806
|
-
return FormatUtilsService.getFormattedPercentage(value);
|
|
8807
|
-
}
|
|
8808
9891
|
get isAllowToAddHistorical() {
|
|
8809
9892
|
return (this.permission["incluir"]);
|
|
8810
9893
|
}
|
|
@@ -8822,11 +9905,15 @@ HistoricalPixAccountComponent.ctorParameters = () => [
|
|
|
8822
9905
|
{ type: TranslateService },
|
|
8823
9906
|
{ type: ChangeDetectorRef },
|
|
8824
9907
|
{ type: FormBuilder },
|
|
8825
|
-
{ type:
|
|
9908
|
+
{ type: SharedStateService },
|
|
9909
|
+
{ type: HistoricalPixAccountService }
|
|
8826
9910
|
];
|
|
8827
9911
|
__decorate([
|
|
8828
9912
|
ViewChild(CustomFieldsComponent$1, { static: false })
|
|
8829
9913
|
], HistoricalPixAccountComponent.prototype, "customFields", void 0);
|
|
9914
|
+
__decorate([
|
|
9915
|
+
ViewChild('dataListPix', { static: false })
|
|
9916
|
+
], HistoricalPixAccountComponent.prototype, "dataListPix", void 0);
|
|
8830
9917
|
__decorate([
|
|
8831
9918
|
Input()
|
|
8832
9919
|
], HistoricalPixAccountComponent.prototype, "formGroup", void 0);
|
|
@@ -8851,249 +9938,103 @@ __decorate([
|
|
|
8851
9938
|
__decorate([
|
|
8852
9939
|
Input()
|
|
8853
9940
|
], 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, "
|
|
8872
|
-
__decorate([
|
|
8873
|
-
Input()
|
|
8874
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8875
|
-
__decorate([
|
|
8876
|
-
Input()
|
|
8877
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8878
|
-
__decorate([
|
|
8879
|
-
Input()
|
|
8880
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8881
|
-
__decorate([
|
|
8882
|
-
|
|
8883
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8884
|
-
__decorate([
|
|
8885
|
-
|
|
8886
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8887
|
-
__decorate([
|
|
8888
|
-
|
|
8889
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8890
|
-
__decorate([
|
|
8891
|
-
Input()
|
|
8892
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8893
|
-
__decorate([
|
|
8894
|
-
|
|
8895
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8896
|
-
__decorate([
|
|
8897
|
-
|
|
8898
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8899
|
-
__decorate([
|
|
8900
|
-
|
|
8901
|
-
], HistoricalPixAccountComponent.prototype, "
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
if (cei.length !== 11 ||
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
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
|
-
}
|
|
9941
|
+
__decorate([
|
|
9942
|
+
Input()
|
|
9943
|
+
], HistoricalPixAccountComponent.prototype, "isViewMode", void 0);
|
|
9944
|
+
__decorate([
|
|
9945
|
+
Input()
|
|
9946
|
+
], HistoricalPixAccountComponent.prototype, "currency", void 0);
|
|
9947
|
+
__decorate([
|
|
9948
|
+
Input()
|
|
9949
|
+
], HistoricalPixAccountComponent.prototype, "customEntity", void 0);
|
|
9950
|
+
__decorate([
|
|
9951
|
+
Input()
|
|
9952
|
+
], HistoricalPixAccountComponent.prototype, "customService", void 0);
|
|
9953
|
+
__decorate([
|
|
9954
|
+
Input()
|
|
9955
|
+
], HistoricalPixAccountComponent.prototype, "withSideBar", void 0);
|
|
9956
|
+
__decorate([
|
|
9957
|
+
Input()
|
|
9958
|
+
], HistoricalPixAccountComponent.prototype, "permission", void 0);
|
|
9959
|
+
__decorate([
|
|
9960
|
+
Input()
|
|
9961
|
+
], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
|
|
9962
|
+
__decorate([
|
|
9963
|
+
Input()
|
|
9964
|
+
], HistoricalPixAccountComponent.prototype, "addExistentHistoricData", void 0);
|
|
9965
|
+
__decorate([
|
|
9966
|
+
Input()
|
|
9967
|
+
], HistoricalPixAccountComponent.prototype, "getListPixAccount", void 0);
|
|
9968
|
+
__decorate([
|
|
9969
|
+
Input()
|
|
9970
|
+
], HistoricalPixAccountComponent.prototype, "isEditModeForSave", void 0);
|
|
9971
|
+
__decorate([
|
|
9972
|
+
Input()
|
|
9973
|
+
], HistoricalPixAccountComponent.prototype, "showField", void 0);
|
|
9974
|
+
__decorate([
|
|
9975
|
+
Input()
|
|
9976
|
+
], HistoricalPixAccountComponent.prototype, "hideBtnAddForViewMode", void 0);
|
|
9977
|
+
__decorate([
|
|
9978
|
+
Input()
|
|
9979
|
+
], HistoricalPixAccountComponent.prototype, "showButtonView", void 0);
|
|
9980
|
+
__decorate([
|
|
9981
|
+
Output()
|
|
9982
|
+
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
9983
|
+
__decorate([
|
|
9984
|
+
Output()
|
|
9985
|
+
], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
|
|
9986
|
+
__decorate([
|
|
9987
|
+
Output()
|
|
9988
|
+
], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
|
|
9989
|
+
__decorate([
|
|
9990
|
+
Output()
|
|
9991
|
+
], HistoricalPixAccountComponent.prototype, "isValidChangeForm", void 0);
|
|
9992
|
+
__decorate([
|
|
9993
|
+
Input()
|
|
9994
|
+
], HistoricalPixAccountComponent.prototype, "dateChange", null);
|
|
9995
|
+
__decorate([
|
|
9996
|
+
Input()
|
|
9997
|
+
], HistoricalPixAccountComponent.prototype, "displayDateChange", null);
|
|
9998
|
+
__decorate([
|
|
9999
|
+
Input()
|
|
10000
|
+
], HistoricalPixAccountComponent.prototype, "addListData", null);
|
|
10001
|
+
__decorate([
|
|
10002
|
+
Input()
|
|
10003
|
+
], HistoricalPixAccountComponent.prototype, "visible", null);
|
|
10004
|
+
__decorate([
|
|
10005
|
+
Input()
|
|
10006
|
+
], HistoricalPixAccountComponent.prototype, "paramsForm", null);
|
|
10007
|
+
__decorate([
|
|
10008
|
+
Input()
|
|
10009
|
+
], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", null);
|
|
10010
|
+
HistoricalPixAccountComponent = __decorate([
|
|
10011
|
+
Component({
|
|
10012
|
+
// tslint:disable-next-line:component-selector
|
|
10013
|
+
selector: "c-historical-pix-account",
|
|
10014
|
+
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 [disabled]=\"isTotalPercentage100\"\n [pTooltip]=\"isTotalPercentage100 ? ('hcm.payroll.historical_pix_account_msg_limit_total_by_percentage' | translate) : ''\"\n tooltipPosition=\"top\"\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 (onEditInit)=\"onCellEditInit($event)\">\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 <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <div class=\"ui-fluid\">\n <!-- \u00C1rea de inputs din\u00E2micos -->\n <div [ngSwitch]=\"getPixKeyType(item)\" class=\"ui-fluid\">\n <!-- CPF -->\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n mask=\"999.999.999-99\"\n unmask=\"true\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n styleClass=\"full-width-input\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (onComplete)=\"validateDocumentField(rowIndex, 'CPF')\"\n (onBlur)=\"onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n </p-inputMask>\n\n <!-- CNPJ -->\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n mask=\"99.999.999/9999-99\"\n unmask=\"true\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n styleClass=\"full-width-input\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (onComplete)=\"validateDocumentField(rowIndex, 'CNPJ')\"\n (onBlur)=\"onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n </p-inputMask>\n\n <!-- TELEPHONE -->\n <p-inputMask *ngSwitchCase=\"'TELEPHONE'\"\n mask=\"(99) 99999-9999\"\n unmask=\"true\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n styleClass=\"full-width-input\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (onComplete)=\"validateDocumentField(rowIndex, 'TELEPHONE')\"\n (onBlur)=\"onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n </p-inputMask>\n\n <!-- EMAIL -->\n <input *ngSwitchCase=\"'EMAIL'\"\n type=\"email\"\n pInputText\n class=\"p-inputtext p-component full-width-input\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (blur)=\"validateDocumentField(rowIndex, 'EMAIL'); onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n\n <!-- RANDOM_KEY -->\n <input *ngSwitchCase=\"'RANDOM_KEY'\"\n type=\"text\"\n pInputText\n class=\"p-inputtext p-component full-width-input\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (blur)=\"validateDocumentField(rowIndex, 'RANDOM_KEY'); onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n\n <!-- BANK_ACCOUNT -->\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\"\n type=\"text\"\n pInputText\n class=\"p-inputtext p-component full-width-input\"\n [disabled]=\"true\">\n </div>\n\n <!-- \u00DAnico s-control-errors para todos os tipos -->\n <small *ngIf=\"isInvalid(rowIndex, 'pixKey')\" class=\"p-error error-text\">\n {{getErrorMessage(rowIndex, 'pixKey')}}\n </small>\n </div>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{getFormattedPixKey(getPixKeyType(item), 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 {{ formatPercentage(item.percentage) }}%\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",
|
|
10015
|
+
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}:host ::ng-deep .p-cell-editing{padding:0!important}:host ::ng-deep .full-width-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep .p-inputtext{width:100%;min-height:34px;padding:6px 12px}:host ::ng-deep .p-inputmask{width:100%;display:block}:host ::ng-deep .p-inputmask .p-inputmask-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep p-celleditor{width:100%}:host ::ng-deep p-celleditor .ui-fluid{width:100%;display:block;padding:0}:host ::ng-deep .p-error{margin-top:4px;font-size:12px}:host ::ng-deep .error-text{color:#f44336;display:block;margin-top:4px;font-size:.875em}"]
|
|
10016
|
+
})
|
|
10017
|
+
], HistoricalPixAccountComponent);
|
|
9074
10018
|
|
|
9075
|
-
let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent {
|
|
9076
|
-
constructor(formBuilder, cd) {
|
|
9077
|
-
|
|
10019
|
+
let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent extends HistoricakPixAccountBase {
|
|
10020
|
+
constructor(formBuilder, cd, sharedStateService) {
|
|
10021
|
+
super(formBuilder);
|
|
9078
10022
|
this.cd = cd;
|
|
10023
|
+
this.sharedStateService = sharedStateService;
|
|
9079
10024
|
this.withSideBar = true;
|
|
9080
10025
|
this.isEditMode = false;
|
|
9081
|
-
this.
|
|
9082
|
-
this.defaultCpfNumber = null;
|
|
10026
|
+
this.showField = false;
|
|
9083
10027
|
this.visibleChange = new EventEmitter();
|
|
9084
10028
|
this.pixAccountItemToList = new EventEmitter();
|
|
9085
10029
|
this.ngUnsubscribe = new Subject();
|
|
9086
|
-
this.initialValidatorOfPercentage = [Validators.required, Validators.min(0.01)];
|
|
9087
10030
|
this.labelBtnAdd = "hcm.payroll.employees_add";
|
|
9088
|
-
this.maxValuePercentage = 100.00;
|
|
9089
10031
|
this.visibleBtnSave = true;
|
|
9090
10032
|
this.isView = false;
|
|
9091
10033
|
this.isShowPixKeyFieldValidatorMessage = false;
|
|
9092
|
-
this.
|
|
10034
|
+
this.hideFields = this.sharedStateService.hideField$;
|
|
9093
10035
|
this.registerSubjects();
|
|
9094
10036
|
}
|
|
9095
|
-
ngOnInit() {
|
|
9096
|
-
}
|
|
10037
|
+
ngOnInit() { }
|
|
9097
10038
|
ngAfterViewInit() {
|
|
9098
10039
|
this.cd.detectChanges();
|
|
9099
10040
|
}
|
|
@@ -9101,39 +10042,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9101
10042
|
this.ngUnsubscribe.next(true);
|
|
9102
10043
|
this.ngUnsubscribe.unsubscribe();
|
|
9103
10044
|
}
|
|
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
|
-
}
|
|
10045
|
+
registerSubjects() { }
|
|
9137
10046
|
get visible() {
|
|
9138
10047
|
return this._visible;
|
|
9139
10048
|
}
|
|
@@ -9164,7 +10073,8 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9164
10073
|
}
|
|
9165
10074
|
formatPixKeyTelephoneNumber() {
|
|
9166
10075
|
if (this.pixKeyType === "TELEPHONE") {
|
|
9167
|
-
this.pixAccountFormGroup.get("pixKey")
|
|
10076
|
+
const pixKeyCtrl = this.pixAccountFormGroup.get("pixKey");
|
|
10077
|
+
pixKeyCtrl.setValue(FormatUtilsService.getFormattedTelephoneNumber(pixKeyCtrl.value));
|
|
9168
10078
|
}
|
|
9169
10079
|
}
|
|
9170
10080
|
convertDTOToShowWithCustomFields(data) {
|
|
@@ -9176,14 +10086,14 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9176
10086
|
this.visibleBtnSave = isEditMode;
|
|
9177
10087
|
if (this.pixAccountFormGroup.get("pixKeyType").value) {
|
|
9178
10088
|
this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
|
|
9179
|
-
this.setPixKeyValidators(isEditMode);
|
|
10089
|
+
this.setPixKeyValidators(isEditMode, this.pixAccountFormGroup);
|
|
9180
10090
|
this.formatPixKeyTelephoneNumber();
|
|
9181
10091
|
}
|
|
9182
10092
|
configEnabledFields(this.pixAccountFormGroup, isEditMode, [
|
|
9183
10093
|
"pixKeyType",
|
|
9184
10094
|
"pixKey",
|
|
9185
10095
|
"percentage",
|
|
9186
|
-
"customFields"
|
|
10096
|
+
"customFields"
|
|
9187
10097
|
], []);
|
|
9188
10098
|
}
|
|
9189
10099
|
close() {
|
|
@@ -9191,13 +10101,11 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9191
10101
|
this.visible = false;
|
|
9192
10102
|
}
|
|
9193
10103
|
addItem() {
|
|
9194
|
-
this.pixAccountFormGroup.updateValueAndValidity();
|
|
9195
|
-
verifyValidationsForm.call(this.pixAccountFormGroup);
|
|
9196
10104
|
if (this.pixAccountFormGroup.valid) {
|
|
9197
10105
|
if (this.employeeId) {
|
|
9198
10106
|
this.pixAccountFormGroup.get("employee").setValue({
|
|
9199
10107
|
tableId: this.employeeId,
|
|
9200
|
-
name: ""
|
|
10108
|
+
name: ""
|
|
9201
10109
|
});
|
|
9202
10110
|
}
|
|
9203
10111
|
this.pixAccountItemToList.emit(this.pixAccountFormGroup.getRawValue());
|
|
@@ -9221,13 +10129,9 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9221
10129
|
return {
|
|
9222
10130
|
prefix: "",
|
|
9223
10131
|
thousands: this.currency.thousandsSeparator,
|
|
9224
|
-
decimal: this.currency.decimalSeparator
|
|
10132
|
+
decimal: this.currency.decimalSeparator
|
|
9225
10133
|
};
|
|
9226
10134
|
}
|
|
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
10135
|
set getListPixAccount(pixAccountList) {
|
|
9232
10136
|
if (pixAccountList) {
|
|
9233
10137
|
this.setValidatorsAccordingList(pixAccountList, null, false);
|
|
@@ -9236,143 +10140,23 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9236
10140
|
this.resetForm();
|
|
9237
10141
|
}
|
|
9238
10142
|
}
|
|
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
10143
|
set isViewMode(condition) {
|
|
9318
10144
|
this.isView = !!(condition && !this.withSideBar);
|
|
9319
10145
|
this.configEnableFields(!this.isView);
|
|
9320
10146
|
if (!this.isView)
|
|
9321
10147
|
this.resetForm();
|
|
9322
10148
|
}
|
|
9323
|
-
|
|
9324
|
-
|
|
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
|
-
}
|
|
10149
|
+
set paramsForm(value) {
|
|
10150
|
+
this._paramsForm = value;
|
|
9352
10151
|
}
|
|
9353
|
-
|
|
9354
|
-
|
|
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
|
-
};
|
|
10152
|
+
set defaultCpfNumber(value) {
|
|
10153
|
+
this._defaultCpfNumber = value;
|
|
9371
10154
|
}
|
|
9372
10155
|
};
|
|
9373
10156
|
HistoricalPixAccountFormComponent.ctorParameters = () => [
|
|
9374
10157
|
{ type: FormBuilder },
|
|
9375
|
-
{ type: ChangeDetectorRef }
|
|
10158
|
+
{ type: ChangeDetectorRef },
|
|
10159
|
+
{ type: SharedStateService }
|
|
9376
10160
|
];
|
|
9377
10161
|
__decorate([
|
|
9378
10162
|
ViewChild(CustomFieldsComponent$1, { static: true })
|
|
@@ -9394,10 +10178,7 @@ __decorate([
|
|
|
9394
10178
|
], HistoricalPixAccountFormComponent.prototype, "isEditMode", void 0);
|
|
9395
10179
|
__decorate([
|
|
9396
10180
|
Input()
|
|
9397
|
-
], HistoricalPixAccountFormComponent.prototype, "
|
|
9398
|
-
__decorate([
|
|
9399
|
-
Input()
|
|
9400
|
-
], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
|
|
10181
|
+
], HistoricalPixAccountFormComponent.prototype, "showField", void 0);
|
|
9401
10182
|
__decorate([
|
|
9402
10183
|
Output()
|
|
9403
10184
|
], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
|
|
@@ -9416,29 +10197,20 @@ __decorate([
|
|
|
9416
10197
|
__decorate([
|
|
9417
10198
|
Input()
|
|
9418
10199
|
], HistoricalPixAccountFormComponent.prototype, "isViewMode", null);
|
|
10200
|
+
__decorate([
|
|
10201
|
+
Input()
|
|
10202
|
+
], HistoricalPixAccountFormComponent.prototype, "paramsForm", null);
|
|
10203
|
+
__decorate([
|
|
10204
|
+
Input()
|
|
10205
|
+
], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", null);
|
|
9419
10206
|
HistoricalPixAccountFormComponent = __decorate([
|
|
9420
10207
|
Component({
|
|
9421
10208
|
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",
|
|
9423
|
-
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}"]
|
|
10209
|
+
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",
|
|
10210
|
+
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}:host ::ng-deep .p-cell-editing{padding:0!important}:host ::ng-deep .full-width-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep .p-inputtext{width:100%;min-height:34px;padding:6px 12px}:host ::ng-deep .p-inputmask{width:100%;display:block}:host ::ng-deep .p-inputmask .p-inputmask-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep p-celleditor{width:100%}:host ::ng-deep p-celleditor .ui-fluid{width:100%;display:block;padding:0}:host ::ng-deep .p-error{margin-top:4px;font-size:12px}:host ::ng-deep .error-text{color:#f44336;display:block;margin-top:4px;font-size:.875em}"]
|
|
9424
10211
|
})
|
|
9425
10212
|
], HistoricalPixAccountFormComponent);
|
|
9426
10213
|
|
|
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
10214
|
let HistoricalPixAccountModule = class HistoricalPixAccountModule {
|
|
9443
10215
|
};
|
|
9444
10216
|
HistoricalPixAccountModule = __decorate([
|
|
@@ -9466,6 +10238,8 @@ HistoricalPixAccountModule = __decorate([
|
|
|
9466
10238
|
CustomFieldsModule$1,
|
|
9467
10239
|
PanelModule,
|
|
9468
10240
|
InputMaskModule,
|
|
10241
|
+
DropdownModule,
|
|
10242
|
+
TabViewModule,
|
|
9469
10243
|
],
|
|
9470
10244
|
declarations: [HistoricalPixAccountComponent, HistoricalPixAccountFormComponent],
|
|
9471
10245
|
providers: [HistoricalPixAccountService, ConfirmationService],
|
|
@@ -9504,7 +10278,7 @@ HistoricalPixAccountListService = __decorate([
|
|
|
9504
10278
|
|
|
9505
10279
|
const moment$e = moment_;
|
|
9506
10280
|
let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent {
|
|
9507
|
-
constructor(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
|
|
10281
|
+
constructor(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService, sharedStateService) {
|
|
9508
10282
|
this.confirmationService = confirmationService;
|
|
9509
10283
|
this.translateService = translateService;
|
|
9510
10284
|
this.activatedRoute = activatedRoute;
|
|
@@ -9512,11 +10286,17 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9512
10286
|
this.router = router;
|
|
9513
10287
|
this.messageService = messageService;
|
|
9514
10288
|
this.historicalPixAccountListService = historicalPixAccountListService;
|
|
10289
|
+
this.sharedStateService = sharedStateService;
|
|
9515
10290
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
9516
10291
|
this.keyPayload = "historicalEmployeePix";
|
|
9517
10292
|
this.withSidebar = true;
|
|
10293
|
+
this.showActionsButtonOnAdd = false;
|
|
9518
10294
|
this.isOnlyView = new EventEmitter();
|
|
10295
|
+
this.isOnlyEdit = new EventEmitter();
|
|
9519
10296
|
this.enableView = new EventEmitter();
|
|
10297
|
+
this.isEditJudicialDependentPix = new EventEmitter();
|
|
10298
|
+
this.isHideBtnAddForViewMode = new EventEmitter();
|
|
10299
|
+
this.isShowActionsButton = new EventEmitter();
|
|
9520
10300
|
this.ngUnsubscribe = new Subject();
|
|
9521
10301
|
this.loading = true;
|
|
9522
10302
|
this.columns = [
|
|
@@ -9524,18 +10304,6 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9524
10304
|
label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
|
|
9525
10305
|
field: "dateChange",
|
|
9526
10306
|
},
|
|
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
10307
|
{
|
|
9540
10308
|
label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
|
|
9541
10309
|
field: "numberOfPixAccount",
|
|
@@ -9548,6 +10316,7 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9548
10316
|
ngOnDestroy() {
|
|
9549
10317
|
this.ngUnsubscribe.next();
|
|
9550
10318
|
this.ngUnsubscribe.complete();
|
|
10319
|
+
this.unsubscribe();
|
|
9551
10320
|
}
|
|
9552
10321
|
ngAfterViewInit() {
|
|
9553
10322
|
this.cd.detectChanges();
|
|
@@ -9555,41 +10324,65 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9555
10324
|
onLazyLoad(payload) {
|
|
9556
10325
|
payload.forEach((value) => {
|
|
9557
10326
|
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
10327
|
});
|
|
9561
10328
|
this.onGridLoad(payload);
|
|
9562
10329
|
this.loading = false;
|
|
9563
10330
|
}
|
|
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
10331
|
getMenuActions(rowData) {
|
|
9580
10332
|
return [
|
|
9581
10333
|
{
|
|
9582
10334
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
9583
10335
|
command: () => {
|
|
9584
10336
|
if (this.isAllowToViewHistorical) {
|
|
10337
|
+
this.sharedStateService.setHideField(true);
|
|
10338
|
+
this.isShowActionsButton.emit(false);
|
|
10339
|
+
this.sharedStateService.setShowEditMode(false);
|
|
9585
10340
|
const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
|
|
9586
10341
|
if (this.withSidebar) {
|
|
9587
10342
|
this.isOnlyView.emit(true);
|
|
10343
|
+
this.isOnlyEdit.emit(false);
|
|
10344
|
+
this.isHideBtnAddForViewMode.emit(true);
|
|
10345
|
+
this.sharedStateService.setHideBtnAddForViewMode(true);
|
|
10346
|
+
this.sharedStateService.setActiveHideOptionsOnView(true);
|
|
10347
|
+
this.router.navigate([`historical-pix-account/${dateChange}`], {
|
|
10348
|
+
relativeTo: this.activatedRoute,
|
|
10349
|
+
});
|
|
10350
|
+
}
|
|
10351
|
+
else {
|
|
10352
|
+
this.sharedStateService.setActiveHideOptionsOnView(true);
|
|
10353
|
+
this.sharedStateService.setSaveButton(false);
|
|
10354
|
+
this.enableView.emit(dateChange);
|
|
10355
|
+
}
|
|
10356
|
+
}
|
|
10357
|
+
else {
|
|
10358
|
+
this.isNotAllowMessage();
|
|
10359
|
+
}
|
|
10360
|
+
},
|
|
10361
|
+
},
|
|
10362
|
+
{
|
|
10363
|
+
label: this.translateService.instant("hcm.payroll.edit"),
|
|
10364
|
+
command: () => {
|
|
10365
|
+
if (this.isAllowToEditHistorical) {
|
|
10366
|
+
this.sharedStateService.setHideField(true);
|
|
10367
|
+
this.isShowActionsButton.emit(true);
|
|
10368
|
+
this.sharedStateService.setShowEditMode(true);
|
|
10369
|
+
const dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, this.dateFormat).format("YYYY-MM-DD");
|
|
10370
|
+
if (this.withSidebar) {
|
|
10371
|
+
this.isOnlyView.emit(false);
|
|
10372
|
+
this.isOnlyEdit.emit(true);
|
|
10373
|
+
this.isHideBtnAddForViewMode.emit(false);
|
|
10374
|
+
this.sharedStateService.setHideBtnAddForViewMode(false);
|
|
10375
|
+
this.sharedStateService.setActiveHideOptionsOnView(false);
|
|
9588
10376
|
this.router.navigate([`historical-pix-account/${dateChange}`], {
|
|
9589
10377
|
relativeTo: this.activatedRoute,
|
|
9590
10378
|
});
|
|
9591
10379
|
}
|
|
9592
10380
|
else {
|
|
10381
|
+
this.sharedStateService.setActiveHideOptionsOnView(false);
|
|
10382
|
+
setTimeout(() => {
|
|
10383
|
+
this.sharedStateService.triggerActiveValidatorsOnEditModalOpen();
|
|
10384
|
+
});
|
|
10385
|
+
this.sharedStateService.setSaveButton(true);
|
|
9593
10386
|
this.enableView.emit(dateChange);
|
|
9594
10387
|
}
|
|
9595
10388
|
}
|
|
@@ -9608,7 +10401,7 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9608
10401
|
this.isNotAllowMessage();
|
|
9609
10402
|
}
|
|
9610
10403
|
},
|
|
9611
|
-
}
|
|
10404
|
+
}
|
|
9612
10405
|
];
|
|
9613
10406
|
}
|
|
9614
10407
|
delete(id, dateChange) {
|
|
@@ -9674,6 +10467,19 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9674
10467
|
this.lastRecord = payload[0];
|
|
9675
10468
|
}
|
|
9676
10469
|
}
|
|
10470
|
+
unsubscribe() {
|
|
10471
|
+
if (this._subscription) {
|
|
10472
|
+
this._subscription.unsubscribe();
|
|
10473
|
+
}
|
|
10474
|
+
}
|
|
10475
|
+
set hideFieldsOnAdd$(subject) {
|
|
10476
|
+
this.unsubscribe();
|
|
10477
|
+
if (subject) {
|
|
10478
|
+
this._subscription = subject.subscribe((value) => {
|
|
10479
|
+
this.sharedStateService.setHideField(value);
|
|
10480
|
+
});
|
|
10481
|
+
}
|
|
10482
|
+
}
|
|
9677
10483
|
get isAllowToAddHistorical() {
|
|
9678
10484
|
return (this.permission["incluir"]);
|
|
9679
10485
|
}
|
|
@@ -9683,6 +10489,9 @@ let HistoricalPixAccountListComponent = class HistoricalPixAccountListComponent
|
|
|
9683
10489
|
get isAllowToViewHistorical() {
|
|
9684
10490
|
return (this.permission["visualizar"]);
|
|
9685
10491
|
}
|
|
10492
|
+
get isAllowToEditHistorical() {
|
|
10493
|
+
return (this.permission["editar"]);
|
|
10494
|
+
}
|
|
9686
10495
|
get scopedActions() {
|
|
9687
10496
|
return this.getMenuActions.bind(this);
|
|
9688
10497
|
}
|
|
@@ -9700,7 +10509,8 @@ HistoricalPixAccountListComponent.ctorParameters = () => [
|
|
|
9700
10509
|
{ type: ChangeDetectorRef },
|
|
9701
10510
|
{ type: Router },
|
|
9702
10511
|
{ type: MessageService },
|
|
9703
|
-
{ type: HistoricalPixAccountListService }
|
|
10512
|
+
{ type: HistoricalPixAccountListService },
|
|
10513
|
+
{ type: SharedStateService }
|
|
9704
10514
|
];
|
|
9705
10515
|
__decorate([
|
|
9706
10516
|
ViewChild(CustomFieldsComponent$1, { static: false })
|
|
@@ -9726,12 +10536,33 @@ __decorate([
|
|
|
9726
10536
|
__decorate([
|
|
9727
10537
|
Input()
|
|
9728
10538
|
], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
|
|
10539
|
+
__decorate([
|
|
10540
|
+
Input()
|
|
10541
|
+
], HistoricalPixAccountListComponent.prototype, "hideField", void 0);
|
|
10542
|
+
__decorate([
|
|
10543
|
+
Input()
|
|
10544
|
+
], HistoricalPixAccountListComponent.prototype, "showActionsButtonOnAdd", void 0);
|
|
9729
10545
|
__decorate([
|
|
9730
10546
|
Output()
|
|
9731
10547
|
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
10548
|
+
__decorate([
|
|
10549
|
+
Output()
|
|
10550
|
+
], HistoricalPixAccountListComponent.prototype, "isOnlyEdit", void 0);
|
|
9732
10551
|
__decorate([
|
|
9733
10552
|
Output()
|
|
9734
10553
|
], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
|
|
10554
|
+
__decorate([
|
|
10555
|
+
Output()
|
|
10556
|
+
], HistoricalPixAccountListComponent.prototype, "isEditJudicialDependentPix", void 0);
|
|
10557
|
+
__decorate([
|
|
10558
|
+
Output()
|
|
10559
|
+
], HistoricalPixAccountListComponent.prototype, "isHideBtnAddForViewMode", void 0);
|
|
10560
|
+
__decorate([
|
|
10561
|
+
Output()
|
|
10562
|
+
], HistoricalPixAccountListComponent.prototype, "isShowActionsButton", void 0);
|
|
10563
|
+
__decorate([
|
|
10564
|
+
Input()
|
|
10565
|
+
], HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", null);
|
|
9735
10566
|
__decorate([
|
|
9736
10567
|
Input()
|
|
9737
10568
|
], HistoricalPixAccountListComponent.prototype, "reloadList", null);
|
|
@@ -9776,5 +10607,5 @@ HistoricalPixAccountListModule = __decorate([
|
|
|
9776
10607
|
* Generated bundle index. Do not edit.
|
|
9777
10608
|
*/
|
|
9778
10609
|
|
|
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,
|
|
10610
|
+
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
10611
|
//# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map
|