@senior-gestao-pessoas/payroll-core 9.7.0 → 9.8.0-feature-hcmgdp-12459-4d08efe5
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 +264 -68
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
- package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +9 -1
- package/components/historical-pix-account/historical-pix-account.component.d.ts +1 -0
- package/components/input-rest-auto-complete/input-rest-auto-complete.component.d.ts +2 -0
- package/components/utils/cnpj-validator.d.ts +3 -0
- package/components/utils/format-utils/format-utils.service.d.ts +3 -2
- package/components/utils/generic-validators.d.ts +6 -0
- package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +37 -9
- package/esm2015/components/historical-pix-account/historical-pix-account.component.js +7 -3
- package/esm2015/components/input-rest-auto-complete/input-rest-auto-complete.component.js +87 -50
- package/esm2015/components/utils/cnpj-validator.js +54 -1
- package/esm2015/components/utils/format-utils/format-utils.service.js +23 -10
- package/esm2015/components/utils/generic-validators.js +57 -1
- package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +41 -9
- package/esm5/components/historical-pix-account/historical-pix-account.component.js +7 -3
- package/esm5/components/input-rest-auto-complete/input-rest-auto-complete.component.js +88 -50
- package/esm5/components/utils/cnpj-validator.js +54 -1
- package/esm5/components/utils/format-utils/format-utils.service.js +23 -10
- package/esm5/components/utils/generic-validators.js +57 -1
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +259 -68
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +264 -68
- package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
|
@@ -141,6 +141,59 @@ class CNPJValidator {
|
|
|
141
141
|
}
|
|
142
142
|
return true;
|
|
143
143
|
}
|
|
144
|
+
checkCNPJAlphanumeric(value) {
|
|
145
|
+
let cnpj = value;
|
|
146
|
+
if (cnpj) {
|
|
147
|
+
cnpj = cnpj.replace(/[^\dA-Za-z]/g, '').toUpperCase();
|
|
148
|
+
if (cnpj.length !== 14) {
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
// Valida que dígitos verificadores são numéricos
|
|
152
|
+
if (!/^\d$/.test(cnpj.charAt(12)) || !/^\d$/.test(cnpj.charAt(13))) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
// Elimina CNPJs invalidos conhecidos
|
|
156
|
+
if (cnpj === '00000000000000' ||
|
|
157
|
+
cnpj === '11111111111111' ||
|
|
158
|
+
cnpj === '22222222222222' ||
|
|
159
|
+
cnpj === '33333333333333' ||
|
|
160
|
+
cnpj === '44444444444444' ||
|
|
161
|
+
cnpj === '55555555555555' ||
|
|
162
|
+
cnpj === '66666666666666' ||
|
|
163
|
+
cnpj === '77777777777777' ||
|
|
164
|
+
cnpj === '88888888888888' ||
|
|
165
|
+
cnpj === '99999999999999') {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
// Valida DVs
|
|
169
|
+
const size = cnpj.length - 2;
|
|
170
|
+
const digits = cnpj.substring(size);
|
|
171
|
+
if (!this.validateCnpjDigit(cnpj, size, Number(digits.charAt(0)))) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
if (!this.validateCnpjDigit(cnpj, size + 1, Number(digits.charAt(1)))) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
validateCnpjDigit(cnpj, size, digit) {
|
|
182
|
+
let numbers = cnpj.substring(0, size);
|
|
183
|
+
let sum = 0;
|
|
184
|
+
let pos = size - 7;
|
|
185
|
+
for (let i = size; i >= 1; i--) {
|
|
186
|
+
sum += this.convertToAsciiMinus48(numbers.charAt(size - i)) * pos--;
|
|
187
|
+
if (pos < 2) {
|
|
188
|
+
pos = 9;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
192
|
+
return result === digit;
|
|
193
|
+
}
|
|
194
|
+
convertToAsciiMinus48(input) {
|
|
195
|
+
return input.charCodeAt(0) - 48;
|
|
196
|
+
}
|
|
144
197
|
}
|
|
145
198
|
const cnpjValidator = new CNPJValidator();
|
|
146
199
|
|
|
@@ -2606,62 +2659,96 @@ let InputRestAutoCompleteComponent = class InputRestAutoCompleteComponent {
|
|
|
2606
2659
|
ngOnInit() { }
|
|
2607
2660
|
filterQuery(event) {
|
|
2608
2661
|
const query = event.query;
|
|
2609
|
-
if (!(isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
2662
|
+
if (!(Number.isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
2610
2663
|
try {
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
referenceDate: this.referenceDate,
|
|
2616
|
-
})
|
|
2617
|
-
.subscribe(payload => this.formaterResponce(payload.result));
|
|
2618
|
-
}
|
|
2619
|
-
else if (this.isDismissalReason) {
|
|
2620
|
-
const params = { valueSearch: query };
|
|
2621
|
-
if (this.referenceDate) {
|
|
2622
|
-
params['referenceDate'] = this.referenceDate;
|
|
2623
|
-
}
|
|
2624
|
-
return this.service
|
|
2625
|
-
.query('autocompleteDismissalReason', params, ServiceType.GENERAL_REGISTER)
|
|
2626
|
-
.subscribe(payload => this.formaterResponce(payload.result));
|
|
2627
|
-
}
|
|
2628
|
-
else if (this.usingType && this.usingType.length) {
|
|
2629
|
-
return this.service
|
|
2630
|
-
.query('autocompleteOtherCompanyFilterUsingType', {
|
|
2631
|
-
searchText: query,
|
|
2632
|
-
usingType: this.usingType,
|
|
2633
|
-
})
|
|
2634
|
-
.subscribe(payload => this.formaterResponce(payload.result));
|
|
2635
|
-
}
|
|
2636
|
-
else if (this.isDepartmentFromCompany) {
|
|
2637
|
-
return this.service
|
|
2638
|
-
.query('autocompleteDepartmentQuery', {
|
|
2639
|
-
searchText: query,
|
|
2640
|
-
companyId: this.companyId,
|
|
2641
|
-
referenceDate: this.referenceDate,
|
|
2642
|
-
})
|
|
2643
|
-
.subscribe(payload => this.formaterResponce(payload.result));
|
|
2644
|
-
}
|
|
2645
|
-
else if (this.isSituationDefinition) {
|
|
2646
|
-
const params = { searchText: query };
|
|
2647
|
-
return this.service
|
|
2648
|
-
.query('autocompleteSituationDefinitionQuery', params, ServiceType.ORGANIZATION_REGISTER)
|
|
2649
|
-
.subscribe(payload => this.formaterResponce(payload.result));
|
|
2650
|
-
}
|
|
2651
|
-
else if (this.isWagetype) {
|
|
2652
|
-
const params = { searchText: query, companyId: this.companyId };
|
|
2653
|
-
return this.service
|
|
2654
|
-
.query('autocompleteWagetypeQuery', params, ServiceType.ENTRY)
|
|
2655
|
-
.subscribe(payload => this.formaterResponce(payload.result));
|
|
2656
|
-
}
|
|
2657
|
-
this.service
|
|
2658
|
-
.query('autocomplete', this.getParamsRest(query), this.serviceType).subscribe(payload => this.formaterResponce(payload.result));
|
|
2664
|
+
const queryConfig = this.getQueryConfiguration(query);
|
|
2665
|
+
return this.service
|
|
2666
|
+
.query(queryConfig.endpoint, queryConfig.params, queryConfig.serviceType)
|
|
2667
|
+
.subscribe(payload => this.formaterResponce(payload.result));
|
|
2659
2668
|
}
|
|
2660
2669
|
catch (e) {
|
|
2661
2670
|
console.log(e);
|
|
2662
2671
|
}
|
|
2663
2672
|
}
|
|
2664
2673
|
}
|
|
2674
|
+
getQueryConfiguration(query) {
|
|
2675
|
+
const queryStrategies = [
|
|
2676
|
+
{
|
|
2677
|
+
condition: () => this.isTimetrackingSituation,
|
|
2678
|
+
endpoint: 'autocompleteTimetrackingSituation',
|
|
2679
|
+
params: () => ({
|
|
2680
|
+
valueSearch: query,
|
|
2681
|
+
referenceDate: this.referenceDate,
|
|
2682
|
+
}),
|
|
2683
|
+
serviceType: this.serviceType,
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
condition: () => this.isDismissalReason,
|
|
2687
|
+
endpoint: 'autocompleteDismissalReason',
|
|
2688
|
+
params: () => {
|
|
2689
|
+
const params = { valueSearch: query };
|
|
2690
|
+
if (this.referenceDate) {
|
|
2691
|
+
params['referenceDate'] = this.referenceDate;
|
|
2692
|
+
}
|
|
2693
|
+
return params;
|
|
2694
|
+
},
|
|
2695
|
+
serviceType: ServiceType.GENERAL_REGISTER,
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
condition: () => this.usingType && this.usingType.length,
|
|
2699
|
+
endpoint: 'autocompleteOtherCompanyFilterUsingType',
|
|
2700
|
+
params: () => ({
|
|
2701
|
+
searchText: query,
|
|
2702
|
+
usingType: this.usingType,
|
|
2703
|
+
}),
|
|
2704
|
+
serviceType: this.serviceType,
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
condition: () => this.isDepartmentFromCompany,
|
|
2708
|
+
endpoint: 'autocompleteDepartmentQuery',
|
|
2709
|
+
params: () => ({
|
|
2710
|
+
searchText: query,
|
|
2711
|
+
companyId: this.companyId,
|
|
2712
|
+
referenceDate: this.referenceDate,
|
|
2713
|
+
}),
|
|
2714
|
+
serviceType: this.serviceType,
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
condition: () => this.isSituationDefinition,
|
|
2718
|
+
endpoint: 'autocompleteSituationDefinitionQuery',
|
|
2719
|
+
params: () => ({ searchText: query }),
|
|
2720
|
+
serviceType: ServiceType.ORGANIZATION_REGISTER,
|
|
2721
|
+
},
|
|
2722
|
+
{
|
|
2723
|
+
condition: () => this.isWagetype,
|
|
2724
|
+
endpoint: 'autocompleteWagetypeQuery',
|
|
2725
|
+
params: () => ({
|
|
2726
|
+
searchText: query,
|
|
2727
|
+
companyId: this.companyId,
|
|
2728
|
+
}),
|
|
2729
|
+
serviceType: ServiceType.ENTRY,
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
condition: () => this.isTransportationVoucherScaleGroup,
|
|
2733
|
+
endpoint: 'autocompleteTransportationVoucherScaleGroupQuery',
|
|
2734
|
+
params: () => ({ searchText: query }),
|
|
2735
|
+
serviceType: ServiceType.GENERAL_REGISTER,
|
|
2736
|
+
},
|
|
2737
|
+
];
|
|
2738
|
+
const strategy = queryStrategies.find(s => s.condition());
|
|
2739
|
+
if (strategy) {
|
|
2740
|
+
return {
|
|
2741
|
+
endpoint: strategy.endpoint,
|
|
2742
|
+
params: strategy.params(),
|
|
2743
|
+
serviceType: strategy.serviceType,
|
|
2744
|
+
};
|
|
2745
|
+
}
|
|
2746
|
+
return {
|
|
2747
|
+
endpoint: 'autocomplete',
|
|
2748
|
+
params: this.getParamsRest(query),
|
|
2749
|
+
serviceType: this.serviceType,
|
|
2750
|
+
};
|
|
2751
|
+
}
|
|
2665
2752
|
formaterResponce(result) {
|
|
2666
2753
|
this.suggestions = [];
|
|
2667
2754
|
const valsResult = [];
|
|
@@ -2874,6 +2961,9 @@ __decorate([
|
|
|
2874
2961
|
__decorate([
|
|
2875
2962
|
Input()
|
|
2876
2963
|
], InputRestAutoCompleteComponent.prototype, "multiple", void 0);
|
|
2964
|
+
__decorate([
|
|
2965
|
+
Input()
|
|
2966
|
+
], InputRestAutoCompleteComponent.prototype, "isTransportationVoucherScaleGroup", void 0);
|
|
2877
2967
|
__decorate([
|
|
2878
2968
|
Input()
|
|
2879
2969
|
], InputRestAutoCompleteComponent.prototype, "serviceType", void 0);
|
|
@@ -8456,27 +8546,40 @@ class FormatUtilsService {
|
|
|
8456
8546
|
* Retorna o CNPJ formatado
|
|
8457
8547
|
* @param cnpj CNPJ
|
|
8458
8548
|
*/
|
|
8459
|
-
static getFormattedCnpj(cnpj) {
|
|
8549
|
+
static getFormattedCnpj(cnpj, isAlphanumericCNPJ) {
|
|
8460
8550
|
if (cnpj) {
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
.replace(/
|
|
8464
|
-
.
|
|
8465
|
-
|
|
8466
|
-
|
|
8551
|
+
if (isAlphanumericCNPJ) {
|
|
8552
|
+
// Remove caracteres especiais mantendo letras e números, e converte para maiúsculas
|
|
8553
|
+
const cleanCnpj = cnpj.replace(/[^a-zA-Z0-9]/g, '').toUpperCase();
|
|
8554
|
+
// Aplica formatação: AA.BBB.CCC/DDDD-EE
|
|
8555
|
+
return cleanCnpj
|
|
8556
|
+
.replace(/^([A-Z0-9]{2})([A-Z0-9])/, '$1.$2')
|
|
8557
|
+
.replace(/^([A-Z0-9]{2}\.)([A-Z0-9]{3})([A-Z0-9])/, '$1$2.$3')
|
|
8558
|
+
.replace(/^([A-Z0-9]{2}\.[A-Z0-9]{3}\.)([A-Z0-9]{3})([A-Z0-9])/, '$1$2/$3')
|
|
8559
|
+
.replace(/^([A-Z0-9]{2}\.[A-Z0-9]{3}\.[A-Z0-9]{3}\/)([A-Z0-9]{4})([0-9])/, '$1$2-$3');
|
|
8560
|
+
}
|
|
8561
|
+
else {
|
|
8562
|
+
return cnpj
|
|
8563
|
+
.replace(/\D/g, "")
|
|
8564
|
+
.replace(/(\d{2})(\d)/, "$1.$2")
|
|
8565
|
+
.replace(/(\d{3})(\d)/, "$1.$2")
|
|
8566
|
+
.replace(/(\d{3})(\d)/, "$1/$2")
|
|
8567
|
+
.replace(/(\d{4})(\d)/, "$1-$2");
|
|
8568
|
+
}
|
|
8467
8569
|
}
|
|
8468
8570
|
return null;
|
|
8469
8571
|
}
|
|
8470
8572
|
/**
|
|
8471
8573
|
* Retorna a mascara do CPF/CNPJ
|
|
8472
8574
|
* @param key Valores possíveis são CPF ou CNPJ
|
|
8575
|
+
* @param isAlphanumericCNPJ Define se o CNPJ pode ser alfanumérico.
|
|
8473
8576
|
*/
|
|
8474
|
-
static getCpfCnpjMask(key) {
|
|
8577
|
+
static getCpfCnpjMask(key, isAlphanumericCNPJ) {
|
|
8475
8578
|
switch (key) {
|
|
8476
8579
|
case "CPF":
|
|
8477
8580
|
return "999.999.999-99";
|
|
8478
8581
|
case "CNPJ":
|
|
8479
|
-
return "99.999.999/9999-99";
|
|
8582
|
+
return isAlphanumericCNPJ ? "**.***.***/****-99" : "99.999.999/9999-99";
|
|
8480
8583
|
default:
|
|
8481
8584
|
return "";
|
|
8482
8585
|
}
|
|
@@ -8676,6 +8779,62 @@ class GenericValidator {
|
|
|
8676
8779
|
}
|
|
8677
8780
|
return null;
|
|
8678
8781
|
}
|
|
8782
|
+
/**
|
|
8783
|
+
* Valida se o CNPJ Alfanumérico é valido. Deve-se ser informado o cpf sem máscara.
|
|
8784
|
+
*/
|
|
8785
|
+
static isValidCnpjAlphanumeric(control) {
|
|
8786
|
+
let cnpj = control.value;
|
|
8787
|
+
if (cnpj) {
|
|
8788
|
+
cnpj = cnpj.replace(/[^\dA-Za-z]/g, '').toUpperCase();
|
|
8789
|
+
if (cnpj.length !== 14) {
|
|
8790
|
+
return null;
|
|
8791
|
+
}
|
|
8792
|
+
// Valida que dígitos verificadores são numéricos
|
|
8793
|
+
if (!/^\d$/.test(cnpj.charAt(12)) || !/^\d$/.test(cnpj.charAt(13))) {
|
|
8794
|
+
return { cnpjNotValid: true };
|
|
8795
|
+
}
|
|
8796
|
+
// Elimina CNPJs invalidos conhecidos
|
|
8797
|
+
if (cnpj === '00000000000000' ||
|
|
8798
|
+
cnpj === '11111111111111' ||
|
|
8799
|
+
cnpj === '22222222222222' ||
|
|
8800
|
+
cnpj === '33333333333333' ||
|
|
8801
|
+
cnpj === '44444444444444' ||
|
|
8802
|
+
cnpj === '55555555555555' ||
|
|
8803
|
+
cnpj === '66666666666666' ||
|
|
8804
|
+
cnpj === '77777777777777' ||
|
|
8805
|
+
cnpj === '88888888888888' ||
|
|
8806
|
+
cnpj === '99999999999999') {
|
|
8807
|
+
return { cnpjNotValid: true };
|
|
8808
|
+
}
|
|
8809
|
+
// Valida DVs
|
|
8810
|
+
const size = cnpj.length - 2;
|
|
8811
|
+
const digits = cnpj.substring(size);
|
|
8812
|
+
if (!GenericValidator.validateCnpjDigit(cnpj, size, Number(digits.charAt(0)))) {
|
|
8813
|
+
return { cnpjNotValid: true };
|
|
8814
|
+
}
|
|
8815
|
+
if (!GenericValidator.validateCnpjDigit(cnpj, size + 1, Number(digits.charAt(1)))) {
|
|
8816
|
+
return { cnpjNotValid: true };
|
|
8817
|
+
}
|
|
8818
|
+
return null;
|
|
8819
|
+
}
|
|
8820
|
+
return null;
|
|
8821
|
+
}
|
|
8822
|
+
static validateCnpjDigit(cnpj, size, digit) {
|
|
8823
|
+
const numbers = cnpj.substring(0, size);
|
|
8824
|
+
let sum = 0;
|
|
8825
|
+
let pos = size - 7;
|
|
8826
|
+
for (let i = size; i >= 1; i--) {
|
|
8827
|
+
sum += this.convertToAsciiMinus48(numbers.charAt(size - i)) * pos--;
|
|
8828
|
+
if (pos < 2) {
|
|
8829
|
+
pos = 9;
|
|
8830
|
+
}
|
|
8831
|
+
}
|
|
8832
|
+
const result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
8833
|
+
return result === digit;
|
|
8834
|
+
}
|
|
8835
|
+
static convertToAsciiMinus48(input) {
|
|
8836
|
+
return input.charCodeAt(0) - 48;
|
|
8837
|
+
}
|
|
8679
8838
|
/**
|
|
8680
8839
|
* Válida o número de telefone da chave PIX.
|
|
8681
8840
|
*/
|
|
@@ -8706,6 +8865,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
8706
8865
|
this.paramsForm = new FormGroup({});
|
|
8707
8866
|
this.defaultCpfNumber = null;
|
|
8708
8867
|
this.permitsEditBankAccountForm = false;
|
|
8868
|
+
this.isAlphanumericCNPJ = false;
|
|
8709
8869
|
this.visibleChange = new EventEmitter();
|
|
8710
8870
|
this.pixAccountItemToList = new EventEmitter();
|
|
8711
8871
|
this.ngUnsubscribe = new Subject();
|
|
@@ -8758,7 +8918,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
8758
8918
|
this.pixKeyType = item.key;
|
|
8759
8919
|
this.isShowPixKeyFieldValidatorMessage = true;
|
|
8760
8920
|
this.pixAccountFormGroup.get("pixKey").reset();
|
|
8761
|
-
this.setPixKeyValidators(true);
|
|
8921
|
+
this.setPixKeyValidators(true, this.isAlphanumericCNPJ);
|
|
8762
8922
|
if (item.key === "CPF") {
|
|
8763
8923
|
this.setDefaultCpfPixKey();
|
|
8764
8924
|
}
|
|
@@ -8813,7 +8973,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
8813
8973
|
this.visibleBtnSave = isEditMode;
|
|
8814
8974
|
if (this.pixAccountFormGroup.get("pixKeyType").value) {
|
|
8815
8975
|
this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
|
|
8816
|
-
this.setPixKeyValidators(isEditMode);
|
|
8976
|
+
this.setPixKeyValidators(isEditMode, this.isAlphanumericCNPJ);
|
|
8817
8977
|
this.formatPixKeyTelephoneNumber();
|
|
8818
8978
|
}
|
|
8819
8979
|
configEnabledFields(this.pixAccountFormGroup, isEditMode, [
|
|
@@ -8831,6 +8991,12 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
8831
8991
|
this.pixAccountFormGroup.updateValueAndValidity();
|
|
8832
8992
|
verifyValidationsForm.call(this.pixAccountFormGroup);
|
|
8833
8993
|
if (this.pixAccountFormGroup.valid) {
|
|
8994
|
+
if (this.pixKeyType === 'CNPJ' && this.isAlphanumericCNPJ) {
|
|
8995
|
+
const pixKey = this.pixAccountFormGroup.get('pixKey').value;
|
|
8996
|
+
if (pixKey) {
|
|
8997
|
+
this.pixAccountFormGroup.get('pixKey').setValue(pixKey.toUpperCase().replace(/[^A-Z0-9]/g, ''));
|
|
8998
|
+
}
|
|
8999
|
+
}
|
|
8834
9000
|
if (this.employeeId) {
|
|
8835
9001
|
this.pixAccountFormGroup.get("employee").setValue({
|
|
8836
9002
|
tableId: this.employeeId,
|
|
@@ -8892,13 +9058,13 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
8892
9058
|
});
|
|
8893
9059
|
}
|
|
8894
9060
|
this.beforeSetPixKeyTypeValidator();
|
|
8895
|
-
this.setPixKeyValidators(isEditMode);
|
|
9061
|
+
this.setPixKeyValidators(isEditMode, this.isAlphanumericCNPJ);
|
|
8896
9062
|
this.validatePercentageValid(percentageIncluded);
|
|
8897
9063
|
}
|
|
8898
9064
|
/**
|
|
8899
9065
|
* Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
|
|
8900
9066
|
*/
|
|
8901
|
-
setPixKeyValidators(isEditMode) {
|
|
9067
|
+
setPixKeyValidators(isEditMode, isAlphanumericCNPJ) {
|
|
8902
9068
|
const genericPixKey = this.pixAccountFormGroup.get("pixKey");
|
|
8903
9069
|
if (this.pixKeyType) {
|
|
8904
9070
|
switch (this.pixKeyType) {
|
|
@@ -8918,9 +9084,7 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
8918
9084
|
]));
|
|
8919
9085
|
break;
|
|
8920
9086
|
case "CNPJ":
|
|
8921
|
-
|
|
8922
|
-
Validators.required, GenericValidator.isValidCnpj,
|
|
8923
|
-
]));
|
|
9087
|
+
this.configureCnpjKeyValidators(isAlphanumericCNPJ, genericPixKey);
|
|
8924
9088
|
break;
|
|
8925
9089
|
case "RANDOM_KEY":
|
|
8926
9090
|
genericPixKey.setValidators(Validators.required);
|
|
@@ -8935,6 +9099,23 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
8935
9099
|
genericPixKey.updateValueAndValidity();
|
|
8936
9100
|
}
|
|
8937
9101
|
}
|
|
9102
|
+
/**
|
|
9103
|
+
* Escolhe o validator do CNPJ conforme a feature toggle alphanumericCNPJFeature.
|
|
9104
|
+
* @param isAlphanumericCNPJ Feature toggle que define se o CNPJ pode ser alfanumérico.
|
|
9105
|
+
* @param genericPixKey Tipo AbstractControl do campo pixKey.
|
|
9106
|
+
*/
|
|
9107
|
+
configureCnpjKeyValidators(isAlphanumericCNPJ, genericPixKey) {
|
|
9108
|
+
if (isAlphanumericCNPJ) {
|
|
9109
|
+
genericPixKey.setValidators(Validators.compose([
|
|
9110
|
+
Validators.required, GenericValidator.isValidCnpjAlphanumeric,
|
|
9111
|
+
]));
|
|
9112
|
+
}
|
|
9113
|
+
else {
|
|
9114
|
+
genericPixKey.setValidators(Validators.compose([
|
|
9115
|
+
Validators.required, GenericValidator.isValidCnpj,
|
|
9116
|
+
]));
|
|
9117
|
+
}
|
|
9118
|
+
}
|
|
8938
9119
|
/**
|
|
8939
9120
|
* Este método calcula as parcentagens que já foram inseridas, e seta a diferença para chegar em
|
|
8940
9121
|
* 100% na validação do campo "percentage" como um novo maxValue;
|
|
@@ -9006,6 +9187,9 @@ let HistoricalPixAccountFormComponent = class HistoricalPixAccountFormComponent
|
|
|
9006
9187
|
}
|
|
9007
9188
|
};
|
|
9008
9189
|
}
|
|
9190
|
+
get cnpjMask() {
|
|
9191
|
+
return FormatUtilsService.getCpfCnpjMask("CNPJ", this.isAlphanumericCNPJ);
|
|
9192
|
+
}
|
|
9009
9193
|
};
|
|
9010
9194
|
HistoricalPixAccountFormComponent.ctorParameters = () => [
|
|
9011
9195
|
{ type: FormBuilder },
|
|
@@ -9038,6 +9222,9 @@ __decorate([
|
|
|
9038
9222
|
__decorate([
|
|
9039
9223
|
Input()
|
|
9040
9224
|
], HistoricalPixAccountFormComponent.prototype, "permitsEditBankAccountForm", void 0);
|
|
9225
|
+
__decorate([
|
|
9226
|
+
Input()
|
|
9227
|
+
], HistoricalPixAccountFormComponent.prototype, "isAlphanumericCNPJ", void 0);
|
|
9041
9228
|
__decorate([
|
|
9042
9229
|
Output()
|
|
9043
9230
|
], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
|
|
@@ -9059,7 +9246,7 @@ __decorate([
|
|
|
9059
9246
|
HistoricalPixAccountFormComponent = __decorate([
|
|
9060
9247
|
Component({
|
|
9061
9248
|
selector: "pix-account",
|
|
9062
|
-
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=\"
|
|
9249
|
+
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]=\"cnpjMask\" [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",
|
|
9063
9250
|
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}"]
|
|
9064
9251
|
})
|
|
9065
9252
|
], HistoricalPixAccountFormComponent);
|
|
@@ -9078,6 +9265,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
9078
9265
|
this.defaultCpfNumber = null;
|
|
9079
9266
|
this.listDataReciever = [];
|
|
9080
9267
|
this.showButtonEdit = false;
|
|
9268
|
+
this.isAlphanumericCNPJ = false;
|
|
9081
9269
|
this.isViewModeActive = new EventEmitter();
|
|
9082
9270
|
this.isEditModeActive = new EventEmitter();
|
|
9083
9271
|
this.isDeleteModeActive = new EventEmitter();
|
|
@@ -9359,7 +9547,7 @@ let HistoricalPixAccountComponent = class HistoricalPixAccountComponent {
|
|
|
9359
9547
|
return FormatUtilsService.getFormattedCpf(cpf);
|
|
9360
9548
|
}
|
|
9361
9549
|
getFormattedCnpj(cnpj) {
|
|
9362
|
-
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
9550
|
+
return FormatUtilsService.getFormattedCnpj(cnpj, this.isAlphanumericCNPJ);
|
|
9363
9551
|
}
|
|
9364
9552
|
getFormattedPercentage(value) {
|
|
9365
9553
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
@@ -9443,6 +9631,9 @@ __decorate([
|
|
|
9443
9631
|
__decorate([
|
|
9444
9632
|
Input()
|
|
9445
9633
|
], HistoricalPixAccountComponent.prototype, "showButtonEdit", void 0);
|
|
9634
|
+
__decorate([
|
|
9635
|
+
Input()
|
|
9636
|
+
], HistoricalPixAccountComponent.prototype, "isAlphanumericCNPJ", void 0);
|
|
9446
9637
|
__decorate([
|
|
9447
9638
|
Output()
|
|
9448
9639
|
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
@@ -9468,7 +9659,7 @@ HistoricalPixAccountComponent = __decorate([
|
|
|
9468
9659
|
Component({
|
|
9469
9660
|
// tslint:disable-next-line:component-selector
|
|
9470
9661
|
selector: "c-historical-pix-account",
|
|
9471
|
-
template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar && !isViewMode\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n [permitsEditBankAccountForm]=\"permitsEditBankAccount\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col *ngIf=\"!isViewMode\" [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th *ngIf=\"!isViewMode\" id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length && !isViewMode\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n",
|
|
9662
|
+
template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"\n [isAlphanumericCNPJ]=\"isAlphanumericCNPJ\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar && !isViewMode\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n [permitsEditBankAccountForm]=\"permitsEditBankAccount\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"\n [isAlphanumericCNPJ]=\"isAlphanumericCNPJ\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col *ngIf=\"!isViewMode\" [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th *ngIf=\"!isViewMode\" id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length && !isViewMode\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n",
|
|
9472
9663
|
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}"]
|
|
9473
9664
|
})
|
|
9474
9665
|
], HistoricalPixAccountComponent);
|