@senior-gestao-pessoas/payroll-core 9.5.0-71c63479-42df-4b8e-8295-7f214bdd37f5 → 9.5.0-77209b41-a4ab-43cd-89d7-40623b664fa9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +542 -85
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +2 -2
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +1 -0
  6. package/components/historical-pix-account/historical-pix-account.component.d.ts +71 -11
  7. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +3 -0
  8. package/components/shared/shared-state.service.d.ts +8 -0
  9. package/esm2015/components/historical-pix-account/historical-pix-account-base.js +9 -2
  10. package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +9 -7
  11. package/esm2015/components/historical-pix-account/historical-pix-account.component.js +478 -80
  12. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +26 -3
  13. package/esm2015/components/shared/shared-state.service.js +17 -1
  14. package/esm2015/components/utils/format-utils/format-utils.service.js +3 -1
  15. package/esm5/components/historical-pix-account/historical-pix-account-base.js +9 -2
  16. package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +9 -7
  17. package/esm5/components/historical-pix-account/historical-pix-account.component.js +488 -80
  18. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +26 -3
  19. package/esm5/components/shared/shared-state.service.js +17 -1
  20. package/esm5/components/utils/format-utils/format-utils.service.js +3 -1
  21. package/fesm2015/senior-gestao-pessoas-payroll-core.js +532 -85
  22. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  23. package/fesm5/senior-gestao-pessoas-payroll-core.js +542 -85
  24. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  25. package/package.json +1 -1
  26. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
@@ -9483,6 +9483,7 @@
9483
9483
  */
