@senior-gestao-pessoas/payroll-core 9.8.0 → 9.9.0-feature-hcmgdp-12490-b88ad694
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 +618 -64
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
- package/components/input-rest-auto-complete/input-rest-auto-complete.component.d.ts +2 -0
- package/components/transportation-voucher-scale-lookup/autocomplete.service.d.ts +31 -0
- package/components/transportation-voucher-scale-lookup/index.d.ts +5 -0
- package/components/transportation-voucher-scale-lookup/lookup.service.d.ts +47 -0
- package/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.component.d.ts +80 -0
- package/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.dto.d.ts +8 -0
- package/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.module.d.ts +2 -0
- package/esm2015/components/input-rest-auto-complete/input-rest-auto-complete.component.js +87 -50
- package/esm2015/components/transportation-voucher-scale-lookup/autocomplete.service.js +114 -0
- package/esm2015/components/transportation-voucher-scale-lookup/index.js +6 -0
- package/esm2015/components/transportation-voucher-scale-lookup/lookup.service.js +147 -0
- package/esm2015/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.component.js +215 -0
- package/esm2015/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.dto.js +17 -0
- package/esm2015/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.module.js +31 -0
- package/esm2015/public_api.js +2 -1
- package/esm5/components/input-rest-auto-complete/input-rest-auto-complete.component.js +88 -50
- package/esm5/components/transportation-voucher-scale-lookup/autocomplete.service.js +128 -0
- package/esm5/components/transportation-voucher-scale-lookup/index.js +6 -0
- package/esm5/components/transportation-voucher-scale-lookup/lookup.service.js +152 -0
- package/esm5/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.component.js +223 -0
- package/esm5/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.dto.js +19 -0
- package/esm5/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.module.js +34 -0
- package/esm5/public_api.js +2 -1
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +583 -66
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +615 -66
- package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/locale/en-US.json +5 -1
- package/locale/es-ES.json +5 -1
- package/locale/pt-BR.json +5 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
|
@@ -12,7 +12,7 @@ import { DropdownModule } from 'primeng/dropdown';
|
|
|
12
12
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
13
13
|
import { InputTextModule } from 'primeng/inputtext';
|
|
14
14
|
import { SharedModule as SharedModule$1 } from 'primeng/shared';
|
|
15
|
-
import { LocaleService, ButtonModule, LoadingStateModule, ObjectCardModule, ThumbnailModule, ImageCropperService, FieldType, DynamicFormModule, FormField, CustomFieldsComponent as CustomFieldsComponent$1, SidebarModule, ControlErrorsModule, CustomFieldsModule as CustomFieldsModule$1 } from '@seniorsistemas/angular-components';
|
|
15
|
+
import { LocaleService, ButtonModule, LoadingStateModule, ObjectCardModule, ThumbnailModule, ImageCropperService, FieldType, DynamicFormModule, FormField, LocaleModule, CustomFieldsComponent as CustomFieldsComponent$1, SidebarModule, ControlErrorsModule, CustomFieldsModule as CustomFieldsModule$1 } from '@seniorsistemas/angular-components';
|
|
16
16
|
import * as moment_ from 'moment';
|
|
17
17
|
import { now } from 'moment';
|
|
18
18
|
import { Subject, throwError, forkJoin, Observable, BehaviorSubject } from 'rxjs';
|
|
@@ -2871,62 +2871,97 @@ var InputRestAutoCompleteComponent = /** @class */ (function () {
|
|
|
2871
2871
|
InputRestAutoCompleteComponent.prototype.filterQuery = function (event) {
|
|
2872
2872
|
var _this = this;
|
|
2873
2873
|
var query = event.query;
|
|
2874
|
-
if (!(isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
2874
|
+
if (!(Number.isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
2875
2875
|
try {
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
referenceDate: this.referenceDate,
|
|
2881
|
-
})
|
|
2882
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2883
|
-
}
|
|
2884
|
-
else if (this.isDismissalReason) {
|
|
2885
|
-
var params = { valueSearch: query };
|
|
2886
|
-
if (this.referenceDate) {
|
|
2887
|
-
params['referenceDate'] = this.referenceDate;
|
|
2888
|
-
}
|
|
2889
|
-
return this.service
|
|
2890
|
-
.query('autocompleteDismissalReason', params, ServiceType.GENERAL_REGISTER)
|
|
2891
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2892
|
-
}
|
|
2893
|
-
else if (this.usingType && this.usingType.length) {
|
|
2894
|
-
return this.service
|
|
2895
|
-
.query('autocompleteOtherCompanyFilterUsingType', {
|
|
2896
|
-
searchText: query,
|
|
2897
|
-
usingType: this.usingType,
|
|
2898
|
-
})
|
|
2899
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2900
|
-
}
|
|
2901
|
-
else if (this.isDepartmentFromCompany) {
|
|
2902
|
-
return this.service
|
|
2903
|
-
.query('autocompleteDepartmentQuery', {
|
|
2904
|
-
searchText: query,
|
|
2905
|
-
companyId: this.companyId,
|
|
2906
|
-
referenceDate: this.referenceDate,
|
|
2907
|
-
})
|
|
2908
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2909
|
-
}
|
|
2910
|
-
else if (this.isSituationDefinition) {
|
|
2911
|
-
var params = { searchText: query };
|
|
2912
|
-
return this.service
|
|
2913
|
-
.query('autocompleteSituationDefinitionQuery', params, ServiceType.ORGANIZATION_REGISTER)
|
|
2914
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2915
|
-
}
|
|
2916
|
-
else if (this.isWagetype) {
|
|
2917
|
-
var params = { searchText: query, companyId: this.companyId };
|
|
2918
|
-
return this.service
|
|
2919
|
-
.query('autocompleteWagetypeQuery', params, ServiceType.ENTRY)
|
|
2920
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2921
|
-
}
|
|
2922
|
-
this.service
|
|
2923
|
-
.query('autocomplete', this.getParamsRest(query), this.serviceType).subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2876
|
+
var queryConfig = this.getQueryConfiguration(query);
|
|
2877
|
+
return this.service
|
|
2878
|
+
.query(queryConfig.endpoint, queryConfig.params, queryConfig.serviceType)
|
|
2879
|
+
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
2924
2880
|
}
|
|
2925
2881
|
catch (e) {
|
|
2926
2882
|
console.log(e);
|
|
2927
2883
|
}
|
|
2928
2884
|
}
|
|
2929
2885
|
};
|
|
2886
|
+
InputRestAutoCompleteComponent.prototype.getQueryConfiguration = function (query) {
|
|
2887
|
+
var _this = this;
|
|
2888
|
+
var queryStrategies = [
|
|
2889
|
+
{
|
|
2890
|
+
condition: function () { return _this.isTimetrackingSituation; },
|
|
2891
|
+
endpoint: 'autocompleteTimetrackingSituation',
|
|
2892
|
+
params: function () { return ({
|
|
2893
|
+
valueSearch: query,
|
|
2894
|
+
referenceDate: _this.referenceDate,
|
|
2895
|
+
}); },
|
|
2896
|
+
serviceType: this.serviceType,
|
|
2897
|
+
},
|
|
2898
|
+
{
|
|
2899
|
+
condition: function () { return _this.isDismissalReason; },
|
|
2900
|
+
endpoint: 'autocompleteDismissalReason',
|
|
2901
|
+
params: function () {
|
|
2902
|
+
var params = { valueSearch: query };
|
|
2903
|
+
if (_this.referenceDate) {
|
|
2904
|
+
params['referenceDate'] = _this.referenceDate;
|
|
2905
|
+
}
|
|
2906
|
+
return params;
|
|
2907
|
+
},
|
|
2908
|
+
serviceType: ServiceType.GENERAL_REGISTER,
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
condition: function () { return _this.usingType && _this.usingType.length; },
|
|
2912
|
+
endpoint: 'autocompleteOtherCompanyFilterUsingType',
|
|
2913
|
+
params: function () { return ({
|
|
2914
|
+
searchText: query,
|
|
2915
|
+
usingType: _this.usingType,
|
|
2916
|
+
}); },
|
|
2917
|
+
serviceType: this.serviceType,
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
condition: function () { return _this.isDepartmentFromCompany; },
|
|
2921
|
+
endpoint: 'autocompleteDepartmentQuery',
|
|
2922
|
+
params: function () { return ({
|
|
2923
|
+
searchText: query,
|
|
2924
|
+
companyId: _this.companyId,
|
|
2925
|
+
referenceDate: _this.referenceDate,
|
|
2926
|
+
}); },
|
|
2927
|
+
serviceType: this.serviceType,
|
|
2928
|
+
},
|
|
2929
|
+
{
|
|
2930
|
+
condition: function () { return _this.isSituationDefinition; },
|
|
2931
|
+
endpoint: 'autocompleteSituationDefinitionQuery',
|
|
2932
|
+
params: function () { return ({ searchText: query }); },
|
|
2933
|
+
serviceType: ServiceType.ORGANIZATION_REGISTER,
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
condition: function () { return _this.isWagetype; },
|
|
2937
|
+
endpoint: 'autocompleteWagetypeQuery',
|
|
2938
|
+
params: function () { return ({
|
|
2939
|
+
searchText: query,
|
|
2940
|
+
companyId: _this.companyId,
|
|
2941
|
+
}); },
|
|
2942
|
+
serviceType: ServiceType.ENTRY,
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
condition: function () { return _this.isTransportationVoucherScaleGroup; },
|
|
2946
|
+
endpoint: 'autocompleteTransportationVoucherScaleGroupQuery',
|
|
2947
|
+
params: function () { return ({ searchText: query }); },
|
|
2948
|
+
serviceType: ServiceType.GENERAL_REGISTER,
|
|
2949
|
+
},
|
|
2950
|
+
];
|
|
2951
|
+
var strategy = queryStrategies.find(function (s) { return s.condition(); });
|
|
2952
|
+
if (strategy) {
|
|
2953
|
+
return {
|
|
2954
|
+
endpoint: strategy.endpoint,
|
|
2955
|
+
params: strategy.params(),
|
|
2956
|
+
serviceType: strategy.serviceType,
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
return {
|
|
2960
|
+
endpoint: 'autocomplete',
|
|
2961
|
+
params: this.getParamsRest(query),
|
|
2962
|
+
serviceType: this.serviceType,
|
|
2963
|
+
};
|
|
2964
|
+
};
|
|
2930
2965
|
InputRestAutoCompleteComponent.prototype.formaterResponce = function (result) {
|
|
2931
2966
|
var _this = this;
|
|
2932
2967
|
this.suggestions = [];
|
|
@@ -3150,6 +3185,9 @@ var InputRestAutoCompleteComponent = /** @class */ (function () {
|
|
|
3150
3185
|
__decorate([
|
|
3151
3186
|
Input()
|
|
3152
3187
|
], InputRestAutoCompleteComponent.prototype, "multiple", void 0);
|
|
3188
|
+
__decorate([
|
|
3189
|
+
Input()
|
|
3190
|
+
], InputRestAutoCompleteComponent.prototype, "isTransportationVoucherScaleGroup", void 0);
|
|
3153
3191
|
__decorate([
|
|
3154
3192
|
Input()
|
|
3155
3193
|
], InputRestAutoCompleteComponent.prototype, "serviceType", void 0);
|
|
@@ -7527,6 +7565,517 @@ var WorkstationgroupLookupModule = /** @class */ (function () {
|
|
|
7527
7565
|
return WorkstationgroupLookupModule;
|
|
7528
7566
|
}());
|
|
7529
7567
|
|
|
7568
|
+
var moment$c = moment_;
|
|
7569
|
+
var AutocompleteService$1 = /** @class */ (function () {
|
|
7570
|
+
function AutocompleteService(httpClienteService) {
|
|
7571
|
+
this.httpClienteService = httpClienteService;
|
|
7572
|
+
}
|
|
7573
|
+
AutocompleteService.prototype.getAutoComplete = function (entity, params, searchFields, codeIsString, service) {
|
|
7574
|
+
var getParams = this.generateGridParameters(params, searchFields, codeIsString);
|
|
7575
|
+
return this.httpClienteService.getAutoComplete(entity, getParams, service)
|
|
7576
|
+
.pipe(map(function (result) { return result && result.contents; }));
|
|
7577
|
+
};
|
|
7578
|
+
AutocompleteService.prototype.getAutoCompleteQuery = function (query, params, service) {
|
|
7579
|
+
if (service === void 0) { service = ServiceType.PAYROLL; }
|
|
7580
|
+
return this.httpClienteService.query(query, params, service)
|
|
7581
|
+
.pipe(map(function (data) { return data && data.result; }));
|
|
7582
|
+
};
|
|
7583
|
+
/**
|
|
7584
|
+
* Gera os parametros de pesquisa via pesquisa na grid
|
|
7585
|
+
* @param filterData
|
|
7586
|
+
*/
|
|
7587
|
+
AutocompleteService.prototype.generateGridParameters = function (filterData, searchFields, codeIsString) {
|
|
7588
|
+
var _this = this;
|
|
7589
|
+
var gridParameters = "";
|
|
7590
|
+
Object.keys(filterData).forEach(function (attribute) {
|
|
7591
|
+
var filterSearchField = searchFields && searchFields.filter(function (field) { return attribute === field.name; })[0];
|
|
7592
|
+
var filterQueryString = null;
|
|
7593
|
+
var operatorsQuery = "";
|
|
7594
|
+
var searchField = filterSearchField && filterSearchField.type;
|
|
7595
|
+
if (!filterSearchField && attribute != CoreFieldType.searchValue)
|
|
7596
|
+
searchField = FieldType.String;
|
|
7597
|
+
if (!filterSearchField && attribute === CoreFieldType.searchValue)
|
|
7598
|
+
searchField = CoreFieldType.searchValue;
|
|
7599
|
+
if (gridParameters)
|
|
7600
|
+
operatorsQuery = " and ";
|
|
7601
|
+
filterQueryString = _this.getParameterByType(searchField, attribute, filterData[attribute], codeIsString);
|
|
7602
|
+
if (filterQueryString)
|
|
7603
|
+
gridParameters += " " + operatorsQuery + " " + filterQueryString;
|
|
7604
|
+
});
|
|
7605
|
+
return gridParameters;
|
|
7606
|
+
};
|
|
7607
|
+
/**
|
|
7608
|
+
* Gera a string de consulta CRUD de um campo.
|
|
7609
|
+
* @param type Tipo do campo.
|
|
7610
|
+
* @param attribute Nome do atribute da entidade
|
|
7611
|
+
* @param value Valor do campo
|
|
7612
|
+
*/
|
|
7613
|
+
AutocompleteService.prototype.getParameterByType = function (type, attribute, value, codeIsString) {
|
|
7614
|
+
if (!value && type != CoreFieldType.searchValue)
|
|
7615
|
+
return attribute + " is null";
|
|
7616
|
+
if (value && value === 'not null' && type != CoreFieldType.searchValue)
|
|
7617
|
+
return attribute + " is not null";
|
|
7618
|
+
switch (type) {
|
|
7619
|
+
case FieldType.Date:
|
|
7620
|
+
return attribute + " eq '" + moment$c(value).format('YYYY-MM-DD') + "'";
|
|
7621
|
+
case FieldType.Enum:
|
|
7622
|
+
return attribute + " eq '" + value + "'";
|
|
7623
|
+
case FieldType.Integer:
|
|
7624
|
+
return attribute + " eq " + value;
|
|
7625
|
+
case FieldType.Autocomplete:
|
|
7626
|
+
return attribute + " eq '" + value.id + "'";
|
|
7627
|
+
case CoreFieldType.searchValue:
|
|
7628
|
+
return "" + this.getParameterBySearchType(value, codeIsString);
|
|
7629
|
+
default:
|
|
7630
|
+
return this.getSearchFilterString(attribute, value);
|
|
7631
|
+
}
|
|
7632
|
+
};
|
|
7633
|
+
/**
|
|
7634
|
+
* Retorna o filtro formatador para ser chamdo no endpoint
|
|
7635
|
+
* @param valueFilterSearch valor pra adicionar no filtro
|
|
7636
|
+
*/
|
|
7637
|
+
AutocompleteService.prototype.getParameterBySearchType = function (valueFilterSearch, codeIsString) {
|
|
7638
|
+
var e_1, _a;
|
|
7639
|
+
var searchFilter = "";
|
|
7640
|
+
if (valueFilterSearch) {
|
|
7641
|
+
try {
|
|
7642
|
+
for (var _b = __values(Object.entries(valueFilterSearch)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
7643
|
+
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
7644
|
+
if (key === "code" && Number(value)) {
|
|
7645
|
+
var hasQuote = codeIsString ? "'" : "";
|
|
7646
|
+
if (searchFilter)
|
|
7647
|
+
searchFilter += " or " + key + " eq " + hasQuote + value + hasQuote;
|
|
7648
|
+
else
|
|
7649
|
+
searchFilter += key + " eq " + hasQuote + value + hasQuote;
|
|
7650
|
+
}
|
|
7651
|
+
else if (key != "code") {
|
|
7652
|
+
if (searchFilter)
|
|
7653
|
+
searchFilter += " or " + this.getSearchFilterString(key, value);
|
|
7654
|
+
else
|
|
7655
|
+
searchFilter += this.getSearchFilterString(key, value);
|
|
7656
|
+
}
|
|
7657
|
+
}
|
|
7658
|
+
}
|
|
7659
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
7660
|
+
finally {
|
|
7661
|
+
try {
|
|
7662
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7663
|
+
}
|
|
7664
|
+
finally { if (e_1) throw e_1.error; }
|
|
7665
|
+
}
|
|
7666
|
+
searchFilter = searchFilter ? "(" + searchFilter + ")" : '';
|
|
7667
|
+
}
|
|
7668
|
+
return searchFilter;
|
|
7669
|
+
};
|
|
7670
|
+
/**
|
|
7671
|
+
* Formata o filtro quando for "Ou"
|
|
7672
|
+
* @param attribute Nome do atributo da entidade.
|
|
7673
|
+
* @param value Valor da propriedade do objeto.
|
|
7674
|
+
*/
|
|
7675
|
+
AutocompleteService.prototype.getSearchFilterString = function (attribute, value) {
|
|
7676
|
+
return "contains(tolower(" + attribute + "), '" + value.toLowerCase() + "')";
|
|
7677
|
+
};
|
|
7678
|
+
AutocompleteService.ctorParameters = function () { return [
|
|
7679
|
+
{ type: HttpClientService }
|
|
7680
|
+
]; };
|
|
7681
|
+
AutocompleteService = __decorate([
|
|
7682
|
+
Injectable()
|
|
7683
|
+
], AutocompleteService);
|
|
7684
|
+
return AutocompleteService;
|
|
7685
|
+
}());
|
|
7686
|
+
|
|
7687
|
+
var moment$d = moment_;
|
|
7688
|
+
var LookupService$2 = /** @class */ (function () {
|
|
7689
|
+
function LookupService(http, messageService, translateService) {
|
|
7690
|
+
this.http = http;
|
|
7691
|
+
this.messageService = messageService;
|
|
7692
|
+
this.translateService = translateService;
|
|
7693
|
+
}
|
|
7694
|
+
LookupService.prototype.lookupRequestPost = function (httpPostParams, endpoint, concatFields, lookupDisplayField) {
|
|
7695
|
+
if (concatFields === void 0) { concatFields = null; }
|
|
7696
|
+
this.httpPostParams = httpPostParams;
|
|
7697
|
+
this.postConfigPageSize(httpPostParams);
|
|
7698
|
+
this.lookupDisplayField = lookupDisplayField;
|
|
7699
|
+
this.concatFields = concatFields;
|
|
7700
|
+
return this.postDataLookup(endpoint);
|
|
7701
|
+
};
|
|
7702
|
+
LookupService.prototype.postConfigPageSize = function (httpPostParams) {
|
|
7703
|
+
if (httpPostParams) {
|
|
7704
|
+
this.httpPostParams.page.size = httpPostParams.page && httpPostParams.page.size ? httpPostParams.page.size : 10;
|
|
7705
|
+
this.httpPostParams.page.current = httpPostParams.page && httpPostParams.page.current ? httpPostParams.page.current : 0;
|
|
7706
|
+
}
|
|
7707
|
+
};
|
|
7708
|
+
/**
|
|
7709
|
+
* POST
|
|
7710
|
+
* @param endpoint Busca e faz o tratamento dos dados do lookup.
|
|
7711
|
+
* @param httpParams HttpParams
|
|
7712
|
+
*/
|
|
7713
|
+
LookupService.prototype.postDataLookup = function (endpoint) {
|
|
7714
|
+
var _this = this;
|
|
7715
|
+
return this.postUrlDataLookup(endpoint, this.httpPostParams).pipe(map(function (payload) {
|
|
7716
|
+
var contents = payload.contents;
|
|
7717
|
+
if (_this.concatFields && _this.concatFields.length) {
|
|
7718
|
+
contents.map(function (value) {
|
|
7719
|
+
if (_this.concatOtherFields) {
|
|
7720
|
+
_this.convertGridFieldValue(value);
|
|
7721
|
+
}
|
|
7722
|
+
value[_this.lookupDisplayField] = _this.generateDisplayFieldValue(__assign({}, value));
|
|
7723
|
+
});
|
|
7724
|
+
}
|
|
7725
|
+
return payload;
|
|
7726
|
+
}));
|
|
7727
|
+
};
|
|
7728
|
+
/**
|
|
7729
|
+
* Converte o valor do campo para apresentação no lookup.
|
|
7730
|
+
*
|
|
7731
|
+
* @param content Valor do campo para conversão.
|
|
7732
|
+
* @param field FormField do campo.
|
|
7733
|
+
*/
|
|
7734
|
+
LookupService.prototype.convertLookupFieldValue = function (content, field) {
|
|
7735
|
+
if (content) {
|
|
7736
|
+
switch (field.type) {
|
|
7737
|
+
case FieldType.Date:
|
|
7738
|
+
content = moment$d(content).format("L");
|
|
7739
|
+
break;
|
|
7740
|
+
case FieldType.Enum:
|
|
7741
|
+
var enumValue = field.options.filter(function (enumeration) { return enumeration.value === content; })[0];
|
|
7742
|
+
content = enumValue ? enumValue.label : content;
|
|
7743
|
+
break;
|
|
7744
|
+
}
|
|
7745
|
+
}
|
|
7746
|
+
return content;
|
|
7747
|
+
};
|
|
7748
|
+
/**
|
|
7749
|
+
* Converte os dados para visualização na grid
|
|
7750
|
+
* @param content
|
|
7751
|
+
*/
|
|
7752
|
+
LookupService.prototype.convertGridFieldValue = function (content) {
|
|
7753
|
+
if (content) {
|
|
7754
|
+
this.concatOtherFields.forEach(function (field) {
|
|
7755
|
+
switch (field.type) {
|
|
7756
|
+
case FieldType.Enum:
|
|
7757
|
+
var enumValue = field.options.filter(function (enumeration) { return enumeration.value === content[field.name]; })[0];
|
|
7758
|
+
content[field.name] = enumValue ? enumValue.label : content[field.name];
|
|
7759
|
+
break;
|
|
7760
|
+
}
|
|
7761
|
+
});
|
|
7762
|
+
}
|
|
7763
|
+
};
|
|
7764
|
+
/**
|
|
7765
|
+
* Faz a concatenação de valores do registro para ser apresentado no lookup ao selecionar o dado.
|
|
7766
|
+
* @param contentValue Valor do registro.
|
|
7767
|
+
*/
|
|
7768
|
+
LookupService.prototype.generateDisplayFieldValue = function (contentValue) {
|
|
7769
|
+
var _this = this;
|
|
7770
|
+
var displayField = "";
|
|
7771
|
+
this.concatFields.forEach(function (field) {
|
|
7772
|
+
var fieldValue = _this.convertLookupFieldValue(contentValue[field.name], field);
|
|
7773
|
+
if (fieldValue) {
|
|
7774
|
+
if (displayField) {
|
|
7775
|
+
displayField += " - " + fieldValue;
|
|
7776
|
+
}
|
|
7777
|
+
else {
|
|
7778
|
+
displayField = fieldValue;
|
|
7779
|
+
}
|
|
7780
|
+
}
|
|
7781
|
+
});
|
|
7782
|
+
return displayField;
|
|
7783
|
+
};
|
|
7784
|
+
/**
|
|
7785
|
+
* Faz a requisição POST na URL do lookup.
|
|
7786
|
+
* @param endpoint - URL do endpoint.
|
|
7787
|
+
* @param httpParams - Parâmetros HTTP.
|
|
7788
|
+
*/
|
|
7789
|
+
LookupService.prototype.postUrlDataLookup = function (endpoint, httpParams) {
|
|
7790
|
+
var _this = this;
|
|
7791
|
+
if (httpParams) {
|
|
7792
|
+
return this.http.post("" + endpoint, __assign({}, httpParams)).pipe(catchError(function (exception) {
|
|
7793
|
+
if (exception.status === 403) {
|
|
7794
|
+
_this.messageService.add({
|
|
7795
|
+
severity: "error",
|
|
7796
|
+
summary: _this.translateService.instant("hcm.payroll.error"),
|
|
7797
|
+
detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
7798
|
+
sticky: true,
|
|
7799
|
+
});
|
|
7800
|
+
}
|
|
7801
|
+
return throwError(exception);
|
|
7802
|
+
}));
|
|
7803
|
+
}
|
|
7804
|
+
else {
|
|
7805
|
+
return this.http.post("" + endpoint, {}).pipe(catchError(function (exception) {
|
|
7806
|
+
if (exception.status === 403) {
|
|
7807
|
+
_this.messageService.add({
|
|
7808
|
+
severity: "error",
|
|
7809
|
+
summary: _this.translateService.instant("hcm.payroll.error"),
|
|
7810
|
+
detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
7811
|
+
sticky: true,
|
|
7812
|
+
});
|
|
7813
|
+
}
|
|
7814
|
+
return throwError(exception);
|
|
7815
|
+
}));
|
|
7816
|
+
}
|
|
7817
|
+
};
|
|
7818
|
+
LookupService.ctorParameters = function () { return [
|
|
7819
|
+
{ type: HttpClient },
|
|
7820
|
+
{ type: MessageService },
|
|
7821
|
+
{ type: TranslateService }
|
|
7822
|
+
]; };
|
|
7823
|
+
LookupService = __decorate([
|
|
7824
|
+
Injectable()
|
|
7825
|
+
], LookupService);
|
|
7826
|
+
return LookupService;
|
|
7827
|
+
}());
|
|
7828
|
+
|
|
7829
|
+
var TransportationVoucherScaleLookupDto = /** @class */ (function () {
|
|
7830
|
+
function TransportationVoucherScaleLookupDto(payload) {
|
|
7831
|
+
var filterData = payload.filterData;
|
|
7832
|
+
this.code = filterData.code || null;
|
|
7833
|
+
this.transportationVoucherScaleGroupId = filterData.transportationVoucherScaleGroup && filterData.transportationVoucherScaleGroup.id || null;
|
|
7834
|
+
this.searchText = filterData.searchText || null;
|
|
7835
|
+
this.page = {
|
|
7836
|
+
current: payload.first ? payload.first : 0,
|
|
7837
|
+
size: payload.rows ? payload.rows : 10
|
|
7838
|
+
} || null;
|
|
7839
|
+
}
|
|
7840
|
+
TransportationVoucherScaleLookupDto.prototype.getToFilter = function () {
|
|
7841
|
+
var objDTO = this;
|
|
7842
|
+
return objDTO;
|
|
7843
|
+
};
|
|
7844
|
+
return TransportationVoucherScaleLookupDto;
|
|
7845
|
+
}());
|
|
7846
|
+
|
|
7847
|
+
var moment$e = moment_;
|
|
7848
|
+
var TransportationVoucherScaleLookupComponent = /** @class */ (function () {
|
|
7849
|
+
function TransportationVoucherScaleLookupComponent(autocompleteService, lookupService, translate, cdr) {
|
|
7850
|
+
var _this = this;
|
|
7851
|
+
this.autocompleteService = autocompleteService;
|
|
7852
|
+
this.lookupService = lookupService;
|
|
7853
|
+
this.translate = translate;
|
|
7854
|
+
this.cdr = cdr;
|
|
7855
|
+
this.onSelect = new EventEmitter();
|
|
7856
|
+
this.onClear = new EventEmitter();
|
|
7857
|
+
this.onBlur = new EventEmitter();
|
|
7858
|
+
this.lookupSuggestions = [];
|
|
7859
|
+
this.searchGridData = [];
|
|
7860
|
+
this.suggestionsObservable = new BehaviorSubject([]);
|
|
7861
|
+
this.totalRecords = 0;
|
|
7862
|
+
this.concatFieldsName = [
|
|
7863
|
+
new FormField({
|
|
7864
|
+
name: "code",
|
|
7865
|
+
label: this.translate.instant("hcm.payroll.code"),
|
|
7866
|
+
type: FieldType.String,
|
|
7867
|
+
}),
|
|
7868
|
+
new FormField({
|
|
7869
|
+
name: "description",
|
|
7870
|
+
label: this.translate.instant("hcm.payroll.description"),
|
|
7871
|
+
type: FieldType.String,
|
|
7872
|
+
}),
|
|
7873
|
+
];
|
|
7874
|
+
this.concatName = [
|
|
7875
|
+
new FormField({
|
|
7876
|
+
name: "code",
|
|
7877
|
+
label: this.translate.instant("hcm.payroll.code"),
|
|
7878
|
+
type: FieldType.Integer,
|
|
7879
|
+
}),
|
|
7880
|
+
];
|
|
7881
|
+
this.gridFields = [
|
|
7882
|
+
new FormField({
|
|
7883
|
+
name: "displayField",
|
|
7884
|
+
label: this.translate.instant("hcm.payroll.transportation_voucher_scale"),
|
|
7885
|
+
type: FieldType.String,
|
|
7886
|
+
}),
|
|
7887
|
+
];
|
|
7888
|
+
this.searchFields = __spread(this.concatName, [
|
|
7889
|
+
{
|
|
7890
|
+
name: "searchText",
|
|
7891
|
+
label: this.translate.instant("hcm.payroll.description"),
|
|
7892
|
+
type: FieldType.String,
|
|
7893
|
+
},
|
|
7894
|
+
{
|
|
7895
|
+
name: "transportationVoucherScaleGroup",
|
|
7896
|
+
type: FieldType.Autocomplete,
|
|
7897
|
+
label: this.translate.instant("hcm.payroll.grouper"),
|
|
7898
|
+
dataKey: "id",
|
|
7899
|
+
appendTo: "body",
|
|
7900
|
+
fullWidth: true,
|
|
7901
|
+
onSearch: function (val) {
|
|
7902
|
+
_this.getAutocompleteQuery("autocompleteTransportationVoucherScaleGroupQuery", {
|
|
7903
|
+
searchText: val ? val : "",
|
|
7904
|
+
}, ServiceType.GENERAL_REGISTER);
|
|
7905
|
+
},
|
|
7906
|
+
suggestionsObservable: this.suggestionsObservable,
|
|
7907
|
+
displayField: "value",
|
|
7908
|
+
},
|
|
7909
|
+
]);
|
|
7910
|
+
this.transportationVoucherScaleFilterForm = new FormGroup({});
|
|
7911
|
+
this.unsubscribe = new Subject();
|
|
7912
|
+
this.initialLoad = true;
|
|
7913
|
+
}
|
|
7914
|
+
TransportationVoucherScaleLookupComponent.prototype.ngOnInit = function () {
|
|
7915
|
+
};
|
|
7916
|
+
TransportationVoucherScaleLookupComponent.prototype.ngAfterViewInit = function () {
|
|
7917
|
+
this.cdr.detectChanges();
|
|
7918
|
+
};
|
|
7919
|
+
TransportationVoucherScaleLookupComponent.prototype.ngOnDestroy = function () {
|
|
7920
|
+
this.unsubscribe.next();
|
|
7921
|
+
this.unsubscribe.complete();
|
|
7922
|
+
};
|
|
7923
|
+
/**
|
|
7924
|
+
* Evento disparado ao selecionar um item no lookup
|
|
7925
|
+
*/
|
|
7926
|
+
TransportationVoucherScaleLookupComponent.prototype.selectOption = function (event) {
|
|
7927
|
+
if (event && event.code) {
|
|
7928
|
+
this.onSelect.emit(event);
|
|
7929
|
+
}
|
|
7930
|
+
};
|
|
7931
|
+
/**
|
|
7932
|
+
* Evento disparado ao limpar o campo
|
|
7933
|
+
*/
|
|
7934
|
+
TransportationVoucherScaleLookupComponent.prototype.onClearItem = function (event) {
|
|
7935
|
+
this.onClear.emit(event);
|
|
7936
|
+
};
|
|
7937
|
+
/**
|
|
7938
|
+
* Requisição de busca no lookup
|
|
7939
|
+
*/
|
|
7940
|
+
TransportationVoucherScaleLookupComponent.prototype.searchRequest = function ($event) {
|
|
7941
|
+
var _this = this;
|
|
7942
|
+
var endpoint = "hcm/general_register/queries/transportationVoucherScaleFilterQuery";
|
|
7943
|
+
var isLookupOpen = $event && $event.filterData;
|
|
7944
|
+
$event = __assign({}, this.getValueEvent($event, isLookupOpen));
|
|
7945
|
+
var filter = new TransportationVoucherScaleLookupDto($event);
|
|
7946
|
+
this.lookupService
|
|
7947
|
+
.lookupRequestPost(filter.getToFilter(), endpoint, __spread(this.concatFieldsName), "displayField")
|
|
7948
|
+
.pipe(takeUntil(this.unsubscribe))
|
|
7949
|
+
.subscribe(function (data) {
|
|
7950
|
+
if (isLookupOpen) {
|
|
7951
|
+
_this.searchGridData = data && __spread(data.contents);
|
|
7952
|
+
}
|
|
7953
|
+
else {
|
|
7954
|
+
_this.lookupSuggestions = data && __spread(data.contents);
|
|
7955
|
+
}
|
|
7956
|
+
_this.totalRecords = data && data.totalElements;
|
|
7957
|
+
});
|
|
7958
|
+
};
|
|
7959
|
+
/**
|
|
7960
|
+
* Formata o evento de pesquisa
|
|
7961
|
+
*/
|
|
7962
|
+
TransportationVoucherScaleLookupComponent.prototype.getValueEvent = function ($event, isLookupOpen) {
|
|
7963
|
+
if (isLookupOpen) {
|
|
7964
|
+
return $event;
|
|
7965
|
+
}
|
|
7966
|
+
else {
|
|
7967
|
+
return {
|
|
7968
|
+
filterData: {
|
|
7969
|
+
searchText: $event
|
|
7970
|
+
},
|
|
7971
|
+
};
|
|
7972
|
+
}
|
|
7973
|
+
};
|
|
7974
|
+
/**
|
|
7975
|
+
* Busca dados do autocomplete
|
|
7976
|
+
*/
|
|
7977
|
+
TransportationVoucherScaleLookupComponent.prototype.getAutoComplete = function (entity, params, code, displayField, filterParams, codeIsString, service) {
|
|
7978
|
+
var _this = this;
|
|
7979
|
+
if (filterParams === void 0) { filterParams = null; }
|
|
7980
|
+
if (codeIsString === void 0) { codeIsString = false; }
|
|
7981
|
+
if (service === void 0) { service = ServiceType.PAYROLL; }
|
|
7982
|
+
var searchFields = [
|
|
7983
|
+
{ name: code, type: FieldType.Integer },
|
|
7984
|
+
{ name: displayField, type: FieldType.String },
|
|
7985
|
+
];
|
|
7986
|
+
var concatFields = __assign({ code: { searchValue: params } }, filterParams);
|
|
7987
|
+
this.autocompleteService
|
|
7988
|
+
.getAutoComplete(entity, concatFields, searchFields, codeIsString, service)
|
|
7989
|
+
.pipe(takeUntil(this.unsubscribe))
|
|
7990
|
+
.subscribe(function (data) {
|
|
7991
|
+
_this.suggestionsObservable.next(data || []);
|
|
7992
|
+
});
|
|
7993
|
+
};
|
|
7994
|
+
/**
|
|
7995
|
+
* Busca dados via query customizada
|
|
7996
|
+
*/
|
|
7997
|
+
TransportationVoucherScaleLookupComponent.prototype.getAutocompleteQuery = function (query, params, service) {
|
|
7998
|
+
var _this = this;
|
|
7999
|
+
if (service === void 0) { service = ServiceType.PAYROLL; }
|
|
8000
|
+
this.autocompleteService
|
|
8001
|
+
.getAutoCompleteQuery(query, params, service)
|
|
8002
|
+
.pipe(takeUntil(this.unsubscribe))
|
|
8003
|
+
.subscribe(function (data) {
|
|
8004
|
+
if (query === "autocompleteTransportationVoucherScaleGroupQuery") {
|
|
8005
|
+
data.forEach(function (item) {
|
|
8006
|
+
if (item.fields && item.fields.length >= 2) {
|
|
8007
|
+
// Extrai o valor concatenado do segundo field (TransportationVoucherScaleGroupNameI18n)
|
|
8008
|
+
item["value"] = item.fields[1].value;
|
|
8009
|
+
// Extrai o id do tableId
|
|
8010
|
+
item["id"] = item.tableId;
|
|
8011
|
+
}
|
|
8012
|
+
});
|
|
8013
|
+
}
|
|
8014
|
+
_this.suggestionsObservable.next(data || []);
|
|
8015
|
+
});
|
|
8016
|
+
};
|
|
8017
|
+
TransportationVoucherScaleLookupComponent.ctorParameters = function () { return [
|
|
8018
|
+
{ type: AutocompleteService$1 },
|
|
8019
|
+
{ type: LookupService$2 },
|
|
8020
|
+
{ type: TranslateService },
|
|
8021
|
+
{ type: ChangeDetectorRef }
|
|
8022
|
+
]; };
|
|
8023
|
+
__decorate([
|
|
8024
|
+
ViewChild("transportationVoucherScaleEl", { static: false })
|
|
8025
|
+
], TransportationVoucherScaleLookupComponent.prototype, "transportationVoucherScaleEl", void 0);
|
|
8026
|
+
__decorate([
|
|
8027
|
+
Input()
|
|
8028
|
+
], TransportationVoucherScaleLookupComponent.prototype, "required", void 0);
|
|
8029
|
+
__decorate([
|
|
8030
|
+
Input()
|
|
8031
|
+
], TransportationVoucherScaleLookupComponent.prototype, "disabled", void 0);
|
|
8032
|
+
__decorate([
|
|
8033
|
+
Input()
|
|
8034
|
+
], TransportationVoucherScaleLookupComponent.prototype, "form", void 0);
|
|
8035
|
+
__decorate([
|
|
8036
|
+
Input()
|
|
8037
|
+
], TransportationVoucherScaleLookupComponent.prototype, "name", void 0);
|
|
8038
|
+
__decorate([
|
|
8039
|
+
Output()
|
|
8040
|
+
], TransportationVoucherScaleLookupComponent.prototype, "onSelect", void 0);
|
|
8041
|
+
__decorate([
|
|
8042
|
+
Output()
|
|
8043
|
+
], TransportationVoucherScaleLookupComponent.prototype, "onClear", void 0);
|
|
8044
|
+
__decorate([
|
|
8045
|
+
Output()
|
|
8046
|
+
], TransportationVoucherScaleLookupComponent.prototype, "onBlur", void 0);
|
|
8047
|
+
TransportationVoucherScaleLookupComponent = __decorate([
|
|
8048
|
+
Component({
|
|
8049
|
+
// tslint:disable-next-line:component-selector
|
|
8050
|
+
selector: "c-transportation-voucher-scale-lookup",
|
|
8051
|
+
template: "<div [formGroup]=\"form\">\n <s-lookup\n #transportationVoucherScaleEl\n id=\"transportationVoucherScale\"\n dataKey=\"code\"\n (onSelect)=\"selectOption($event)\"\n (onClear)=\"onClearItem($event)\"\n [formControlName]=\"name\"\n (onLookupRequest)=\"searchRequest($event)\"\n (onSearchRequest)=\"searchRequest($event)\"\n filterTitle=\"{{ 'hcm.payroll.filters' | translate }}\"\n filterLabel=\"{{ 'hcm.payroll.filter' | translate }}\"\n clearLabel=\"{{ 'hcm.payroll.lookup_generic_clean_filter_label' | translate }}\"\n cancelLabel=\"{{ 'hcm.payroll.cancel' | translate }}\"\n selectLabel=\"{{ 'hcm.payroll.lookup_btn_select_label' | translate }}\"\n [disabled]=\"disabled\"\n [lookupSuggestions]=\"lookupSuggestions\"\n lookupEmptyMessage=\"{{ 'hcm.payroll.lookup_auto_complete_empty_message' | translate }}\"\n [searchGridData]=\"searchGridData\"\n [searchFields]=\"searchFields\"\n placeholder=\"{{'hcm.payroll.suggestions' | translate}}\"\n [searchTotalRecords]=\"totalRecords\"\n searchTotalRecordsLabel=\"{{ totalRecords }} {{\n 'hcm.payroll.admission_registers' | translate\n }}\"\n [searchGridFields]=\"gridFields\"\n searchTitle=\"{{ 'hcm.payroll.transportation_voucher_scale' | translate }}\"\n lookupDisplayField=\"displayField\"\n ></s-lookup>\n</div>\n"
|
|
8052
|
+
})
|
|
8053
|
+
], TransportationVoucherScaleLookupComponent);
|
|
8054
|
+
return TransportationVoucherScaleLookupComponent;
|
|
8055
|
+
}());
|
|
8056
|
+
|
|
8057
|
+
var TransportationVoucherScaleLookupModule = /** @class */ (function () {
|
|
8058
|
+
function TransportationVoucherScaleLookupModule() {
|
|
8059
|
+
}
|
|
8060
|
+
TransportationVoucherScaleLookupModule = __decorate([
|
|
8061
|
+
NgModule({
|
|
8062
|
+
imports: [
|
|
8063
|
+
CommonModule,
|
|
8064
|
+
FormsModule,
|
|
8065
|
+
ReactiveFormsModule,
|
|
8066
|
+
TranslateModule,
|
|
8067
|
+
HttpClientModule,
|
|
8068
|
+
LocaleModule.forChild(),
|
|
8069
|
+
DynamicFormModule,
|
|
8070
|
+
],
|
|
8071
|
+
declarations: [TransportationVoucherScaleLookupComponent],
|
|
8072
|
+
exports: [TransportationVoucherScaleLookupComponent],
|
|
8073
|
+
providers: [AutocompleteService$1, LookupService$2, MessageService],
|
|
8074
|
+
})
|
|
8075
|
+
], TransportationVoucherScaleLookupModule);
|
|
8076
|
+
return TransportationVoucherScaleLookupModule;
|
|
8077
|
+
}());
|
|
8078
|
+
|
|
7530
8079
|
var HistoricalBankAccountComponent = /** @class */ (function () {
|
|
7531
8080
|
function HistoricalBankAccountComponent(confirmationService, translateService, activatedRoute, cd, formBuilder) {
|
|
7532
8081
|
var _this = this;
|
|
@@ -8307,7 +8856,7 @@ var HistoricalBankAccountListService = /** @class */ (function () {
|
|
|
8307
8856
|
return HistoricalBankAccountListService;
|
|
8308
8857
|
}());
|
|
8309
8858
|
|
|
8310
|
-
var moment$
|
|
8859
|
+
var moment$f = moment_;
|
|
8311
8860
|
var HistoricalBankAccountListComponent = /** @class */ (function () {
|
|
8312
8861
|
function HistoricalBankAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalBankAccountListService) {
|
|
8313
8862
|
this.confirmationService = confirmationService;
|
|
@@ -8363,7 +8912,7 @@ var HistoricalBankAccountListComponent = /** @class */ (function () {
|
|
|
8363
8912
|
HistoricalBankAccountListComponent.prototype.onLazyLoad = function (payload) {
|
|
8364
8913
|
var _this = this;
|
|
8365
8914
|
payload.forEach(function (value) {
|
|
8366
|
-
value.dateWhen = moment$
|
|
8915
|
+
value.dateWhen = moment$f(value.dateWhen).format(_this.dateFormat);
|
|
8367
8916
|
});
|
|
8368
8917
|
this.onGridLoad(payload);
|
|
8369
8918
|
this.loading = false;
|
|
@@ -8374,7 +8923,7 @@ var HistoricalBankAccountListComponent = /** @class */ (function () {
|
|
|
8374
8923
|
{
|
|
8375
8924
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
8376
8925
|
command: function () {
|
|
8377
|
-
var dateWhen = rowData && rowData.dateWhen && moment$
|
|
8926
|
+
var dateWhen = rowData && rowData.dateWhen && moment$f(rowData.dateWhen, _this.dateFormat).format("YYYY-MM-DD");
|
|
8378
8927
|
if (_this.withSidebar)
|
|
8379
8928
|
_this.router.navigate(["historical-bank-account/" + dateWhen], {
|
|
8380
8929
|
relativeTo: _this.activatedRoute,
|
|
@@ -8403,7 +8952,7 @@ var HistoricalBankAccountListComponent = /** @class */ (function () {
|
|
|
8403
8952
|
HistoricalBankAccountListComponent.prototype.delete = function (id, dateWhen) {
|
|
8404
8953
|
var _this = this;
|
|
8405
8954
|
if (id === this.lastRecord.id) {
|
|
8406
|
-
var dateWhenToDto_1 = moment$
|
|
8955
|
+
var dateWhenToDto_1 = moment$f(dateWhen, this.dateFormat).format("YYYY-MM-DD");
|
|
8407
8956
|
this.confirmationService.confirm({
|
|
8408
8957
|
message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete") + "?",
|
|
8409
8958
|
accept: function () {
|
|
@@ -8610,9 +9159,9 @@ var EntityODataParameter = /** @class */ (function () {
|
|
|
8610
9159
|
return EntityODataParameter;
|
|
8611
9160
|
}());
|
|
8612
9161
|
|
|
8613
|
-
var moment$
|
|
8614
|
-
var dateStartG5 = moment$
|
|
8615
|
-
var dateEndG5 = moment$
|
|
9162
|
+
var moment$g = moment_;
|
|
9163
|
+
var dateStartG5 = moment$g('31/12/1900', 'DD/MM/YYYY');
|
|
9164
|
+
var dateEndG5 = moment$g('04/06/2080', 'DD/MM/YYYY');
|
|
8616
9165
|
var DateValidator = /** @class */ (function () {
|
|
8617
9166
|
function DateValidator() {
|
|
8618
9167
|
}
|
|
@@ -8628,7 +9177,7 @@ var DateValidator = /** @class */ (function () {
|
|
|
8628
9177
|
var value = removeCharacteresSpecials(control.value);
|
|
8629
9178
|
dateFormat = removeCharacteresSpecials(dateFormat);
|
|
8630
9179
|
if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
|
|
8631
|
-
var dateValue = moment$
|
|
9180
|
+
var dateValue = moment$g(value, dateFormat);
|
|
8632
9181
|
var valid = dateValue.isValid();
|
|
8633
9182
|
var isValidRange = useG5DateRange ? dateValue.isBetween(dateStartG5, dateEndG5, null, '[]') : true;
|
|
8634
9183
|
return valid && isValidRange ? null : { invalidDate: true };
|
|
@@ -8664,8 +9213,8 @@ var DateValidator = /** @class */ (function () {
|
|
|
8664
9213
|
var value = removeCharacteresSpecials(control.value);
|
|
8665
9214
|
dateFormat = removeCharacteresSpecials(dateFormat);
|
|
8666
9215
|
if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
|
|
8667
|
-
var referenceDate = moment$
|
|
8668
|
-
var compareTo = moment$
|
|
9216
|
+
var referenceDate = moment$g(value, dateFormat);
|
|
9217
|
+
var compareTo = moment$g(compareToDate, dateFormat);
|
|
8669
9218
|
return _this.dateCompare(referenceDate, compareTo, compareType, options);
|
|
8670
9219
|
}
|
|
8671
9220
|
return null;
|
|
@@ -10528,7 +11077,7 @@ var HistoricalPixAccountListService = /** @class */ (function () {
|
|
|
10528
11077
|
return HistoricalPixAccountListService;
|
|
10529
11078
|
}());
|
|
10530
11079
|
|
|
10531
|
-
var moment$
|
|
11080
|
+
var moment$h = moment_;
|
|
10532
11081
|
var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
10533
11082
|
function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
|
|
10534
11083
|
this.confirmationService = confirmationService;
|
|
@@ -10571,7 +11120,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10571
11120
|
HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
|
|
10572
11121
|
var _this = this;
|
|
10573
11122
|
payload.forEach(function (value) {
|
|
10574
|
-
value.dateChange = moment$
|
|
11123
|
+
value.dateChange = moment$h(value.dateChange).format(_this.dateFormat);
|
|
10575
11124
|
});
|
|
10576
11125
|
this.onGridLoad(payload);
|
|
10577
11126
|
this.loading = false;
|
|
@@ -10583,7 +11132,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10583
11132
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
10584
11133
|
command: function () {
|
|
10585
11134
|
if (_this.isAllowToViewHistorical) {
|
|
10586
|
-
var dateChange = rowData && rowData.dateChange && moment$
|
|
11135
|
+
var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10587
11136
|
if (_this.withSidebar) {
|
|
10588
11137
|
_this.isOnlyView.emit(true);
|
|
10589
11138
|
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
@@ -10603,7 +11152,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10603
11152
|
label: this.translateService.instant("hcm.payroll.edit"),
|
|
10604
11153
|
command: function () {
|
|
10605
11154
|
if (_this.isAllowToEditHistorical) {
|
|
10606
|
-
var dateChange = rowData && rowData.dateChange && moment$
|
|
11155
|
+
var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10607
11156
|
if (_this.withSidebar) {
|
|
10608
11157
|
_this.isOnlyView.emit(false);
|
|
10609
11158
|
_this.isOnlyEdit.emit(true);
|
|
@@ -10636,7 +11185,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10636
11185
|
HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
|
|
10637
11186
|
var _this = this;
|
|
10638
11187
|
if (id === this.lastRecord.id) {
|
|
10639
|
-
var dateChangeToDto_1 = moment$
|
|
11188
|
+
var dateChangeToDto_1 = moment$h(dateChange, this.dateFormat).format("YYYY-MM-DD");
|
|
10640
11189
|
this.confirmationService.confirm({
|
|
10641
11190
|
message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
|
|
10642
11191
|
accept: function () {
|
|
@@ -10836,5 +11385,5 @@ var HistoricalPixAccountListModule = /** @class */ (function () {
|
|
|
10836
11385
|
* Generated bundle index. Do not edit.
|
|
10837
11386
|
*/
|
|
10838
11387
|
|
|
10839
|
-
export { AdmissionDraftSummaryComponent, AdmissionDraftSummaryModule, AdmissionDraftSummaryService, AutocompleteParametersService, BlockUiComponent, BlockUiModule, BreadcrumbComponent, BreadcrumbSDSModule, CNPJValidator, CPFValidator, CompanyIndicationType, CompanyIndicationsService, CompareType, ControlMessagesErrorComponent, ControlMessagesErrorModule, CoreDirectives, CoreFieldType, CustomFieldsComponent, CustomFieldsModule, DataListModule, DataListRestModule, DateValidator, DirectionEnumeration, EmployeeSelectorComponent, EmployeeSelectorModule, EmployeeSummaryComponent, EmployeeSummaryModule, EmployeeSummaryService, EntityODataParameter, ErrorPageComponent, ErrorPageModule, FieldValidatorComponent, FieldValidatorModule, FileUploadComponent, FileUploadCoreModule, FormComparatorService, FromToComponent, FromToModule, HistoricalBankAccountComponent, HistoricalBankAccountListComponent, HistoricalBankAccountListModule, HistoricalBankAccountListService, HistoricalBankAccountModule, HistoricalBankAccountService, HistoricalPixAccountComponent, HistoricalPixAccountListComponent, HistoricalPixAccountListModule, HistoricalPixAccountListService, HistoricalPixAccountModule, HistoricalPixAccountService, HttpClientService, HttpRequestType, ImageCropComponent, ImageCropModule, ImageCropService, InputDateComponent, InputDateModelComponent, InputDateModelModule, InputDateModule, InputRestAutoCompleteComponent, InputRestAutoCompleteEmployeeModelModule, InputRestAutoCompleteEmployeeModelService, InputRestAutoCompleteEmployeeModule, InputRestAutoCompleteEmployeeService, InputRestAutoCompleteEnumComponent, InputRestAutoCompleteEnumModule, InputRestAutoCompleteEnumService, InputRestAutoCompleteJobpositionComponent, InputRestAutoCompleteJobpositionModule, InputRestAutoCompleteJobpositionService, InputRestAutoCompleteModelEnumModule, InputRestAutoCompleteModelEnumService, InputRestAutoCompleteModelModule, InputRestAutoCompleteModelService, InputRestAutoCompleteModule, InputRestAutoCompleteService, IntegrationService, ListRestComponent, ListRestModule, LookupModule, LookupParametersService, MenuType, ModuleType, NameNotSpacesDirective, OnlyNumberDirective, Operators, ParameterType, PermissionService, ReportFormat, ReportService, ReportStage, ServiceType, ServicesModule, SpinnerLoaderComponent, SpinnerLoaderModule, StringMethods, ToastComponent, ToastModule, ToastService, TypeAdmissionModule, TypeAdmissionServices, UsingType, WorkflowDataService, WorkflowIntegrator, WorkstationgroupLookupDto, WorkstationgroupLookupModule, _moment, assign, autoCompleteObjectForIdObject, clearValues, cnpjValidator, compareValues, configEnabledFields, containsMoreThanOneConsecutiveAbbreviation, containsMoreThanOneConsecutiveBlankSpace, containsMoreThanTwoRepeatedCharacters, containsSpecialCharacters, convertBooleanString, convertStringToBoolean, cpfValidator, firstNameIsValid, firstNameLengthIsValid, formatMoney, fullNameLengthIsValid, getAddWeekDaysBusiness, getFormat, getFormatDate, getMoment, getNowDate, getObjValids, getQueryParams, getWeekDaysBusiness, getYears, invertFieldDate, isBirthDayValid, isDateCompare, isDateExpirationBeforeExpeditionDate, isDateField, isDateSameOrAfterCurrentDate, isFullDate, isMax, isNumber, isObject, isRequired, isShallow, isValid, isValidDate, isValidPIS, mountCustomForSave, mountCustomForShow, mountCustomToSave, mountCustomToShow, mountGeneratedCustomToSave, ngCalendarFormat, notEmpty, numberOrZero, removeCharacteresSpecials, removeEmpty, removeWhiteSpaces, setCustonFields, setDisableField, setErrors, setRequired, setRequiredFields, setValidator, setValidatorsAndDisableFields, setValueCustom, stringMethods, sun, uiid, validateBirthDate, verifyValidationsForm, SharedModule as ɵa, DataListRestComponent as ɵb, DataListRestService as ɵc, FileUploadService as ɵd, InputRestAutoCompleteEmployeeComponent as ɵe, InputRestAutoCompleteEmployeeModelComponent as ɵf, InputRestAutoCompleteModelComponent as ɵg, InputRestAutoCompleteModelEnumComponent as ɵh, ListRestService as ɵi, DataListComponent as ɵj, DataListService as ɵk, LookupComponent as ɵl, LookupService as ɵm, WorkstationgroupLookupComponent as ɵn, AutocompleteService as ɵo, LookupService$1 as ɵp, HistoricalBankAccountFormComponent as ɵq, HistoricalPixAccountFormComponent as ɵr };
|
|
11388
|
+
export { AdmissionDraftSummaryComponent, AdmissionDraftSummaryModule, AdmissionDraftSummaryService, AutocompleteParametersService, AutocompleteService$1 as AutocompleteService, BlockUiComponent, BlockUiModule, BreadcrumbComponent, BreadcrumbSDSModule, CNPJValidator, CPFValidator, CompanyIndicationType, CompanyIndicationsService, CompareType, ControlMessagesErrorComponent, ControlMessagesErrorModule, CoreDirectives, CoreFieldType, CustomFieldsComponent, CustomFieldsModule, DataListModule, DataListRestModule, DateValidator, DirectionEnumeration, EmployeeSelectorComponent, EmployeeSelectorModule, EmployeeSummaryComponent, EmployeeSummaryModule, EmployeeSummaryService, EntityODataParameter, ErrorPageComponent, ErrorPageModule, FieldValidatorComponent, FieldValidatorModule, FileUploadComponent, FileUploadCoreModule, FormComparatorService, FromToComponent, FromToModule, HistoricalBankAccountComponent, HistoricalBankAccountListComponent, HistoricalBankAccountListModule, HistoricalBankAccountListService, HistoricalBankAccountModule, HistoricalBankAccountService, HistoricalPixAccountComponent, HistoricalPixAccountListComponent, HistoricalPixAccountListModule, HistoricalPixAccountListService, HistoricalPixAccountModule, HistoricalPixAccountService, HttpClientService, HttpRequestType, ImageCropComponent, ImageCropModule, ImageCropService, InputDateComponent, InputDateModelComponent, InputDateModelModule, InputDateModule, InputRestAutoCompleteComponent, InputRestAutoCompleteEmployeeModelModule, InputRestAutoCompleteEmployeeModelService, InputRestAutoCompleteEmployeeModule, InputRestAutoCompleteEmployeeService, InputRestAutoCompleteEnumComponent, InputRestAutoCompleteEnumModule, InputRestAutoCompleteEnumService, InputRestAutoCompleteJobpositionComponent, InputRestAutoCompleteJobpositionModule, InputRestAutoCompleteJobpositionService, InputRestAutoCompleteModelEnumModule, InputRestAutoCompleteModelEnumService, InputRestAutoCompleteModelModule, InputRestAutoCompleteModelService, InputRestAutoCompleteModule, InputRestAutoCompleteService, IntegrationService, ListRestComponent, ListRestModule, LookupModule, LookupParametersService, LookupService$2 as LookupService, MenuType, ModuleType, NameNotSpacesDirective, OnlyNumberDirective, Operators, ParameterType, PermissionService, ReportFormat, ReportService, ReportStage, ServiceType, ServicesModule, SpinnerLoaderComponent, SpinnerLoaderModule, StringMethods, ToastComponent, ToastModule, ToastService, TransportationVoucherScaleLookupComponent, TransportationVoucherScaleLookupDto, TransportationVoucherScaleLookupModule, TypeAdmissionModule, TypeAdmissionServices, UsingType, WorkflowDataService, WorkflowIntegrator, WorkstationgroupLookupDto, WorkstationgroupLookupModule, _moment, assign, autoCompleteObjectForIdObject, clearValues, cnpjValidator, compareValues, configEnabledFields, containsMoreThanOneConsecutiveAbbreviation, containsMoreThanOneConsecutiveBlankSpace, containsMoreThanTwoRepeatedCharacters, containsSpecialCharacters, convertBooleanString, convertStringToBoolean, cpfValidator, firstNameIsValid, firstNameLengthIsValid, formatMoney, fullNameLengthIsValid, getAddWeekDaysBusiness, getFormat, getFormatDate, getMoment, getNowDate, getObjValids, getQueryParams, getWeekDaysBusiness, getYears, invertFieldDate, isBirthDayValid, isDateCompare, isDateExpirationBeforeExpeditionDate, isDateField, isDateSameOrAfterCurrentDate, isFullDate, isMax, isNumber, isObject, isRequired, isShallow, isValid, isValidDate, isValidPIS, mountCustomForSave, mountCustomForShow, mountCustomToSave, mountCustomToShow, mountGeneratedCustomToSave, ngCalendarFormat, notEmpty, numberOrZero, removeCharacteresSpecials, removeEmpty, removeWhiteSpaces, setCustonFields, setDisableField, setErrors, setRequired, setRequiredFields, setValidator, setValidatorsAndDisableFields, setValueCustom, stringMethods, sun, uiid, validateBirthDate, verifyValidationsForm, SharedModule as ɵa, DataListRestComponent as ɵb, DataListRestService as ɵc, FileUploadService as ɵd, InputRestAutoCompleteEmployeeComponent as ɵe, InputRestAutoCompleteEmployeeModelComponent as ɵf, InputRestAutoCompleteModelComponent as ɵg, InputRestAutoCompleteModelEnumComponent as ɵh, ListRestService as ɵi, DataListComponent as ɵj, DataListService as ɵk, LookupComponent as ɵl, LookupService as ɵm, WorkstationgroupLookupComponent as ɵn, AutocompleteService as ɵo, LookupService$1 as ɵp, HistoricalBankAccountFormComponent as ɵq, HistoricalPixAccountFormComponent as ɵr };
|
|
10840
11389
|
//# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map
|