@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
|
@@ -3037,62 +3037,97 @@
|
|
|
3037
3037
|
InputRestAutoCompleteComponent.prototype.filterQuery = function (event) {
|
|
3038
3038
|
var _this = this;
|
|
3039
3039
|
var query = event.query;
|
|
3040
|
-
if (!(isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
3040
|
+
if (!(Number.isNaN(query) && query.toString().length < this.minCharactersToSearch)) {
|
|
3041
3041
|
try {
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
referenceDate: this.referenceDate,
|
|
3047
|
-
})
|
|
3048
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3049
|
-
}
|
|
3050
|
-
else if (this.isDismissalReason) {
|
|
3051
|
-
var params = { valueSearch: query };
|
|
3052
|
-
if (this.referenceDate) {
|
|
3053
|
-
params['referenceDate'] = this.referenceDate;
|
|
3054
|
-
}
|
|
3055
|
-
return this.service
|
|
3056
|
-
.query('autocompleteDismissalReason', params, exports.ServiceType.GENERAL_REGISTER)
|
|
3057
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3058
|
-
}
|
|
3059
|
-
else if (this.usingType && this.usingType.length) {
|
|
3060
|
-
return this.service
|
|
3061
|
-
.query('autocompleteOtherCompanyFilterUsingType', {
|
|
3062
|
-
searchText: query,
|
|
3063
|
-
usingType: this.usingType,
|
|
3064
|
-
})
|
|
3065
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3066
|
-
}
|
|
3067
|
-
else if (this.isDepartmentFromCompany) {
|
|
3068
|
-
return this.service
|
|
3069
|
-
.query('autocompleteDepartmentQuery', {
|
|
3070
|
-
searchText: query,
|
|
3071
|
-
companyId: this.companyId,
|
|
3072
|
-
referenceDate: this.referenceDate,
|
|
3073
|
-
})
|
|
3074
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3075
|
-
}
|
|
3076
|
-
else if (this.isSituationDefinition) {
|
|
3077
|
-
var params = { searchText: query };
|
|
3078
|
-
return this.service
|
|
3079
|
-
.query('autocompleteSituationDefinitionQuery', params, exports.ServiceType.ORGANIZATION_REGISTER)
|
|
3080
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3081
|
-
}
|
|
3082
|
-
else if (this.isWagetype) {
|
|
3083
|
-
var params = { searchText: query, companyId: this.companyId };
|
|
3084
|
-
return this.service
|
|
3085
|
-
.query('autocompleteWagetypeQuery', params, exports.ServiceType.ENTRY)
|
|
3086
|
-
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3087
|
-
}
|
|
3088
|
-
this.service
|
|
3089
|
-
.query('autocomplete', this.getParamsRest(query), this.serviceType).subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3042
|
+
var queryConfig = this.getQueryConfiguration(query);
|
|
3043
|
+
return this.service
|
|
3044
|
+
.query(queryConfig.endpoint, queryConfig.params, queryConfig.serviceType)
|
|
3045
|
+
.subscribe(function (payload) { return _this.formaterResponce(payload.result); });
|
|
3090
3046
|
}
|
|
3091
3047
|
catch (e) {
|
|
3092
3048
|
console.log(e);
|
|
3093
3049
|
}
|
|
3094
3050
|
}
|
|
3095
3051
|
};
|
|
3052
|
+
InputRestAutoCompleteComponent.prototype.getQueryConfiguration = function (query) {
|
|
3053
|
+
var _this = this;
|
|
3054
|
+
var queryStrategies = [
|
|
3055
|
+
{
|
|
3056
|
+
condition: function () { return _this.isTimetrackingSituation; },
|
|
3057
|
+
endpoint: 'autocompleteTimetrackingSituation',
|
|
3058
|
+
params: function () { return ({
|
|
3059
|
+
valueSearch: query,
|
|
3060
|
+
referenceDate: _this.referenceDate,
|
|
3061
|
+
}); },
|
|
3062
|
+
serviceType: this.serviceType,
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
condition: function () { return _this.isDismissalReason; },
|
|
3066
|
+
endpoint: 'autocompleteDismissalReason',
|
|
3067
|
+
params: function () {
|
|
3068
|
+
var params = { valueSearch: query };
|
|
3069
|
+
if (_this.referenceDate) {
|
|
3070
|
+
params['referenceDate'] = _this.referenceDate;
|
|
3071
|
+
}
|
|
3072
|
+
return params;
|
|
3073
|
+
},
|
|
3074
|
+
serviceType: exports.ServiceType.GENERAL_REGISTER,
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
condition: function () { return _this.usingType && _this.usingType.length; },
|
|
3078
|
+
endpoint: 'autocompleteOtherCompanyFilterUsingType',
|
|
3079
|
+
params: function () { return ({
|
|
3080
|
+
searchText: query,
|
|
3081
|
+
usingType: _this.usingType,
|
|
3082
|
+
}); },
|
|
3083
|
+
serviceType: this.serviceType,
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
condition: function () { return _this.isDepartmentFromCompany; },
|
|
3087
|
+
endpoint: 'autocompleteDepartmentQuery',
|
|
3088
|
+
params: function () { return ({
|
|
3089
|
+
searchText: query,
|
|
3090
|
+
companyId: _this.companyId,
|
|
3091
|
+
referenceDate: _this.referenceDate,
|
|
3092
|
+
}); },
|
|
3093
|
+
serviceType: this.serviceType,
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
condition: function () { return _this.isSituationDefinition; },
|
|
3097
|
+
endpoint: 'autocompleteSituationDefinitionQuery',
|
|
3098
|
+
params: function () { return ({ searchText: query }); },
|
|
3099
|
+
serviceType: exports.ServiceType.ORGANIZATION_REGISTER,
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
condition: function () { return _this.isWagetype; },
|
|
3103
|
+
endpoint: 'autocompleteWagetypeQuery',
|
|
3104
|
+
params: function () { return ({
|
|
3105
|
+
searchText: query,
|
|
3106
|
+
companyId: _this.companyId,
|
|
3107
|
+
}); },
|
|
3108
|
+
serviceType: exports.ServiceType.ENTRY,
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
condition: function () { return _this.isTransportationVoucherScaleGroup; },
|
|
3112
|
+
endpoint: 'autocompleteTransportationVoucherScaleGroupQuery',
|
|
3113
|
+
params: function () { return ({ searchText: query }); },
|
|
3114
|
+
serviceType: exports.ServiceType.GENERAL_REGISTER,
|
|
3115
|
+
},
|
|
3116
|
+
];
|
|
3117
|
+
var strategy = queryStrategies.find(function (s) { return s.condition(); });
|
|
3118
|
+
if (strategy) {
|
|
3119
|
+
return {
|
|
3120
|
+
endpoint: strategy.endpoint,
|
|
3121
|
+
params: strategy.params(),
|
|
3122
|
+
serviceType: strategy.serviceType,
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
return {
|
|
3126
|
+
endpoint: 'autocomplete',
|
|
3127
|
+
params: this.getParamsRest(query),
|
|
3128
|
+
serviceType: this.serviceType,
|
|
3129
|
+
};
|
|
3130
|
+
};
|
|
3096
3131
|
InputRestAutoCompleteComponent.prototype.formaterResponce = function (result) {
|
|
3097
3132
|
var _this = this;
|
|
3098
3133
|
this.suggestions = [];
|
|
@@ -3316,6 +3351,9 @@
|
|
|
3316
3351
|
__decorate([
|
|
3317
3352
|
core.Input()
|
|
3318
3353
|
], InputRestAutoCompleteComponent.prototype, "multiple", void 0);
|
|
3354
|
+
__decorate([
|
|
3355
|
+
core.Input()
|
|
3356
|
+
], InputRestAutoCompleteComponent.prototype, "isTransportationVoucherScaleGroup", void 0);
|
|
3319
3357
|
__decorate([
|
|
3320
3358
|
core.Input()
|
|
3321
3359
|
], InputRestAutoCompleteComponent.prototype, "serviceType", void 0);
|
|
@@ -7693,6 +7731,517 @@
|
|
|
7693
7731
|
return WorkstationgroupLookupModule;
|
|
7694
7732
|
}());
|
|
7695
7733
|
|
|
7734
|
+
var moment$c = moment_;
|
|
7735
|
+
var AutocompleteService$1 = /** @class */ (function () {
|
|
7736
|
+
function AutocompleteService(httpClienteService) {
|
|
7737
|
+
this.httpClienteService = httpClienteService;
|
|
7738
|
+
}
|
|
7739
|
+
AutocompleteService.prototype.getAutoComplete = function (entity, params, searchFields, codeIsString, service) {
|
|
7740
|
+
var getParams = this.generateGridParameters(params, searchFields, codeIsString);
|
|
7741
|
+
return this.httpClienteService.getAutoComplete(entity, getParams, service)
|
|
7742
|
+
.pipe(operators.map(function (result) { return result && result.contents; }));
|
|
7743
|
+
};
|
|
7744
|
+
AutocompleteService.prototype.getAutoCompleteQuery = function (query, params, service) {
|
|
7745
|
+
if (service === void 0) { service = exports.ServiceType.PAYROLL; }
|
|
7746
|
+
return this.httpClienteService.query(query, params, service)
|
|
7747
|
+
.pipe(operators.map(function (data) { return data && data.result; }));
|
|
7748
|
+
};
|
|
7749
|
+
/**
|
|
7750
|
+
* Gera os parametros de pesquisa via pesquisa na grid
|
|
7751
|
+
* @param filterData
|
|
7752
|
+
*/
|
|
7753
|
+
AutocompleteService.prototype.generateGridParameters = function (filterData, searchFields, codeIsString) {
|
|
7754
|
+
var _this = this;
|
|
7755
|
+
var gridParameters = "";
|
|
7756
|
+
Object.keys(filterData).forEach(function (attribute) {
|
|
7757
|
+
var filterSearchField = searchFields && searchFields.filter(function (field) { return attribute === field.name; })[0];
|
|
7758
|
+
var filterQueryString = null;
|
|
7759
|
+
var operatorsQuery = "";
|
|
7760
|
+
var searchField = filterSearchField && filterSearchField.type;
|
|
7761
|
+
if (!filterSearchField && attribute != exports.CoreFieldType.searchValue)
|
|
7762
|
+
searchField = angularComponents.FieldType.String;
|
|
7763
|
+
if (!filterSearchField && attribute === exports.CoreFieldType.searchValue)
|
|
7764
|
+
searchField = exports.CoreFieldType.searchValue;
|
|
7765
|
+
if (gridParameters)
|
|
7766
|
+
operatorsQuery = " and ";
|
|
7767
|
+
filterQueryString = _this.getParameterByType(searchField, attribute, filterData[attribute], codeIsString);
|
|
7768
|
+
if (filterQueryString)
|
|
7769
|
+
gridParameters += " " + operatorsQuery + " " + filterQueryString;
|
|
7770
|
+
});
|
|
7771
|
+
return gridParameters;
|
|
7772
|
+
};
|
|
7773
|
+
/**
|
|
7774
|
+
* Gera a string de consulta CRUD de um campo.
|
|
7775
|
+
* @param type Tipo do campo.
|
|
7776
|
+
* @param attribute Nome do atribute da entidade
|
|
7777
|
+
* @param value Valor do campo
|
|
7778
|
+
*/
|
|
7779
|
+
AutocompleteService.prototype.getParameterByType = function (type, attribute, value, codeIsString) {
|
|
7780
|
+
if (!value && type != exports.CoreFieldType.searchValue)
|
|
7781
|
+
return attribute + " is null";
|
|
7782
|
+
if (value && value === 'not null' && type != exports.CoreFieldType.searchValue)
|
|
7783
|
+
return attribute + " is not null";
|
|
7784
|
+
switch (type) {
|
|
7785
|
+
case angularComponents.FieldType.Date:
|
|
7786
|
+
return attribute + " eq '" + moment$c(value).format('YYYY-MM-DD') + "'";
|
|
7787
|
+
case angularComponents.FieldType.Enum:
|
|
7788
|
+
return attribute + " eq '" + value + "'";
|
|
7789
|
+
case angularComponents.FieldType.Integer:
|
|
7790
|
+
return attribute + " eq " + value;
|
|
7791
|
+
case angularComponents.FieldType.Autocomplete:
|
|
7792
|
+
return attribute + " eq '" + value.id + "'";
|
|
7793
|
+
case exports.CoreFieldType.searchValue:
|
|
7794
|
+
return "" + this.getParameterBySearchType(value, codeIsString);
|
|
7795
|
+
default:
|
|
7796
|
+
return this.getSearchFilterString(attribute, value);
|
|
7797
|
+
}
|
|
7798
|
+
};
|
|
7799
|
+
/**
|
|
7800
|
+
* Retorna o filtro formatador para ser chamdo no endpoint
|
|
7801
|
+
* @param valueFilterSearch valor pra adicionar no filtro
|
|
7802
|
+
*/
|
|
7803
|
+
AutocompleteService.prototype.getParameterBySearchType = function (valueFilterSearch, codeIsString) {
|
|
7804
|
+
var e_1, _a;
|
|
7805
|
+
var searchFilter = "";
|
|
7806
|
+
if (valueFilterSearch) {
|
|
7807
|
+
try {
|
|
7808
|
+
for (var _b = __values(Object.entries(valueFilterSearch)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
7809
|
+
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
7810
|
+
if (key === "code" && Number(value)) {
|
|
7811
|
+
var hasQuote = codeIsString ? "'" : "";
|
|
7812
|
+
if (searchFilter)
|
|
7813
|
+
searchFilter += " or " + key + " eq " + hasQuote + value + hasQuote;
|
|
7814
|
+
else
|
|
7815
|
+
searchFilter += key + " eq " + hasQuote + value + hasQuote;
|
|
7816
|
+
}
|
|
7817
|
+
else if (key != "code") {
|
|
7818
|
+
if (searchFilter)
|
|
7819
|
+
searchFilter += " or " + this.getSearchFilterString(key, value);
|
|
7820
|
+
else
|
|
7821
|
+
searchFilter += this.getSearchFilterString(key, value);
|
|
7822
|
+
}
|
|
7823
|
+
}
|
|
7824
|
+
}
|
|
7825
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
7826
|
+
finally {
|
|
7827
|
+
try {
|
|
7828
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7829
|
+
}
|
|
7830
|
+
finally { if (e_1) throw e_1.error; }
|
|
7831
|
+
}
|
|
7832
|
+
searchFilter = searchFilter ? "(" + searchFilter + ")" : '';
|
|
7833
|
+
}
|
|
7834
|
+
return searchFilter;
|
|
7835
|
+
};
|
|
7836
|
+
/**
|
|
7837
|
+
* Formata o filtro quando for "Ou"
|
|
7838
|
+
* @param attribute Nome do atributo da entidade.
|
|
7839
|
+
* @param value Valor da propriedade do objeto.
|
|
7840
|
+
*/
|
|
7841
|
+
AutocompleteService.prototype.getSearchFilterString = function (attribute, value) {
|
|
7842
|
+
return "contains(tolower(" + attribute + "), '" + value.toLowerCase() + "')";
|
|
7843
|
+
};
|
|
7844
|
+
AutocompleteService.ctorParameters = function () { return [
|
|
7845
|
+
{ type: HttpClientService }
|
|
7846
|
+
]; };
|
|
7847
|
+
AutocompleteService = __decorate([
|
|
7848
|
+
core.Injectable()
|
|
7849
|
+
], AutocompleteService);
|
|
7850
|
+
return AutocompleteService;
|
|
7851
|
+
}());
|
|
7852
|
+
|
|
7853
|
+
var moment$d = moment_;
|
|
7854
|
+
var LookupService$2 = /** @class */ (function () {
|
|
7855
|
+
function LookupService(http, messageService, translateService) {
|
|
7856
|
+
this.http = http;
|
|
7857
|
+
this.messageService = messageService;
|
|
7858
|
+
this.translateService = translateService;
|
|
7859
|
+
}
|
|
7860
|
+
LookupService.prototype.lookupRequestPost = function (httpPostParams, endpoint, concatFields, lookupDisplayField) {
|
|
7861
|
+
if (concatFields === void 0) { concatFields = null; }
|
|
7862
|
+
this.httpPostParams = httpPostParams;
|
|
7863
|
+
this.postConfigPageSize(httpPostParams);
|
|
7864
|
+
this.lookupDisplayField = lookupDisplayField;
|
|
7865
|
+
this.concatFields = concatFields;
|
|
7866
|
+
return this.postDataLookup(endpoint);
|
|
7867
|
+
};
|
|
7868
|
+
LookupService.prototype.postConfigPageSize = function (httpPostParams) {
|
|
7869
|
+
if (httpPostParams) {
|
|
7870
|
+
this.httpPostParams.page.size = httpPostParams.page && httpPostParams.page.size ? httpPostParams.page.size : 10;
|
|
7871
|
+
this.httpPostParams.page.current = httpPostParams.page && httpPostParams.page.current ? httpPostParams.page.current : 0;
|
|
7872
|
+
}
|
|
7873
|
+
};
|
|
7874
|
+
/**
|
|
7875
|
+
* POST
|
|
7876
|
+
* @param endpoint Busca e faz o tratamento dos dados do lookup.
|
|
7877
|
+
* @param httpParams HttpParams
|
|
7878
|
+
*/
|
|
7879
|
+
LookupService.prototype.postDataLookup = function (endpoint) {
|
|
7880
|
+
var _this = this;
|
|
7881
|
+
return this.postUrlDataLookup(endpoint, this.httpPostParams).pipe(operators.map(function (payload) {
|
|
7882
|
+
var contents = payload.contents;
|
|
7883
|
+
if (_this.concatFields && _this.concatFields.length) {
|
|
7884
|
+
contents.map(function (value) {
|
|
7885
|
+
if (_this.concatOtherFields) {
|
|
7886
|
+
_this.convertGridFieldValue(value);
|
|
7887
|
+
}
|
|
7888
|
+
value[_this.lookupDisplayField] = _this.generateDisplayFieldValue(__assign({}, value));
|
|
7889
|
+
});
|
|
7890
|
+
}
|
|
7891
|
+
return payload;
|
|
7892
|
+
}));
|
|
7893
|
+
};
|
|
7894
|
+
/**
|
|
7895
|
+
* Converte o valor do campo para apresentação no lookup.
|
|
7896
|
+
*
|
|
7897
|
+
* @param content Valor do campo para conversão.
|
|
7898
|
+
* @param field FormField do campo.
|
|
7899
|
+
*/
|
|
7900
|
+
LookupService.prototype.convertLookupFieldValue = function (content, field) {
|
|
7901
|
+
if (content) {
|
|
7902
|
+
switch (field.type) {
|
|
7903
|
+
case angularComponents.FieldType.Date:
|
|
7904
|
+
content = moment$d(content).format("L");
|
|
7905
|
+
break;
|
|
7906
|
+
case angularComponents.FieldType.Enum:
|
|
7907
|
+
var enumValue = field.options.filter(function (enumeration) { return enumeration.value === content; })[0];
|
|
7908
|
+
content = enumValue ? enumValue.label : content;
|
|
7909
|
+
break;
|
|
7910
|
+
}
|
|
7911
|
+
}
|
|
7912
|
+
return content;
|
|
7913
|
+
};
|
|
7914
|
+
/**
|
|
7915
|
+
* Converte os dados para visualização na grid
|
|
7916
|
+
* @param content
|
|
7917
|
+
*/
|
|
7918
|
+
LookupService.prototype.convertGridFieldValue = function (content) {
|
|
7919
|
+
if (content) {
|
|
7920
|
+
this.concatOtherFields.forEach(function (field) {
|
|
7921
|
+
switch (field.type) {
|
|
7922
|
+
case angularComponents.FieldType.Enum:
|
|
7923
|
+
var enumValue = field.options.filter(function (enumeration) { return enumeration.value === content[field.name]; })[0];
|
|
7924
|
+
content[field.name] = enumValue ? enumValue.label : content[field.name];
|
|
7925
|
+
break;
|
|
7926
|
+
}
|
|
7927
|
+
});
|
|
7928
|
+
}
|
|
7929
|
+
};
|
|
7930
|
+
/**
|
|
7931
|
+
* Faz a concatenação de valores do registro para ser apresentado no lookup ao selecionar o dado.
|
|
7932
|
+
* @param contentValue Valor do registro.
|
|
7933
|
+
*/
|
|
7934
|
+
LookupService.prototype.generateDisplayFieldValue = function (contentValue) {
|
|
7935
|
+
var _this = this;
|
|
7936
|
+
var displayField = "";
|
|
7937
|
+
this.concatFields.forEach(function (field) {
|
|
7938
|
+
var fieldValue = _this.convertLookupFieldValue(contentValue[field.name], field);
|
|
7939
|
+
if (fieldValue) {
|
|
7940
|
+
if (displayField) {
|
|
7941
|
+
displayField += " - " + fieldValue;
|
|
7942
|
+
}
|
|
7943
|
+
else {
|
|
7944
|
+
displayField = fieldValue;
|
|
7945
|
+
}
|
|
7946
|
+
}
|
|
7947
|
+
});
|
|
7948
|
+
return displayField;
|
|
7949
|
+
};
|
|
7950
|
+
/**
|
|
7951
|
+
* Faz a requisição POST na URL do lookup.
|
|
7952
|
+
* @param endpoint - URL do endpoint.
|
|
7953
|
+
* @param httpParams - Parâmetros HTTP.
|
|
7954
|
+
*/
|
|
7955
|
+
LookupService.prototype.postUrlDataLookup = function (endpoint, httpParams) {
|
|
7956
|
+
var _this = this;
|
|
7957
|
+
if (httpParams) {
|
|
7958
|
+
return this.http.post("" + endpoint, __assign({}, httpParams)).pipe(operators.catchError(function (exception) {
|
|
7959
|
+
if (exception.status === 403) {
|
|
7960
|
+
_this.messageService.add({
|
|
7961
|
+
severity: "error",
|
|
7962
|
+
summary: _this.translateService.instant("hcm.payroll.error"),
|
|
7963
|
+
detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
7964
|
+
sticky: true,
|
|
7965
|
+
});
|
|
7966
|
+
}
|
|
7967
|
+
return rxjs.throwError(exception);
|
|
7968
|
+
}));
|
|
7969
|
+
}
|
|
7970
|
+
else {
|
|
7971
|
+
return this.http.post("" + endpoint, {}).pipe(operators.catchError(function (exception) {
|
|
7972
|
+
if (exception.status === 403) {
|
|
7973
|
+
_this.messageService.add({
|
|
7974
|
+
severity: "error",
|
|
7975
|
+
summary: _this.translateService.instant("hcm.payroll.error"),
|
|
7976
|
+
detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
7977
|
+
sticky: true,
|
|
7978
|
+
});
|
|
7979
|
+
}
|
|
7980
|
+
return rxjs.throwError(exception);
|
|
7981
|
+
}));
|
|
7982
|
+
}
|
|
7983
|
+
};
|
|
7984
|
+
LookupService.ctorParameters = function () { return [
|
|
7985
|
+
{ type: http.HttpClient },
|
|
7986
|
+
{ type: api.MessageService },
|
|
7987
|
+
{ type: core$1.TranslateService }
|
|
7988
|
+
]; };
|
|
7989
|
+
LookupService = __decorate([
|
|
7990
|
+
core.Injectable()
|
|
7991
|
+
], LookupService);
|
|
7992
|
+
return LookupService;
|
|
7993
|
+
}());
|
|
7994
|
+
|
|
7995
|
+
var TransportationVoucherScaleLookupDto = /** @class */ (function () {
|
|
7996
|
+
function TransportationVoucherScaleLookupDto(payload) {
|
|
7997
|
+
var filterData = payload.filterData;
|
|
7998
|
+
this.code = filterData.code || null;
|
|
7999
|
+
this.transportationVoucherScaleGroupId = filterData.transportationVoucherScaleGroup && filterData.transportationVoucherScaleGroup.id || null;
|
|
8000
|
+
this.searchText = filterData.searchText || null;
|
|
8001
|
+
this.page = {
|
|
8002
|
+
current: payload.first ? payload.first : 0,
|
|
8003
|
+
size: payload.rows ? payload.rows : 10
|
|
8004
|
+
} || null;
|
|
8005
|
+
}
|
|
8006
|
+
TransportationVoucherScaleLookupDto.prototype.getToFilter = function () {
|
|
8007
|
+
var objDTO = this;
|
|
8008
|
+
return objDTO;
|
|
8009
|
+
};
|
|
8010
|
+
return TransportationVoucherScaleLookupDto;
|
|
8011
|
+
}());
|
|
8012
|
+
|
|
8013
|
+
var moment$e = moment_;
|
|
8014
|
+
var TransportationVoucherScaleLookupComponent = /** @class */ (function () {
|
|
8015
|
+
function TransportationVoucherScaleLookupComponent(autocompleteService, lookupService, translate, cdr) {
|
|
8016
|
+
var _this = this;
|
|
8017
|
+
this.autocompleteService = autocompleteService;
|
|
8018
|
+
this.lookupService = lookupService;
|
|
8019
|
+
this.translate = translate;
|
|
8020
|
+
this.cdr = cdr;
|
|
8021
|
+
this.onSelect = new core.EventEmitter();
|
|
8022
|
+
this.onClear = new core.EventEmitter();
|
|
8023
|
+
this.onBlur = new core.EventEmitter();
|
|
8024
|
+
this.lookupSuggestions = [];
|
|
8025
|
+
this.searchGridData = [];
|
|
8026
|
+
this.suggestionsObservable = new rxjs.BehaviorSubject([]);
|
|
8027
|
+
this.totalRecords = 0;
|
|
8028
|
+
this.concatFieldsName = [
|
|
8029
|
+
new angularComponents.FormField({
|
|
8030
|
+
name: "code",
|
|
8031
|
+
label: this.translate.instant("hcm.payroll.code"),
|
|
8032
|
+
type: angularComponents.FieldType.String,
|
|
8033
|
+
}),
|
|
8034
|
+
new angularComponents.FormField({
|
|
8035
|
+
name: "description",
|
|
8036
|
+
label: this.translate.instant("hcm.payroll.description"),
|
|
8037
|
+
type: angularComponents.FieldType.String,
|
|
8038
|
+
}),
|
|
8039
|
+
];
|
|
8040
|
+
this.concatName = [
|
|
8041
|
+
new angularComponents.FormField({
|
|
8042
|
+
name: "code",
|
|
8043
|
+
label: this.translate.instant("hcm.payroll.code"),
|
|
8044
|
+
type: angularComponents.FieldType.Integer,
|
|
8045
|
+
}),
|
|
8046
|
+
];
|
|
8047
|
+
this.gridFields = [
|
|
8048
|
+
new angularComponents.FormField({
|
|
8049
|
+
name: "displayField",
|
|
8050
|
+
label: this.translate.instant("hcm.payroll.transportation_voucher_scale"),
|
|
8051
|
+
type: angularComponents.FieldType.String,
|
|
8052
|
+
}),
|
|
8053
|
+
];
|
|
8054
|
+
this.searchFields = __spread(this.concatName, [
|
|
8055
|
+
{
|
|
8056
|
+
name: "searchText",
|
|
8057
|
+
label: this.translate.instant("hcm.payroll.description"),
|
|
8058
|
+
type: angularComponents.FieldType.String,
|
|
8059
|
+
},
|
|
8060
|
+
{
|
|
8061
|
+
name: "transportationVoucherScaleGroup",
|
|
8062
|
+
type: angularComponents.FieldType.Autocomplete,
|
|
8063
|
+
label: this.translate.instant("hcm.payroll.grouper"),
|
|
8064
|
+
dataKey: "id",
|
|
8065
|
+
appendTo: "body",
|
|
8066
|
+
fullWidth: true,
|
|
8067
|
+
onSearch: function (val) {
|
|
8068
|
+
_this.getAutocompleteQuery("autocompleteTransportationVoucherScaleGroupQuery", {
|
|
8069
|
+
searchText: val ? val : "",
|
|
8070
|
+
}, exports.ServiceType.GENERAL_REGISTER);
|
|
8071
|
+
},
|
|
8072
|
+
suggestionsObservable: this.suggestionsObservable,
|
|
8073
|
+
displayField: "value",
|
|
8074
|
+
},
|
|
8075
|
+
]);
|
|
8076
|
+
this.transportationVoucherScaleFilterForm = new forms.FormGroup({});
|
|
8077
|
+
this.unsubscribe = new rxjs.Subject();
|
|
8078
|
+
this.initialLoad = true;
|
|
8079
|
+
}
|
|
8080
|
+
TransportationVoucherScaleLookupComponent.prototype.ngOnInit = function () {
|
|
8081
|
+
};
|
|
8082
|
+
TransportationVoucherScaleLookupComponent.prototype.ngAfterViewInit = function () {
|
|
8083
|
+
this.cdr.detectChanges();
|
|
8084
|
+
};
|
|
8085
|
+
TransportationVoucherScaleLookupComponent.prototype.ngOnDestroy = function () {
|
|
8086
|
+
this.unsubscribe.next();
|
|
8087
|
+
this.unsubscribe.complete();
|
|
8088
|
+
};
|
|
8089
|
+
/**
|
|
8090
|
+
* Evento disparado ao selecionar um item no lookup
|
|
8091
|
+
*/
|
|
8092
|
+
TransportationVoucherScaleLookupComponent.prototype.selectOption = function (event) {
|
|
8093
|
+
if (event && event.code) {
|
|
8094
|
+
this.onSelect.emit(event);
|
|
8095
|
+
}
|
|
8096
|
+
};
|
|
8097
|
+
/**
|
|
8098
|
+
* Evento disparado ao limpar o campo
|
|
8099
|
+
*/
|
|
8100
|
+
TransportationVoucherScaleLookupComponent.prototype.onClearItem = function (event) {
|
|
8101
|
+
this.onClear.emit(event);
|
|
8102
|
+
};
|
|
8103
|
+
/**
|
|
8104
|
+
* Requisição de busca no lookup
|
|
8105
|
+
*/
|
|
8106
|
+
TransportationVoucherScaleLookupComponent.prototype.searchRequest = function ($event) {
|
|
8107
|
+
var _this = this;
|
|
8108
|
+
var endpoint = "hcm/general_register/queries/transportationVoucherScaleFilterQuery";
|
|
8109
|
+
var isLookupOpen = $event && $event.filterData;
|
|
8110
|
+
$event = __assign({}, this.getValueEvent($event, isLookupOpen));
|
|
8111
|
+
var filter = new TransportationVoucherScaleLookupDto($event);
|
|
8112
|
+
this.lookupService
|
|
8113
|
+
.lookupRequestPost(filter.getToFilter(), endpoint, __spread(this.concatFieldsName), "displayField")
|
|
8114
|
+
.pipe(operators.takeUntil(this.unsubscribe))
|
|
8115
|
+
.subscribe(function (data) {
|
|
8116
|
+
if (isLookupOpen) {
|
|
8117
|
+
_this.searchGridData = data && __spread(data.contents);
|
|
8118
|
+
}
|
|
8119
|
+
else {
|
|
8120
|
+
_this.lookupSuggestions = data && __spread(data.contents);
|
|
8121
|
+
}
|
|
8122
|
+
_this.totalRecords = data && data.totalElements;
|
|
8123
|
+
});
|
|
8124
|
+
};
|
|
8125
|
+
/**
|
|
8126
|
+
* Formata o evento de pesquisa
|
|
8127
|
+
*/
|
|
8128
|
+
TransportationVoucherScaleLookupComponent.prototype.getValueEvent = function ($event, isLookupOpen) {
|
|
8129
|
+
if (isLookupOpen) {
|
|
8130
|
+
return $event;
|
|
8131
|
+
}
|
|
8132
|
+
else {
|
|
8133
|
+
return {
|
|
8134
|
+
filterData: {
|
|
8135
|
+
searchText: $event
|
|
8136
|
+
},
|
|
8137
|
+
};
|
|
8138
|
+
}
|
|
8139
|
+
};
|
|
8140
|
+
/**
|
|
8141
|
+
* Busca dados do autocomplete
|
|
8142
|
+
*/
|
|
8143
|
+
TransportationVoucherScaleLookupComponent.prototype.getAutoComplete = function (entity, params, code, displayField, filterParams, codeIsString, service) {
|
|
8144
|
+
var _this = this;
|
|
8145
|
+
if (filterParams === void 0) { filterParams = null; }
|
|
8146
|
+
if (codeIsString === void 0) { codeIsString = false; }
|
|
8147
|
+
if (service === void 0) { service = exports.ServiceType.PAYROLL; }
|
|
8148
|
+
var searchFields = [
|
|
8149
|
+
{ name: code, type: angularComponents.FieldType.Integer },
|
|
8150
|
+
{ name: displayField, type: angularComponents.FieldType.String },
|
|
8151
|
+
];
|
|
8152
|
+
var concatFields = __assign({ code: { searchValue: params } }, filterParams);
|
|
8153
|
+
this.autocompleteService
|
|
8154
|
+
.getAutoComplete(entity, concatFields, searchFields, codeIsString, service)
|
|
8155
|
+
.pipe(operators.takeUntil(this.unsubscribe))
|
|
8156
|
+
.subscribe(function (data) {
|
|
8157
|
+
_this.suggestionsObservable.next(data || []);
|
|
8158
|
+
});
|
|
8159
|
+
};
|
|
8160
|
+
/**
|
|
8161
|
+
* Busca dados via query customizada
|
|
8162
|
+
*/
|
|
8163
|
+
TransportationVoucherScaleLookupComponent.prototype.getAutocompleteQuery = function (query, params, service) {
|
|
8164
|
+
var _this = this;
|
|
8165
|
+
if (service === void 0) { service = exports.ServiceType.PAYROLL; }
|
|
8166
|
+
this.autocompleteService
|
|
8167
|
+
.getAutoCompleteQuery(query, params, service)
|
|
8168
|
+
.pipe(operators.takeUntil(this.unsubscribe))
|
|
8169
|
+
.subscribe(function (data) {
|
|
8170
|
+
if (query === "autocompleteTransportationVoucherScaleGroupQuery") {
|
|
8171
|
+
data.forEach(function (item) {
|
|
8172
|
+
if (item.fields && item.fields.length >= 2) {
|
|
8173
|
+
// Extrai o valor concatenado do segundo field (TransportationVoucherScaleGroupNameI18n)
|
|
8174
|
+
item["value"] = item.fields[1].value;
|
|
8175
|
+
// Extrai o id do tableId
|
|
8176
|
+
item["id"] = item.tableId;
|
|
8177
|
+
}
|
|
8178
|
+
});
|
|
8179
|
+
}
|
|
8180
|
+
_this.suggestionsObservable.next(data || []);
|
|
8181
|
+
});
|
|
8182
|
+
};
|
|
8183
|
+
TransportationVoucherScaleLookupComponent.ctorParameters = function () { return [
|
|
8184
|
+
{ type: AutocompleteService$1 },
|
|
8185
|
+
{ type: LookupService$2 },
|
|
8186
|
+
{ type: core$1.TranslateService },
|
|
8187
|
+
{ type: core.ChangeDetectorRef }
|
|
8188
|
+
]; };
|
|
8189
|
+
__decorate([
|
|
8190
|
+
core.ViewChild("transportationVoucherScaleEl", { static: false })
|
|
8191
|
+
], TransportationVoucherScaleLookupComponent.prototype, "transportationVoucherScaleEl", void 0);
|
|
8192
|
+
__decorate([
|
|
8193
|
+
core.Input()
|
|
8194
|
+
], TransportationVoucherScaleLookupComponent.prototype, "required", void 0);
|
|
8195
|
+
__decorate([
|
|
8196
|
+
core.Input()
|
|
8197
|
+
], TransportationVoucherScaleLookupComponent.prototype, "disabled", void 0);
|
|
8198
|
+
__decorate([
|
|
8199
|
+
core.Input()
|
|
8200
|
+
], TransportationVoucherScaleLookupComponent.prototype, "form", void 0);
|
|
8201
|
+
__decorate([
|
|
8202
|
+
core.Input()
|
|
8203
|
+
], TransportationVoucherScaleLookupComponent.prototype, "name", void 0);
|
|
8204
|
+
__decorate([
|
|
8205
|
+
core.Output()
|
|
8206
|
+
], TransportationVoucherScaleLookupComponent.prototype, "onSelect", void 0);
|
|
8207
|
+
__decorate([
|
|
8208
|
+
core.Output()
|
|
8209
|
+
], TransportationVoucherScaleLookupComponent.prototype, "onClear", void 0);
|
|
8210
|
+
__decorate([
|
|
8211
|
+
core.Output()
|
|
8212
|
+
], TransportationVoucherScaleLookupComponent.prototype, "onBlur", void 0);
|
|
8213
|
+
TransportationVoucherScaleLookupComponent = __decorate([
|
|
8214
|
+
core.Component({
|
|
8215
|
+
// tslint:disable-next-line:component-selector
|
|
8216
|
+
selector: "c-transportation-voucher-scale-lookup",
|
|
8217
|
+
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"
|
|
8218
|
+
})
|
|
8219
|
+
], TransportationVoucherScaleLookupComponent);
|
|
8220
|
+
return TransportationVoucherScaleLookupComponent;
|
|
8221
|
+
}());
|
|
8222
|
+
|
|
8223
|
+
var TransportationVoucherScaleLookupModule = /** @class */ (function () {
|
|
8224
|
+
function TransportationVoucherScaleLookupModule() {
|
|
8225
|
+
}
|
|
8226
|
+
TransportationVoucherScaleLookupModule = __decorate([
|
|
8227
|
+
core.NgModule({
|
|
8228
|
+
imports: [
|
|
8229
|
+
common.CommonModule,
|
|
8230
|
+
forms.FormsModule,
|
|
8231
|
+
forms.ReactiveFormsModule,
|
|
8232
|
+
core$1.TranslateModule,
|
|
8233
|
+
http.HttpClientModule,
|
|
8234
|
+
angularComponents.LocaleModule.forChild(),
|
|
8235
|
+
angularComponents.DynamicFormModule,
|
|
8236
|
+
],
|
|
8237
|
+
declarations: [TransportationVoucherScaleLookupComponent],
|
|
8238
|
+
exports: [TransportationVoucherScaleLookupComponent],
|
|
8239
|
+
providers: [AutocompleteService$1, LookupService$2, api.MessageService],
|
|
8240
|
+
})
|
|
8241
|
+
], TransportationVoucherScaleLookupModule);
|
|
8242
|
+
return TransportationVoucherScaleLookupModule;
|
|
8243
|
+
}());
|
|
8244
|
+
|
|
7696
8245
|
var HistoricalBankAccountComponent = /** @class */ (function () {
|
|
7697
8246
|
function HistoricalBankAccountComponent(confirmationService, translateService, activatedRoute, cd, formBuilder) {
|
|
7698
8247
|
var _this = this;
|
|
@@ -8473,7 +9022,7 @@
|
|
|
8473
9022
|
return HistoricalBankAccountListService;
|
|
8474
9023
|
}());
|
|
8475
9024
|
|
|
8476
|
-
var moment$
|
|
9025
|
+
var moment$f = moment_;
|
|
8477
9026
|
var HistoricalBankAccountListComponent = /** @class */ (function () {
|
|
8478
9027
|
function HistoricalBankAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalBankAccountListService) {
|
|
8479
9028
|
this.confirmationService = confirmationService;
|
|
@@ -8529,7 +9078,7 @@
|
|
|
8529
9078
|
HistoricalBankAccountListComponent.prototype.onLazyLoad = function (payload) {
|
|
8530
9079
|
var _this = this;
|
|
8531
9080
|
payload.forEach(function (value) {
|
|
8532
|
-
value.dateWhen = moment$
|
|
9081
|
+
value.dateWhen = moment$f(value.dateWhen).format(_this.dateFormat);
|
|
8533
9082
|
});
|
|
8534
9083
|
this.onGridLoad(payload);
|
|
8535
9084
|
this.loading = false;
|
|
@@ -8540,7 +9089,7 @@
|
|
|
8540
9089
|
{
|
|
8541
9090
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
8542
9091
|
command: function () {
|
|
8543
|
-
var dateWhen = rowData && rowData.dateWhen && moment$
|
|
9092
|
+
var dateWhen = rowData && rowData.dateWhen && moment$f(rowData.dateWhen, _this.dateFormat).format("YYYY-MM-DD");
|
|
8544
9093
|
if (_this.withSidebar)
|
|
8545
9094
|
_this.router.navigate(["historical-bank-account/" + dateWhen], {
|
|
8546
9095
|
relativeTo: _this.activatedRoute,
|
|
@@ -8569,7 +9118,7 @@
|
|
|
8569
9118
|
HistoricalBankAccountListComponent.prototype.delete = function (id, dateWhen) {
|
|
8570
9119
|
var _this = this;
|
|
8571
9120
|
if (id === this.lastRecord.id) {
|
|
8572
|
-
var dateWhenToDto_1 = moment$
|
|
9121
|
+
var dateWhenToDto_1 = moment$f(dateWhen, this.dateFormat).format("YYYY-MM-DD");
|
|
8573
9122
|
this.confirmationService.confirm({
|
|
8574
9123
|
message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete") + "?",
|
|
8575
9124
|
accept: function () {
|
|
@@ -8776,9 +9325,9 @@
|
|
|
8776
9325
|
return EntityODataParameter;
|
|
8777
9326
|
}());
|
|
8778
9327
|
|
|
8779
|
-
var moment$
|
|
8780
|
-
var dateStartG5 = moment$
|
|
8781
|
-
var dateEndG5 = moment$
|
|
9328
|
+
var moment$g = moment_;
|
|
9329
|
+
var dateStartG5 = moment$g('31/12/1900', 'DD/MM/YYYY');
|
|
9330
|
+
var dateEndG5 = moment$g('04/06/2080', 'DD/MM/YYYY');
|
|
8782
9331
|
var DateValidator = /** @class */ (function () {
|
|
8783
9332
|
function DateValidator() {
|
|
8784
9333
|
}
|
|
@@ -8794,7 +9343,7 @@
|
|
|
8794
9343
|
var value = removeCharacteresSpecials(control.value);
|
|
8795
9344
|
dateFormat = removeCharacteresSpecials(dateFormat);
|
|
8796
9345
|
if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
|
|
8797
|
-
var dateValue = moment$
|
|
9346
|
+
var dateValue = moment$g(value, dateFormat);
|
|
8798
9347
|
var valid = dateValue.isValid();
|
|
8799
9348
|
var isValidRange = useG5DateRange ? dateValue.isBetween(dateStartG5, dateEndG5, null, '[]') : true;
|
|
8800
9349
|
return valid && isValidRange ? null : { invalidDate: true };
|
|
@@ -8830,8 +9379,8 @@
|
|
|
8830
9379
|
var value = removeCharacteresSpecials(control.value);
|
|
8831
9380
|
dateFormat = removeCharacteresSpecials(dateFormat);
|
|
8832
9381
|
if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
|
|
8833
|
-
var referenceDate = moment$
|
|
8834
|
-
var compareTo = moment$
|
|
9382
|
+
var referenceDate = moment$g(value, dateFormat);
|
|
9383
|
+
var compareTo = moment$g(compareToDate, dateFormat);
|
|
8835
9384
|
return _this.dateCompare(referenceDate, compareTo, compareType, options);
|
|
8836
9385
|
}
|
|
8837
9386
|
return null;
|
|
@@ -10694,7 +11243,7 @@
|
|
|
10694
11243
|
return HistoricalPixAccountListService;
|
|
10695
11244
|
}());
|
|
10696
11245
|
|
|
10697
|
-
var moment$
|
|
11246
|
+
var moment$h = moment_;
|
|
10698
11247
|
var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
10699
11248
|
function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
|
|
10700
11249
|
this.confirmationService = confirmationService;
|
|
@@ -10737,7 +11286,7 @@
|
|
|
10737
11286
|
HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
|
|
10738
11287
|
var _this = this;
|
|
10739
11288
|
payload.forEach(function (value) {
|
|
10740
|
-
value.dateChange = moment$
|
|
11289
|
+
value.dateChange = moment$h(value.dateChange).format(_this.dateFormat);
|
|
10741
11290
|
});
|
|
10742
11291
|
this.onGridLoad(payload);
|
|
10743
11292
|
this.loading = false;
|
|
@@ -10749,7 +11298,7 @@
|
|
|
10749
11298
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
10750
11299
|
command: function () {
|
|
10751
11300
|
if (_this.isAllowToViewHistorical) {
|
|
10752
|
-
var dateChange = rowData && rowData.dateChange && moment$
|
|
11301
|
+
var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10753
11302
|
if (_this.withSidebar) {
|
|
10754
11303
|
_this.isOnlyView.emit(true);
|
|
10755
11304
|
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
@@ -10769,7 +11318,7 @@
|
|
|
10769
11318
|
label: this.translateService.instant("hcm.payroll.edit"),
|
|
10770
11319
|
command: function () {
|
|
10771
11320
|
if (_this.isAllowToEditHistorical) {
|
|
10772
|
-
var dateChange = rowData && rowData.dateChange && moment$
|
|
11321
|
+
var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10773
11322
|
if (_this.withSidebar) {
|
|
10774
11323
|
_this.isOnlyView.emit(false);
|
|
10775
11324
|
_this.isOnlyEdit.emit(true);
|
|
@@ -10802,7 +11351,7 @@
|
|
|
10802
11351
|
HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
|
|
10803
11352
|
var _this = this;
|
|
10804
11353
|
if (id === this.lastRecord.id) {
|
|
10805
|
-
var dateChangeToDto_1 = moment$
|
|
11354
|
+
var dateChangeToDto_1 = moment$h(dateChange, this.dateFormat).format("YYYY-MM-DD");
|
|
10806
11355
|
this.confirmationService.confirm({
|
|
10807
11356
|
message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
|
|
10808
11357
|
accept: function () {
|
|
@@ -10998,6 +11547,7 @@
|
|
|
10998
11547
|
exports.AdmissionDraftSummaryModule = AdmissionDraftSummaryModule;
|
|
10999
11548
|
exports.AdmissionDraftSummaryService = AdmissionDraftSummaryService;
|
|
11000
11549
|
exports.AutocompleteParametersService = AutocompleteParametersService;
|
|
11550
|
+
exports.AutocompleteService = AutocompleteService$1;
|
|
11001
11551
|
exports.BlockUiComponent = BlockUiComponent;
|
|
11002
11552
|
exports.BlockUiModule = BlockUiModule;
|
|
11003
11553
|
exports.BreadcrumbComponent = BreadcrumbComponent;
|
|
@@ -11070,6 +11620,7 @@
|
|
|
11070
11620
|
exports.ListRestModule = ListRestModule;
|
|
11071
11621
|
exports.LookupModule = LookupModule;
|
|
11072
11622
|
exports.LookupParametersService = LookupParametersService;
|
|
11623
|
+
exports.LookupService = LookupService$2;
|
|
11073
11624
|
exports.NameNotSpacesDirective = NameNotSpacesDirective;
|
|
11074
11625
|
exports.OnlyNumberDirective = OnlyNumberDirective;
|
|
11075
11626
|
exports.PermissionService = PermissionService;
|
|
@@ -11081,6 +11632,9 @@
|
|
|
11081
11632
|
exports.ToastComponent = ToastComponent;
|
|
11082
11633
|
exports.ToastModule = ToastModule;
|
|
11083
11634
|
exports.ToastService = ToastService;
|
|
11635
|
+
exports.TransportationVoucherScaleLookupComponent = TransportationVoucherScaleLookupComponent;
|
|
11636
|
+
exports.TransportationVoucherScaleLookupDto = TransportationVoucherScaleLookupDto;
|
|
11637
|
+
exports.TransportationVoucherScaleLookupModule = TransportationVoucherScaleLookupModule;
|
|
11084
11638
|
exports.TypeAdmissionModule = TypeAdmissionModule;
|
|
11085
11639
|
exports.TypeAdmissionServices = TypeAdmissionServices;
|
|
11086
11640
|
exports.WorkflowDataService = WorkflowDataService;
|