9484
9484
  FormatUtilsService.formatCpfInputEvent = function (event) {
9485
9485
  var cpf = event.target.value;
9486
+ console.log("FormatUtilsService.formatCpfInputEvent.cpf: " + cpf);
9486
9487
  // Permite apagar nos pontos sensíveis
9487
9488
  if (event.keyCode === 8 && (cpf.length === 4 || cpf.length === 8 || cpf.length === 12)) {
9488
9489
  return;
@@ -9495,6 +9496,7 @@
9495
9496
  */
9496
9497
  FormatUtilsService.formatCnpjInputEvent = function (event) {
9497
9498
  var cnpj = event.target.value;
9499
+ console.log("FormatUtilsService.formatCnpjInputEvent.cnpj: " + cnpj);
9498
9500
  // Permite apagar nos pontos sensíveis
9499
9501
  if (event.keyCode === 8 && (cnpj.length === 3 || cnpj.length === 7 || cnpj.length === 11 || cnpj.length === 16)) {
9500
9502
  return;
@@ -9516,6 +9518,10 @@
9516
9518
  this.showEditMode$ = this.showEditMode.asObservable();
9517
9519
  this.activeValidatorsOnEditModalOpen = new rxjs.Subject();
9518
9520
  this.activeValidatorsOnEditModalOpen$ = this.activeValidatorsOnEditModalOpen.asObservable();
9521
+ this.hideBtnAddForViewMode = new rxjs.BehaviorSubject(false);
9522
+ this.hideBtnAddForViewMode$ = this.hideBtnAddForViewMode.asObservable();
9523
+ this.activeHideOptionsOnView = new rxjs.BehaviorSubject(true);
9524
+ this.activeHideOptionsOnView$ = this.activeHideOptionsOnView.asObservable();
9519
9525
  }
9520
9526
  SharedStateService.prototype.setHideField = function (value) {
9521
9527
  this.hideFieldSubject.next(value);
@@ -9532,6 +9538,18 @@
9532
9538
  SharedStateService.prototype.triggerActiveValidatorsOnEditModalOpen = function () {
9533
9539
  this.activeValidatorsOnEditModalOpen.next();
9534
9540
  };
9541
+ SharedStateService.prototype.setHideBtnAddForViewMode = function (value) {
9542
+ this.hideBtnAddForViewMode.next(value);
9543
+ };
9544
+ SharedStateService.prototype.resetHideField = function () {
9545
+ this.hideFieldSubject.next(true);
9546
+ };
9547
+ SharedStateService.prototype.setActiveHideOptionsOnView = function (value) {
9548
+ this.activeHideOptionsOnView.next(value);
9549
+ };
9550
+ SharedStateService.prototype.getActiveHideOptionsOnView = function () {
9551
+ return this.activeHideOptionsOnView.getValue();
9552
+ };
9535
9553
  SharedStateService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function SharedStateService_Factory() { return new SharedStateService(); }, token: SharedStateService, providedIn: "root" });
9536
9554
  SharedStateService = __decorate([
9537
9555
  core.Injectable({
@@ -9838,10 +9856,17 @@
9838
9856
  case "RANDOM_KEY":
9839
9857
  pixKey.setValidators(forms.Validators.required);
9840
9858
  break;
9859
+ case "BANK_ACCOUNT":
9860
+ pixKey.clearValidators();
9861
+ pixKey.setValue('');
9862
+ break;
9841
9863
  default:
9842
9864
  pixKey.clearValidators();
9843
9865
  }
9844
- if (isEditMode) {
9866
+ if (this.pixKeyType === "BANK_ACCOUNT") {
9867
+ pixKey.disable();
9868
+ }
9869
+ else if (isEditMode) {
9845
9870
  pixKey.enable();
9846
9871
  }
9847
9872
  pixKey.updateValueAndValidity();
@@ -9929,6 +9954,9 @@
9929
9954
  _this.addExistentHistoricData = [];
9930
9955
  _this.getListPixAccount = [];
9931
9956
  _this.isEditModeForSave = false;
9957
+ _this.showField = false;
9958
+ _this.hideBtnAddForViewMode = false;
9959
+ _this.showButtonView = true;
9932
9960
  _this.isViewModeActive = new core.EventEmitter();
9933
9961
  _this.isEditModeActive = new core.EventEmitter();
9934
9962
  _this.isDeleteModeActive = new core.EventEmitter();
@@ -9946,13 +9974,12 @@
9946
9974
  _this.loading = true;
9947
9975
  _this.listData = [];
9948
9976
  _this.listDataNoPage = [];
9949
- _this.showButtonView = true;
9950
9977
  _this.showEditMode = false;
9951
9978
  _this.hasRecordsPix = true;
9952
- _this.maxValuePercentage = 100.00;
9953
9979
  _this.hideFields = _this.sharedStateService.hideField$;
9954
9980
  _this.suggestions = [];
9955
9981
  _this.formGroupByRow = {};
9982
+ _this.isSyncingPercentage = false;
9956
9983
  _this.cols = [
9957
9984
  {
9958
9985
  label: _this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
@@ -10031,14 +10058,17 @@
10031
10058
  }
10032
10059
  HistoricalPixAccountComponent.prototype.ngOnInit = function () {
10033
10060
  var _this = this;
10061
+ this.showFields = this.showField;
10034
10062
  this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
10035
- this.sharedStateService.showButton$.subscribe(function (value) {
10036
- _this.showButtonView = value;
10037
- });
10038
10063
  this.sharedStateService.showEditMode$.subscribe(function (value) {
10039
10064
  _this.showEditMode = value;
10040
10065
  _this.isEditModeForSave = value;
10041
10066
  });
10067
+ this.sharedStateService.activeHideOptionsOnView$.subscribe(function (value) {
10068
+ if (value) {
10069
+ _this.showButtonView = false;
10070
+ }
10071
+ });
10042
10072
  this.sharedStateService.activeValidatorsOnEditModalOpen$
10043
10073
  .subscribe(function () {
10044
10074
  Object.values(_this.formGroupByRow).forEach(function (fg) {
@@ -10049,6 +10079,7 @@
10049
10079
  });
10050
10080
  _this.emitFormValidity();
10051
10081
  });
10082
+ this.resetFormState();
10052
10083
  };
10053
10084
  HistoricalPixAccountComponent.prototype.ngOnChanges = function (changes) {
10054
10085
  if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
@@ -10061,6 +10092,10 @@
10061
10092
  var newData = changes['addExistentHistoricData'].currentValue;
10062
10093
  this.rebuildFormGroupMap(newData);
10063
10094
  }
10095
+ if (changes['isEditMode']) {
10096
+ this.isEditMode = changes['isEditMode'].currentValue;
10097
+ this.cd.detectChanges();
10098
+ }
10064
10099
  };
10065
10100
  HistoricalPixAccountComponent.prototype.createFormGroup = function () {
10066
10101
  this.historicalPixAccountList = this.formBuilder.group({
@@ -10075,9 +10110,31 @@
10075
10110
  this.cd.detectChanges();
10076
10111
  };
10077
10112
  HistoricalPixAccountComponent.prototype.emitFormValidity = function () {
10078
- var allValid = Object.values(this.formGroupByRow).every(function (fg) {
10113
+ if (!this.formGroupByRow || Object.keys(this.formGroupByRow).length === 0) {
10114
+ this.isValidChangeForm.emit(false);
10115
+ return;
10116
+ }
10117
+ var allValid = true;
10118
+ Object.values(this.formGroupByRow).forEach(function (fg) {
10119
+ // Verifica cada controle individualmente
10120
+ Object.keys(fg.controls).forEach(function (key) {
10121
+ var control = fg.get(key);
10122
+ // Verifica se o controle é obrigatório e está vazio
10123
+ if (control.validator && control.validator({})) {
10124
+ var validatorFn = control.validator({});
10125
+ if (validatorFn && validatorFn.required && !control.value) {
10126
+ allValid = false;
10127
+ }
10128
+ }
10129
+ // Verifica se o controle tem erros
10130
+ if (control.errors) {
10131
+ allValid = false;
10132
+ }
10133
+ });
10079
10134
  fg.updateValueAndValidity();
10080
- return fg.valid;
10135
+ if (!fg.valid) {
10136
+ allValid = false;
10137
+ }
10081
10138
  });
10082
10139
  this.isValidChangeForm.emit(allValid);
10083
10140
  };
@@ -10098,65 +10155,27 @@
10098
10155
  };
10099
10156
  HistoricalPixAccountComponent.prototype.createPixRowFormGroup = function () {
10100
10157
  return this.formBuilder.group({
10158
+ id: [null],
10101
10159
  pixKeyType: [null, forms.Validators.required],
10102
10160
  pixKey: [null],
10103
10161
  percentage: [0, forms.Validators.compose(__spread(this.initialValidatorOfPercentage, [
10104
10162
  forms.Validators.max(this.maxValuePercentage),
10105
- ]))]
10163
+ ]))],
10164
+ externalId: [null],
10106
10165
  });
10107
10166
  };
10108
- HistoricalPixAccountComponent.prototype.onPixKeyInput = function (event, index) {
10109
- var inputValue = event.target.value;
10110
- var inputRawValue = inputValue.replace(/\D/g, '');
10111
- var form = this.formGroupByRow[index];
10112
- var pixKeyControl = form.get('pixKey');
10113
- if (pixKeyControl) {
10114
- pixKeyControl.setValue(inputRawValue, { emitEvent: false });
10115
- pixKeyControl.markAsDirty();
10116
- pixKeyControl.updateValueAndValidity();
10117
- }
10118
- this.setPixKeyValidators(true, form);
10119
- this.emitFormValidity();
10120
- };
10121
- HistoricalPixAccountComponent.prototype.onBlurPixCpfAndCnpj = function (index) {
10122
- var form = this.formGroupByRow[index];
10123
- var pixKeyControl = form.get('pixKey');
10124
- var pixKeyTypeControl = form.get('pixKeyType');
10125
- if (!pixKeyControl || !pixKeyTypeControl)
10126
- return;
10127
- var currentValue = pixKeyControl.value;
10128
- var pixKeyType = pixKeyTypeControl.value.key;
10129
- var rawValue = (currentValue || '').replace(/\D/g, '');
10130
- pixKeyControl.setValue(rawValue, { emitEvent: false });
10131
- if (pixKeyControl.valid) {
10132
- form.patchValue({
10133
- pixKeyFormatted: FormatUtilsService.getFormattedSubscriptionNumber(rawValue, pixKeyType)
10167
+ /**
10168
+ * Sincroniza todos os dados do NgModel para os FormGroups antes de enviar ao componente pai
10169
+ */
10170
+ HistoricalPixAccountComponent.prototype.syncPixDataToParentForm = function () {
10171
+ this.syncAllModelToForm();
10172
+ var historicalPix = __spread(this.addExistentHistoricData);
10173
+ this.historicalPixAccountList.get("historicalPixAccountList").setValue(historicalPix);
10174
+ if (this.formGroup) {
10175
+ this.formGroup.get(this.fieldFormGroup).patchValue({
10176
+ historicalPixAccountList: historicalPix
10134
10177
  });
10135
10178
  }
10136
- this.emitFormValidity();
10137
- };
10138
- HistoricalPixAccountComponent.prototype.getFormattedPixKey = function (type, value) {
10139
- return FormatUtilsService.getFormattedSubscriptionNumber(value, type);
10140
- };
10141
- HistoricalPixAccountComponent.prototype.syncPixDataToParentForm = function () {
10142
- if (!this.isEditModeForSave)
10143
- return;
10144
- var values = Object.values(this.formGroupByRow).map(function (fg) {
10145
- var value = fg.getRawValue();
10146
- var pixKeyType = value.pixKeyType.key;
10147
- if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
10148
- value.pixKey = (value.pixKey || '').replace(/[.\-\/]/g, '');
10149
- }
10150
- else if (pixKeyType === 'TELEPHONE') {
10151
- value.pixKey = (value.pixKey || '').replace(/[()\s\-]/g, '');
10152
- }
10153
- return value;
10154
- });
10155
- this.formGroup
10156
- .get(this.fieldFormGroup)
10157
- .get('historicalPixAccountList')
10158
- .setValue(values);
10159
- this.emitFormValidity();
10160
10179
  };
10161
10180
  HistoricalPixAccountComponent.prototype.syncResetPixFormToParent = function () {
10162
10181
  this.formGroupByRow = {};
@@ -10166,6 +10185,46 @@
10166
10185
  this.rebuildFormGroupMap(this.addExistentHistoricData);
10167
10186
  }
10168
10187
  };
10188
+ /**
10189
+ * Valida todos os formulários
10190
+ */
10191
+ HistoricalPixAccountComponent.prototype.validateAllForms = function () {
10192
+ var _this = this;
10193
+ this.forceCloseAllCellEditors();
10194
+ this.syncAllModelToForm();
10195
+ if (!this.formGroupByRow || Object.keys(this.formGroupByRow).length === 0) {
10196
+ return true;
10197
+ }
10198
+ var isAllValid = true;
10199
+ Object.keys(this.formGroupByRow).forEach(function (indexKey) {
10200
+ var index = Number(indexKey);
10201
+ var form = _this.formGroupByRow[index];
10202
+ if (form) {
10203
+ Object.keys(form.controls).forEach(function (controlName) {
10204
+ var control = form.get(controlName);
10205
+ control.markAsTouched();
10206
+ if (controlName === 'pixKey') {
10207
+ var pixKeyTypeControl = form.get('pixKeyType');
10208
+ if (pixKeyTypeControl.value) {
10209
+ _this.validateDocumentField(index, pixKeyTypeControl.value.key);
10210
+ }
10211
+ }
10212
+ });
10213
+ form.updateValueAndValidity();
10214
+ if (form.invalid) {
10215
+ isAllValid = false;
10216
+ }
10217
+ }
10218
+ });
10219
+ if (isAllValid && this.addExistentHistoricData && this.addExistentHistoricData.length > 0) {
10220
+ var totalPercentage = this.addExistentHistoricData.reduce(function (sum, item) { return sum + (parseFloat(item.percentage) || 0); }, 0);
10221
+ if (Math.abs(totalPercentage - 100) > 0.01) {
10222
+ isAllValid = false;
10223
+ }
10224
+ }
10225
+ this.isValidChangeForm.emit(isAllValid);
10226
+ return isAllValid;
10227
+ };
10169
10228
  HistoricalPixAccountComponent.prototype.onLazyLoad = function (event) {
10170
10229
  var _this = this;
10171
10230
  var first = event && event.first ? event.first : 0;
@@ -10213,9 +10272,11 @@
10213
10272
  };
10214
10273
  HistoricalPixAccountComponent.prototype.addPix = function () {
10215
10274
  var newItem = {
10275
+ id: null,
10216
10276
  pixKeyType: {},
10217
10277
  pixKey: '',
10218
- percentage: 0
10278
+ percentage: '',
10279
+ externalId: '',
10219
10280
  };
10220
10281
  var index = this.addExistentHistoricData.length;
10221
10282
  this.addExistentHistoricData = __spread(this.addExistentHistoricData, [
@@ -10226,8 +10287,27 @@
10226
10287
  this.emitFormValidity();
10227
10288
  };
10228
10289
  HistoricalPixAccountComponent.prototype.deletePix = function (index) {
10290
+ var _this = this;
10291
+ if (this.dataListPix.editingCell) {
10292
+ this.dataListPix.editingCell = null;
10293
+ }
10229
10294
  this.addExistentHistoricData = this.addExistentHistoricData.filter(function (_, i) { return i !== index; });
10295
+ var currentList = this.historicalPixAccountList.get("historicalPixAccountList").value || [];
10296
+ var updatedList = currentList.filter(function (_, i) { return i !== index; });
10297
+ this.historicalPixAccountList.get("historicalPixAccountList").setValue(updatedList);
10298
+ if (this.formGroup) {
10299
+ this.formGroup.get(this.fieldFormGroup).patchValue({
10300
+ historicalPixAccountList: updatedList
10301
+ });
10302
+ }
10230
10303
  this.rebuildFormGroupMap(this.addExistentHistoricData);
10304
+ this.addExistentHistoricData.forEach(function (_, i) {
10305
+ if (_this.formGroupByRow[i]) {
10306
+ var allValues = _this.addExistentHistoricData
10307
+ .map(function (item, idx) { return idx === i ? 0 : (parseFloat(item.percentage) || 0); });
10308
+ _this.validatePercentageValid(allValues, _this.formGroupByRow[i]);
10309
+ }
10310
+ });
10231
10311
  this.emitFormValidity();
10232
10312
  };
10233
10313
  HistoricalPixAccountComponent.prototype.rebuildFormGroupMap = function (data) {
@@ -10248,6 +10328,10 @@
10248
10328
  _this.pixKeyType = pixKeyType;
10249
10329
  _this.setPixKeyValidators(true, form);
10250
10330
  _this.setValidatorsAccordingList(data, index, _this.isEditMode);
10331
+ var listValues = data
10332
+ .filter(function (_, i) { return i !== index; })
10333
+ .map(function (row) { return row.percentage ? parseFloat(row.percentage) : 0; });
10334
+ _this.validatePercentageValid(listValues, form);
10251
10335
  });
10252
10336
  this.emitFormValidity();
10253
10337
  };
@@ -10327,15 +10411,368 @@
10327
10411
  this.msgTotalLimitByPercentage = null;
10328
10412
  }
10329
10413
  };
10414
+ HistoricalPixAccountComponent.prototype.formatPercentage = function (value) {
10415
+ if (value == null || value === '' || isNaN(Number(value))) {
10416
+ return '0.00';
10417
+ }
10418
+ return Number(value).toFixed(2);
10419
+ };
10330
10420
  HistoricalPixAccountComponent.prototype.onSyncValue = function (field, index) {
10421
+ var _this = this;
10331
10422
  if (this.formGroupByRow &&
10332
10423
  this.formGroupByRow[index] &&
10333
10424
  this.formGroupByRow[index].get(field)) {
10334
- var value = this.formGroupByRow[index].get(field).value;
10425
+ var control = this.formGroupByRow[index].get(field);
10426
+ var value = control.value;
10335
10427
  this.addExistentHistoricData[index][field] = value;
10428
+ control.markAsDirty();
10429
+ control.markAsTouched();
10430
+ if (field === 'percentage') {
10431
+ var currentList = this.addExistentHistoricData
10432
+ .map(function (item, i) { return i === index ? 0 : (parseFloat(item.percentage) || 0); });
10433
+ this.validatePercentageValid(currentList, this.formGroupByRow[index]);
10434
+ if (!this.isSyncingPercentage) {
10435
+ this.isSyncingPercentage = true;
10436
+ setTimeout(function () {
10437
+ _this.syncPixDataToParentForm();
10438
+ _this.isSyncingPercentage = false;
10439
+ }, 0);
10440
+ }
10441
+ }
10442
+ control.updateValueAndValidity();
10443
+ this.formGroupByRow[index].updateValueAndValidity();
10444
+ this.emitFormValidity();
10336
10445
  }
10446
+ };
10447
+ HistoricalPixAccountComponent.prototype.close = function () {
10448
+ this.visible = false;
10449
+ };
10450
+ HistoricalPixAccountComponent.prototype.getFormattedTelephoneNumber = function (telephoneNumber) {
10451
+ return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
10452
+ };
10453
+ HistoricalPixAccountComponent.prototype.getFormattedCpf = function (cpf) {
10454
+ return FormatUtilsService.getFormattedCpf(cpf);
10455
+ };
10456
+ HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
10457
+ return FormatUtilsService.getFormattedCnpj(cnpj);
10458
+ };
10459
+ HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
10460
+ return FormatUtilsService.getFormattedPercentage(value);
10461
+ };
10462
+ /**
10463
+ * Reseta completamente o estado do formulário e controles
10464
+ */
10465
+ HistoricalPixAccountComponent.prototype.resetFormState = function () {
10466
+ if (this.formGroupByRow) {
10467
+ Object.values(this.formGroupByRow).forEach(function (form) {
10468
+ if (form) {
10469
+ Object.keys(form.controls).forEach(function (controlName) {
10470
+ var control = form.get(controlName);
10471
+ if (control) {
10472
+ control.setErrors(null);
10473
+ control.markAsUntouched();
10474
+ control.markAsPristine();
10475
+ }
10476
+ });
10477
+ form.updateValueAndValidity();
10478
+ }
10479
+ });
10480
+ }
10481
+ if (this.dataListPix) {
10482
+ if (typeof this.dataListPix.closeAllCellEditors === 'function') {
10483
+ try {
10484
+ this.dataListPix.closeAllCellEditors();
10485
+ }
10486
+ catch (e) {
10487
+ console.error('Erro ao tentar fechar cell editors:', e);
10488
+ }
10489
+ }
10490
+ else if (this.dataListPix.editingCell) {
10491
+ this.dataListPix.editingCell = null;
10492
+ }
10493
+ if (this.dataListPix.editing !== undefined) {
10494
+ this.dataListPix.editing = false;
10495
+ }
10496
+ }
10497
+ this.cd.detectChanges();
10498
+ };
10499
+ /**
10500
+ * Formata a chave PIX para exibição baseada no tipo
10501
+ */
10502
+ HistoricalPixAccountComponent.prototype.getFormattedPixKey = function (pixKeyType, pixKey) {
10503
+ if (!pixKey)
10504
+ return '';
10505
+ switch (pixKeyType) {
10506
+ case 'CPF':
10507
+ return FormatUtilsService.getFormattedCpf(pixKey);
10508
+ case 'CNPJ':
10509
+ return FormatUtilsService.getFormattedCnpj(pixKey);
10510
+ case 'TELEPHONE':
10511
+ return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
10512
+ case 'EMAIL':
10513
+ case 'RANDOM_KEY':
10514
+ default:
10515
+ return pixKey;
10516
+ }
10517
+ };
10518
+ /**
10519
+ * Obtém o tipo de chave PIX do item atual
10520
+ */
10521
+ HistoricalPixAccountComponent.prototype.getPixKeyType = function (item) {
10522
+ return item && item.pixKeyType && item.pixKeyType.key || '';
10523
+ };
10524
+ /**
10525
+ * Verifica se um controle está inválido para os campos editáveis
10526
+ */
10527
+ HistoricalPixAccountComponent.prototype.isInvalid = function (index, controlName) {
10528
+ var form = this.formGroupByRow[index];
10529
+ if (!form)
10530
+ return false;
10531
+ var control = form.get(controlName);
10532
+ if (!control)
10533
+ return false;
10534
+ return control.invalid && (control.touched || control.dirty);
10535
+ };
10536
+ /**
10537
+ * Método chamado quando uma célula entra no modo de edição
10538
+ */
10539
+ HistoricalPixAccountComponent.prototype.onCellEditInit = function (event) {
10540
+ var rowIndex = this.addExistentHistoricData.findIndex(function (item) { return item === event.data; });
10541
+ if (rowIndex < 0)
10542
+ return;
10543
+ var form = this.formGroupByRow[rowIndex];
10544
+ if (form && form.get('pixKey')) {
10545
+ var pixKeyControl = form.get('pixKey');
10546
+ var currentValue = this.addExistentHistoricData[rowIndex].pixKey;
10547
+ pixKeyControl.setValue(currentValue);
10548
+ }
10549
+ };
10550
+ /**
10551
+ * Recupera o FormControl específico para um campo em determinado índice
10552
+ */
10553
+ HistoricalPixAccountComponent.prototype.getFormControl = function (index, controlName) {
10554
+ var form = this.formGroupByRow[index];
10555
+ if (!form)
10556
+ return null;
10557
+ return form.get(controlName);
10558
+ };
10559
+ /**
10560
+ * Valida campos de documento (CPF, CNPJ) quando o usuário termina de digitar no form de edição
10561
+ */
10562
+ HistoricalPixAccountComponent.prototype.validateDocumentField = function (index, fieldType) {
10563
+ var _a;
10564
+ var form = this.formGroupByRow[index];
10565
+ var item = this.addExistentHistoricData[index];
10566
+ if (!form || !item)
10567
+ return;
10568
+ var pixKeyControl = form.get('pixKey');
10569
+ if (!pixKeyControl)
10570
+ return;
10571
+ var value = item.pixKey;
10572
+ pixKeyControl.setValue(value);
10573
+ if (fieldType === 'CPF' || fieldType === 'CNPJ' || fieldType === 'TELEPHONE') {
10574
+ value = value ? value.toString().replace(/\D/g, '') : '';
10575
+ item.pixKey = value;
10576
+ pixKeyControl.setValue(value);
10577
+ }
10578
+ if (!value || value.toString().trim() === '') {
10579
+ pixKeyControl.setErrors({ required: true });
10580
+ pixKeyControl.markAsTouched();
10581
+ form.updateValueAndValidity();
10582
+ this.emitFormValidity();
10583
+ return;
10584
+ }
10585
+ var cleanValue = value;
10586
+ if (fieldType === 'CPF' || fieldType === 'CNPJ') {
10587
+ cleanValue = value.toString().replace(/\D/g, '');
10588
+ item.pixKey = cleanValue;
10589
+ pixKeyControl.setValue(cleanValue);
10590
+ }
10591
+ var isValid = false;
10592
+ switch (fieldType) {
10593
+ case 'CPF':
10594
+ isValid = cleanValue.length === 11 && GenericValidator.isValidCpf({ value: cleanValue }) === null;
10595
+ break;
10596
+ case 'CNPJ':
10597
+ isValid = cleanValue.length === 14 && GenericValidator.isValidCnpj({ value: cleanValue }) === null;
10598
+ break;
10599
+ case 'TELEPHONE':
10600
+ cleanValue = value.toString().replace(/\D/g, '');
10601
+ isValid = GenericValidator.isValidPhoneNumber({ value: cleanValue }) === null;
10602
+ break;
10603
+ case 'EMAIL':
10604
+ isValid = GenericValidator.isValidEmail({ value: value }) === null;
10605
+ break;
10606
+ case 'RANDOM_KEY':
10607
+ isValid = true;
10608
+ break;
10609
+ default:
10610
+ isValid = true;
10611
+ }
10612
+ pixKeyControl.markAsTouched();
10613
+ if (isValid) {
10614
+ pixKeyControl.setErrors(null);
10615
+ }
10616
+ else {
10617
+ var errorType = this.getErrorTypeForField(fieldType);
10618
+ pixKeyControl.setErrors((_a = {}, _a[errorType] = true, _a));
10619
+ }
10620
+ form.updateValueAndValidity();
10337
10621
  this.emitFormValidity();
10622
+ this.cd.detectChanges();
10623
+ };
10624
+ /**
10625
+ * Obtém o tipo de erro para cada tipo de campo editável
10626
+ */
10627
+ HistoricalPixAccountComponent.prototype.getErrorTypeForField = function (fieldType) {
10628
+ switch (fieldType) {
10629
+ case 'CPF': return 'invalidCpf';
10630
+ case 'CNPJ': return 'invalidCnpj';
10631
+ case 'TELEPHONE': return 'invalidPhoneNumber';
10632
+ case 'EMAIL': return 'invalidEmail';
10633
+ default: return 'required';
10634
+ }
10635
+ };
10636
+ /**
10637
+ * Retorna a mensagem de erro apropriada para um campo
10638
+ */
10639
+ HistoricalPixAccountComponent.prototype.getErrorMessage = function (index, controlName) {
10640
+ var form = this.formGroupByRow[index];
10641
+ if (!form)
10642
+ return '';
10643
+ var control = form.get(controlName);
10644
+ if (!control || !control.errors)
10645
+ return '';
10646
+ var fieldValue = control.value || '';
10647
+ if (control.hasError('required')) {
10648
+ return this.translateService.instant('hcm.payroll.required');
10649
+ }
10650
+ if (control.hasError('invalidCpf')) {
10651
+ return this.translateService.instant('hcm.payroll.employees_addition_cpf_error');
10652
+ }
10653
+ else if (control.hasError('invalidCnpj')) {
10654
+ return this.translateService.instant('hcm.payroll.employees_addition_cnpj_error');
10655
+ }
10656
+ else if (control.hasError('invalidEmail')) {
10657
+ return this.translateService.instant('hcm.payroll.employees_addition_email_invalid');
10658
+ }
10659
+ else if (control.hasError('invalidPhoneNumber')) {
10660
+ return this.translateService.instant('hcm.payroll.employees_addition_invalid_phone_number', { value: fieldValue });
10661
+ }
10662
+ return '';
10663
+ };
10664
+ /**
10665
+ * Tratamento ao perder o foco em campos de documento
10666
+ */
10667
+ HistoricalPixAccountComponent.prototype.onDocumentBlur = function (index) {
10668
+ var form = this.formGroupByRow[index];
10669
+ var item = this.addExistentHistoricData[index];
10670
+ if (!form || !item)
10671
+ return;
10672
+ var pixKeyControl = form.get('pixKey');
10673
+ var pixKeyTypeControl = form.get('pixKeyType');
10674
+ if (!pixKeyControl || !pixKeyTypeControl.value)
10675
+ return;
10676
+ var pixKeyType = pixKeyTypeControl.value.key;
10677
+ var value = item.pixKey;
10678
+ if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ' || pixKeyType === 'TELEPHONE') {
10679
+ value = value ? value.toString().replace(/\D/g, '') : '';
10680
+ item.pixKey = value;
10681
+ }
10682
+ pixKeyControl.setValue(value);
10683
+ this.validateDocumentField(index, pixKeyType);
10684
+ if (value) {
10685
+ if (pixKeyType === 'CPF') {
10686
+ item.pixKeyFormatted = FormatUtilsService.getFormattedCpf(value);
10687
+ }
10688
+ else if (pixKeyType === 'CNPJ') {
10689
+ item.pixKeyFormatted = FormatUtilsService.getFormattedCnpj(value);
10690
+ }
10691
+ else if (pixKeyType === 'TELEPHONE') {
10692
+ item.pixKeyFormatted = FormatUtilsService.getFormattedTelephoneNumber(value);
10693
+ }
10694
+ else {
10695
+ item.pixKeyFormatted = value;
10696
+ }
10697
+ }
10698
+ this.finishEditing();
10699
+ };
10700
+ HistoricalPixAccountComponent.prototype.finishEditing = function () {
10701
+ this.syncAllModelToForm();
10702
+ this.cd.detectChanges();
10338
10703
  };
10704
+ HistoricalPixAccountComponent.prototype.clearErrorsTemporarily = function (rowIndex) {
10705
+ var form = this.formGroupByRow[rowIndex];
10706
+ if (form && form.get('pixKey')) {
10707
+ var currentValue = form.get('pixKey').value;
10708
+ form.get('pixKey').setErrors(null);
10709
+ form.get('pixKey').setValue(currentValue);
10710
+ }
10711
+ };
10712
+ HistoricalPixAccountComponent.prototype.closeEditModeManually = function () {
10713
+ var _this = this;
10714
+ setTimeout(function () {
10715
+ if (_this.dataListPix) {
10716
+ if (typeof _this.dataListPix.closeAllCellEditors === 'function') {
10717
+ _this.dataListPix.closeAllCellEditors();
10718
+ }
10719
+ else if (_this.dataListPix.editingCell) {
10720
+ _this.dataListPix.editingCell = null;
10721
+ }
10722
+ _this.cd.detectChanges();
10723
+ }
10724
+ }, 100);
10725
+ };
10726
+ HistoricalPixAccountComponent.prototype.syncAllModelToForm = function () {
10727
+ var _this = this;
10728
+ if (!this.addExistentHistoricData || !this.formGroupByRow)
10729
+ return;
10730
+ this.addExistentHistoricData.forEach(function (item, index) {
10731
+ var form = _this.formGroupByRow[index];
10732
+ if (form) {
10733
+ Object.keys(form.controls).forEach(function (controlName) {
10734
+ var control = form.get(controlName);
10735
+ if (control && item[controlName] !== undefined) {
10736
+ control.setValue(item[controlName]);
10737
+ }
10738
+ });
10739
+ var pixKeyTypeControl = form.get('pixKeyType');
10740
+ if (pixKeyTypeControl.value) {
10741
+ _this.validateDocumentField(index, pixKeyTypeControl.value.key);
10742
+ }
10743
+ }
10744
+ });
10745
+ };
10746
+ /**
10747
+ * Método para forçar o fechamento de todas as células em edição
10748
+ */
10749
+ HistoricalPixAccountComponent.prototype.forceCloseAllCellEditors = function () {
10750
+ this.finishEditing();
10751
+ this.syncAllModelToForm();
10752
+ };
10753
+ HistoricalPixAccountComponent.prototype.isPixKeyType = function (item, type) {
10754
+ return item && item.pixKeyType && item.pixKeyType.key === type;
10755
+ };
10756
+ HistoricalPixAccountComponent.prototype.getPixKey = function (rowData) {
10757
+ return rowData ? rowData.pixKey : null;
10758
+ };
10759
+ HistoricalPixAccountComponent.prototype.setPixKey = function (rowData, value) {
10760
+ if (rowData) {
10761
+ rowData.pixKey = value;
10762
+ }
10763
+ };
10764
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isTotalPercentage100", {
10765
+ get: function () {
10766
+ if (!this.addExistentHistoricData || this.addExistentHistoricData.length === 0) {
10767
+ return false;
10768
+ }
10769
+ var totalPercentage = this.addExistentHistoricData
10770
+ .reduce(function (sum, item) { return sum + (parseFloat(item.percentage) || 0); }, 0);
10771
+ return totalPercentage >= 100;
10772
+ },
10773
+ enumerable: true,
10774
+ configurable: true
10775
+ });
10339
10776
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "scopedActions", {
10340
10777
  get: function () {
10341
10778
  return this.actions.bind(this);
@@ -10345,7 +10782,8 @@
10345
10782
  });
