@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.
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js +542 -85
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +2 -2
- 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 +1 -0
- package/components/historical-pix-account/historical-pix-account.component.d.ts +71 -11
- package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +3 -0
- package/components/shared/shared-state.service.d.ts +8 -0
- package/esm2015/components/historical-pix-account/historical-pix-account-base.js +9 -2
- package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +9 -7
- package/esm2015/components/historical-pix-account/historical-pix-account.component.js +478 -80
- package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +26 -3
- package/esm2015/components/shared/shared-state.service.js +17 -1
- package/esm2015/components/utils/format-utils/format-utils.service.js +3 -1
- package/esm5/components/historical-pix-account/historical-pix-account-base.js +9 -2
- package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +9 -7
- package/esm5/components/historical-pix-account/historical-pix-account.component.js +488 -80
- package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +26 -3
- package/esm5/components/shared/shared-state.service.js +17 -1
- package/esm5/components/utils/format-utils/format-utils.service.js +3 -1
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +532 -85
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +542 -85
- 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
|
@@ -9318,6 +9318,7 @@ var FormatUtilsService = /** @class */ (function () {
|
|
|
9318
9318
|
*/
|
|
9319
9319
|
FormatUtilsService.formatCpfInputEvent = function (event) {
|
|
9320
9320
|
var cpf = event.target.value;
|
|
9321
|
+
console.log("FormatUtilsService.formatCpfInputEvent.cpf: " + cpf);
|
|
9321
9322
|
// Permite apagar nos pontos sensíveis
|
|
9322
9323
|
if (event.keyCode === 8 && (cpf.length === 4 || cpf.length === 8 || cpf.length === 12)) {
|
|
9323
9324
|
return;
|
|
@@ -9330,6 +9331,7 @@ var FormatUtilsService = /** @class */ (function () {
|
|
|
9330
9331
|
*/
|
|
9331
9332
|
FormatUtilsService.formatCnpjInputEvent = function (event) {
|
|
9332
9333
|
var cnpj = event.target.value;
|
|
9334
|
+
console.log("FormatUtilsService.formatCnpjInputEvent.cnpj: " + cnpj);
|
|
9333
9335
|
// Permite apagar nos pontos sensíveis
|
|
9334
9336
|
if (event.keyCode === 8 && (cnpj.length === 3 || cnpj.length === 7 || cnpj.length === 11 || cnpj.length === 16)) {
|
|
9335
9337
|
return;
|
|
@@ -9351,6 +9353,10 @@ var SharedStateService = /** @class */ (function () {
|
|
|
9351
9353
|
this.showEditMode$ = this.showEditMode.asObservable();
|
|
9352
9354
|
this.activeValidatorsOnEditModalOpen = new Subject();
|
|
9353
9355
|
this.activeValidatorsOnEditModalOpen$ = this.activeValidatorsOnEditModalOpen.asObservable();
|
|
9356
|
+
this.hideBtnAddForViewMode = new BehaviorSubject(false);
|
|
9357
|
+
this.hideBtnAddForViewMode$ = this.hideBtnAddForViewMode.asObservable();
|
|
9358
|
+
this.activeHideOptionsOnView = new BehaviorSubject(true);
|
|
9359
|
+
this.activeHideOptionsOnView$ = this.activeHideOptionsOnView.asObservable();
|
|
9354
9360
|
}
|
|
9355
9361
|
SharedStateService.prototype.setHideField = function (value) {
|
|
9356
9362
|
this.hideFieldSubject.next(value);
|
|
@@ -9367,6 +9373,18 @@ var SharedStateService = /** @class */ (function () {
|
|
|
9367
9373
|
SharedStateService.prototype.triggerActiveValidatorsOnEditModalOpen = function () {
|
|
9368
9374
|
this.activeValidatorsOnEditModalOpen.next();
|
|
9369
9375
|
};
|
|
9376
|
+
SharedStateService.prototype.setHideBtnAddForViewMode = function (value) {
|
|
9377
|
+
this.hideBtnAddForViewMode.next(value);
|
|
9378
|
+
};
|
|
9379
|
+
SharedStateService.prototype.resetHideField = function () {
|
|
9380
|
+
this.hideFieldSubject.next(true);
|
|
9381
|
+
};
|
|
9382
|
+
SharedStateService.prototype.setActiveHideOptionsOnView = function (value) {
|
|
9383
|
+
this.activeHideOptionsOnView.next(value);
|
|
9384
|
+
};
|
|
9385
|
+
SharedStateService.prototype.getActiveHideOptionsOnView = function () {
|
|
9386
|
+
return this.activeHideOptionsOnView.getValue();
|
|
9387
|
+
};
|
|
9370
9388
|
SharedStateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function SharedStateService_Factory() { return new SharedStateService(); }, token: SharedStateService, providedIn: "root" });
|
|
9371
9389
|
SharedStateService = __decorate([
|
|
9372
9390
|
Injectable({
|
|
@@ -9673,10 +9691,17 @@ var HistoricakPixAccountBase = /** @class */ (function () {
|
|
|
9673
9691
|
case "RANDOM_KEY":
|
|
9674
9692
|
pixKey.setValidators(Validators.required);
|
|
9675
9693
|
break;
|
|
9694
|
+
case "BANK_ACCOUNT":
|
|
9695
|
+
pixKey.clearValidators();
|
|
9696
|
+
pixKey.setValue('');
|
|
9697
|
+
break;
|
|
9676
9698
|
default:
|
|
9677
9699
|
pixKey.clearValidators();
|
|
9678
9700
|
}
|
|
9679
|
-
if (
|
|
9701
|
+
if (this.pixKeyType === "BANK_ACCOUNT") {
|
|
9702
|
+
pixKey.disable();
|
|
9703
|
+
}
|
|
9704
|
+
else if (isEditMode) {
|
|
9680
9705
|
pixKey.enable();
|
|
9681
9706
|
}
|
|
9682
9707
|
pixKey.updateValueAndValidity();
|
|
@@ -9764,6 +9789,9 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9764
9789
|
_this.addExistentHistoricData = [];
|
|
9765
9790
|
_this.getListPixAccount = [];
|
|
9766
9791
|
_this.isEditModeForSave = false;
|
|
9792
|
+
_this.showField = false;
|
|
9793
|
+
_this.hideBtnAddForViewMode = false;
|
|
9794
|
+
_this.showButtonView = true;
|
|
9767
9795
|
_this.isViewModeActive = new EventEmitter();
|
|
9768
9796
|
_this.isEditModeActive = new EventEmitter();
|
|
9769
9797
|
_this.isDeleteModeActive = new EventEmitter();
|
|
@@ -9781,13 +9809,12 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9781
9809
|
_this.loading = true;
|
|
9782
9810
|
_this.listData = [];
|
|
9783
9811
|
_this.listDataNoPage = [];
|
|
9784
|
-
_this.showButtonView = true;
|
|
9785
9812
|
_this.showEditMode = false;
|
|
9786
9813
|
_this.hasRecordsPix = true;
|
|
9787
|
-
_this.maxValuePercentage = 100.00;
|
|
9788
9814
|
_this.hideFields = _this.sharedStateService.hideField$;
|
|
9789
9815
|
_this.suggestions = [];
|
|
9790
9816
|
_this.formGroupByRow = {};
|
|
9817
|
+
_this.isSyncingPercentage = false;
|
|
9791
9818
|
_this.cols = [
|
|
9792
9819
|
{
|
|
9793
9820
|
label: _this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
|
|
@@ -9866,14 +9893,17 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9866
9893
|
}
|
|
9867
9894
|
HistoricalPixAccountComponent.prototype.ngOnInit = function () {
|
|
9868
9895
|
var _this = this;
|
|
9896
|
+
this.showFields = this.showField;
|
|
9869
9897
|
this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
|
|
9870
|
-
this.sharedStateService.showButton$.subscribe(function (value) {
|
|
9871
|
-
_this.showButtonView = value;
|
|
9872
|
-
});
|
|
9873
9898
|
this.sharedStateService.showEditMode$.subscribe(function (value) {
|
|
9874
9899
|
_this.showEditMode = value;
|
|
9875
9900
|
_this.isEditModeForSave = value;
|
|
9876
9901
|
});
|
|
9902
|
+
this.sharedStateService.activeHideOptionsOnView$.subscribe(function (value) {
|
|
9903
|
+
if (value) {
|
|
9904
|
+
_this.showButtonView = false;
|
|
9905
|
+
}
|
|
9906
|
+
});
|
|
9877
9907
|
this.sharedStateService.activeValidatorsOnEditModalOpen$
|
|
9878
9908
|
.subscribe(function () {
|
|
9879
9909
|
Object.values(_this.formGroupByRow).forEach(function (fg) {
|
|
@@ -9884,6 +9914,7 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9884
9914
|
});
|
|
9885
9915
|
_this.emitFormValidity();
|
|
9886
9916
|
});
|
|
9917
|
+
this.resetFormState();
|
|
9887
9918
|
};
|
|
9888
9919
|
HistoricalPixAccountComponent.prototype.ngOnChanges = function (changes) {
|
|
9889
9920
|
if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
|
|
@@ -9896,6 +9927,10 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9896
9927
|
var newData = changes['addExistentHistoricData'].currentValue;
|
|
9897
9928
|
this.rebuildFormGroupMap(newData);
|
|
9898
9929
|
}
|
|
9930
|
+
if (changes['isEditMode']) {
|
|
9931
|
+
this.isEditMode = changes['isEditMode'].currentValue;
|
|
9932
|
+
this.cd.detectChanges();
|
|
9933
|
+
}
|
|
9899
9934
|
};
|
|
9900
9935
|
HistoricalPixAccountComponent.prototype.createFormGroup = function () {
|
|
9901
9936
|
this.historicalPixAccountList = this.formBuilder.group({
|
|
@@ -9910,9 +9945,31 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9910
9945
|
this.cd.detectChanges();
|
|
9911
9946
|
};
|
|
9912
9947
|
HistoricalPixAccountComponent.prototype.emitFormValidity = function () {
|
|
9913
|
-
|
|
9948
|
+
if (!this.formGroupByRow || Object.keys(this.formGroupByRow).length === 0) {
|
|
9949
|
+
this.isValidChangeForm.emit(false);
|
|
9950
|
+
return;
|
|
9951
|
+
}
|
|
9952
|
+
var allValid = true;
|
|
9953
|
+
Object.values(this.formGroupByRow).forEach(function (fg) {
|
|
9954
|
+
// Verifica cada controle individualmente
|
|
9955
|
+
Object.keys(fg.controls).forEach(function (key) {
|
|
9956
|
+
var control = fg.get(key);
|
|
9957
|
+
// Verifica se o controle é obrigatório e está vazio
|
|
9958
|
+
if (control.validator && control.validator({})) {
|
|
9959
|
+
var validatorFn = control.validator({});
|
|
9960
|
+
if (validatorFn && validatorFn.required && !control.value) {
|
|
9961
|
+
allValid = false;
|
|
9962
|
+
}
|
|
9963
|
+
}
|
|
9964
|
+
// Verifica se o controle tem erros
|
|
9965
|
+
if (control.errors) {
|
|
9966
|
+
allValid = false;
|
|
9967
|
+
}
|
|
9968
|
+
});
|
|
9914
9969
|
fg.updateValueAndValidity();
|
|
9915
|
-
|
|
9970
|
+
if (!fg.valid) {
|
|
9971
|
+
allValid = false;
|
|
9972
|
+
}
|
|
9916
9973
|
});
|
|
9917
9974
|
this.isValidChangeForm.emit(allValid);
|
|
9918
9975
|
};
|
|
@@ -9933,65 +9990,27 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9933
9990
|
};
|
|
9934
9991
|
HistoricalPixAccountComponent.prototype.createPixRowFormGroup = function () {
|
|
9935
9992
|
return this.formBuilder.group({
|
|
9993
|
+
id: [null],
|
|
9936
9994
|
pixKeyType: [null, Validators.required],
|
|
9937
9995
|
pixKey: [null],
|
|
9938
9996
|
percentage: [0, Validators.compose(__spread(this.initialValidatorOfPercentage, [
|
|
9939
9997
|
Validators.max(this.maxValuePercentage),
|
|
9940
|
-
]))]
|
|
9998
|
+
]))],
|
|
9999
|
+
externalId: [null],
|
|
9941
10000
|
});
|
|
9942
10001
|
};
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
this.setPixKeyValidators(true, form);
|
|
9954
|
-
this.emitFormValidity();
|
|
9955
|
-
};
|
|
9956
|
-
HistoricalPixAccountComponent.prototype.onBlurPixCpfAndCnpj = function (index) {
|
|
9957
|
-
var form = this.formGroupByRow[index];
|
|
9958
|
-
var pixKeyControl = form.get('pixKey');
|
|
9959
|
-
var pixKeyTypeControl = form.get('pixKeyType');
|
|
9960
|
-
if (!pixKeyControl || !pixKeyTypeControl)
|
|
9961
|
-
return;
|
|
9962
|
-
var currentValue = pixKeyControl.value;
|
|
9963
|
-
var pixKeyType = pixKeyTypeControl.value.key;
|
|
9964
|
-
var rawValue = (currentValue || '').replace(/\D/g, '');
|
|
9965
|
-
pixKeyControl.setValue(rawValue, { emitEvent: false });
|
|
9966
|
-
if (pixKeyControl.valid) {
|
|
9967
|
-
form.patchValue({
|
|
9968
|
-
pixKeyFormatted: FormatUtilsService.getFormattedSubscriptionNumber(rawValue, pixKeyType)
|
|
10002
|
+
/**
|
|
10003
|
+
* Sincroniza todos os dados do NgModel para os FormGroups antes de enviar ao componente pai
|
|
10004
|
+
*/
|
|
10005
|
+
HistoricalPixAccountComponent.prototype.syncPixDataToParentForm = function () {
|
|
10006
|
+
this.syncAllModelToForm();
|
|
10007
|
+
var historicalPix = __spread(this.addExistentHistoricData);
|
|
10008
|
+
this.historicalPixAccountList.get("historicalPixAccountList").setValue(historicalPix);
|
|
10009
|
+
if (this.formGroup) {
|
|
10010
|
+
this.formGroup.get(this.fieldFormGroup).patchValue({
|
|
10011
|
+
historicalPixAccountList: historicalPix
|
|
9969
10012
|
});
|
|
9970
10013
|
}
|
|
9971
|
-
this.emitFormValidity();
|
|
9972
|
-
};
|
|
9973
|
-
HistoricalPixAccountComponent.prototype.getFormattedPixKey = function (type, value) {
|
|
9974
|
-
return FormatUtilsService.getFormattedSubscriptionNumber(value, type);
|
|
9975
|
-
};
|
|
9976
|
-
HistoricalPixAccountComponent.prototype.syncPixDataToParentForm = function () {
|
|
9977
|
-
if (!this.isEditModeForSave)
|
|
9978
|
-
return;
|
|
9979
|
-
var values = Object.values(this.formGroupByRow).map(function (fg) {
|
|
9980
|
-
var value = fg.getRawValue();
|
|
9981
|
-
var pixKeyType = value.pixKeyType.key;
|
|
9982
|
-
if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
|
|
9983
|
-
value.pixKey = (value.pixKey || '').replace(/[.\-\/]/g, '');
|
|
9984
|
-
}
|
|
9985
|
-
else if (pixKeyType === 'TELEPHONE') {
|
|
9986
|
-
value.pixKey = (value.pixKey || '').replace(/[()\s\-]/g, '');
|
|
9987
|
-
}
|
|
9988
|
-
return value;
|
|
9989
|
-
});
|
|
9990
|
-
this.formGroup
|
|
9991
|
-
.get(this.fieldFormGroup)
|
|
9992
|
-
.get('historicalPixAccountList')
|
|
9993
|
-
.setValue(values);
|
|
9994
|
-
this.emitFormValidity();
|
|
9995
10014
|
};
|
|
9996
10015
|
HistoricalPixAccountComponent.prototype.syncResetPixFormToParent = function () {
|
|
9997
10016
|
this.formGroupByRow = {};
|
|
@@ -10001,6 +10020,46 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10001
10020
|
this.rebuildFormGroupMap(this.addExistentHistoricData);
|
|
10002
10021
|
}
|
|
10003
10022
|
};
|
|
10023
|
+
/**
|
|
10024
|
+
* Valida todos os formulários
|
|
10025
|
+
*/
|
|
10026
|
+
HistoricalPixAccountComponent.prototype.validateAllForms = function () {
|
|
10027
|
+
var _this = this;
|
|
10028
|
+
this.forceCloseAllCellEditors();
|
|
10029
|
+
this.syncAllModelToForm();
|
|
10030
|
+
if (!this.formGroupByRow || Object.keys(this.formGroupByRow).length === 0) {
|
|
10031
|
+
return true;
|
|
10032
|
+
}
|
|
10033
|
+
var isAllValid = true;
|
|
10034
|
+
Object.keys(this.formGroupByRow).forEach(function (indexKey) {
|
|
10035
|
+
var index = Number(indexKey);
|
|
10036
|
+
var form = _this.formGroupByRow[index];
|
|
10037
|
+
if (form) {
|
|
10038
|
+
Object.keys(form.controls).forEach(function (controlName) {
|
|
10039
|
+
var control = form.get(controlName);
|
|
10040
|
+
control.markAsTouched();
|
|
10041
|
+
if (controlName === 'pixKey') {
|
|
10042
|
+
var pixKeyTypeControl = form.get('pixKeyType');
|
|
10043
|
+
if (pixKeyTypeControl.value) {
|
|
10044
|
+
_this.validateDocumentField(index, pixKeyTypeControl.value.key);
|
|
10045
|
+
}
|
|
10046
|
+
}
|
|
10047
|
+
});
|
|
10048
|
+
form.updateValueAndValidity();
|
|
10049
|
+
if (form.invalid) {
|
|
10050
|
+
isAllValid = false;
|
|
10051
|
+
}
|
|
10052
|
+
}
|
|
10053
|
+
});
|
|
10054
|
+
if (isAllValid && this.addExistentHistoricData && this.addExistentHistoricData.length > 0) {
|
|
10055
|
+
var totalPercentage = this.addExistentHistoricData.reduce(function (sum, item) { return sum + (parseFloat(item.percentage) || 0); }, 0);
|
|
10056
|
+
if (Math.abs(totalPercentage - 100) > 0.01) {
|
|
10057
|
+
isAllValid = false;
|
|
10058
|
+
}
|
|
10059
|
+
}
|
|
10060
|
+
this.isValidChangeForm.emit(isAllValid);
|
|
10061
|
+
return isAllValid;
|
|
10062
|
+
};
|
|
10004
10063
|
HistoricalPixAccountComponent.prototype.onLazyLoad = function (event) {
|
|
10005
10064
|
var _this = this;
|
|
10006
10065
|
var first = event && event.first ? event.first : 0;
|
|
@@ -10048,9 +10107,11 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10048
10107
|
};
|
|
10049
10108
|
HistoricalPixAccountComponent.prototype.addPix = function () {
|
|
10050
10109
|
var newItem = {
|
|
10110
|
+
id: null,
|
|
10051
10111
|
pixKeyType: {},
|
|
10052
10112
|
pixKey: '',
|
|
10053
|
-
percentage:
|
|
10113
|
+
percentage: '',
|
|
10114
|
+
externalId: '',
|
|
10054
10115
|
};
|
|
10055
10116
|
var index = this.addExistentHistoricData.length;
|
|
10056
10117
|
this.addExistentHistoricData = __spread(this.addExistentHistoricData, [
|
|
@@ -10061,8 +10122,27 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10061
10122
|
this.emitFormValidity();
|
|
10062
10123
|
};
|
|
10063
10124
|
HistoricalPixAccountComponent.prototype.deletePix = function (index) {
|
|
10125
|
+
var _this = this;
|
|
10126
|
+
if (this.dataListPix.editingCell) {
|
|
10127
|
+
this.dataListPix.editingCell = null;
|
|
10128
|
+
}
|
|
10064
10129
|
this.addExistentHistoricData = this.addExistentHistoricData.filter(function (_, i) { return i !== index; });
|
|
10130
|
+
var currentList = this.historicalPixAccountList.get("historicalPixAccountList").value || [];
|
|
10131
|
+
var updatedList = currentList.filter(function (_, i) { return i !== index; });
|
|
10132
|
+
this.historicalPixAccountList.get("historicalPixAccountList").setValue(updatedList);
|
|
10133
|
+
if (this.formGroup) {
|
|
10134
|
+
this.formGroup.get(this.fieldFormGroup).patchValue({
|
|
10135
|
+
historicalPixAccountList: updatedList
|
|
10136
|
+
});
|
|
10137
|
+
}
|
|
10065
10138
|
this.rebuildFormGroupMap(this.addExistentHistoricData);
|
|
10139
|
+
this.addExistentHistoricData.forEach(function (_, i) {
|
|
10140
|
+
if (_this.formGroupByRow[i]) {
|
|
10141
|
+
var allValues = _this.addExistentHistoricData
|
|
10142
|
+
.map(function (item, idx) { return idx === i ? 0 : (parseFloat(item.percentage) || 0); });
|
|
10143
|
+
_this.validatePercentageValid(allValues, _this.formGroupByRow[i]);
|
|
10144
|
+
}
|
|
10145
|
+
});
|
|
10066
10146
|
this.emitFormValidity();
|
|
10067
10147
|
};
|
|
10068
10148
|
HistoricalPixAccountComponent.prototype.rebuildFormGroupMap = function (data) {
|
|
@@ -10083,6 +10163,10 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10083
10163
|
_this.pixKeyType = pixKeyType;
|
|
10084
10164
|
_this.setPixKeyValidators(true, form);
|
|
10085
10165
|
_this.setValidatorsAccordingList(data, index, _this.isEditMode);
|
|
10166
|
+
var listValues = data
|
|
10167
|
+
.filter(function (_, i) { return i !== index; })
|
|
10168
|
+
.map(function (row) { return row.percentage ? parseFloat(row.percentage) : 0; });
|
|
10169
|
+
_this.validatePercentageValid(listValues, form);
|
|
10086
10170
|
});
|
|
10087
10171
|
this.emitFormValidity();
|
|
10088
10172
|
};
|
|
@@ -10162,15 +10246,368 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10162
10246
|
this.msgTotalLimitByPercentage = null;
|
|
10163
10247
|
}
|
|
10164
10248
|
};
|
|
10249
|
+
HistoricalPixAccountComponent.prototype.formatPercentage = function (value) {
|
|
10250
|
+
if (value == null || value === '' || isNaN(Number(value))) {
|
|
10251
|
+
return '0.00';
|
|
10252
|
+
}
|
|
10253
|
+
return Number(value).toFixed(2);
|
|
10254
|
+
};
|
|
10165
10255
|
HistoricalPixAccountComponent.prototype.onSyncValue = function (field, index) {
|
|
10256
|
+
var _this = this;
|
|
10166
10257
|
if (this.formGroupByRow &&
|
|
10167
10258
|
this.formGroupByRow[index] &&
|
|
10168
10259
|
this.formGroupByRow[index].get(field)) {
|
|
10169
|
-
var
|
|
10260
|
+
var control = this.formGroupByRow[index].get(field);
|
|
10261
|
+
var value = control.value;
|
|
10170
10262
|
this.addExistentHistoricData[index][field] = value;
|
|
10263
|
+
control.markAsDirty();
|
|
10264
|
+
control.markAsTouched();
|
|
10265
|
+
if (field === 'percentage') {
|
|
10266
|
+
var currentList = this.addExistentHistoricData
|
|
10267
|
+
.map(function (item, i) { return i === index ? 0 : (parseFloat(item.percentage) || 0); });
|
|
10268
|
+
this.validatePercentageValid(currentList, this.formGroupByRow[index]);
|
|
10269
|
+
if (!this.isSyncingPercentage) {
|
|
10270
|
+
this.isSyncingPercentage = true;
|
|
10271
|
+
setTimeout(function () {
|
|
10272
|
+
_this.syncPixDataToParentForm();
|
|
10273
|
+
_this.isSyncingPercentage = false;
|
|
10274
|
+
}, 0);
|
|
10275
|
+
}
|
|
10276
|
+
}
|
|
10277
|
+
control.updateValueAndValidity();
|
|
10278
|
+
this.formGroupByRow[index].updateValueAndValidity();
|
|
10279
|
+
this.emitFormValidity();
|
|
10171
10280
|
}
|
|
10281
|
+
};
|
|
10282
|
+
HistoricalPixAccountComponent.prototype.close = function () {
|
|
10283
|
+
this.visible = false;
|
|
10284
|
+
};
|
|
10285
|
+
HistoricalPixAccountComponent.prototype.getFormattedTelephoneNumber = function (telephoneNumber) {
|
|
10286
|
+
return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
|
|
10287
|
+
};
|
|
10288
|
+
HistoricalPixAccountComponent.prototype.getFormattedCpf = function (cpf) {
|
|
10289
|
+
return FormatUtilsService.getFormattedCpf(cpf);
|
|
10290
|
+
};
|
|
10291
|
+
HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
|
|
10292
|
+
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
10293
|
+
};
|
|
10294
|
+
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
10295
|
+
return FormatUtilsService.getFormattedPercentage(value);
|
|
10296
|
+
};
|
|
10297
|
+
/**
|
|
10298
|
+
* Reseta completamente o estado do formulário e controles
|
|
10299
|
+
*/
|
|
10300
|
+
HistoricalPixAccountComponent.prototype.resetFormState = function () {
|
|
10301
|
+
if (this.formGroupByRow) {
|
|
10302
|
+
Object.values(this.formGroupByRow).forEach(function (form) {
|
|
10303
|
+
if (form) {
|
|
10304
|
+
Object.keys(form.controls).forEach(function (controlName) {
|
|
10305
|
+
var control = form.get(controlName);
|
|
10306
|
+
if (control) {
|
|
10307
|
+
control.setErrors(null);
|
|
10308
|
+
control.markAsUntouched();
|
|
10309
|
+
control.markAsPristine();
|
|
10310
|
+
}
|
|
10311
|
+
});
|
|
10312
|
+
form.updateValueAndValidity();
|
|
10313
|
+
}
|
|
10314
|
+
});
|
|
10315
|
+
}
|
|
10316
|
+
if (this.dataListPix) {
|
|
10317
|
+
if (typeof this.dataListPix.closeAllCellEditors === 'function') {
|
|
10318
|
+
try {
|
|
10319
|
+
this.dataListPix.closeAllCellEditors();
|
|
10320
|
+
}
|
|
10321
|
+
catch (e) {
|
|
10322
|
+
console.error('Erro ao tentar fechar cell editors:', e);
|
|
10323
|
+
}
|
|
10324
|
+
}
|
|
10325
|
+
else if (this.dataListPix.editingCell) {
|
|
10326
|
+
this.dataListPix.editingCell = null;
|
|
10327
|
+
}
|
|
10328
|
+
if (this.dataListPix.editing !== undefined) {
|
|
10329
|
+
this.dataListPix.editing = false;
|
|
10330
|
+
}
|
|
10331
|
+
}
|
|
10332
|
+
this.cd.detectChanges();
|
|
10333
|
+
};
|
|
10334
|
+
/**
|
|
10335
|
+
* Formata a chave PIX para exibição baseada no tipo
|
|
10336
|
+
*/
|
|
10337
|
+
HistoricalPixAccountComponent.prototype.getFormattedPixKey = function (pixKeyType, pixKey) {
|
|
10338
|
+
if (!pixKey)
|
|
10339
|
+
return '';
|
|
10340
|
+
switch (pixKeyType) {
|
|
10341
|
+
case 'CPF':
|
|
10342
|
+
return FormatUtilsService.getFormattedCpf(pixKey);
|
|
10343
|
+
case 'CNPJ':
|
|
10344
|
+
return FormatUtilsService.getFormattedCnpj(pixKey);
|
|
10345
|
+
case 'TELEPHONE':
|
|
10346
|
+
return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
|
|
10347
|
+
case 'EMAIL':
|
|
10348
|
+
case 'RANDOM_KEY':
|
|
10349
|
+
default:
|
|
10350
|
+
return pixKey;
|
|
10351
|
+
}
|
|
10352
|
+
};
|
|
10353
|
+
/**
|
|
10354
|
+
* Obtém o tipo de chave PIX do item atual
|
|
10355
|
+
*/
|
|
10356
|
+
HistoricalPixAccountComponent.prototype.getPixKeyType = function (item) {
|
|
10357
|
+
return item && item.pixKeyType && item.pixKeyType.key || '';
|
|
10358
|
+
};
|
|
10359
|
+
/**
|
|
10360
|
+
* Verifica se um controle está inválido para os campos editáveis
|
|
10361
|
+
*/
|
|
10362
|
+
HistoricalPixAccountComponent.prototype.isInvalid = function (index, controlName) {
|
|
10363
|
+
var form = this.formGroupByRow[index];
|
|
10364
|
+
if (!form)
|
|
10365
|
+
return false;
|
|
10366
|
+
var control = form.get(controlName);
|
|
10367
|
+
if (!control)
|
|
10368
|
+
return false;
|
|
10369
|
+
return control.invalid && (control.touched || control.dirty);
|
|
10370
|
+
};
|
|
10371
|
+
/**
|
|
10372
|
+
* Método chamado quando uma célula entra no modo de edição
|
|
10373
|
+
*/
|
|
10374
|
+
HistoricalPixAccountComponent.prototype.onCellEditInit = function (event) {
|
|
10375
|
+
var rowIndex = this.addExistentHistoricData.findIndex(function (item) { return item === event.data; });
|
|
10376
|
+
if (rowIndex < 0)
|
|
10377
|
+
return;
|
|
10378
|
+
var form = this.formGroupByRow[rowIndex];
|
|
10379
|
+
if (form && form.get('pixKey')) {
|
|
10380
|
+
var pixKeyControl = form.get('pixKey');
|
|
10381
|
+
var currentValue = this.addExistentHistoricData[rowIndex].pixKey;
|
|
10382
|
+
pixKeyControl.setValue(currentValue);
|
|
10383
|
+
}
|
|
10384
|
+
};
|
|
10385
|
+
/**
|
|
10386
|
+
* Recupera o FormControl específico para um campo em determinado índice
|
|
10387
|
+
*/
|
|
10388
|
+
HistoricalPixAccountComponent.prototype.getFormControl = function (index, controlName) {
|
|
10389
|
+
var form = this.formGroupByRow[index];
|
|
10390
|
+
if (!form)
|
|
10391
|
+
return null;
|
|
10392
|
+
return form.get(controlName);
|
|
10393
|
+
};
|
|
10394
|
+
/**
|
|
10395
|
+
* Valida campos de documento (CPF, CNPJ) quando o usuário termina de digitar no form de edição
|
|
10396
|
+
*/
|
|
10397
|
+
HistoricalPixAccountComponent.prototype.validateDocumentField = function (index, fieldType) {
|
|
10398
|
+
var _a;
|
|
10399
|
+
var form = this.formGroupByRow[index];
|
|
10400
|
+
var item = this.addExistentHistoricData[index];
|
|
10401
|
+
if (!form || !item)
|
|
10402
|
+
return;
|
|
10403
|
+
var pixKeyControl = form.get('pixKey');
|
|
10404
|
+
if (!pixKeyControl)
|
|
10405
|
+
return;
|
|
10406
|
+
var value = item.pixKey;
|
|
10407
|
+
pixKeyControl.setValue(value);
|
|
10408
|
+
if (fieldType === 'CPF' || fieldType === 'CNPJ' || fieldType === 'TELEPHONE') {
|
|
10409
|
+
value = value ? value.toString().replace(/\D/g, '') : '';
|
|
10410
|
+
item.pixKey = value;
|
|
10411
|
+
pixKeyControl.setValue(value);
|
|
10412
|
+
}
|
|
10413
|
+
if (!value || value.toString().trim() === '') {
|
|
10414
|
+
pixKeyControl.setErrors({ required: true });
|
|
10415
|
+
pixKeyControl.markAsTouched();
|
|
10416
|
+
form.updateValueAndValidity();
|
|
10417
|
+
this.emitFormValidity();
|
|
10418
|
+
return;
|
|
10419
|
+
}
|
|
10420
|
+
var cleanValue = value;
|
|
10421
|
+
if (fieldType === 'CPF' || fieldType === 'CNPJ') {
|
|
10422
|
+
cleanValue = value.toString().replace(/\D/g, '');
|
|
10423
|
+
item.pixKey = cleanValue;
|
|
10424
|
+
pixKeyControl.setValue(cleanValue);
|
|
10425
|
+
}
|
|
10426
|
+
var isValid = false;
|
|
10427
|
+
switch (fieldType) {
|
|
10428
|
+
case 'CPF':
|
|
10429
|
+
isValid = cleanValue.length === 11 && GenericValidator.isValidCpf({ value: cleanValue }) === null;
|
|
10430
|
+
break;
|
|
10431
|
+
case 'CNPJ':
|
|
10432
|
+
isValid = cleanValue.length === 14 && GenericValidator.isValidCnpj({ value: cleanValue }) === null;
|
|
10433
|
+
break;
|
|
10434
|
+
case 'TELEPHONE':
|
|
10435
|
+
cleanValue = value.toString().replace(/\D/g, '');
|
|
10436
|
+
isValid = GenericValidator.isValidPhoneNumber({ value: cleanValue }) === null;
|
|
10437
|
+
break;
|
|
10438
|
+
case 'EMAIL':
|
|
10439
|
+
isValid = GenericValidator.isValidEmail({ value: value }) === null;
|
|
10440
|
+
break;
|
|
10441
|
+
case 'RANDOM_KEY':
|
|
10442
|
+
isValid = true;
|
|
10443
|
+
break;
|
|
10444
|
+
default:
|
|
10445
|
+
isValid = true;
|
|
10446
|
+
}
|
|
10447
|
+
pixKeyControl.markAsTouched();
|
|
10448
|
+
if (isValid) {
|
|
10449
|
+
pixKeyControl.setErrors(null);
|
|
10450
|
+
}
|
|
10451
|
+
else {
|
|
10452
|
+
var errorType = this.getErrorTypeForField(fieldType);
|
|
10453
|
+
pixKeyControl.setErrors((_a = {}, _a[errorType] = true, _a));
|
|
10454
|
+
}
|
|
10455
|
+
form.updateValueAndValidity();
|
|
10172
10456
|
this.emitFormValidity();
|
|
10457
|
+
this.cd.detectChanges();
|
|
10458
|
+
};
|
|
10459
|
+
/**
|
|
10460
|
+
* Obtém o tipo de erro para cada tipo de campo editável
|
|
10461
|
+
*/
|
|
10462
|
+
HistoricalPixAccountComponent.prototype.getErrorTypeForField = function (fieldType) {
|
|
10463
|
+
switch (fieldType) {
|
|
10464
|
+
case 'CPF': return 'invalidCpf';
|
|
10465
|
+
case 'CNPJ': return 'invalidCnpj';
|
|
10466
|
+
case 'TELEPHONE': return 'invalidPhoneNumber';
|
|
10467
|
+
case 'EMAIL': return 'invalidEmail';
|
|
10468
|
+
default: return 'required';
|
|
10469
|
+
}
|
|
10470
|
+
};
|
|
10471
|
+
/**
|
|
10472
|
+
* Retorna a mensagem de erro apropriada para um campo
|
|
10473
|
+
*/
|
|
10474
|
+
HistoricalPixAccountComponent.prototype.getErrorMessage = function (index, controlName) {
|
|
10475
|
+
var form = this.formGroupByRow[index];
|
|
10476
|
+
if (!form)
|
|
10477
|
+
return '';
|
|
10478
|
+
var control = form.get(controlName);
|
|
10479
|
+
if (!control || !control.errors)
|
|
10480
|
+
return '';
|
|
10481
|
+
var fieldValue = control.value || '';
|
|
10482
|
+
if (control.hasError('required')) {
|
|
10483
|
+
return this.translateService.instant('hcm.payroll.required');
|
|
10484
|
+
}
|
|
10485
|
+
if (control.hasError('invalidCpf')) {
|
|
10486
|
+
return this.translateService.instant('hcm.payroll.employees_addition_cpf_error');
|
|
10487
|
+
}
|
|
10488
|
+
else if (control.hasError('invalidCnpj')) {
|
|
10489
|
+
return this.translateService.instant('hcm.payroll.employees_addition_cnpj_error');
|
|
10490
|
+
}
|
|
10491
|
+
else if (control.hasError('invalidEmail')) {
|
|
10492
|
+
return this.translateService.instant('hcm.payroll.employees_addition_email_invalid');
|
|
10493
|
+
}
|
|
10494
|
+
else if (control.hasError('invalidPhoneNumber')) {
|
|
10495
|
+
return this.translateService.instant('hcm.payroll.employees_addition_invalid_phone_number', { value: fieldValue });
|
|
10496
|
+
}
|
|
10497
|
+
return '';
|
|
10498
|
+
};
|
|
10499
|
+
/**
|
|
10500
|
+
* Tratamento ao perder o foco em campos de documento
|
|
10501
|
+
*/
|
|
10502
|
+
HistoricalPixAccountComponent.prototype.onDocumentBlur = function (index) {
|
|
10503
|
+
var form = this.formGroupByRow[index];
|
|
10504
|
+
var item = this.addExistentHistoricData[index];
|
|
10505
|
+
if (!form || !item)
|
|
10506
|
+
return;
|
|
10507
|
+
var pixKeyControl = form.get('pixKey');
|
|
10508
|
+
var pixKeyTypeControl = form.get('pixKeyType');
|
|
10509
|
+
if (!pixKeyControl || !pixKeyTypeControl.value)
|
|
10510
|
+
return;
|
|
10511
|
+
var pixKeyType = pixKeyTypeControl.value.key;
|
|
10512
|
+
var value = item.pixKey;
|
|
10513
|
+
if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ' || pixKeyType === 'TELEPHONE') {
|
|
10514
|
+
value = value ? value.toString().replace(/\D/g, '') : '';
|
|
10515
|
+
item.pixKey = value;
|
|
10516
|
+
}
|
|
10517
|
+
pixKeyControl.setValue(value);
|
|
10518
|
+
this.validateDocumentField(index, pixKeyType);
|
|
10519
|
+
if (value) {
|
|
10520
|
+
if (pixKeyType === 'CPF') {
|
|
10521
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedCpf(value);
|
|
10522
|
+
}
|
|
10523
|
+
else if (pixKeyType === 'CNPJ') {
|
|
10524
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedCnpj(value);
|
|
10525
|
+
}
|
|
10526
|
+
else if (pixKeyType === 'TELEPHONE') {
|
|
10527
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedTelephoneNumber(value);
|
|
10528
|
+
}
|
|
10529
|
+
else {
|
|
10530
|
+
item.pixKeyFormatted = value;
|
|
10531
|
+
}
|
|
10532
|
+
}
|
|
10533
|
+
this.finishEditing();
|
|
10534
|
+
};
|
|
10535
|
+
HistoricalPixAccountComponent.prototype.finishEditing = function () {
|
|
10536
|
+
this.syncAllModelToForm();
|
|
10537
|
+
this.cd.detectChanges();
|
|
10173
10538
|
};
|
|
10539
|
+
HistoricalPixAccountComponent.prototype.clearErrorsTemporarily = function (rowIndex) {
|
|
10540
|
+
var form = this.formGroupByRow[rowIndex];
|
|
10541
|
+
if (form && form.get('pixKey')) {
|
|
10542
|
+
var currentValue = form.get('pixKey').value;
|
|
10543
|
+
form.get('pixKey').setErrors(null);
|
|
10544
|
+
form.get('pixKey').setValue(currentValue);
|
|
10545
|
+
}
|
|
10546
|
+
};
|
|
10547
|
+
HistoricalPixAccountComponent.prototype.closeEditModeManually = function () {
|
|
10548
|
+
var _this = this;
|
|
10549
|
+
setTimeout(function () {
|
|
10550
|
+
if (_this.dataListPix) {
|
|
10551
|
+
if (typeof _this.dataListPix.closeAllCellEditors === 'function') {
|
|
10552
|
+
_this.dataListPix.closeAllCellEditors();
|
|
10553
|
+
}
|
|
10554
|
+
else if (_this.dataListPix.editingCell) {
|
|
10555
|
+
_this.dataListPix.editingCell = null;
|
|
10556
|
+
}
|
|
10557
|
+
_this.cd.detectChanges();
|
|
10558
|
+
}
|
|
10559
|
+
}, 100);
|
|
10560
|
+
};
|
|
10561
|
+
HistoricalPixAccountComponent.prototype.syncAllModelToForm = function () {
|
|
10562
|
+
var _this = this;
|
|
10563
|
+
if (!this.addExistentHistoricData || !this.formGroupByRow)
|
|
10564
|
+
return;
|
|
10565
|
+
this.addExistentHistoricData.forEach(function (item, index) {
|
|
10566
|
+
var form = _this.formGroupByRow[index];
|
|
10567
|
+
if (form) {
|
|
10568
|
+
Object.keys(form.controls).forEach(function (controlName) {
|
|
10569
|
+
var control = form.get(controlName);
|
|
10570
|
+
if (control && item[controlName] !== undefined) {
|
|
10571
|
+
control.setValue(item[controlName]);
|
|
10572
|
+
}
|
|
10573
|
+
});
|
|
10574
|
+
var pixKeyTypeControl = form.get('pixKeyType');
|
|
10575
|
+
if (pixKeyTypeControl.value) {
|
|
10576
|
+
_this.validateDocumentField(index, pixKeyTypeControl.value.key);
|
|
10577
|
+
}
|
|
10578
|
+
}
|
|
10579
|
+
});
|
|
10580
|
+
};
|
|
10581
|
+
/**
|
|
10582
|
+
* Método para forçar o fechamento de todas as células em edição
|
|
10583
|
+
*/
|
|
10584
|
+
HistoricalPixAccountComponent.prototype.forceCloseAllCellEditors = function () {
|
|
10585
|
+
this.finishEditing();
|
|
10586
|
+
this.syncAllModelToForm();
|
|
10587
|
+
};
|
|
10588
|
+
HistoricalPixAccountComponent.prototype.isPixKeyType = function (item, type) {
|
|
10589
|
+
return item && item.pixKeyType && item.pixKeyType.key === type;
|
|
10590
|
+
};
|
|
10591
|
+
HistoricalPixAccountComponent.prototype.getPixKey = function (rowData) {
|
|
10592
|
+
return rowData ? rowData.pixKey : null;
|
|
10593
|
+
};
|
|
10594
|
+
HistoricalPixAccountComponent.prototype.setPixKey = function (rowData, value) {
|
|
10595
|
+
if (rowData) {
|
|
10596
|
+
rowData.pixKey = value;
|
|
10597
|
+
}
|
|
10598
|
+
};
|
|
10599
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isTotalPercentage100", {
|
|
10600
|
+
get: function () {
|
|
10601
|
+
if (!this.addExistentHistoricData || this.addExistentHistoricData.length === 0) {
|
|
10602
|
+
return false;
|
|
10603
|
+
}
|
|
10604
|
+
var totalPercentage = this.addExistentHistoricData
|
|
10605
|
+
.reduce(function (sum, item) { return sum + (parseFloat(item.percentage) || 0); }, 0);
|
|
10606
|
+
return totalPercentage >= 100;
|
|
10607
|
+
},
|
|
10608
|
+
enumerable: true,
|
|
10609
|
+
configurable: true
|
|
10610
|
+
});
|
|
10174
10611
|
Object.defineProperty(HistoricalPixAccountComponent.prototype, "scopedActions", {
|
|
10175
10612
|
get: function () {
|
|
10176
10613
|
return this.actions.bind(this);
|
|
@@ -10180,7 +10617,8 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10180
10617
|
});
|
|
10181
10618
|
Object.defineProperty(HistoricalPixAccountComponent.prototype, "recordsMessage", {
|
|
10182
10619
|
get: function () {
|
|
10183
|
-
return (this.totalRecords || 0) + " " + (this.totalRecords === 1 ?
|
|
10620
|
+
return (this.totalRecords || 0) + " " + (this.totalRecords === 1 ?
|
|
10621
|
+
this.translateService.instant("hcm.payroll.admission_register") : this.translateService.instant("hcm.payroll.admission_registers"));
|
|
10184
10622
|
},
|
|
10185
10623
|
enumerable: true,
|
|
10186
10624
|
configurable: true
|
|
@@ -10255,21 +10693,6 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10255
10693
|
enumerable: true,
|
|
10256
10694
|
configurable: true
|
|
10257
10695
|
});
|
|
10258
|
-
HistoricalPixAccountComponent.prototype.close = function () {
|
|
10259
|
-
this.visible = false;
|
|
10260
|
-
};
|
|
10261
|
-
HistoricalPixAccountComponent.prototype.getFormattedTelephoneNumber = function (telephoneNumber) {
|
|
10262
|
-
return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
|
|
10263
|
-
};
|
|
10264
|
-
HistoricalPixAccountComponent.prototype.getFormattedCpf = function (cpf) {
|
|
10265
|
-
return FormatUtilsService.getFormattedCpf(cpf);
|
|
10266
|
-
};
|
|
10267
|
-
HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
|
|
10268
|
-
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
10269
|
-
};
|
|
10270
|
-
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
10271
|
-
return FormatUtilsService.getFormattedPercentage(value);
|
|
10272
|
-
};
|
|
10273
10696
|
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
|
|
10274
10697
|
get: function () {
|
|
10275
10698
|
return (this.permission["incluir"]);
|
|
@@ -10365,6 +10788,15 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10365
10788
|
__decorate([
|
|
10366
10789
|
Input()
|
|
10367
10790
|
], HistoricalPixAccountComponent.prototype, "isEditModeForSave", void 0);
|
|
10791
|
+
__decorate([
|
|
10792
|
+
Input()
|
|
10793
|
+
], HistoricalPixAccountComponent.prototype, "showField", void 0);
|
|
10794
|
+
__decorate([
|
|
10795
|
+
Input()
|
|
10796
|
+
], HistoricalPixAccountComponent.prototype, "hideBtnAddForViewMode", void 0);
|
|
10797
|
+
__decorate([
|
|
10798
|
+
Input()
|
|
10799
|
+
], HistoricalPixAccountComponent.prototype, "showButtonView", void 0);
|
|
10368
10800
|
__decorate([
|
|
10369
10801
|
Output()
|
|
10370
10802
|
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
@@ -10399,8 +10831,8 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10399
10831
|
Component({
|
|
10400
10832
|
// tslint:disable-next-line:component-selector
|
|
10401
10833
|
selector: "c-historical-pix-account",
|
|
10402
|
-
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",
|
|
10403
|
-
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}"]
|
|
10834
|
+
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",
|
|
10835
|
+
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}"]
|
|
10404
10836
|
})
|
|
10405
10837
|
], HistoricalPixAccountComponent);
|
|
10406
10838
|
return HistoricalPixAccountComponent;
|
|
@@ -10414,6 +10846,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10414
10846
|
_this.sharedStateService = sharedStateService;
|
|
10415
10847
|
_this.withSideBar = true;
|
|
10416
10848
|
_this.isEditMode = false;
|
|
10849
|
+
_this.showField = false;
|
|
10417
10850
|
_this.visibleChange = new EventEmitter();
|
|
10418
10851
|
_this.pixAccountItemToList = new EventEmitter();
|
|
10419
10852
|
_this.ngUnsubscribe = new Subject();
|
|
@@ -10500,8 +10933,6 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10500
10933
|
this.visible = false;
|
|
10501
10934
|
};
|
|
10502
10935
|
HistoricalPixAccountFormComponent.prototype.addItem = function () {
|
|
10503
|
-
this.pixAccountFormGroup.updateValueAndValidity();
|
|
10504
|
-
verifyValidationsForm.call(this.pixAccountFormGroup);
|
|
10505
10936
|
if (this.pixAccountFormGroup.valid) {
|
|
10506
10937
|
if (this.employeeId) {
|
|
10507
10938
|
this.pixAccountFormGroup.get("employee").setValue({
|
|
@@ -10600,6 +11031,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10600
11031
|
__decorate([
|
|
10601
11032
|
Input()
|
|
10602
11033
|
], HistoricalPixAccountFormComponent.prototype, "isEditMode", void 0);
|
|
11034
|
+
__decorate([
|
|
11035
|
+
Input()
|
|
11036
|
+
], HistoricalPixAccountFormComponent.prototype, "showField", void 0);
|
|
10603
11037
|
__decorate([
|
|
10604
11038
|
Output()
|
|
10605
11039
|
], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
|
|
@@ -10627,8 +11061,8 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10627
11061
|
HistoricalPixAccountFormComponent = __decorate([
|
|
10628
11062
|
Component({
|
|
10629
11063
|
selector: "pix-account",
|
|
10630
|
-
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",
|
|
10631
|
-
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}"]
|
|
11064
|
+
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",
|
|
11065
|
+
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}"]
|
|
10632
11066
|
})
|
|
10633
11067
|
], HistoricalPixAccountFormComponent);
|
|
10634
11068
|
return HistoricalPixAccountFormComponent;
|
|
@@ -10718,10 +11152,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10718
11152
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
10719
11153
|
this.keyPayload = "historicalEmployeePix";
|
|
10720
11154
|
this.withSidebar = true;
|
|
11155
|
+
this.showActionsButtonOnAdd = false;
|
|
10721
11156
|
this.isOnlyView = new EventEmitter();
|
|
10722
11157
|
this.isOnlyEdit = new EventEmitter();
|
|
10723
11158
|
this.enableView = new EventEmitter();
|
|
10724
11159
|
this.isEditJudicialDependentPix = new EventEmitter();
|
|
11160
|
+
this.isHideBtnAddForViewMode = new EventEmitter();
|
|
11161
|
+
this.isShowActionsButton = new EventEmitter();
|
|
10725
11162
|
this.ngUnsubscribe = new Subject();
|
|
10726
11163
|
this.loading = true;
|
|
10727
11164
|
this.columns = [
|
|
@@ -10762,16 +11199,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10762
11199
|
command: function () {
|
|
10763
11200
|
if (_this.isAllowToViewHistorical) {
|
|
10764
11201
|
_this.sharedStateService.setHideField(true);
|
|
10765
|
-
_this.
|
|
11202
|
+
_this.isShowActionsButton.emit(false);
|
|
10766
11203
|
_this.sharedStateService.setShowEditMode(false);
|
|
10767
11204
|
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10768
11205
|
if (_this.withSidebar) {
|
|
10769
11206
|
_this.isOnlyView.emit(true);
|
|
11207
|
+
_this.isOnlyEdit.emit(false);
|
|
11208
|
+
_this.isHideBtnAddForViewMode.emit(true);
|
|
11209
|
+
_this.sharedStateService.setHideBtnAddForViewMode(true);
|
|
11210
|
+
_this.sharedStateService.setActiveHideOptionsOnView(true);
|
|
10770
11211
|
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10771
11212
|
relativeTo: _this.activatedRoute,
|
|
10772
11213
|
});
|
|
10773
11214
|
}
|
|
10774
11215
|
else {
|
|
11216
|
+
_this.sharedStateService.setActiveHideOptionsOnView(true);
|
|
10775
11217
|
_this.sharedStateService.setSaveButton(false);
|
|
10776
11218
|
_this.enableView.emit(dateChange);
|
|
10777
11219
|
}
|
|
@@ -10786,15 +11228,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10786
11228
|
command: function () {
|
|
10787
11229
|
if (_this.isAllowToEditHistorical) {
|
|
10788
11230
|
_this.sharedStateService.setHideField(true);
|
|
10789
|
-
_this.
|
|
11231
|
+
_this.isShowActionsButton.emit(true);
|
|
10790
11232
|
_this.sharedStateService.setShowEditMode(true);
|
|
10791
11233
|
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10792
11234
|
if (_this.withSidebar) {
|
|
11235
|
+
_this.isOnlyView.emit(false);
|
|
11236
|
+
_this.isOnlyEdit.emit(true);
|
|
11237
|
+
_this.isHideBtnAddForViewMode.emit(false);
|
|
11238
|
+
_this.sharedStateService.setHideBtnAddForViewMode(false);
|
|
11239
|
+
_this.sharedStateService.setActiveHideOptionsOnView(false);
|
|
10793
11240
|
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10794
11241
|
relativeTo: _this.activatedRoute,
|
|
10795
11242
|
});
|
|
10796
11243
|
}
|
|
10797
11244
|
else {
|
|
11245
|
+
_this.sharedStateService.setActiveHideOptionsOnView(false);
|
|
10798
11246
|
setTimeout(function () {
|
|
10799
11247
|
_this.sharedStateService.triggerActiveValidatorsOnEditModalOpen();
|
|
10800
11248
|
});
|
|
@@ -10984,6 +11432,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10984
11432
|
__decorate([
|
|
10985
11433
|
Input()
|
|
10986
11434
|
], HistoricalPixAccountListComponent.prototype, "hideField", void 0);
|
|
11435
|
+
__decorate([
|
|
11436
|
+
Input()
|
|
11437
|
+
], HistoricalPixAccountListComponent.prototype, "showActionsButtonOnAdd", void 0);
|
|
10987
11438
|
__decorate([
|
|
10988
11439
|
Output()
|
|
10989
11440
|
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
@@ -10996,6 +11447,12 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10996
11447
|
__decorate([
|
|
10997
11448
|
Output()
|
|
10998
11449
|
], HistoricalPixAccountListComponent.prototype, "isEditJudicialDependentPix", void 0);
|
|
11450
|
+
__decorate([
|
|
11451
|
+
Output()
|
|
11452
|
+
], HistoricalPixAccountListComponent.prototype, "isHideBtnAddForViewMode", void 0);
|
|
11453
|
+
__decorate([
|
|
11454
|
+
Output()
|
|
11455
|
+
], HistoricalPixAccountListComponent.prototype, "isShowActionsButton", void 0);
|
|
10999
11456
|
__decorate([
|
|
11000
11457
|
Input()
|
|
11001
11458
|
], HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", null);
|