@senior-gestao-pessoas/payroll-core 9.5.0-01923a3e-20f4-4cb3-9565-a0584abd00d1 → 9.5.0-32c4c8b1-bb0c-491c-8ec0-0eef83fe1088
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 +530 -86
- 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 -10
- 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 +466 -81
- 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 +476 -81
- 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 +520 -86
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +530 -86
- 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,12 +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
9814
|
_this.hideFields = _this.sharedStateService.hideField$;
|
|
9788
9815
|
_this.suggestions = [];
|
|
9789
9816
|
_this.formGroupByRow = {};
|
|
9817
|
+
_this.isSyncingPercentage = false;
|
|
9790
9818
|
_this.cols = [
|
|
9791
9819
|
{
|
|
9792
9820
|
label: _this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),
|
|
@@ -9865,14 +9893,17 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9865
9893
|
}
|
|
9866
9894
|
HistoricalPixAccountComponent.prototype.ngOnInit = function () {
|
|
9867
9895
|
var _this = this;
|
|
9896
|
+
this.showFields = this.showField;
|
|
9868
9897
|
this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
|
|
9869
|
-
this.sharedStateService.showButton$.subscribe(function (value) {
|
|
9870
|
-
_this.showButtonView = value;
|
|
9871
|
-
});
|
|
9872
9898
|
this.sharedStateService.showEditMode$.subscribe(function (value) {
|
|
9873
9899
|
_this.showEditMode = value;
|
|
9874
9900
|
_this.isEditModeForSave = value;
|
|
9875
9901
|
});
|
|
9902
|
+
this.sharedStateService.activeHideOptionsOnView$.subscribe(function (value) {
|
|
9903
|
+
if (value) {
|
|
9904
|
+
_this.showButtonView = false;
|
|
9905
|
+
}
|
|
9906
|
+
});
|
|
9876
9907
|
this.sharedStateService.activeValidatorsOnEditModalOpen$
|
|
9877
9908
|
.subscribe(function () {
|
|
9878
9909
|
Object.values(_this.formGroupByRow).forEach(function (fg) {
|
|
@@ -9883,6 +9914,7 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9883
9914
|
});
|
|
9884
9915
|
_this.emitFormValidity();
|
|
9885
9916
|
});
|
|
9917
|
+
this.resetFormState();
|
|
9886
9918
|
};
|
|
9887
9919
|
HistoricalPixAccountComponent.prototype.ngOnChanges = function (changes) {
|
|
9888
9920
|
if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
|
|
@@ -9895,6 +9927,10 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9895
9927
|
var newData = changes['addExistentHistoricData'].currentValue;
|
|
9896
9928
|
this.rebuildFormGroupMap(newData);
|
|
9897
9929
|
}
|
|
9930
|
+
if (changes['isEditMode']) {
|
|
9931
|
+
this.isEditMode = changes['isEditMode'].currentValue;
|
|
9932
|
+
this.cd.detectChanges();
|
|
9933
|
+
}
|
|
9898
9934
|
};
|
|
9899
9935
|
HistoricalPixAccountComponent.prototype.createFormGroup = function () {
|
|
9900
9936
|
this.historicalPixAccountList = this.formBuilder.group({
|
|
@@ -9909,9 +9945,31 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9909
9945
|
this.cd.detectChanges();
|
|
9910
9946
|
};
|
|
9911
9947
|
HistoricalPixAccountComponent.prototype.emitFormValidity = function () {
|
|
9912
|
-
|
|
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
|
+
});
|
|
9913
9969
|
fg.updateValueAndValidity();
|
|
9914
|
-
|
|
9970
|
+
if (!fg.valid) {
|
|
9971
|
+
allValid = false;
|
|
9972
|
+
}
|
|
9915
9973
|
});
|
|
9916
9974
|
this.isValidChangeForm.emit(allValid);
|
|
9917
9975
|
};
|
|
@@ -9932,65 +9990,27 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
9932
9990
|
};
|
|
9933
9991
|
HistoricalPixAccountComponent.prototype.createPixRowFormGroup = function () {
|
|
9934
9992
|
return this.formBuilder.group({
|
|
9993
|
+
id: [null],
|
|
9935
9994
|
pixKeyType: [null, Validators.required],
|
|
9936
9995
|
pixKey: [null],
|
|
9937
9996
|
percentage: [0, Validators.compose(__spread(this.initialValidatorOfPercentage, [
|
|
9938
9997
|
Validators.max(this.maxValuePercentage),
|
|
9939
|
-
]))]
|
|
9998
|
+
]))],
|
|
9999
|
+
externalId: [null],
|
|
9940
10000
|
});
|
|
9941
10001
|
};
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
this.setPixKeyValidators(true, form);
|
|
9953
|
-
this.emitFormValidity();
|
|
9954
|
-
};
|
|
9955
|
-
HistoricalPixAccountComponent.prototype.onBlurPixCpfAndCnpj = function (index) {
|
|
9956
|
-
var form = this.formGroupByRow[index];
|
|
9957
|
-
var pixKeyControl = form.get('pixKey');
|
|
9958
|
-
var pixKeyTypeControl = form.get('pixKeyType');
|
|
9959
|
-
if (!pixKeyControl || !pixKeyTypeControl)
|
|
9960
|
-
return;
|
|
9961
|
-
var currentValue = pixKeyControl.value;
|
|
9962
|
-
var pixKeyType = pixKeyTypeControl.value.key;
|
|
9963
|
-
var rawValue = (currentValue || '').replace(/\D/g, '');
|
|
9964
|
-
pixKeyControl.setValue(rawValue, { emitEvent: false });
|
|
9965
|
-
if (pixKeyControl.valid) {
|
|
9966
|
-
form.patchValue({
|
|
9967
|
-
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
|
|
9968
10012
|
});
|
|
9969
10013
|
}
|
|
9970
|
-
this.emitFormValidity();
|
|
9971
|
-
};
|
|
9972
|
-
HistoricalPixAccountComponent.prototype.getFormattedPixKey = function (type, value) {
|
|
9973
|
-
return FormatUtilsService.getFormattedSubscriptionNumber(value, type);
|
|
9974
|
-
};
|
|
9975
|
-
HistoricalPixAccountComponent.prototype.syncPixDataToParentForm = function () {
|
|
9976
|
-
if (!this.isEditModeForSave)
|
|
9977
|
-
return;
|
|
9978
|
-
var values = Object.values(this.formGroupByRow).map(function (fg) {
|
|
9979
|
-
var value = fg.getRawValue();
|
|
9980
|
-
var pixKeyType = value.pixKeyType.key;
|
|
9981
|
-
if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ') {
|
|
9982
|
-
value.pixKey = (value.pixKey || '').replace(/[.\-\/]/g, '');
|
|
9983
|
-
}
|
|
9984
|
-
else if (pixKeyType === 'TELEPHONE') {
|
|
9985
|
-
value.pixKey = (value.pixKey || '').replace(/[()\s\-]/g, '');
|
|
9986
|
-
}
|
|
9987
|
-
return value;
|
|
9988
|
-
});
|
|
9989
|
-
this.formGroup
|
|
9990
|
-
.get(this.fieldFormGroup)
|
|
9991
|
-
.get('historicalPixAccountList')
|
|
9992
|
-
.setValue(values);
|
|
9993
|
-
this.emitFormValidity();
|
|
9994
10014
|
};
|
|
9995
10015
|
HistoricalPixAccountComponent.prototype.syncResetPixFormToParent = function () {
|
|
9996
10016
|
this.formGroupByRow = {};
|
|
@@ -10000,6 +10020,46 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10000
10020
|
this.rebuildFormGroupMap(this.addExistentHistoricData);
|
|
10001
10021
|
}
|
|
10002
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
|
+
};
|
|
10003
10063
|
HistoricalPixAccountComponent.prototype.onLazyLoad = function (event) {
|
|
10004
10064
|
var _this = this;
|
|
10005
10065
|
var first = event && event.first ? event.first : 0;
|
|
@@ -10047,9 +10107,11 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10047
10107
|
};
|
|
10048
10108
|
HistoricalPixAccountComponent.prototype.addPix = function () {
|
|
10049
10109
|
var newItem = {
|
|
10110
|
+
id: null,
|
|
10050
10111
|
pixKeyType: {},
|
|
10051
10112
|
pixKey: '',
|
|
10052
|
-
percentage:
|
|
10113
|
+
percentage: '',
|
|
10114
|
+
externalId: '',
|
|
10053
10115
|
};
|
|
10054
10116
|
var index = this.addExistentHistoricData.length;
|
|
10055
10117
|
this.addExistentHistoricData = __spread(this.addExistentHistoricData, [
|
|
@@ -10060,11 +10122,27 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10060
10122
|
this.emitFormValidity();
|
|
10061
10123
|
};
|
|
10062
10124
|
HistoricalPixAccountComponent.prototype.deletePix = function (index) {
|
|
10125
|
+
var _this = this;
|
|
10063
10126
|
if (this.dataListPix.editingCell) {
|
|
10064
10127
|
this.dataListPix.editingCell = null;
|
|
10065
10128
|
}
|
|
10066
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
|
+
}
|
|
10067
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
|
+
});
|
|
10068
10146
|
this.emitFormValidity();
|
|
10069
10147
|
};
|
|
10070
10148
|
HistoricalPixAccountComponent.prototype.rebuildFormGroupMap = function (data) {
|
|
@@ -10139,6 +10217,7 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10139
10217
|
}
|
|
10140
10218
|
$event["dateChange"] = this.dateChange;
|
|
10141
10219
|
newDataList.push($event);
|
|
10220
|
+
this.addExistentHistoricData.push(__assign({}, $event));
|
|
10142
10221
|
}
|
|
10143
10222
|
this.historicalPixAccountList.get("historicalPixAccountList").setValue(newDataList);
|
|
10144
10223
|
this.verifyTotalPercentage();
|
|
@@ -10168,7 +10247,14 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10168
10247
|
this.msgTotalLimitByPercentage = null;
|
|
10169
10248
|
}
|
|
10170
10249
|
};
|
|
10250
|
+
HistoricalPixAccountComponent.prototype.formatPercentage = function (value) {
|
|
10251
|
+
if (value == null || value === '' || isNaN(Number(value))) {
|
|
10252
|
+
return '0.00';
|
|
10253
|
+
}
|
|
10254
|
+
return Number(value).toFixed(2);
|
|
10255
|
+
};
|
|
10171
10256
|
HistoricalPixAccountComponent.prototype.onSyncValue = function (field, index) {
|
|
10257
|
+
var _this = this;
|
|
10172
10258
|
if (this.formGroupByRow &&
|
|
10173
10259
|
this.formGroupByRow[index] &&
|
|
10174
10260
|
this.formGroupByRow[index].get(field)) {
|
|
@@ -10177,14 +10263,352 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10177
10263
|
this.addExistentHistoricData[index][field] = value;
|
|
10178
10264
|
control.markAsDirty();
|
|
10179
10265
|
control.markAsTouched();
|
|
10266
|
+
if (field === 'percentage') {
|
|
10267
|
+
var currentList = this.addExistentHistoricData
|
|
10268
|
+
.map(function (item, i) { return i === index ? 0 : (parseFloat(item.percentage) || 0); });
|
|
10269
|
+
this.validatePercentageValid(currentList, this.formGroupByRow[index]);
|
|
10270
|
+
if (!this.isSyncingPercentage) {
|
|
10271
|
+
this.isSyncingPercentage = true;
|
|
10272
|
+
setTimeout(function () {
|
|
10273
|
+
_this.syncPixDataToParentForm();
|
|
10274
|
+
_this.isSyncingPercentage = false;
|
|
10275
|
+
}, 0);
|
|
10276
|
+
}
|
|
10277
|
+
}
|
|
10180
10278
|
control.updateValueAndValidity();
|
|
10181
|
-
|
|
10182
|
-
|
|
10279
|
+
this.formGroupByRow[index].updateValueAndValidity();
|
|
10280
|
+
this.emitFormValidity();
|
|
10281
|
+
}
|
|
10282
|
+
};
|
|
10283
|
+
HistoricalPixAccountComponent.prototype.close = function () {
|
|
10284
|
+
this.visible = false;
|
|
10285
|
+
};
|
|
10286
|
+
HistoricalPixAccountComponent.prototype.getFormattedTelephoneNumber = function (telephoneNumber) {
|
|
10287
|
+
return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
|
|
10288
|
+
};
|
|
10289
|
+
HistoricalPixAccountComponent.prototype.getFormattedCpf = function (cpf) {
|
|
10290
|
+
return FormatUtilsService.getFormattedCpf(cpf);
|
|
10291
|
+
};
|
|
10292
|
+
HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
|
|
10293
|
+
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
10294
|
+
};
|
|
10295
|
+
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
10296
|
+
return FormatUtilsService.getFormattedPercentage(value);
|
|
10297
|
+
};
|
|
10298
|
+
/**
|
|
10299
|
+
* Reseta completamente o estado do formulário e controles
|
|
10300
|
+
*/
|
|
10301
|
+
HistoricalPixAccountComponent.prototype.resetFormState = function () {
|
|
10302
|
+
if (this.formGroupByRow) {
|
|
10303
|
+
Object.values(this.formGroupByRow).forEach(function (form) {
|
|
10304
|
+
if (form) {
|
|
10305
|
+
Object.keys(form.controls).forEach(function (controlName) {
|
|
10306
|
+
var control = form.get(controlName);
|
|
10307
|
+
if (control) {
|
|
10308
|
+
control.setErrors(null);
|
|
10309
|
+
control.markAsUntouched();
|
|
10310
|
+
control.markAsPristine();
|
|
10311
|
+
}
|
|
10312
|
+
});
|
|
10313
|
+
form.updateValueAndValidity();
|
|
10314
|
+
}
|
|
10183
10315
|
});
|
|
10184
|
-
|
|
10316
|
+
}
|
|
10317
|
+
if (this.dataListPix) {
|
|
10318
|
+
if (typeof this.dataListPix.closeAllCellEditors === 'function') {
|
|
10319
|
+
try {
|
|
10320
|
+
this.dataListPix.closeAllCellEditors();
|
|
10321
|
+
}
|
|
10322
|
+
catch (e) {
|
|
10323
|
+
console.error('Erro ao tentar fechar cell editors:', e);
|
|
10324
|
+
}
|
|
10325
|
+
}
|
|
10326
|
+
else if (this.dataListPix.editingCell) {
|
|
10327
|
+
this.dataListPix.editingCell = null;
|
|
10328
|
+
}
|
|
10329
|
+
if (this.dataListPix.editing !== undefined) {
|
|
10330
|
+
this.dataListPix.editing = false;
|
|
10331
|
+
}
|
|
10332
|
+
}
|
|
10333
|
+
this.cd.detectChanges();
|
|
10334
|
+
};
|
|
10335
|
+
/**
|
|
10336
|
+
* Formata a chave PIX para exibição baseada no tipo
|
|
10337
|
+
*/
|
|
10338
|
+
HistoricalPixAccountComponent.prototype.getFormattedPixKey = function (pixKeyType, pixKey) {
|
|
10339
|
+
if (!pixKey)
|
|
10340
|
+
return '';
|
|
10341
|
+
switch (pixKeyType) {
|
|
10342
|
+
case 'CPF':
|
|
10343
|
+
return FormatUtilsService.getFormattedCpf(pixKey);
|
|
10344
|
+
case 'CNPJ':
|
|
10345
|
+
return FormatUtilsService.getFormattedCnpj(pixKey);
|
|
10346
|
+
case 'TELEPHONE':
|
|
10347
|
+
return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
|
|
10348
|
+
case 'EMAIL':
|
|
10349
|
+
case 'RANDOM_KEY':
|
|
10350
|
+
default:
|
|
10351
|
+
return pixKey;
|
|
10352
|
+
}
|
|
10353
|
+
};
|
|
10354
|
+
/**
|
|
10355
|
+
* Obtém o tipo de chave PIX do item atual
|
|
10356
|
+
*/
|
|
10357
|
+
HistoricalPixAccountComponent.prototype.getPixKeyType = function (item) {
|
|
10358
|
+
return item && item.pixKeyType && item.pixKeyType.key || '';
|
|
10359
|
+
};
|
|
10360
|
+
/**
|
|
10361
|
+
* Verifica se um controle está inválido para os campos editáveis
|
|
10362
|
+
*/
|
|
10363
|
+
HistoricalPixAccountComponent.prototype.isInvalid = function (index, controlName) {
|
|
10364
|
+
var form = this.formGroupByRow[index];
|
|
10365
|
+
if (!form)
|
|
10366
|
+
return false;
|
|
10367
|
+
var control = form.get(controlName);
|
|
10368
|
+
if (!control)
|
|
10369
|
+
return false;
|
|
10370
|
+
return control.invalid && (control.touched || control.dirty);
|
|
10371
|
+
};
|
|
10372
|
+
/**
|
|
10373
|
+
* Método chamado quando uma célula entra no modo de edição
|
|
10374
|
+
*/
|
|
10375
|
+
HistoricalPixAccountComponent.prototype.onCellEditInit = function (event) {
|
|
10376
|
+
var rowIndex = this.addExistentHistoricData.findIndex(function (item) { return item === event.data; });
|
|
10377
|
+
if (rowIndex < 0)
|
|
10378
|
+
return;
|
|
10379
|
+
var form = this.formGroupByRow[rowIndex];
|
|
10380
|
+
if (form && form.get('pixKey')) {
|
|
10381
|
+
var pixKeyControl = form.get('pixKey');
|
|
10382
|
+
var currentValue = this.addExistentHistoricData[rowIndex].pixKey;
|
|
10383
|
+
pixKeyControl.setValue(currentValue);
|
|
10384
|
+
}
|
|
10385
|
+
};
|
|
10386
|
+
/**
|
|
10387
|
+
* Recupera o FormControl específico para um campo em determinado índice
|
|
10388
|
+
*/
|
|
10389
|
+
HistoricalPixAccountComponent.prototype.getFormControl = function (index, controlName) {
|
|
10390
|
+
var form = this.formGroupByRow[index];
|
|
10391
|
+
if (!form)
|
|
10392
|
+
return null;
|
|
10393
|
+
return form.get(controlName);
|
|
10394
|
+
};
|
|
10395
|
+
/**
|
|
10396
|
+
* Valida campos de documento (CPF, CNPJ) quando o usuário termina de digitar no form de edição
|
|
10397
|
+
*/
|
|
10398
|
+
HistoricalPixAccountComponent.prototype.validateDocumentField = function (index, fieldType) {
|
|
10399
|
+
var _a;
|
|
10400
|
+
var form = this.formGroupByRow[index];
|
|
10401
|
+
var item = this.addExistentHistoricData[index];
|
|
10402
|
+
if (!form || !item)
|
|
10403
|
+
return;
|
|
10404
|
+
var pixKeyControl = form.get('pixKey');
|
|
10405
|
+
if (!pixKeyControl)
|
|
10406
|
+
return;
|
|
10407
|
+
var value = item.pixKey;
|
|
10408
|
+
pixKeyControl.setValue(value);
|
|
10409
|
+
if (fieldType === 'CPF' || fieldType === 'CNPJ' || fieldType === 'TELEPHONE') {
|
|
10410
|
+
value = value ? value.toString().replace(/\D/g, '') : '';
|
|
10411
|
+
item.pixKey = value;
|
|
10412
|
+
pixKeyControl.setValue(value);
|
|
10413
|
+
}
|
|
10414
|
+
if (!value || value.toString().trim() === '') {
|
|
10415
|
+
pixKeyControl.setErrors({ required: true });
|
|
10416
|
+
pixKeyControl.markAsTouched();
|
|
10417
|
+
form.updateValueAndValidity();
|
|
10185
10418
|
this.emitFormValidity();
|
|
10419
|
+
return;
|
|
10420
|
+
}
|
|
10421
|
+
var cleanValue = value;
|
|
10422
|
+
if (fieldType === 'CPF' || fieldType === 'CNPJ') {
|
|
10423
|
+
cleanValue = value.toString().replace(/\D/g, '');
|
|
10424
|
+
item.pixKey = cleanValue;
|
|
10425
|
+
pixKeyControl.setValue(cleanValue);
|
|
10426
|
+
}
|
|
10427
|
+
var isValid = false;
|
|
10428
|
+
switch (fieldType) {
|
|
10429
|
+
case 'CPF':
|
|
10430
|
+
isValid = cleanValue.length === 11 && GenericValidator.isValidCpf({ value: cleanValue }) === null;
|
|
10431
|
+
break;
|
|
10432
|
+
case 'CNPJ':
|
|
10433
|
+
isValid = cleanValue.length === 14 && GenericValidator.isValidCnpj({ value: cleanValue }) === null;
|
|
10434
|
+
break;
|
|
10435
|
+
case 'TELEPHONE':
|
|
10436
|
+
cleanValue = value.toString().replace(/\D/g, '');
|
|
10437
|
+
isValid = GenericValidator.isValidPhoneNumber({ value: cleanValue }) === null;
|
|
10438
|
+
break;
|
|
10439
|
+
case 'EMAIL':
|
|
10440
|
+
isValid = GenericValidator.isValidEmail({ value: value }) === null;
|
|
10441
|
+
break;
|
|
10442
|
+
case 'RANDOM_KEY':
|
|
10443
|
+
isValid = true;
|
|
10444
|
+
break;
|
|
10445
|
+
default:
|
|
10446
|
+
isValid = true;
|
|
10186
10447
|
}
|
|
10448
|
+
pixKeyControl.markAsTouched();
|
|
10449
|
+
if (isValid) {
|
|
10450
|
+
pixKeyControl.setErrors(null);
|
|
10451
|
+
}
|
|
10452
|
+
else {
|
|
10453
|
+
var errorType = this.getErrorTypeForField(fieldType);
|
|
10454
|
+
pixKeyControl.setErrors((_a = {}, _a[errorType] = true, _a));
|
|
10455
|
+
}
|
|
10456
|
+
form.updateValueAndValidity();
|
|
10457
|
+
this.emitFormValidity();
|
|
10458
|
+
this.cd.detectChanges();
|
|
10459
|
+
};
|
|
10460
|
+
/**
|
|
10461
|
+
* Obtém o tipo de erro para cada tipo de campo editável
|
|
10462
|
+
*/
|
|
10463
|
+
HistoricalPixAccountComponent.prototype.getErrorTypeForField = function (fieldType) {
|
|
10464
|
+
switch (fieldType) {
|
|
10465
|
+
case 'CPF': return 'invalidCpf';
|
|
10466
|
+
case 'CNPJ': return 'invalidCnpj';
|
|
10467
|
+
case 'TELEPHONE': return 'invalidPhoneNumber';
|
|
10468
|
+
case 'EMAIL': return 'invalidEmail';
|
|
10469
|
+
default: return 'required';
|
|
10470
|
+
}
|
|
10471
|
+
};
|
|
10472
|
+
/**
|
|
10473
|
+
* Retorna a mensagem de erro apropriada para um campo
|
|
10474
|
+
*/
|
|
10475
|
+
HistoricalPixAccountComponent.prototype.getErrorMessage = function (index, controlName) {
|
|
10476
|
+
var form = this.formGroupByRow[index];
|
|
10477
|
+
if (!form)
|
|
10478
|
+
return '';
|
|
10479
|
+
var control = form.get(controlName);
|
|
10480
|
+
if (!control || !control.errors)
|
|
10481
|
+
return '';
|
|
10482
|
+
var fieldValue = control.value || '';
|
|
10483
|
+
if (control.hasError('required')) {
|
|
10484
|
+
return this.translateService.instant('hcm.payroll.required');
|
|
10485
|
+
}
|
|
10486
|
+
if (control.hasError('invalidCpf')) {
|
|
10487
|
+
return this.translateService.instant('hcm.payroll.employees_addition_cpf_error');
|
|
10488
|
+
}
|
|
10489
|
+
else if (control.hasError('invalidCnpj')) {
|
|
10490
|
+
return this.translateService.instant('hcm.payroll.employees_addition_cnpj_error');
|
|
10491
|
+
}
|
|
10492
|
+
else if (control.hasError('invalidEmail')) {
|
|
10493
|
+
return this.translateService.instant('hcm.payroll.employees_addition_email_invalid');
|
|
10494
|
+
}
|
|
10495
|
+
else if (control.hasError('invalidPhoneNumber')) {
|
|
10496
|
+
return this.translateService.instant('hcm.payroll.employees_addition_invalid_phone_number', { value: fieldValue });
|
|
10497
|
+
}
|
|
10498
|
+
return '';
|
|
10499
|
+
};
|
|
10500
|
+
/**
|
|
10501
|
+
* Tratamento ao perder o foco em campos de documento
|
|
10502
|
+
*/
|
|
10503
|
+
HistoricalPixAccountComponent.prototype.onDocumentBlur = function (index) {
|
|
10504
|
+
var form = this.formGroupByRow[index];
|
|
10505
|
+
var item = this.addExistentHistoricData[index];
|
|
10506
|
+
if (!form || !item)
|
|
10507
|
+
return;
|
|
10508
|
+
var pixKeyControl = form.get('pixKey');
|
|
10509
|
+
var pixKeyTypeControl = form.get('pixKeyType');
|
|
10510
|
+
if (!pixKeyControl || !pixKeyTypeControl.value)
|
|
10511
|
+
return;
|
|
10512
|
+
var pixKeyType = pixKeyTypeControl.value.key;
|
|
10513
|
+
var value = item.pixKey;
|
|
10514
|
+
if (pixKeyType === 'CPF' || pixKeyType === 'CNPJ' || pixKeyType === 'TELEPHONE') {
|
|
10515
|
+
value = value ? value.toString().replace(/\D/g, '') : '';
|
|
10516
|
+
item.pixKey = value;
|
|
10517
|
+
}
|
|
10518
|
+
pixKeyControl.setValue(value);
|
|
10519
|
+
this.validateDocumentField(index, pixKeyType);
|
|
10520
|
+
if (value) {
|
|
10521
|
+
if (pixKeyType === 'CPF') {
|
|
10522
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedCpf(value);
|
|
10523
|
+
}
|
|
10524
|
+
else if (pixKeyType === 'CNPJ') {
|
|
10525
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedCnpj(value);
|
|
10526
|
+
}
|
|
10527
|
+
else if (pixKeyType === 'TELEPHONE') {
|
|
10528
|
+
item.pixKeyFormatted = FormatUtilsService.getFormattedTelephoneNumber(value);
|
|
10529
|
+
}
|
|
10530
|
+
else {
|
|
10531
|
+
item.pixKeyFormatted = value;
|
|
10532
|
+
}
|
|
10533
|
+
}
|
|
10534
|
+
this.finishEditing();
|
|
10535
|
+
};
|
|
10536
|
+
HistoricalPixAccountComponent.prototype.finishEditing = function () {
|
|
10537
|
+
this.syncAllModelToForm();
|
|
10538
|
+
this.cd.detectChanges();
|
|
10187
10539
|
};
|
|
10540
|
+
HistoricalPixAccountComponent.prototype.clearErrorsTemporarily = function (rowIndex) {
|
|
10541
|
+
var form = this.formGroupByRow[rowIndex];
|
|
10542
|
+
if (form && form.get('pixKey')) {
|
|
10543
|
+
var currentValue = form.get('pixKey').value;
|
|
10544
|
+
form.get('pixKey').setErrors(null);
|
|
10545
|
+
form.get('pixKey').setValue(currentValue);
|
|
10546
|
+
}
|
|
10547
|
+
};
|
|
10548
|
+
HistoricalPixAccountComponent.prototype.closeEditModeManually = function () {
|
|
10549
|
+
var _this = this;
|
|
10550
|
+
setTimeout(function () {
|
|
10551
|
+
if (_this.dataListPix) {
|
|
10552
|
+
if (typeof _this.dataListPix.closeAllCellEditors === 'function') {
|
|
10553
|
+
_this.dataListPix.closeAllCellEditors();
|
|
10554
|
+
}
|
|
10555
|
+
else if (_this.dataListPix.editingCell) {
|
|
10556
|
+
_this.dataListPix.editingCell = null;
|
|
10557
|
+
}
|
|
10558
|
+
_this.cd.detectChanges();
|
|
10559
|
+
}
|
|
10560
|
+
}, 100);
|
|
10561
|
+
};
|
|
10562
|
+
HistoricalPixAccountComponent.prototype.syncAllModelToForm = function () {
|
|
10563
|
+
var _this = this;
|
|
10564
|
+
if (!this.addExistentHistoricData || !this.formGroupByRow)
|
|
10565
|
+
return;
|
|
10566
|
+
this.addExistentHistoricData.forEach(function (item, index) {
|
|
10567
|
+
var form = _this.formGroupByRow[index];
|
|
10568
|
+
if (form) {
|
|
10569
|
+
Object.keys(form.controls).forEach(function (controlName) {
|
|
10570
|
+
var control = form.get(controlName);
|
|
10571
|
+
if (control && item[controlName] !== undefined) {
|
|
10572
|
+
control.setValue(item[controlName]);
|
|
10573
|
+
}
|
|
10574
|
+
});
|
|
10575
|
+
var pixKeyTypeControl = form.get('pixKeyType');
|
|
10576
|
+
if (pixKeyTypeControl.value) {
|
|
10577
|
+
_this.validateDocumentField(index, pixKeyTypeControl.value.key);
|
|
10578
|
+
}
|
|
10579
|
+
}
|
|
10580
|
+
});
|
|
10581
|
+
};
|
|
10582
|
+
/**
|
|
10583
|
+
* Método para forçar o fechamento de todas as células em edição
|
|
10584
|
+
*/
|
|
10585
|
+
HistoricalPixAccountComponent.prototype.forceCloseAllCellEditors = function () {
|
|
10586
|
+
this.finishEditing();
|
|
10587
|
+
this.syncAllModelToForm();
|
|
10588
|
+
};
|
|
10589
|
+
HistoricalPixAccountComponent.prototype.isPixKeyType = function (item, type) {
|
|
10590
|
+
return item && item.pixKeyType && item.pixKeyType.key === type;
|
|
10591
|
+
};
|
|
10592
|
+
HistoricalPixAccountComponent.prototype.getPixKey = function (rowData) {
|
|
10593
|
+
return rowData ? rowData.pixKey : null;
|
|
10594
|
+
};
|
|
10595
|
+
HistoricalPixAccountComponent.prototype.setPixKey = function (rowData, value) {
|
|
10596
|
+
if (rowData) {
|
|
10597
|
+
rowData.pixKey = value;
|
|
10598
|
+
}
|
|
10599
|
+
};
|
|
10600
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isTotalPercentage100", {
|
|
10601
|
+
get: function () {
|
|
10602
|
+
if (!this.addExistentHistoricData || this.addExistentHistoricData.length === 0) {
|
|
10603
|
+
return false;
|
|
10604
|
+
}
|
|
10605
|
+
var totalPercentage = this.addExistentHistoricData
|
|
10606
|
+
.reduce(function (sum, item) { return sum + (parseFloat(item.percentage) || 0); }, 0);
|
|
10607
|
+
return totalPercentage >= 100;
|
|
10608
|
+
},
|
|
10609
|
+
enumerable: true,
|
|
10610
|
+
configurable: true
|
|
10611
|
+
});
|
|
10188
10612
|
Object.defineProperty(HistoricalPixAccountComponent.prototype, "scopedActions", {
|
|
10189
10613
|
get: function () {
|
|
10190
10614
|
return this.actions.bind(this);
|
|
@@ -10194,7 +10618,8 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10194
10618
|
});
|
|
10195
10619
|
Object.defineProperty(HistoricalPixAccountComponent.prototype, "recordsMessage", {
|
|
10196
10620
|
get: function () {
|
|
10197
|
-
return (this.totalRecords || 0) + " " + (this.totalRecords === 1 ?
|
|
10621
|
+
return (this.totalRecords || 0) + " " + (this.totalRecords === 1 ?
|
|
10622
|
+
this.translateService.instant("hcm.payroll.admission_register") : this.translateService.instant("hcm.payroll.admission_registers"));
|
|
10198
10623
|
},
|
|
10199
10624
|
enumerable: true,
|
|
10200
10625
|
configurable: true
|
|
@@ -10269,21 +10694,6 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10269
10694
|
enumerable: true,
|
|
10270
10695
|
configurable: true
|
|
10271
10696
|
});
|
|
10272
|
-
HistoricalPixAccountComponent.prototype.close = function () {
|
|
10273
|
-
this.visible = false;
|
|
10274
|
-
};
|
|
10275
|
-
HistoricalPixAccountComponent.prototype.getFormattedTelephoneNumber = function (telephoneNumber) {
|
|
10276
|
-
return FormatUtilsService.getFormattedTelephoneNumber(telephoneNumber);
|
|
10277
|
-
};
|
|
10278
|
-
HistoricalPixAccountComponent.prototype.getFormattedCpf = function (cpf) {
|
|
10279
|
-
return FormatUtilsService.getFormattedCpf(cpf);
|
|
10280
|
-
};
|
|
10281
|
-
HistoricalPixAccountComponent.prototype.getFormattedCnpj = function (cnpj) {
|
|
10282
|
-
return FormatUtilsService.getFormattedCnpj(cnpj);
|
|
10283
|
-
};
|
|
10284
|
-
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
10285
|
-
return FormatUtilsService.getFormattedPercentage(value);
|
|
10286
|
-
};
|
|
10287
10697
|
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
|
|
10288
10698
|
get: function () {
|
|
10289
10699
|
return (this.permission["incluir"]);
|
|
@@ -10379,6 +10789,15 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10379
10789
|
__decorate([
|
|
10380
10790
|
Input()
|
|
10381
10791
|
], HistoricalPixAccountComponent.prototype, "isEditModeForSave", void 0);
|
|
10792
|
+
__decorate([
|
|
10793
|
+
Input()
|
|
10794
|
+
], HistoricalPixAccountComponent.prototype, "showField", void 0);
|
|
10795
|
+
__decorate([
|
|
10796
|
+
Input()
|
|
10797
|
+
], HistoricalPixAccountComponent.prototype, "hideBtnAddForViewMode", void 0);
|
|
10798
|
+
__decorate([
|
|
10799
|
+
Input()
|
|
10800
|
+
], HistoricalPixAccountComponent.prototype, "showButtonView", void 0);
|
|
10382
10801
|
__decorate([
|
|
10383
10802
|
Output()
|
|
10384
10803
|
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
@@ -10413,8 +10832,8 @@ var HistoricalPixAccountComponent = /** @class */ (function (_super) {
|
|
|
10413
10832
|
Component({
|
|
10414
10833
|
// tslint:disable-next-line:component-selector
|
|
10415
10834
|
selector: "c-historical-pix-account",
|
|
10416
|
-
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 [customSort]=\"true\">\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",
|
|
10417
|
-
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}"]
|
|
10835
|
+
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",
|
|
10836
|
+
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}"]
|
|
10418
10837
|
})
|
|
10419
10838
|
], HistoricalPixAccountComponent);
|
|
10420
10839
|
return HistoricalPixAccountComponent;
|
|
@@ -10428,6 +10847,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10428
10847
|
_this.sharedStateService = sharedStateService;
|
|
10429
10848
|
_this.withSideBar = true;
|
|
10430
10849
|
_this.isEditMode = false;
|
|
10850
|
+
_this.showField = false;
|
|
10431
10851
|
_this.visibleChange = new EventEmitter();
|
|
10432
10852
|
_this.pixAccountItemToList = new EventEmitter();
|
|
10433
10853
|
_this.ngUnsubscribe = new Subject();
|
|
@@ -10514,8 +10934,6 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10514
10934
|
this.visible = false;
|
|
10515
10935
|
};
|
|
10516
10936
|
HistoricalPixAccountFormComponent.prototype.addItem = function () {
|
|
10517
|
-
this.pixAccountFormGroup.updateValueAndValidity();
|
|
10518
|
-
verifyValidationsForm.call(this.pixAccountFormGroup);
|
|
10519
10937
|
if (this.pixAccountFormGroup.valid) {
|
|
10520
10938
|
if (this.employeeId) {
|
|
10521
10939
|
this.pixAccountFormGroup.get("employee").setValue({
|
|
@@ -10614,6 +11032,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10614
11032
|
__decorate([
|
|
10615
11033
|
Input()
|
|
10616
11034
|
], HistoricalPixAccountFormComponent.prototype, "isEditMode", void 0);
|
|
11035
|
+
__decorate([
|
|
11036
|
+
Input()
|
|
11037
|
+
], HistoricalPixAccountFormComponent.prototype, "showField", void 0);
|
|
10617
11038
|
__decorate([
|
|
10618
11039
|
Output()
|
|
10619
11040
|
], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
|
|
@@ -10641,8 +11062,8 @@ var HistoricalPixAccountFormComponent = /** @class */ (function (_super) {
|
|
|
10641
11062
|
HistoricalPixAccountFormComponent = __decorate([
|
|
10642
11063
|
Component({
|
|
10643
11064
|
selector: "pix-account",
|
|
10644
|
-
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",
|
|
10645
|
-
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}"]
|
|
11065
|
+
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",
|
|
11066
|
+
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}"]
|
|
10646
11067
|
})
|
|
10647
11068
|
], HistoricalPixAccountFormComponent);
|
|
10648
11069
|
return HistoricalPixAccountFormComponent;
|
|
@@ -10732,10 +11153,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10732
11153
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
10733
11154
|
this.keyPayload = "historicalEmployeePix";
|
|
10734
11155
|
this.withSidebar = true;
|
|
11156
|
+
this.showActionsButtonOnAdd = false;
|
|
10735
11157
|
this.isOnlyView = new EventEmitter();
|
|
10736
11158
|
this.isOnlyEdit = new EventEmitter();
|
|
10737
11159
|
this.enableView = new EventEmitter();
|
|
10738
11160
|
this.isEditJudicialDependentPix = new EventEmitter();
|
|
11161
|
+
this.isHideBtnAddForViewMode = new EventEmitter();
|
|
11162
|
+
this.isShowActionsButton = new EventEmitter();
|
|
10739
11163
|
this.ngUnsubscribe = new Subject();
|
|
10740
11164
|
this.loading = true;
|
|
10741
11165
|
this.columns = [
|
|
@@ -10776,16 +11200,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10776
11200
|
command: function () {
|
|
10777
11201
|
if (_this.isAllowToViewHistorical) {
|
|
10778
11202
|
_this.sharedStateService.setHideField(true);
|
|
10779
|
-
_this.
|
|
11203
|
+
_this.isShowActionsButton.emit(false);
|
|
10780
11204
|
_this.sharedStateService.setShowEditMode(false);
|
|
10781
11205
|
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10782
11206
|
if (_this.withSidebar) {
|
|
10783
11207
|
_this.isOnlyView.emit(true);
|
|
11208
|
+
_this.isOnlyEdit.emit(false);
|
|
11209
|
+
_this.isHideBtnAddForViewMode.emit(true);
|
|
11210
|
+
_this.sharedStateService.setHideBtnAddForViewMode(true);
|
|
11211
|
+
_this.sharedStateService.setActiveHideOptionsOnView(true);
|
|
10784
11212
|
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10785
11213
|
relativeTo: _this.activatedRoute,
|
|
10786
11214
|
});
|
|
10787
11215
|
}
|
|
10788
11216
|
else {
|
|
11217
|
+
_this.sharedStateService.setActiveHideOptionsOnView(true);
|
|
10789
11218
|
_this.sharedStateService.setSaveButton(false);
|
|
10790
11219
|
_this.enableView.emit(dateChange);
|
|
10791
11220
|
}
|
|
@@ -10800,15 +11229,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10800
11229
|
command: function () {
|
|
10801
11230
|
if (_this.isAllowToEditHistorical) {
|
|
10802
11231
|
_this.sharedStateService.setHideField(true);
|
|
10803
|
-
_this.
|
|
11232
|
+
_this.isShowActionsButton.emit(true);
|
|
10804
11233
|
_this.sharedStateService.setShowEditMode(true);
|
|
10805
11234
|
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10806
11235
|
if (_this.withSidebar) {
|
|
11236
|
+
_this.isOnlyView.emit(false);
|
|
11237
|
+
_this.isOnlyEdit.emit(true);
|
|
11238
|
+
_this.isHideBtnAddForViewMode.emit(false);
|
|
11239
|
+
_this.sharedStateService.setHideBtnAddForViewMode(false);
|
|
11240
|
+
_this.sharedStateService.setActiveHideOptionsOnView(false);
|
|
10807
11241
|
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10808
11242
|
relativeTo: _this.activatedRoute,
|
|
10809
11243
|
});
|
|
10810
11244
|
}
|
|
10811
11245
|
else {
|
|
11246
|
+
_this.sharedStateService.setActiveHideOptionsOnView(false);
|
|
10812
11247
|
setTimeout(function () {
|
|
10813
11248
|
_this.sharedStateService.triggerActiveValidatorsOnEditModalOpen();
|
|
10814
11249
|
});
|
|
@@ -10998,6 +11433,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10998
11433
|
__decorate([
|
|
10999
11434
|
Input()
|
|
11000
11435
|
], HistoricalPixAccountListComponent.prototype, "hideField", void 0);
|
|
11436
|
+
__decorate([
|
|
11437
|
+
Input()
|
|
11438
|
+
], HistoricalPixAccountListComponent.prototype, "showActionsButtonOnAdd", void 0);
|
|
11001
11439
|
__decorate([
|
|
11002
11440
|
Output()
|
|
11003
11441
|
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
@@ -11010,6 +11448,12 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
11010
11448
|
__decorate([
|
|
11011
11449
|
Output()
|
|
11012
11450
|
], HistoricalPixAccountListComponent.prototype, "isEditJudicialDependentPix", void 0);
|
|
11451
|
+
__decorate([
|
|
11452
|
+
Output()
|
|
11453
|
+
], HistoricalPixAccountListComponent.prototype, "isHideBtnAddForViewMode", void 0);
|
|
11454
|
+
__decorate([
|
|
11455
|
+
Output()
|
|
11456
|
+
], HistoricalPixAccountListComponent.prototype, "isShowActionsButton", void 0);
|
|
11013
11457
|
__decorate([
|
|
11014
11458
|
Input()
|
|
11015
11459
|
], HistoricalPixAccountListComponent.prototype, "hideFieldsOnAdd$", null);
|