10346
10783
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "recordsMessage", {
10347
10784
  get: function () {
10348
- return (this.totalRecords || 0) + " " + (this.totalRecords === 1 ? this.translateService.instant("hcm.payroll.admission_register") : this.translateService.instant("hcm.payroll.admission_registers"));
10785
+ return (this.totalRecords || 0) + " " + (this.totalRecords === 1 ?
10786
+ this.translateService.instant("hcm.payroll.admission_register") : this.translateService.instant("hcm.payroll.admission_registers"));
10349
10787
  },
10350
10788
  enumerable: true,
10351
10789
  configurable: true
@@ -10420,21 +10858,6 @@
10420
10858
  enumerable: true,
10421
10859
  configurable: true
10422
10860
  });
10423
- HistoricalPixAccountComponent.prototype.close = function () {
10424
- this.visible = false;
10425
- };
10426
- HistoricalPixAccountComponent.prototype.getFormattedTelephoneNumber = function (telephoneNumber) {
10427
- return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
10428
- };
10429
- HistoricalPixAccountComponent.prototype.getFormattedCpf = function (cpf) {
10430
- return FormatUtilsService.getFormattedCpf(cpf);
10431
- };
10432
- HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
10433
- return FormatUtilsService.getFormattedCnpj(cnpj);
10434
- };
10435
- HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
10436
- return FormatUtilsService.getFormattedPercentage(value);
10437
- };
10438
10861
  Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
