@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
|
@@ -312,6 +312,59 @@
|
|
|
312
312
|
}
|
|
313
313
|
return true;
|
|
314
314
|
};
|
|
315
|
+
CNPJValidator.prototype.checkCNPJAlphanumeric = function (value) {
|
|
316
|
+
var cnpj = value;
|
|
317
|
+
if (cnpj) {
|
|
318
|
+
cnpj = cnpj.replace(/[^\dA-Za-z]/g, '').toUpperCase();
|
|
319
|
+
if (cnpj.length !== 14) {
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
// Valida que dígitos verificadores são numéricos
|
|
323
|
+
if (!/^\d$/.test(cnpj.charAt(12)) || !/^\d$/.test(cnpj.charAt(13))) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
// Elimina CNPJs invalidos conhecidos
|
|
327
|
+
if (cnpj === '00000000000000' ||
|
|
328
|
+
cnpj === '11111111111111' ||
|
|
329
|
+
cnpj === '22222222222222' ||
|
|
330
|
+
cnpj === '33333333333333' ||
|
|
331
|
+
cnpj === '44444444444444' ||
|
|
332
|
+
cnpj === '55555555555555' ||
|
|
333
|
+
cnpj === '66666666666666' ||
|
|
334
|
+
cnpj === '77777777777777' ||
|
|
335
|
+
cnpj === '88888888888888' ||
|
|
336
|
+
cnpj === '99999999999999') {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
// Valida DVs
|
|
340
|
+
var size = cnpj.length - 2;
|
|
341
|
+
var digits = cnpj.substring(size);
|
|
342
|
+
if (!this.validateCnpjDigit(cnpj, size, Number(digits.charAt(0)))) {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
if (!this.validateCnpjDigit(cnpj, size + 1, Number(digits.charAt(1)))) {
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
return true;
|
|
349
|
+
}
|
|
350
|
+
return true;
|
|
351
|
+
};
|
|
352
|
+
CNPJValidator.prototype.validateCnpjDigit = function (cnpj, size, digit) {
|
|
353
|
+
var numbers = cnpj.substring(0, size);
|
|
354
|
+
var sum = 0;
|
|
355
|
+
var pos = size - 7;
|
|
356
|
+
for (var i = size; i >= 1; i--) {
|
|
357
|
+
sum += this.convertToAsciiMinus48(numbers.charAt(size - i)) * pos--;
|
|
358
|
+
if (pos < 2) {
|
|
359
|
+
pos = 9;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
var result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
363
|
+
return result === digit;
|
|
364
|
+
};
|
|
365
|
+
CNPJValidator.prototype.convertToAsciiMinus48 = function (input) {
|
|
366
|
+
return input.charCodeAt(0) - 48;
|
|
367
|
+
};
|
|
315
368
|
return CNPJValidator;
|
|
316
369
|
}());
|
|
317
370
|
var cnpjValidator = new CNPJValidator();
|
|
@@ -2984,62 +3037,97 @@
|
|
|
2984
3037
|
InputRestAutoCompleteComponent.prototype.filterQuery = function (event) {
|
|
2985
3038
|
var _this = this;
|
|
2986
3039
|
var query = event.query;
|
|
2987
|
-
if (!(isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
3040
|
+
if (!(Number.isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
2988
3041
|
try {
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
referenceDate: this.referenceDate,
|
|
2994
|
-
})
|
|
2995
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2996
|
-
}
|
|
2997
|
-
else if (this.isDismissalReason) {
|
|
2998
|
-
var params = { valueSearch: query };
|
|
2999
|
-
if (this.referenceDate) {
|
|
3000
|
-
params['referenceDate'] = this.referenceDate;
|
|
3001
|
-
}
|
|
3002
|
-
return this.service
|
|
3003
|
-
.query('autocompleteDismissalReason', params, exports.ServiceType.GENERAL_REGISTER)
|
|
3004
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3005
|
-
}
|
|
3006
|
-
else if (this.usingType && this.usingType.length) {
|
|
3007
|
-
return this.service
|
|
3008
|
-
.query('autocompleteOtherCompanyFilterUsingType', {
|
|
3009
|
-
searchText: query,
|
|
3010
|
-
usingType: this.usingType,
|
|
3011
|
-
})
|
|
3012
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3013
|
-
}
|
|
3014
|
-
else if (this.isDepartmentFromCompany) {
|
|
3015
|
-
return this.service
|
|
3016
|
-
.query('autocompleteDepartmentQuery', {
|
|
3017
|
-
searchText: query,
|
|
3018
|
-
companyId: this.companyId,
|
|
3019
|
-
referenceDate: this.referenceDate,
|
|
3020
|
-
})
|
|
3021
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3022
|
-
}
|
|
3023
|
-
else if (this.isSituationDefinition) {
|
|
3024
|
-
var params = { searchText: query };
|
|
3025
|
-
return this.service
|
|
3026
|
-
.query('autocompleteSituationDefinitionQuery', params, exports.ServiceType.ORGANIZATION_REGISTER)
|
|
3027
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3028
|
-
}
|
|
3029
|
-
else if (this.isWagetype) {
|
|
3030
|
-
var params = { searchText: query, companyId: this.companyId };
|
|
3031
|
-
return this.service
|
|
3032
|
-
.query('autocompleteWagetypeQuery', params, exports.ServiceType.ENTRY)
|
|
3033
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3034
|
-
}
|
|
3035
|
-
this.service
|
|
3036
|
-
.query('autocomplete', this.getParamsRest(query), this.serviceType).subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3042
|
+
var queryConfig = this.getQueryConfiguration(query);
|
|
3043
|
+
return this.service
|
|
3044
|
+
.query(queryConfig.endpoint, queryConfig.params, queryConfig.serviceType)
|
|
3045
|
+
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3037
3046
|
}
|
|
3038
3047
|
catch (e) {
|
|
3039
3048
|
console.log(e);
|
|
3040
3049
|
}
|
|
3041
3050
|
}
|
|
3042
3051
|
};
|
|
3052
|
+
InputRestAutoCompleteComponent.prototype.getQueryConfiguration = function (query) {
|
|
3053
|
+
var _this = this;
|
|
3054
|
+
var queryStrategies = [
|
|
3055
|
+
{
|
|
3056
|
+
condition: function () { return _this.isTimetrackingSituation; },
|
|
3057
|
+
endpoint: 'autocompleteTimetrackingSituation',
|
|
3058
|
+
params: function () { return ({
|
|
3059
|
+
valueSearch: query,
|
|
3060
|
+
referenceDate: _this.referenceDate,
|
|
3061
|
+
}); },
|
|
3062
|
+
serviceType: this.serviceType,
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
condition: function () { return _this.isDismissalReason; },
|
|
3066
|
+
endpoint: 'autocompleteDismissalReason',
|
|
3067
|
+
params: function () {
|
|
3068
|
+
var params = { valueSearch: query };
|
|
3069
|
+
if (_this.referenceDate) {
|
|
3070
|
+
params['referenceDate'] = _this.referenceDate;
|
|
3071
|
+
}
|
|
3072
|
+
return params;
|
|
3073
|
+
},
|
|
3074
|
+
serviceType: exports.ServiceType.GENERAL_REGISTER,
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
condition: function () { return _this.usingType && _this.usingType.length; },
|
|
3078
|
+
endpoint: 'autocompleteOtherCompanyFilterUsingType',
|
|
3079
|
+
params: function () { return ({
|
|
3080
|
+
searchText: query,
|
|
3081
|
+
usingType: _this.usingType,
|
|
3082
|
+
}); },
|
|
3083
|
+
serviceType: this.serviceType,
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
condition: function () { return _this.isDepartmentFromCompany; },
|
|
3087
|
+
endpoint: 'autocompleteDepartmentQuery',
|
|
3088
|
+
params: function () { return ({
|
|
3089
|
+
searchText: query,
|
|
3090
|
+
companyId: _this.companyId,
|
|
3091
|
+
referenceDate: _this.referenceDate,
|
|
3092
|
+
}); },
|
|
3093
|
+
serviceType: this.serviceType,
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
condition: function () { return _this.isSituationDefinition; },
|
|
3097
|
+
endpoint: 'autocompleteSituationDefinitionQuery',
|
|
3098
|
+
params: function () { return ({ searchText: query }); },
|
|
3099
|
+
serviceType: exports.ServiceType.ORGANIZATION_REGISTER,
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
condition: function () { return _this.isWagetype; },
|
|
3103
|
+
endpoint: 'autocompleteWagetypeQuery',
|
|
3104
|
+
params: function () { return ({
|
|
3105
|
+
searchText: query,
|
|
3106
|
+
companyId: _this.companyId,
|
|
3107
|
+
}); },
|
|
3108
|
+
serviceType: exports.ServiceType.ENTRY,
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
condition: function () { return _this.isTransportationVoucherScaleGroup; },
|
|
3112
|
+
endpoint: 'autocompleteTransportationVoucherScaleGroupQuery',
|
|
3113
|
+
params: function () { return ({ searchText: query }); },
|
|
3114
|
+
serviceType: exports.ServiceType.GENERAL_REGISTER,
|
|
3115
|
+
},
|
|
3116
|
+
];
|
|
3117
|
+
var strategy = queryStrategies.find(function (s) { return s.condition(); });
|
|
3118
|
+
if (strategy) {
|
|
3119
|
+
return {
|
|
3120
|
+
endpoint: strategy.endpoint,
|
|
3121
|
+
params: strategy.params(),
|
|
3122
|
+
serviceType: strategy.serviceType,
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
return {
|
|
3126
|
+
endpoint: 'autocomplete',
|
|
3127
|
+
params: this.getParamsRest(query),
|
|
3128
|
+
serviceType: this.serviceType,
|
|
3129
|
+
};
|
|
3130
|
+
};
|
|
3043
3131
|
InputRestAutoCompleteComponent.prototype.formaterResponce = function (result) {
|
|
3044
3132
|
var _this = this;
|
|
3045
3133
|
this.suggestions = [];
|
|
@@ -3263,6 +3351,9 @@
|
|
|
3263
3351
|
__decorate([
|
|
3264
3352
|
core.Input()
|
|
3265
3353
|
], InputRestAutoCompleteComponent.prototype, "multiple", void 0);
|
|
3354
|
+
__decorate([
|
|
3355
|
+
core.Input()
|
|
3356
|
+
], InputRestAutoCompleteComponent.prototype, "isTransportationVoucherScaleGroup", void 0);
|
|
3266
3357
|
__decorate([
|
|
3267
3358
|
core.Input()
|
|
3268
3359
|
], InputRestAutoCompleteComponent.prototype, "serviceType", void 0);
|
|
@@ -9355,27 +9446,40 @@
|
|
|
9355
9446
|
* Retorna o CNPJ formatado
|
|
9356
9447
|
* @param cnpj CNPJ
|
|
9357
9448
|
*/
|
|
9358
|
-
FormatUtilsService.getFormattedCnpj = function (cnpj) {
|
|
9449
|
+
FormatUtilsService.getFormattedCnpj = function (cnpj, isAlphanumericCNPJ) {
|
|
9359
9450
|
if (cnpj) {
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
.replace(/
|
|
9363
|
-
.
|
|
9364
|
-
|
|
9365
|
-
|
|
9451
|
+
if (isAlphanumericCNPJ) {
|
|
9452
|
+
// Remove caracteres especiais mantendo letras e números, e converte para maiúsculas
|
|
9453
|
+
var cleanCnpj = cnpj.replace(/[^a-zA-Z0-9]/g, '').toUpperCase();
|
|
9454
|
+
// Aplica formatação: AA.BBB.CCC/DDDD-EE
|
|
9455
|
+
return cleanCnpj
|
|
9456
|
+
.replace(/^([A-Z0-9]{2})([A-Z0-9])/, '$1.$2')
|
|
9457
|
+
.replace(/^([A-Z0-9]{2}\.)([A-Z0-9]{3})([A-Z0-9])/, '$1$2.$3')
|
|
9458
|
+
.replace(/^([A-Z0-9]{2}\.[A-Z0-9]{3}\.)([A-Z0-9]{3})([A-Z0-9])/, '$1$2/$3')
|
|
9459
|
+
.replace(/^([A-Z0-9]{2}\.[A-Z0-9]{3}\.[A-Z0-9]{3}\/)([A-Z0-9]{4})([0-9])/, '$1$2-$3');
|
|
9460
|
+
}
|
|
9461
|
+
else {
|
|
9462
|
+
return cnpj
|
|
9463
|
+
.replace(/\D/g, "")
|
|
9464
|
+
.replace(/(\d{2})(\d)/, "$1.$2")
|
|
9465
|
+
.replace(/(\d{3})(\d)/, "$1.$2")
|
|
9466
|
+
.replace(/(\d{3})(\d)/, "$1/$2")
|
|
9467
|
+
.replace(/(\d{4})(\d)/, "$1-$2");
|
|
9468
|
+
}
|
|
9366
9469
|
}
|
|
9367
9470
|
return null;
|
|
9368
9471
|
};
|
|
9369
9472
|
/**
|
|
9370
9473
|
* Retorna a mascara do CPF/CNPJ
|
|
9371
9474
|
* @param key Valores possíveis são CPF ou CNPJ
|
|
9475
|
+
* @param isAlphanumericCNPJ Define se o CNPJ pode ser alfanumérico.
|
|
9372
9476
|
*/
|
|
9373
|
-
FormatUtilsService.getCpfCnpjMask = function (key) {
|
|
9477
|
+
FormatUtilsService.getCpfCnpjMask = function (key, isAlphanumericCNPJ) {
|
|
9374
9478
|
switch (key) {
|
|
9375
9479
|
case "CPF":
|
|
9376
9480
|
return "999.999.999-99";
|
|
9377
9481
|
case "CNPJ":
|
|
9378
|
-
return "99.999.999/9999-99";
|
|
9482
|
+
return isAlphanumericCNPJ ? "**.***.***/****-99" : "99.999.999/9999-99";
|
|
9379
9483
|
default:
|
|
9380
9484
|
return "";
|
|
9381
9485
|
}
|
|
@@ -9577,6 +9681,62 @@
|
|
|
9577
9681
|
}
|
|
9578
9682
|
return null;
|
|
9579
9683
|
};
|
|
9684
|
+
/**
|
|
9685
|
+
* Valida se o CNPJ Alfanumérico é valido. Deve-se ser informado o cpf sem máscara.
|
|
9686
|
+
*/
|
|
9687
|
+
GenericValidator.isValidCnpjAlphanumeric = function (control) {
|
|
9688
|
+
var cnpj = control.value;
|
|
9689
|
+
if (cnpj) {
|
|
9690
|
+
cnpj = cnpj.replace(/[^\dA-Za-z]/g, '').toUpperCase();
|
|
9691
|
+
if (cnpj.length !== 14) {
|
|
9692
|
+
return null;
|
|
9693
|
+
}
|
|
9694
|
+
// Valida que dígitos verificadores são numéricos
|
|
9695
|
+
if (!/^\d$/.test(cnpj.charAt(12)) || !/^\d$/.test(cnpj.charAt(13))) {
|
|
9696
|
+
return { cnpjNotValid: true };
|
|
9697
|
+
}
|
|
9698
|
+
// Elimina CNPJs invalidos conhecidos
|
|
9699
|
+
if (cnpj === '00000000000000' ||
|
|
9700
|
+
cnpj === '11111111111111' ||
|
|
9701
|
+
cnpj === '22222222222222' ||
|
|
9702
|
+
cnpj === '33333333333333' ||
|
|
9703
|
+
cnpj === '44444444444444' ||
|
|
9704
|
+
cnpj === '55555555555555' ||
|
|
9705
|
+
cnpj === '66666666666666' ||
|
|
9706
|
+
cnpj === '77777777777777' ||
|
|
9707
|
+
cnpj === '88888888888888' ||
|
|
9708
|
+
cnpj === '99999999999999') {
|
|
9709
|
+
return { cnpjNotValid: true };
|
|
9710
|
+
}
|
|
9711
|
+
// Valida DVs
|
|
9712
|
+
var size = cnpj.length - 2;
|
|
9713
|
+
var digits = cnpj.substring(size);
|
|
9714
|
+
if (!GenericValidator.validateCnpjDigit(cnpj, size, Number(digits.charAt(0)))) {
|
|
9715
|
+
return { cnpjNotValid: true };
|
|
9716
|
+
}
|
|
9717
|
+
if (!GenericValidator.validateCnpjDigit(cnpj, size + 1, Number(digits.charAt(1)))) {
|
|
9718
|
+
return { cnpjNotValid: true };
|
|
9719
|
+
}
|
|
9720
|
+
return null;
|
|
9721
|
+
}
|
|
9722
|
+
return null;
|
|
9723
|
+
};
|
|
9724
|
+
GenericValidator.validateCnpjDigit = function (cnpj, size, digit) {
|
|
9725
|
+
var numbers = cnpj.substring(0, size);
|
|
9726
|
+
var sum = 0;
|
|
9727
|
+
var pos = size - 7;
|
|
9728
|
+
for (var i = size; i >= 1; i--) {
|
|
9729
|
+
sum += this.convertToAsciiMinus48(numbers.charAt(size - i)) * pos--;
|
|
9730
|
+
if (pos < 2) {
|
|
9731
|
+
pos = 9;
|
|
9732
|
+
}
|
|
9733
|
+
}
|
|
9734
|
+
var result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
|
|
9735
|
+
return result === digit;
|
|
9736
|
+
};
|
|
9737
|
+
GenericValidator.convertToAsciiMinus48 = function (input) {
|
|
9738
|
+
return input.charCodeAt(0) - 48;
|
|
9739
|
+
};
|
|
9580
9740
|
/**
|
|
9581
9741
|
* Válida o número de telefone da chave PIX.
|
|
9582
9742
|
*/
|
|
@@ -9608,6 +9768,7 @@
|
|
|
9608
9768
|
this.paramsForm = new forms.FormGroup({});
|
|
9609
9769
|
this.defaultCpfNumber = null;
|
|
9610
9770
|
this.permitsEditBankAccountForm = false;
|
|
9771
|
+
this.isAlphanumericCNPJ = false;
|
|
9611
9772
|
this.visibleChange = new core.EventEmitter();
|
|
9612
9773
|
this.pixAccountItemToList = new core.EventEmitter();
|
|
9613
9774
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
@@ -9659,7 +9820,7 @@
|
|
|
9659
9820
|
this.pixKeyType = item.key;
|
|
9660
9821
|
this.isShowPixKeyFieldValidatorMessage = true;
|
|
9661
9822
|
this.pixAccountFormGroup.get("pixKey").reset();
|
|
9662
|
-
this.setPixKeyValidators(true);
|
|
9823
|
+
this.setPixKeyValidators(true, this.isAlphanumericCNPJ);
|
|
9663
9824
|
if (item.key === "CPF") {
|
|
9664
9825
|
this.setDefaultCpfPixKey();
|
|
9665
9826
|
}
|
|
@@ -9722,7 +9883,7 @@
|
|
|
9722
9883
|
this.visibleBtnSave = isEditMode;
|
|
9723
9884
|
if (this.pixAccountFormGroup.get("pixKeyType").value) {
|
|
9724
9885
|
this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
|
|
9725
|
-
this.setPixKeyValidators(isEditMode);
|
|
9886
|
+
this.setPixKeyValidators(isEditMode, this.isAlphanumericCNPJ);
|
|
9726
9887
|
this.formatPixKeyTelephoneNumber();
|
|
9727
9888
|
}
|
|
9728
9889
|
configEnabledFields(this.pixAccountFormGroup, isEditMode, [
|
|
@@ -9740,6 +9901,12 @@
|
|
|
9740
9901
|
this.pixAccountFormGroup.updateValueAndValidity();
|
|
9741
9902
|
verifyValidationsForm.call(this.pixAccountFormGroup);
|
|
9742
9903
|
if (this.pixAccountFormGroup.valid) {
|
|
9904
|
+
if (this.pixKeyType === 'CNPJ' && this.isAlphanumericCNPJ) {
|
|
9905
|
+
var pixKey = this.pixAccountFormGroup.get('pixKey').value;
|
|
9906
|
+
if (pixKey) {
|
|
9907
|
+
this.pixAccountFormGroup.get('pixKey').setValue(pixKey.toUpperCase().replace(/[^A-Z0-9]/g, ''));
|
|
9908
|
+
}
|
|
9909
|
+
}
|
|
9743
9910
|
if (this.employeeId) {
|
|
9744
9911
|
this.pixAccountFormGroup.get("employee").setValue({
|
|
9745
9912
|
tableId: this.employeeId,
|
|
@@ -9815,13 +9982,13 @@
|
|
|
9815
9982
|
});
|
|
9816
9983
|
}
|
|
9817
9984
|
this.beforeSetPixKeyTypeValidator();
|
|
9818
|
-
this.setPixKeyValidators(isEditMode);
|
|
9985
|
+
this.setPixKeyValidators(isEditMode, this.isAlphanumericCNPJ);
|
|
9819
9986
|
this.validatePercentageValid(percentageIncluded);
|
|
9820
9987
|
};
|
|
9821
9988
|
/**
|
|
9822
9989
|
* Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
|
|
9823
9990
|
*/
|
|
9824
|
-
HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode) {
|
|
9991
|
+
HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode, isAlphanumericCNPJ) {
|
|
9825
9992
|
var genericPixKey = this.pixAccountFormGroup.get("pixKey");
|
|
9826
9993
|
if (this.pixKeyType) {
|
|
9827
9994
|
switch (this.pixKeyType) {
|
|
@@ -9841,9 +10008,7 @@
|
|
|
9841
10008
|
]));
|
|
9842
10009
|
break;
|
|
9843
10010
|
case "CNPJ":
|
|
9844
|
-
|
|
9845
|
-
forms.Validators.required, GenericValidator.isValidCnpj,
|
|
9846
|
-
]));
|
|
10011
|
+
this.configureCnpjKeyValidators(isAlphanumericCNPJ, genericPixKey);
|
|
9847
10012
|
break;
|
|
9848
10013
|
case "RANDOM_KEY":
|
|
9849
10014
|
genericPixKey.setValidators(forms.Validators.required);
|
|
@@ -9858,6 +10023,23 @@
|
|
|
9858
10023
|
genericPixKey.updateValueAndValidity();
|
|
9859
10024
|
}
|
|
9860
10025
|
};
|
|
10026
|
+
/**
|
|
10027
|
+
* Escolhe o validator do CNPJ conforme a feature toggle alphanumericCNPJFeature.
|
|
10028
|
+
* @param isAlphanumericCNPJ Feature toggle que define se o CNPJ pode ser alfanumérico.
|
|
10029
|
+
* @param genericPixKey Tipo AbstractControl do campo pixKey.
|
|
10030
|
+
*/
|
|
10031
|
+
HistoricalPixAccountFormComponent.prototype.configureCnpjKeyValidators = function (isAlphanumericCNPJ, genericPixKey) {
|
|
10032
|
+
if (isAlphanumericCNPJ) {
|
|
10033
|
+
genericPixKey.setValidators(forms.Validators.compose([
|
|
10034
|
+
forms.Validators.required, GenericValidator.isValidCnpjAlphanumeric,
|
|
10035
|
+
]));
|
|
10036
|
+
}
|
|
10037
|
+
else {
|
|
10038
|
+
genericPixKey.setValidators(forms.Validators.compose([
|
|
10039
|
+
forms.Validators.required, GenericValidator.isValidCnpj,
|
|
10040
|
+
]));
|
|
10041
|
+
}
|
|
10042
|
+
};
|
|
9861
10043
|
/**
|
|
9862
10044
|
* Este método calcula as parcentagens que já foram inseridas, e seta a diferença para chegar em
|
|
9863
10045
|
* 100% na validação do campo "percentage" como um novo maxValue;
|
|
@@ -9933,6 +10115,13 @@
|
|
|
9933
10115
|
}
|
|
9934
10116
|
};
|
|
9935
10117
|
};
|
|
10118
|
+
Object.defineProperty(HistoricalPixAccountFormComponent.prototype, "cnpjMask", {
|
|
10119
|
+
get: function () {
|
|
10120
|
+
return FormatUtilsService.getCpfCnpjMask("CNPJ", this.isAlphanumericCNPJ);
|
|
10121
|
+
},
|
|
10122
|
+
enumerable: true,
|
|
10123
|
+
configurable: true
|
|
10124
|
+
});
|
|
9936
10125
|
HistoricalPixAccountFormComponent.ctorParameters = function () { return [
|
|
9937
10126
|
{ type: forms.FormBuilder },
|
|
9938
10127
|
{ type: core.ChangeDetectorRef }
|
|
@@ -9964,6 +10153,9 @@
|
|
|
9964
10153
|
__decorate([
|
|
9965
10154
|
core.Input()
|
|
9966
10155
|
], HistoricalPixAccountFormComponent.prototype, "permitsEditBankAccountForm", void 0);
|
|
10156
|
+
__decorate([
|
|
10157
|
+
core.Input()
|
|
10158
|
+
], HistoricalPixAccountFormComponent.prototype, "isAlphanumericCNPJ", void 0);
|
|
9967
10159
|
__decorate([
|
|
9968
10160
|
core.Output()
|
|
9969
10161
|
], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
|
|
@@ -9985,7 +10177,7 @@
|
|
|
9985
10177
|
HistoricalPixAccountFormComponent = __decorate([
|
|
9986
10178
|
core.Component({
|
|
9987
10179
|
selector: "pix-account",
|
|
9988
|
-
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=\"
|
|
10180
|
+
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",
|
|
9989
10181
|
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}"]
|
|
9990
10182
|
})
|
|
9991
10183
|
], HistoricalPixAccountFormComponent);
|
|
@@ -10007,6 +10199,7 @@
|
|
|
10007
10199
|
this.defaultCpfNumber = null;
|
|
10008
10200
|
this.listDataReciever = [];
|
|
10009
10201
|
this.showButtonEdit = false;
|
|
10202
|
+
this.isAlphanumericCNPJ = false;
|
|
10010
10203
|
this.isViewModeActive = new core.EventEmitter();
|
|
10011
10204
|
this.isEditModeActive = new core.EventEmitter();
|
|
10012
10205
|
this.isDeleteModeActive = new core.EventEmitter();
|
|
@@ -10320,7 +10513,7 @@
|
|
|
10320
10513
|
return FormatUtilsService.getFormattedCpf(cpf);
|
|
10321
10514
|
};
|
|
10322
10515
|
HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
|
|
10323
|
-
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
10516
|
+
return FormatUtilsService.getFormattedCnpj(cnpj, this.isAlphanumericCNPJ);
|
|
10324
10517
|
};
|
|
10325
10518
|
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
10326
10519
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
@@ -10419,6 +10612,9 @@
|
|
|
10419
10612
|
__decorate([
|
|
10420
10613
|
core.Input()
|
|
10421
10614
|
], HistoricalPixAccountComponent.prototype, "showButtonEdit", void 0);
|
|
10615
|
+
__decorate([
|
|
10616
|
+
core.Input()
|
|
10617
|
+
], HistoricalPixAccountComponent.prototype, "isAlphanumericCNPJ", void 0);
|
|
10422
10618
|
__decorate([
|
|
10423
10619
|
core.Output()
|
|
10424
10620
|
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
@@ -10444,7 +10640,7 @@
|
|
|
10444
10640
|
core.Component({
|
|
10445
10641
|
// tslint:disable-next-line:component-selector
|
|
10446
10642
|
selector: "c-historical-pix-account",
|
|
10447
|
-
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",
|
|
10643
|
+
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",
|
|
10448
10644
|
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}"]
|
|
10449
10645
|
})
|
|
10450
10646
|
], HistoricalPixAccountComponent);
|