@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
|
@@ -146,6 +146,59 @@ var CNPJValidator = /** @class */ (function () {
|
|
|
146
146
|
}
|
|
147
147
|
return true;
|
|
148
148
|
};
|
|
149
|
+
CNPJValidator.prototype.checkCNPJAlphanumeric = function (value) {
|
|
150
|
+
var cnpj = value;
|
|
151
|
+
if (cnpj) {
|
|
152
|
+
cnpj = cnpj.replace(/[^\dA-Za-z]/g, '').toUpperCase();
|
|
153
|
+
if (cnpj.length !== 14) {
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
// Valida que dígitos verificadores são numéricos
|
|
157
|
+
if (!/^\d$/.test(cnpj.charAt(12)) || !/^\d$/.test(cnpj.charAt(13))) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
// Elimina CNPJs invalidos conhecidos
|
|
161
|
+
if (cnpj === '00000000000000' ||
|
|
162
|
+
cnpj === '11111111111111' ||
|
|
163
|
+
cnpj === '22222222222222' ||
|
|
164
|
+
cnpj === '33333333333333' ||
|
|
165
|
+
cnpj === '44444444444444' ||
|
|
166
|
+
cnpj === '55555555555555' ||
|
|
167
|
+
cnpj === '66666666666666' ||
|
|
168
|
+
cnpj === '77777777777777' ||
|
|
169
|
+
cnpj === '88888888888888' ||
|
|
170
|
+
cnpj === '99999999999999') {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
// Valida DVs
|
|
174
|
+
var size = cnpj.length - 2;
|
|
175
|
+
var digits = cnpj.substring(size);
|
|
176
|
+
if (!this.validateCnpjDigit(cnpj, size, Number(digits.charAt(0)))) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
if (!this.validateCnpjDigit(cnpj, size + 1, Number(digits.charAt(1)))) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
return true;
|
|
185
|
+
};
|
|
186
|
+
CNPJValidator.prototype.validateCnpjDigit = function (cnpj, size, digit) {
|
|
187
|
+
var numbers = cnpj.substring(0, size);
|
|
188
|
+
var sum = 0;
|
|
189
|
+
var pos = size - 7;
|
|
190
|
+
for (var i = size; i >= 1; i--) {
|
|
191
|
+
sum += this.convertToAsciiMinus48(numbers.charAt(size - i)) * pos--;
|
|
192
|
+
if (pos < 2) {
|
|
193
|
+
pos = 9;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
var result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
197
|
+
return result === digit;
|
|
198
|
+
};
|
|
199
|
+
CNPJValidator.prototype.convertToAsciiMinus48 = function (input) {
|
|
200
|
+
return input.charCodeAt(0) - 48;
|
|
201
|
+
};
|
|
149
202
|
return CNPJValidator;
|
|
150
203
|
}());
|
|
151
204
|
var cnpjValidator = new CNPJValidator();
|
|
@@ -2818,62 +2871,97 @@ var InputRestAutoCompleteComponent = /** @class */ (function () {
|
|
|
2818
2871
|
InputRestAutoCompleteComponent.prototype.filterQuery = function (event) {
|
|
2819
2872
|
var _this = this;
|
|
2820
2873
|
var query = event.query;
|
|
2821
|
-
if (!(isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
2874
|
+
if (!(Number.isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
2822
2875
|
try {
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
referenceDate: this.referenceDate,
|
|
2828
|
-
})
|
|
2829
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2830
|
-
}
|
|
2831
|
-
else if (this.isDismissalReason) {
|
|
2832
|
-
var params = { valueSearch: query };
|
|
2833
|
-
if (this.referenceDate) {
|
|
2834
|
-
params['referenceDate'] = this.referenceDate;
|
|
2835
|
-
}
|
|
2836
|
-
return this.service
|
|
2837
|
-
.query('autocompleteDismissalReason', params, ServiceType.GENERAL_REGISTER)
|
|
2838
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2839
|
-
}
|
|
2840
|
-
else if (this.usingType && this.usingType.length) {
|
|
2841
|
-
return this.service
|
|
2842
|
-
.query('autocompleteOtherCompanyFilterUsingType', {
|
|
2843
|
-
searchText: query,
|
|
2844
|
-
usingType: this.usingType,
|
|
2845
|
-
})
|
|
2846
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2847
|
-
}
|
|
2848
|
-
else if (this.isDepartmentFromCompany) {
|
|
2849
|
-
return this.service
|
|
2850
|
-
.query('autocompleteDepartmentQuery', {
|
|
2851
|
-
searchText: query,
|
|
2852
|
-
companyId: this.companyId,
|
|
2853
|
-
referenceDate: this.referenceDate,
|
|
2854
|
-
})
|
|
2855
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2856
|
-
}
|
|
2857
|
-
else if (this.isSituationDefinition) {
|
|
2858
|
-
var params = { searchText: query };
|
|
2859
|
-
return this.service
|
|
2860
|
-
.query('autocompleteSituationDefinitionQuery', params, ServiceType.ORGANIZATION_REGISTER)
|
|
2861
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2862
|
-
}
|
|
2863
|
-
else if (this.isWagetype) {
|
|
2864
|
-
var params = { searchText: query, companyId: this.companyId };
|
|
2865
|
-
return this.service
|
|
2866
|
-
.query('autocompleteWagetypeQuery', params, ServiceType.ENTRY)
|
|
2867
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2868
|
-
}
|
|
2869
|
-
this.service
|
|
2870
|
-
.query('autocomplete', this.getParamsRest(query), this.serviceType).subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2876
|
+
var queryConfig = this.getQueryConfiguration(query);
|
|
2877
|
+
return this.service
|
|
2878
|
+
.query(queryConfig.endpoint, queryConfig.params, queryConfig.serviceType)
|
|
2879
|
+
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2871
2880
|
}
|
|
2872
2881
|
catch (e) {
|
|
2873
2882
|
console.log(e);
|
|
2874
2883
|
}
|
|
2875
2884
|
}
|
|
2876
2885
|
};
|
|
2886
|
+
InputRestAutoCompleteComponent.prototype.getQueryConfiguration = function (query) {
|
|
2887
|
+
var _this = this;
|
|
2888
|
+
var queryStrategies = [
|
|
2889
|
+
{
|
|
2890
|
+
condition: function () { return _this.isTimetrackingSituation; },
|
|
2891
|
+
endpoint: 'autocompleteTimetrackingSituation',
|
|
2892
|
+
params: function () { return ({
|
|
2893
|
+
valueSearch: query,
|
|
2894
|
+
referenceDate: _this.referenceDate,
|
|
2895
|
+
}); },
|
|
2896
|
+
serviceType: this.serviceType,
|
|
2897
|
+
},
|
|
2898
|
+
{
|
|
2899
|
+
condition: function () { return _this.isDismissalReason; },
|
|
2900
|
+
endpoint: 'autocompleteDismissalReason',
|
|
2901
|
+
params: function () {
|
|
2902
|
+
var params = { valueSearch: query };
|
|
2903
|
+
if (_this.referenceDate) {
|
|
2904
|
+
params['referenceDate'] = _this.referenceDate;
|
|
2905
|
+
}
|
|
2906
|
+
return params;
|
|
2907
|
+
},
|
|
2908
|
+
serviceType: ServiceType.GENERAL_REGISTER,
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
condition: function () { return _this.usingType && _this.usingType.length; },
|
|
2912
|
+
endpoint: 'autocompleteOtherCompanyFilterUsingType',
|
|
2913
|
+
params: function () { return ({
|
|
2914
|
+
searchText: query,
|
|
2915
|
+
usingType: _this.usingType,
|
|
2916
|
+
}); },
|
|
2917
|
+
serviceType: this.serviceType,
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
condition: function () { return _this.isDepartmentFromCompany; },
|
|
2921
|
+
endpoint: 'autocompleteDepartmentQuery',
|
|
2922
|
+
params: function () { return ({
|
|
2923
|
+
searchText: query,
|
|
2924
|
+
companyId: _this.companyId,
|
|
2925
|
+
referenceDate: _this.referenceDate,
|
|
2926
|
+
}); },
|
|
2927
|
+
serviceType: this.serviceType,
|
|
2928
|
+
},
|
|
2929
|
+
{
|
|
2930
|
+
condition: function () { return _this.isSituationDefinition; },
|
|
2931
|
+
endpoint: 'autocompleteSituationDefinitionQuery',
|
|
2932
|
+
params: function () { return ({ searchText: query }); },
|
|
2933
|
+
serviceType: ServiceType.ORGANIZATION_REGISTER,
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
condition: function () { return _this.isWagetype; },
|
|
2937
|
+
endpoint: 'autocompleteWagetypeQuery',
|
|
2938
|
+
params: function () { return ({
|
|
2939
|
+
searchText: query,
|
|
2940
|
+
companyId: _this.companyId,
|
|
2941
|
+
}); },
|
|
2942
|
+
serviceType: ServiceType.ENTRY,
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
condition: function () { return _this.isTransportationVoucherScaleGroup; },
|
|
2946
|
+
endpoint: 'autocompleteTransportationVoucherScaleGroupQuery',
|
|
2947
|
+
params: function () { return ({ searchText: query }); },
|
|
2948
|
+
serviceType: ServiceType.GENERAL_REGISTER,
|
|
2949
|
+
},
|
|
2950
|
+
];
|
|
2951
|
+
var strategy = queryStrategies.find(function (s) { return s.condition(); });
|
|
2952
|
+
if (strategy) {
|
|
2953
|
+
return {
|
|
2954
|
+
endpoint: strategy.endpoint,
|
|
2955
|
+
params: strategy.params(),
|
|
2956
|
+
serviceType: strategy.serviceType,
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
return {
|
|
2960
|
+
endpoint: 'autocomplete',
|
|
2961
|
+
params: this.getParamsRest(query),
|
|
2962
|
+
serviceType: this.serviceType,
|
|
2963
|
+
};
|
|
2964
|
+
};
|
|
2877
2965
|
InputRestAutoCompleteComponent.prototype.formaterResponce = function (result) {
|
|
2878
2966
|
var _this = this;
|
|
2879
2967
|
this.suggestions = [];
|
|
@@ -3097,6 +3185,9 @@ var InputRestAutoCompleteComponent = /** @class */ (function () {
|
|
|
3097
3185
|
__decorate([
|
|
3098
3186
|
Input()
|
|
3099
3187
|
], InputRestAutoCompleteComponent.prototype, "multiple", void 0);
|
|
3188
|
+
__decorate([
|
|
3189
|
+
Input()
|
|
3190
|
+
], InputRestAutoCompleteComponent.prototype, "isTransportationVoucherScaleGroup", void 0);
|
|
3100
3191
|
__decorate([
|
|
3101
3192
|
Input()
|
|
3102
3193
|
], InputRestAutoCompleteComponent.prototype, "serviceType", void 0);
|
|
@@ -9189,27 +9280,40 @@ var FormatUtilsService = /** @class */ (function () {
|
|
|
9189
9280
|
* Retorna o CNPJ formatado
|
|
9190
9281
|
* @param cnpj CNPJ
|
|
9191
9282
|
*/
|
|
9192
|
-
FormatUtilsService.getFormattedCnpj = function (cnpj) {
|
|
9283
|
+
FormatUtilsService.getFormattedCnpj = function (cnpj, isAlphanumericCNPJ) {
|
|
9193
9284
|
if (cnpj) {
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
.replace(/
|
|
9197
|
-
.
|
|
9198
|
-
|
|
9199
|
-
|
|
9285
|
+
if (isAlphanumericCNPJ) {
|
|
9286
|
+
// Remove caracteres especiais mantendo letras e números, e converte para maiúsculas
|
|
9287
|
+
var cleanCnpj = cnpj.replace(/[^a-zA-Z0-9]/g, '').toUpperCase();
|
|
9288
|
+
// Aplica formatação: AA.BBB.CCC/DDDD-EE
|
|
9289
|
+
return cleanCnpj
|
|
9290
|
+
.replace(/^([A-Z0-9]{2})([A-Z0-9])/, '$1.$2')
|
|
9291
|
+
.replace(/^([A-Z0-9]{2}\.)([A-Z0-9]{3})([A-Z0-9])/, '$1$2.$3')
|
|
9292
|
+
.replace(/^([A-Z0-9]{2}\.[A-Z0-9]{3}\.)([A-Z0-9]{3})([A-Z0-9])/, '$1$2/$3')
|
|
9293
|
+
.replace(/^([A-Z0-9]{2}\.[A-Z0-9]{3}\.[A-Z0-9]{3}\/)([A-Z0-9]{4})([0-9])/, '$1$2-$3');
|
|
9294
|
+
}
|
|
9295
|
+
else {
|
|
9296
|
+
return cnpj
|
|
9297
|
+
.replace(/\D/g, "")
|
|
9298
|
+
.replace(/(\d{2})(\d)/, "$1.$2")
|
|
9299
|
+
.replace(/(\d{3})(\d)/, "$1.$2")
|
|
9300
|
+
.replace(/(\d{3})(\d)/, "$1/$2")
|
|
9301
|
+
.replace(/(\d{4})(\d)/, "$1-$2");
|
|
9302
|
+
}
|
|
9200
9303
|
}
|
|
9201
9304
|
return null;
|
|
9202
9305
|
};
|
|
9203
9306
|
/**
|
|
9204
9307
|
* Retorna a mascara do CPF/CNPJ
|
|
9205
9308
|
* @param key Valores possíveis são CPF ou CNPJ
|
|
9309
|
+
* @param isAlphanumericCNPJ Define se o CNPJ pode ser alfanumérico.
|
|
9206
9310
|
*/
|
|
9207
|
-
FormatUtilsService.getCpfCnpjMask = function (key) {
|
|
9311
|
+
FormatUtilsService.getCpfCnpjMask = function (key, isAlphanumericCNPJ) {
|
|
9208
9312
|
switch (key) {
|
|
9209
9313
|
case "CPF":
|
|
9210
9314
|
return "999.999.999-99";
|
|
9211
9315
|
case "CNPJ":
|
|
9212
|
-
return "99.999.999/9999-99";
|
|
9316
|
+
return isAlphanumericCNPJ ? "**.***.***/****-99" : "99.999.999/9999-99";
|
|
9213
9317
|
default:
|
|
9214
9318
|
return "";
|
|
9215
9319
|
}
|
|
@@ -9411,6 +9515,62 @@ var GenericValidator = /** @class */ (function () {
|
|
|
9411
9515
|
}
|
|
9412
9516
|
return null;
|
|
9413
9517
|
};
|
|
9518
|
+
/**
|
|
9519
|
+
* Valida se o CNPJ Alfanumérico é valido. Deve-se ser informado o cpf sem máscara.
|
|
9520
|
+
*/
|
|
9521
|
+
GenericValidator.isValidCnpjAlphanumeric = function (control) {
|
|
9522
|
+
var cnpj = control.value;
|
|
9523
|
+
if (cnpj) {
|
|
9524
|
+
cnpj = cnpj.replace(/[^\dA-Za-z]/g, '').toUpperCase();
|
|
9525
|
+
if (cnpj.length !== 14) {
|
|
9526
|
+
return null;
|
|
9527
|
+
}
|
|
9528
|
+
// Valida que dígitos verificadores são numéricos
|
|
9529
|
+
if (!/^\d$/.test(cnpj.charAt(12)) || !/^\d$/.test(cnpj.charAt(13))) {
|
|
9530
|
+
return { cnpjNotValid: true };
|
|
9531
|
+
}
|
|
9532
|
+
// Elimina CNPJs invalidos conhecidos
|
|
9533
|
+
if (cnpj === '00000000000000' ||
|
|
9534
|
+
cnpj === '11111111111111' ||
|
|
9535
|
+
cnpj === '22222222222222' ||
|
|
9536
|
+
cnpj === '33333333333333' ||
|
|
9537
|
+
cnpj === '44444444444444' ||
|
|
9538
|
+
cnpj === '55555555555555' ||
|
|
9539
|
+
cnpj === '66666666666666' ||
|
|
9540
|
+
cnpj === '77777777777777' ||
|
|
9541
|
+
cnpj === '88888888888888' ||
|
|
9542
|
+
cnpj === '99999999999999') {
|
|
9543
|
+
return { cnpjNotValid: true };
|
|
9544
|
+
}
|
|
9545
|
+
// Valida DVs
|
|
9546
|
+
var size = cnpj.length - 2;
|
|
9547
|
+
var digits = cnpj.substring(size);
|
|
9548
|
+
if (!GenericValidator.validateCnpjDigit(cnpj, size, Number(digits.charAt(0)))) {
|
|
9549
|
+
return { cnpjNotValid: true };
|
|
9550
|
+
}
|
|
9551
|
+
if (!GenericValidator.validateCnpjDigit(cnpj, size + 1, Number(digits.charAt(1)))) {
|
|
9552
|
+
return { cnpjNotValid: true };
|
|
9553
|
+
}
|
|
9554
|
+
return null;
|
|
9555
|
+
}
|
|
9556
|
+
return null;
|
|
9557
|
+
};
|
|
9558
|
+
GenericValidator.validateCnpjDigit = function (cnpj, size, digit) {
|
|
9559
|
+
var numbers = cnpj.substring(0, size);
|
|
9560
|
+
var sum = 0;
|
|
9561
|
+
var pos = size - 7;
|
|
9562
|
+
for (var i = size; i >= 1; i--) {
|
|
9563
|
+
sum += this.convertToAsciiMinus48(numbers.charAt(size - i)) * pos--;
|
|
9564
|
+
if (pos < 2) {
|
|
9565
|
+
pos = 9;
|
|
9566
|
+
}
|
|
9567
|
+
}
|
|
9568
|
+
var result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
9569
|
+
return result === digit;
|
|
9570
|
+
};
|
|
9571
|
+
GenericValidator.convertToAsciiMinus48 = function (input) {
|
|
9572
|
+
return input.charCodeAt(0) - 48;
|
|
9573
|
+
};
|
|
9414
9574
|
/**
|
|
9415
9575
|
* Válida o número de telefone da chave PIX.
|
|
9416
9576
|
*/
|
|
@@ -9442,6 +9602,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9442
9602
|
this.paramsForm = new FormGroup({});
|
|
9443
9603
|
this.defaultCpfNumber = null;
|
|
9444
9604
|
this.permitsEditBankAccountForm = false;
|
|
9605
|
+
this.isAlphanumericCNPJ = false;
|
|
9445
9606
|
this.visibleChange = new EventEmitter();
|
|
9446
9607
|
this.pixAccountItemToList = new EventEmitter();
|
|
9447
9608
|
this.ngUnsubscribe = new Subject();
|
|
@@ -9493,7 +9654,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9493
9654
|
this.pixKeyType = item.key;
|
|
9494
9655
|
this.isShowPixKeyFieldValidatorMessage = true;
|
|
9495
9656
|
this.pixAccountFormGroup.get("pixKey").reset();
|
|
9496
|
-
this.setPixKeyValidators(true);
|
|
9657
|
+
this.setPixKeyValidators(true, this.isAlphanumericCNPJ);
|
|
9497
9658
|
if (item.key === "CPF") {
|
|
9498
9659
|
this.setDefaultCpfPixKey();
|
|
9499
9660
|
}
|
|
@@ -9556,7 +9717,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9556
9717
|
this.visibleBtnSave = isEditMode;
|
|
9557
9718
|
if (this.pixAccountFormGroup.get("pixKeyType").value) {
|
|
9558
9719
|
this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
|
|
9559
|
-
this.setPixKeyValidators(isEditMode);
|
|
9720
|
+
this.setPixKeyValidators(isEditMode, this.isAlphanumericCNPJ);
|
|
9560
9721
|
this.formatPixKeyTelephoneNumber();
|
|
9561
9722
|
}
|
|
9562
9723
|
configEnabledFields(this.pixAccountFormGroup, isEditMode, [
|
|
@@ -9574,6 +9735,12 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9574
9735
|
this.pixAccountFormGroup.updateValueAndValidity();
|
|
9575
9736
|
verifyValidationsForm.call(this.pixAccountFormGroup);
|
|
9576
9737
|
if (this.pixAccountFormGroup.valid) {
|
|
9738
|
+
if (this.pixKeyType === 'CNPJ' && this.isAlphanumericCNPJ) {
|
|
9739
|
+
var pixKey = this.pixAccountFormGroup.get('pixKey').value;
|
|
9740
|
+
if (pixKey) {
|
|
9741
|
+
this.pixAccountFormGroup.get('pixKey').setValue(pixKey.toUpperCase().replace(/[^A-Z0-9]/g, ''));
|
|
9742
|
+
}
|
|
9743
|
+
}
|
|
9577
9744
|
if (this.employeeId) {
|
|
9578
9745
|
this.pixAccountFormGroup.get("employee").setValue({
|
|
9579
9746
|
tableId: this.employeeId,
|
|
@@ -9649,13 +9816,13 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9649
9816
|
});
|
|
9650
9817
|
}
|
|
9651
9818
|
this.beforeSetPixKeyTypeValidator();
|
|
9652
|
-
this.setPixKeyValidators(isEditMode);
|
|
9819
|
+
this.setPixKeyValidators(isEditMode, this.isAlphanumericCNPJ);
|
|
9653
9820
|
this.validatePercentageValid(percentageIncluded);
|
|
9654
9821
|
};
|
|
9655
9822
|
/**
|
|
9656
9823
|
* Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
|
|
9657
9824
|
*/
|
|
9658
|
-
HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode) {
|
|
9825
|
+
HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode, isAlphanumericCNPJ) {
|
|
9659
9826
|
var genericPixKey = this.pixAccountFormGroup.get("pixKey");
|
|
9660
9827
|
if (this.pixKeyType) {
|
|
9661
9828
|
switch (this.pixKeyType) {
|
|
@@ -9675,9 +9842,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9675
9842
|
]));
|
|
9676
9843
|
break;
|
|
9677
9844
|
case "CNPJ":
|
|
9678
|
-
|
|
9679
|
-
Validators.required, GenericValidator.isValidCnpj,
|
|
9680
|
-
]));
|
|
9845
|
+
this.configureCnpjKeyValidators(isAlphanumericCNPJ, genericPixKey);
|
|
9681
9846
|
break;
|
|
9682
9847
|
case "RANDOM_KEY":
|
|
9683
9848
|
genericPixKey.setValidators(Validators.required);
|
|
@@ -9692,6 +9857,23 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9692
9857
|
genericPixKey.updateValueAndValidity();
|
|
9693
9858
|
}
|
|
9694
9859
|
};
|
|
9860
|
+
/**
|
|
9861
|
+
* Escolhe o validator do CNPJ conforme a feature toggle alphanumericCNPJFeature.
|
|
9862
|
+
* @param isAlphanumericCNPJ Feature toggle que define se o CNPJ pode ser alfanumérico.
|
|
9863
|
+
* @param genericPixKey Tipo AbstractControl do campo pixKey.
|
|
9864
|
+
*/
|
|
9865
|
+
HistoricalPixAccountFormComponent.prototype.configureCnpjKeyValidators = function (isAlphanumericCNPJ, genericPixKey) {
|
|
9866
|
+
if (isAlphanumericCNPJ) {
|
|
9867
|
+
genericPixKey.setValidators(Validators.compose([
|
|
9868
|
+
Validators.required, GenericValidator.isValidCnpjAlphanumeric,
|
|
9869
|
+
]));
|
|
9870
|
+
}
|
|
9871
|
+
else {
|
|
9872
|
+
genericPixKey.setValidators(Validators.compose([
|
|
9873
|
+
Validators.required, GenericValidator.isValidCnpj,
|
|
9874
|
+
]));
|
|
9875
|
+
}
|
|
9876
|
+
};
|
|
9695
9877
|
/**
|
|
9696
9878
|
* Este método calcula as parcentagens que já foram inseridas, e seta a diferença para chegar em
|
|
9697
9879
|
* 100% na validação do campo "percentage" como um novo maxValue;
|
|
@@ -9767,6 +9949,13 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9767
9949
|
}
|
|
9768
9950
|
};
|
|
9769
9951
|
};
|
|
9952
|
+
Object.defineProperty(HistoricalPixAccountFormComponent.prototype, "cnpjMask", {
|
|
9953
|
+
get: function () {
|
|
9954
|
+
return FormatUtilsService.getCpfCnpjMask("CNPJ", this.isAlphanumericCNPJ);
|
|
9955
|
+
},
|
|
9956
|
+
enumerable: true,
|
|
9957
|
+
configurable: true
|
|
9958
|
+
});
|
|
9770
9959
|
HistoricalPixAccountFormComponent.ctorParameters = function () { return [
|
|
9771
9960
|
{ type: FormBuilder },
|
|
9772
9961
|
{ type: ChangeDetectorRef }
|
|
@@ -9798,6 +9987,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9798
9987
|
__decorate([
|
|
9799
9988
|
Input()
|
|
9800
9989
|
], HistoricalPixAccountFormComponent.prototype, "permitsEditBankAccountForm", void 0);
|
|
9990
|
+
__decorate([
|
|
9991
|
+
Input()
|
|
9992
|
+
], HistoricalPixAccountFormComponent.prototype, "isAlphanumericCNPJ", void 0);
|
|
9801
9993
|
__decorate([
|
|
9802
9994
|
Output()
|
|
9803
9995
|
], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
|
|
@@ -9819,7 +10011,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9819
10011
|
HistoricalPixAccountFormComponent = __decorate([
|
|
9820
10012
|
Component({
|
|
9821
10013
|
selector: "pix-account",
|
|
9822
|
-
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=\"
|
|
10014
|
+
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",
|
|
9823
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}"]
|
|
9824
10016
|
})
|
|
9825
10017
|
], HistoricalPixAccountFormComponent);
|
|
@@ -9841,6 +10033,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9841
10033
|
this.defaultCpfNumber = null;
|
|
9842
10034
|
this.listDataReciever = [];
|
|
9843
10035
|
this.showButtonEdit = false;
|
|
10036
|
+
this.isAlphanumericCNPJ = false;
|
|
9844
10037
|
this.isViewModeActive = new EventEmitter();
|
|
9845
10038
|
this.isEditModeActive = new EventEmitter();
|
|
9846
10039
|
this.isDeleteModeActive = new EventEmitter();
|
|
@@ -10154,7 +10347,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
10154
10347
|
return FormatUtilsService.getFormattedCpf(cpf);
|
|
10155
10348
|
};
|
|
10156
10349
|
HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
|
|
10157
|
-
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
10350
|
+
return FormatUtilsService.getFormattedCnpj(cnpj, this.isAlphanumericCNPJ);
|
|
10158
10351
|
};
|
|
10159
10352
|
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
10160
10353
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
@@ -10253,6 +10446,9 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
10253
10446
|
__decorate([
|
|
10254
10447
|
Input()
|
|
10255
10448
|
], HistoricalPixAccountComponent.prototype, "showButtonEdit", void 0);
|
|
10449
|
+
__decorate([
|
|
10450
|
+
Input()
|
|
10451
|
+
], HistoricalPixAccountComponent.prototype, "isAlphanumericCNPJ", void 0);
|
|
10256
10452
|
__decorate([
|
|
10257
10453
|
Output()
|
|
10258
10454
|
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
@@ -10278,7 +10474,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
10278
10474
|
Component({
|
|
10279
10475
|
// tslint:disable-next-line:component-selector
|
|
10280
10476
|
selector: "c-historical-pix-account",
|
|
10281
|
-
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",
|
|
10477
|
+
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",
|
|
10282
10478
|
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}"]
|
|
10283
10479
|
})
|
|
10284
10480
|
], HistoricalPixAccountComponent);
|