10439
10862
  get: function () {
10440
10863
  return (this.permission["incluir"]);
@@ -10530,6 +10953,15 @@
10530
10953
  __decorate([
10531
10954
  core.Input()
10532
10955
  ], HistoricalPixAccountComponent.prototype, "isEditModeForSave", void 0);
10956
+ __decorate([
10957
+ core.Input()
10958
+ ], HistoricalPixAccountComponent.prototype, "showField", void 0);
10959
+ __decorate([
10960
+ core.Input()
10961
+ ], HistoricalPixAccountComponent.prototype, "hideBtnAddForViewMode", void 0);
10962
+ __decorate([
10963
+ core.Input()
10964
+ ], HistoricalPixAccountComponent.prototype, "showButtonView", void 0);
10533
10965
  __decorate([
10534
10966
  core.Output()
10535
10967
  ], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
@@ -10564,8 +10996,8 @@
10564
10996
  core.Component({
10565
10997
  // tslint:disable-next-line:component-selector
10566
10998
  selector: "c-historical-pix-account",
10567
- template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div *ngIf=\"!showEditMode || !(hideFields | async)\" class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col *ngIf=\"showButtonView\" [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th *ngIf=\"showButtonView\" id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length && showButtonView\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"!isViewMode && actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"!isViewMode && actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n\n<!-- Template exlusivo para edi\u00E7\u00E3o de pix via modal-->\n<div *ngIf=\"showEditMode && (hideFields | async)\" class=\"ui-g-12\">\n <!-- Bot\u00E3o Adicionar -->\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n id=\"btn-save\"\n label=\"{{ 'hcm.payroll.historical_pix_account_add' | translate}}\"\n priority=\"primary\"\n (onClick)=\"addPix()\">\n </s-button>\n </div>\n </div>\n\n <!-- Tabela -->\n <p-table #dataListPix sortField=\"percentage\"\n [columns]=\"cols\"\n [value]=\"addExistentHistoricData\"\n [pageLinks]=\"3\"\n [paginator]=\"true\"\n [responsive]=\"true\"\n [rows]=\"10\"\n [resetPageOnSort]=\"false\"\n [tableStyle]=\"{'margin-top': '2rem'}\">\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of cols\">\n {{ col.label }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item let-rowIndex=\"rowIndex\">\n <ng-container *ngIf=\"formGroupByRow[rowIndex]\" [formGroup]=\"formGroupByRow[rowIndex]\">\n <tr>\n <!-- Tipo de Chave -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.pixKeyType\" pEditableColumnField=\"pixKeyType\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <div style=\"width: 100%; position: relative;\">\n <p-autoComplete\n [suggestions]=\"suggestions\"\n (completeMethod)=\"filterPixKeyType($event)\"\n formControlName=\"pixKeyType\"\n [dropdown]=\"true\"\n (onSelect)=\"onPixKeyTypeChange($event, rowIndex)\"\n (onClear)=\"onPixKeyTypeClear(rowIndex)\"\n (ngModelChange)=\"onSyncValue('pixKeyType', rowIndex)\"\n field=\"value\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n appendTo=\"body\"\n [panelStyle]=\"{ maxWidth: '300px', width: '100%' }\"\n [inputStyle]=\"{ width: '100%' }\"\n ></p-autoComplete>\n\n <s-control-errors [control]=\"formGroupByRow[rowIndex]?.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ item.pixKeyType?.value }}\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Chave Pix -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.pixKey\" pEditableColumnField=\"pixKey\"\n [ngClass]=\"{'required': item.pixKeyType.key !== 'BANK_ACCOUNT',\n 'disabled': item.pixKeyType && item.pixKeyType.key === 'BANK_ACCOUNT'\n }\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <ng-container [ngSwitch]=\"item.pixKeyType.key\">\n <input *ngSwitchCase=\"'TELEPHONE'\"\n only-number\n pInputText\n type=\"text\"\n formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n maxlength=\"15\"\n placeholder=\"(__) ____-____\" />\n\n <input *ngSwitchCase=\"'CPF'\"\n type=\"text\"\n pInputText\n formControlName=\"pixKey\"\n maxlength=\"14\"\n placeholder=\"___.___.___-__\"\n (input)=\"onPixKeyInput($event, rowIndex)\"\n (blur)=\"onBlurPixCpfAndCnpj(rowIndex)\"\n (keyup)=\"cpfMask($event)\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\" />\n\n <input *ngSwitchCase=\"'CNPJ'\"\n type=\"text\"\n pInputText\n formControlName=\"pixKey\"\n maxlength=\"18\"\n placeholder=\"___.___.___/____-__\"\n (input)=\"onPixKeyInput($event, rowIndex)\"\n (blur)=\"onBlurPixCpfAndCnpj(rowIndex)\"\n (keyup)=\"cnpjMask($event)\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\" />\n\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText\n type=\"email\"\n formControlName=\"pixKey\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n placeholder=\"{{ 'hcm.payroll.employees_addition_email' | translate }}\" />\n\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\"\n pInputText\n formControlName=\"pixKey\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n [disabled]=\"true\" />\n\n <input *ngSwitchDefault\n pInputText\n type=\"text\"\n formControlName=\"pixKey\"\n (ngModelChange)=\"onSyncValue('pixKey', rowIndex)\"\n maxlength=\"100\" />\n </ng-container>\n\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\"\n [control]=\"formGroupByRow[rowIndex]?.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: formGroupByRow[rowIndex]?.get('pixKey').value },\n invalidEmail: 'hcm.payroll.employees_addition_email_invalid' | translate,\n cpfNotValid: 'hcm.payroll.employees_addition_cpf_error' | translate,\n cnpjNotValid: 'hcm.payroll.employees_addition_cnpj_error' | translate\n }\">\n </s-control-errors>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ getFormattedPixKey(item.pixKeyType?.key, item.pixKey) }}\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Percentual -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.percentage\" pEditableColumnField=\"percentage\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText type=\"number\"\n formControlName=\"percentage\"\n (ngModelChange)=\"onSyncValue('percentage', rowIndex)\"\n >\n <s-control-errors\n [control]=\"formGroupByRow[rowIndex]?.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ item.percentage?.toFixed(2).replace('.', ',') }}%\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Bot\u00E3o de excluir -->\n <td>\n <s-button\n id=\"btn-delete\"\n label=\"{{ 'hcm.payroll.delete' | translate }}\"\n priority=\"default\"\n (onClick)=\"deletePix(rowIndex)\">\n </s-button>\n </td>\n </tr>\n </ng-container>\n </ng-template>\n </p-table>\n</div>\n",
10568
- 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}"]
10999
+ template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n [showField]=\"showFields\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</div>\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode && !hideBtnAddForViewMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div *ngIf=\"showFields || !showEditMode || !(hideFields | async)\" class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col *ngIf=\"showButtonView\" [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th *ngIf=\"showButtonView\" id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length && showButtonView\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"!isViewMode && actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"!isViewMode && actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n\n<!-- Template exlusivo para edi\u00E7\u00E3o de pix via modal-->\n<div *ngIf=\"!withSideBar && showEditMode && (hideFields | async)\" class=\"ui-g-12\">\n <!-- Bot\u00E3o Adicionar -->\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n id=\"btn-save\"\n label=\"{{ 'hcm.payroll.historical_pix_account_add' | translate}}\"\n priority=\"primary\"\n [disabled]=\"isTotalPercentage100\"\n [pTooltip]=\"isTotalPercentage100 ? ('hcm.payroll.historical_pix_account_msg_limit_total_by_percentage' | translate) : ''\"\n tooltipPosition=\"top\"\n (onClick)=\"addPix()\">\n </s-button>\n </div>\n </div>\n\n <!-- Tabela -->\n <p-table #dataListPix sortField=\"percentage\"\n [columns]=\"cols\"\n [value]=\"addExistentHistoricData\"\n [pageLinks]=\"3\"\n [paginator]=\"true\"\n [responsive]=\"true\"\n [rows]=\"10\"\n [resetPageOnSort]=\"false\"\n [tableStyle]=\"{'margin-top': '2rem'}\"\n [customSort]=\"true\"\n (onEditInit)=\"onCellEditInit($event)\">\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of cols\">\n {{ col.label }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item let-rowIndex=\"rowIndex\">\n <ng-container *ngIf=\"formGroupByRow[rowIndex]\" [formGroup]=\"formGroupByRow[rowIndex]\">\n <tr>\n <!-- Tipo de Chave -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.pixKeyType\" pEditableColumnField=\"pixKeyType\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <div style=\"width: 100%; position: relative;\">\n <p-autoComplete\n [suggestions]=\"suggestions\"\n (completeMethod)=\"filterPixKeyType($event)\"\n formControlName=\"pixKeyType\"\n [dropdown]=\"true\"\n (onSelect)=\"onPixKeyTypeChange($event, rowIndex)\"\n (onClear)=\"onPixKeyTypeClear(rowIndex)\"\n (ngModelChange)=\"onSyncValue('pixKeyType', rowIndex)\"\n field=\"value\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n appendTo=\"body\"\n [panelStyle]=\"{ maxWidth: '300px', width: '100%' }\"\n [inputStyle]=\"{ width: '100%' }\"\n ></p-autoComplete>\n\n <s-control-errors [control]=\"formGroupByRow[rowIndex]?.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ item.pixKeyType?.value }}\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Chave Pix -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.pixKey\" pEditableColumnField=\"pixKey\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <div class=\"ui-fluid\">\n <!-- \u00C1rea de inputs din\u00E2micos -->\n <div [ngSwitch]=\"getPixKeyType(item)\" class=\"ui-fluid\">\n <!-- CPF -->\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n mask=\"999.999.999-99\"\n unmask=\"true\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n styleClass=\"full-width-input\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (onComplete)=\"validateDocumentField(rowIndex, 'CPF')\"\n (onBlur)=\"onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n </p-inputMask>\n\n <!-- CNPJ -->\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n mask=\"99.999.999/9999-99\"\n unmask=\"true\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n styleClass=\"full-width-input\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (onComplete)=\"validateDocumentField(rowIndex, 'CNPJ')\"\n (onBlur)=\"onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n </p-inputMask>\n\n <!-- TELEPHONE -->\n <p-inputMask *ngSwitchCase=\"'TELEPHONE'\"\n mask=\"(99) 99999-9999\"\n unmask=\"true\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n styleClass=\"full-width-input\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (onComplete)=\"validateDocumentField(rowIndex, 'TELEPHONE')\"\n (onBlur)=\"onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n </p-inputMask>\n\n <!-- EMAIL -->\n <input *ngSwitchCase=\"'EMAIL'\"\n type=\"email\"\n pInputText\n class=\"p-inputtext p-component full-width-input\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (blur)=\"validateDocumentField(rowIndex, 'EMAIL'); onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n\n <!-- RANDOM_KEY -->\n <input *ngSwitchCase=\"'RANDOM_KEY'\"\n type=\"text\"\n pInputText\n class=\"p-inputtext p-component full-width-input\"\n [(ngModel)]=\"item.pixKey\"\n [ngModelOptions]=\"{standalone: true}\"\n [ngClass]=\"{'ng-invalid': isInvalid(rowIndex, 'pixKey')}\"\n (blur)=\"validateDocumentField(rowIndex, 'RANDOM_KEY'); onDocumentBlur(rowIndex)\"\n (keydown.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.tab)=\"onDocumentBlur(rowIndex)\"\n (keydown.enter)=\"onDocumentBlur(rowIndex)\"\n (keydown.esc)=\"onDocumentBlur(rowIndex)\"\n (keydown.shift.esc)=\"onDocumentBlur(rowIndex)\">\n\n <!-- BANK_ACCOUNT -->\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\"\n type=\"text\"\n pInputText\n class=\"p-inputtext p-component full-width-input\"\n [disabled]=\"true\">\n </div>\n\n <!-- \u00DAnico s-control-errors para todos os tipos -->\n <small *ngIf=\"isInvalid(rowIndex, 'pixKey')\" class=\"p-error error-text\">\n {{getErrorMessage(rowIndex, 'pixKey')}}\n </small>\n </div>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{getFormattedPixKey(getPixKeyType(item), item.pixKey)}}\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Percentual -->\n <td class=\"ui-md-6 ui-sm-12 required\"\n [pEditableColumn]=\"item.percentage\" pEditableColumnField=\"percentage\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText type=\"number\"\n formControlName=\"percentage\"\n (ngModelChange)=\"onSyncValue('percentage', rowIndex)\"\n >\n <s-control-errors\n [control]=\"formGroupByRow[rowIndex]?.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ formatPercentage(item.percentage) }}%\n </ng-template>\n </p-cellEditor>\n </td>\n\n <!-- Bot\u00E3o de excluir -->\n <td>\n <s-button\n id=\"btn-delete\"\n label=\"{{ 'hcm.payroll.delete' | translate }}\"\n priority=\"default\"\n (onClick)=\"deletePix(rowIndex)\">\n </s-button>\n </td>\n </tr>\n </ng-container>\n </ng-template>\n </p-table>\n</div>\n",
11000
+ styles: [".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}:host ::ng-deep .p-cell-editing{padding:0!important}:host ::ng-deep .full-width-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep .p-inputtext{width:100%;min-height:34px;padding:6px 12px}:host ::ng-deep .p-inputmask{width:100%;display:block}:host ::ng-deep .p-inputmask .p-inputmask-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep p-celleditor{width:100%}:host ::ng-deep p-celleditor .ui-fluid{width:100%;display:block;padding:0}:host ::ng-deep .p-error{margin-top:4px;font-size:12px}:host ::ng-deep .error-text{color:#f44336;display:block;margin-top:4px;font-size:.875em}"]
10569
11001
  })
10570
11002
  ], HistoricalPixAccountComponent);
10571
11003
  return HistoricalPixAccountComponent;
@@ -10579,6 +11011,7 @@
10579
11011
  _this.sharedStateService = sharedStateService;
10580
11012
  _this.withSideBar = true;
10581
11013
  _this.isEditMode = false;
11014
+ _this.showField = false;
10582
11015
  _this.visibleChange = new core.EventEmitter();
10583
11016
  _this.pixAccountItemToList = new core.EventEmitter();
10584
11017
  _this.ngUnsubscribe = new rxjs.Subject();
@@ -10665,8 +11098,6 @@
10665
11098
  this.visible = false;
10666
11099
  };
10667
11100
  HistoricalPixAccountFormComponent.prototype.addItem = function () {
10668
- this.pixAccountFormGroup.updateValueAndValidity();
10669
- verifyValidationsForm.call(this.pixAccountFormGroup);
10670
11101
  if (this.pixAccountFormGroup.valid) {
10671
11102
  if (this.employeeId) {
10672
11103
  this.pixAccountFormGroup.get("employee").setValue({
@@ -10765,6 +11196,9 @@
10765
11196
  __decorate([
10766
11197
  core.Input()
10767
11198
  ], HistoricalPixAccountFormComponent.prototype, "isEditMode", void 0);
11199
+ __decorate([
11200
+ core.Input()
11201
+ ], HistoricalPixAccountFormComponent.prototype, "showField", void 0);
10768
11202
  __decorate([
10769
11203
  core.Output()
10770
11204
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -10792,8 +11226,8 @@
10792
11226
  HistoricalPixAccountFormComponent = __decorate([
10793
11227
  core.Component({
10794
11228
  selector: "pix-account",
10795
- template: "<div id=\"main\">\n <form *ngIf=\"!(hideFields | async)\" [formGroup]=\"pixAccountFormGroup\" autocomplete=\"off\">\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <!-- Tipo de chave -->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label>{{'hcm.payroll.employees_addition_pix_key_type'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]=\"true\" server=\"payroll\"\n enumeration=\"PixKeyType\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n name=\"pixKeyType\" [form]=\"pixAccountFormGroup\"\n (onSelect)=\"onChangePixKeyType($event)\"\n (onClear)=\"onClearPixKeyType()\"\n id=\"ta-pixKeyType\"></input-rest-auto-complete-enum>\n <s-control-errors [control]=\"pixAccountFormGroup.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Chave Pix-->\n <div class=\"ui-md-6 ui-sm-12\" [ngClass]=\"{'required': pixKeyType !== 'BANK_ACCOUNT'}\">\n <label>{{'hcm.payroll.employees_addition_pix_key' | translate}}</label>\n <ng-container [ngSwitch]=\"pixKeyType\">\n <input *ngSwitchCase=\"'TELEPHONE'\" only-number\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\" maxlength=\"15\"\n placeholder=\"(__) ____-____\">\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"___.___.___-__\"\n mask=\"999.999.999-99\" [unmask]=\"true\"></p-inputMask>\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"__.___.___/____-__\"\n mask=\"99.999.999/9999-99\" [unmask]=\"true\"></p-inputMask>\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"{{'hcm.payroll.employees_addition_email'|translate}}\"/>\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\" disabled\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n <input *ngSwitchDefault\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\" maxlength=\"100\" />\n </ng-container>\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\" id=\"er-pix-key\"\n [control]=\"pixAccountFormGroup.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: pixAccountFormGroup.get('pixKey').value },\n invalidEmail: 'hcm.payroll.employees_addition_email_invalid' | translate,\n cpfNotValid: 'hcm.payroll.employees_addition_cpf_error' | translate,\n cnpjNotValid: 'hcm.payroll.employees_addition_cnpj_error' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Percentual-->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label id=\"lb-percentage\"\n for=\"ff-percentage\">{{ 'hcm.payroll.historical_bank_account_label_percentage' | translate }}</label>\n <div class=\"ui-inputgroup\">\n <span class=\"ui-inputgroup-addon\">%</span>\n <input pInputText id=\"ff-percentage\" name=\"percentage\"\n formControlName=\"percentage\"\n currencyMask\n [options]=\"optionsPercentage\"\n [placeholder]=\"percentagePlaceholder\"/>\n </div>\n <s-control-errors [control]=\"pixAccountFormGroup.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <p-fieldset\n legend=\"{{ 'hcm.payroll.custom_fields' | translate }}\"\n [attr.data-hidden]=\"!customFields || !customFields.fields.length\"\n >\n <s-custom-fields\n domain=\"hcm\"\n service=\"{{customService}}\"\n entity=\"{{customEntity}}\"\n formControlName=\"customFields\"\n [invalidErrorLabel]=\"'hcm.payroll.employees_invalid_field' | translate\"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]=\"withSideBar ? 'footer' : 'footer-s-border'\">\n <div class=\"form-group\">\n <s-button id=\"btn-save\" label=\"{{ labelBtnAdd | translate}}\" priority=\"primary\"\n (onClick)=\"addItem()\" *ngIf=\"visibleBtnSave && !this.isView\"></s-button>\n <s-button *ngIf=\"withSideBar\" id=\"btn-close\" label=\"{{'hcm.payroll.cancel'|translate}}\" priority=\"secondary\"\n priority=\"link\" (onClick)=\"close()\"></s-button>\n </div>\n </div>\n</div>\n",
10796
- 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}"]
11229
+ template: "<div id=\"main\">\n <form *ngIf=\"showField || !(hideFields | async)\" [formGroup]=\"pixAccountFormGroup\" autocomplete=\"off\">\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <!-- Tipo de chave -->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label>{{'hcm.payroll.employees_addition_pix_key_type'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]=\"true\" server=\"payroll\"\n enumeration=\"PixKeyType\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n name=\"pixKeyType\" [form]=\"pixAccountFormGroup\"\n (onSelect)=\"onChangePixKeyType($event)\"\n (onClear)=\"onClearPixKeyType()\"\n id=\"ta-pixKeyType\"></input-rest-auto-complete-enum>\n <s-control-errors [control]=\"pixAccountFormGroup.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Chave Pix-->\n <div class=\"ui-md-6 ui-sm-12\" [ngClass]=\"{'required': pixKeyType !== 'BANK_ACCOUNT'}\">\n <label>{{'hcm.payroll.employees_addition_pix_key' | translate}}</label>\n <ng-container [ngSwitch]=\"pixKeyType\">\n <input *ngSwitchCase=\"'TELEPHONE'\" only-number\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\" maxlength=\"15\"\n placeholder=\"(__) ____-____\">\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"___.___.___-__\"\n mask=\"999.999.999-99\" [unmask]=\"true\"></p-inputMask>\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"__.___.___/____-__\"\n mask=\"99.999.999/9999-99\" [unmask]=\"true\"></p-inputMask>\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"{{'hcm.payroll.employees_addition_email'|translate}}\"/>\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\" disabled\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n <input *ngSwitchDefault\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\" maxlength=\"100\" />\n </ng-container>\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\" id=\"er-pix-key\"\n [control]=\"pixAccountFormGroup.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: pixAccountFormGroup.get('pixKey').value },\n invalidEmail: 'hcm.payroll.employees_addition_email_invalid' | translate,\n cpfNotValid: 'hcm.payroll.employees_addition_cpf_error' | translate,\n cnpjNotValid: 'hcm.payroll.employees_addition_cnpj_error' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Percentual-->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label id=\"lb-percentage\"\n for=\"ff-percentage\">{{ 'hcm.payroll.historical_bank_account_label_percentage' | translate }}</label>\n <div class=\"ui-inputgroup\">\n <span class=\"ui-inputgroup-addon\">%</span>\n <input pInputText id=\"ff-percentage\" name=\"percentage\"\n formControlName=\"percentage\"\n currencyMask\n [options]=\"optionsPercentage\"\n [placeholder]=\"percentagePlaceholder\"/>\n </div>\n <s-control-errors [control]=\"pixAccountFormGroup.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <p-fieldset\n legend=\"{{ 'hcm.payroll.custom_fields' | translate }}\"\n [attr.data-hidden]=\"!customFields || !customFields.fields.length\"\n >\n <s-custom-fields\n domain=\"hcm\"\n service=\"{{customService}}\"\n entity=\"{{customEntity}}\"\n formControlName=\"customFields\"\n [invalidErrorLabel]=\"'hcm.payroll.employees_invalid_field' | translate\"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]=\"withSideBar ? 'footer' : 'footer-s-border'\">\n <div class=\"form-group\">\n <s-button id=\"btn-save\" label=\"{{ labelBtnAdd | translate}}\" priority=\"primary\"\n (onClick)=\"addItem()\" *ngIf=\"visibleBtnSave && !this.isView\"></s-button>\n <s-button *ngIf=\"withSideBar\" id=\"btn-close\" label=\"{{'hcm.payroll.cancel'|translate}}\" priority=\"secondary\"\n priority=\"link\" (onClick)=\"close()\"></s-button>\n </div>\n </div>\n</div>\n",
11230
+ styles: [".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}:host ::ng-deep .p-cell-editing{padding:0!important}:host ::ng-deep .full-width-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep .p-inputtext{width:100%;min-height:34px;padding:6px 12px}:host ::ng-deep .p-inputmask{width:100%;display:block}:host ::ng-deep .p-inputmask .p-inputmask-input{width:100%!important;min-height:34px!important;padding:6px 12px!important}:host ::ng-deep p-celleditor{width:100%}:host ::ng-deep p-celleditor .ui-fluid{width:100%;display:block;padding:0}:host ::ng-deep .p-error{margin-top:4px;font-size:12px}:host ::ng-deep .error-text{color:#f44336;display:block;margin-top:4px;font-size:.875em}"]
10797
11231
  })
10798
11232
  ], HistoricalPixAccountFormComponent);
10799
11233
  return HistoricalPixAccountFormComponent;
@@ -10883,10 +11317,13 @@
10883
11317
  this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10884
11318
  this.keyPayload = "historicalEmployeePix";
10885
11319
  this.withSidebar = true;
11320
+ this.showActionsButtonOnAdd = false;
10886
11321
  this.isOnlyView = new core.EventEmitter();
10887
11322
  this.isOnlyEdit = new core.EventEmitter();
10888
11323
  this.enableView = new core.EventEmitter();
10889
11324
  this.isEditJudicialDependentPix = new core.EventEmitter();
11325
+ this.isHideBtnAddForViewMode = new core.EventEmitter();
11326
+ this.isShowActionsButton = new core.EventEmitter();
10890
11327
  this.ngUnsubscribe = new rxjs.Subject();
10891
11328
  this.loading = true;
10892
11329
  this.columns = [
@@ -10927,16 +11364,21 @@
10927
11364
  command: function () {
10928
11365
  if (_this.isAllowToViewHistorical) {
10929
11366
  _this.sharedStateService.setHideField(true);
10930
- _this.sharedStateService.setShowButton(false);
11367
+ _this.isShowActionsButton.emit(false);
10931
11368
  _this.sharedStateService.setShowEditMode(false);
10932
11369
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10933
11370
  if (_this.withSidebar) {
10934
11371
  _this.isOnlyView.emit(true);
11372
+ _this.isOnlyEdit.emit(false);
11373
+ _this.isHideBtnAddForViewMode.emit(true);
11374
+ _this.sharedStateService.setHideBtnAddForViewMode(true);
11375
+ _this.sharedStateService.setActiveHideOptionsOnView(true);
10935
11376
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10936
11377
  relativeTo: _this.activatedRoute,
10937
11378
  });
10938
11379
  }
10939
11380
  else {
11381
+ _this.sharedStateService.setActiveHideOptionsOnView(true);
10940
11382
  _this.sharedStateService.setSaveButton(false);
10941
11383
  _this.enableView.emit(dateChange);
10942
11384
  }
@@ -10951,15 +11393,21 @@
10951
11393
  command: function () {
10952
11394
  if (_this.isAllowToEditHistorical) {
10953
11395
  _this.sharedStateService.setHideField(true);
10954
- _this.sharedStateService.setShowButton(false);
11396
+ _this.isShowActionsButton.emit(true);
10955
11397
  _this.sharedStateService.setShowEditMode(true);
10956
11398
  var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10957
11399
  if (_this.withSidebar) {
11400
+ _this.isOnlyView.emit(false);
11401
+ _this.isOnlyEdit.emit(true);
11402
+ _this.isHideBtnAddForViewMode.emit(false);
11403
+ _this.sharedStateService.setHideBtnAddForViewMode(false);
11404
+ _this.sharedStateService.setActiveHideOptionsOnView(false);
10958
11405
  _this.router.navigate(["historical-pix-account/" + dateChange], {
10959
11406
  relativeTo: _this.activatedRoute,
10960
11407
  });
10961
11408
  }
10962
11409
  else {
11410
+ _this.sharedStateService.setActiveHideOptionsOnView(false);
10963
11411
  setTimeout(function () {
10964
11412
  _this.sharedStateService.triggerActiveValidatorsOnEditModalOpen();
10965
11413
  });
@@ -11149,6 +11597,9 @@
11149
11597
  __decorate([
11150
11598
  core.Input()
11151
11599
  ], HistoricalPixAccountListComponent.prototype, "hideField", void 0);
11600
+ __decorate([
11601
+ core.Input()
11602
+ ], HistoricalPixAccountListComponent.prototype, "showActionsButtonOnAdd", void 0);
11152
11603
  __decorate([
11153
11604
  core.Output()
11154
11605
  ], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
@@ -11161,6 +11612,12 @@
11161
11612
  __decorate([
11162
11613
  core.Output()
11163
11614
  ], HistoricalPixAccountListComponent.prototype, "isEditJudicialDependentPix", void 0);
11615
+ __decorate([
11616
+ core.Output()
11617
+ ], HistoricalPixAccountListComponent.prototype, "isHideBtnAddForViewMode", void 0);
11618
+ __decorate([
11619
+ core.Output()
11620
+ ], HistoricalPixAccountListComponent.prototype, "isShowActionsButton", void 0);
11164
11621
  __decorate([
11165
11622
  core.Input()
11166
11623
  ], HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", null);