@senior-gestao-pessoas/payroll-core 9.8.0-feature-hcmgdp-12459-4d08efe5 → 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.
Files changed (34) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +531 -15
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/transportation-voucher-scale-lookup/autocomplete.service.d.ts +31 -0
  6. package/components/transportation-voucher-scale-lookup/index.d.ts +5 -0
  7. package/components/transportation-voucher-scale-lookup/lookup.service.d.ts +47 -0
  8. package/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.component.d.ts +80 -0
  9. package/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.dto.d.ts +8 -0
  10. package/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.module.d.ts +2 -0
  11. package/esm2015/components/transportation-voucher-scale-lookup/autocomplete.service.js +114 -0
  12. package/esm2015/components/transportation-voucher-scale-lookup/index.js +6 -0
  13. package/esm2015/components/transportation-voucher-scale-lookup/lookup.service.js +147 -0
  14. package/esm2015/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.component.js +215 -0
  15. package/esm2015/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.dto.js +17 -0
  16. package/esm2015/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.module.js +31 -0
  17. package/esm2015/public_api.js +2 -1
  18. package/esm5/components/transportation-voucher-scale-lookup/autocomplete.service.js +128 -0
  19. package/esm5/components/transportation-voucher-scale-lookup/index.js +6 -0
  20. package/esm5/components/transportation-voucher-scale-lookup/lookup.service.js +152 -0
  21. package/esm5/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.component.js +223 -0
  22. package/esm5/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.dto.js +19 -0
  23. package/esm5/components/transportation-voucher-scale-lookup/transportation-voucher-scale-lookup.module.js +34 -0
  24. package/esm5/public_api.js +2 -1
  25. package/fesm2015/senior-gestao-pessoas-payroll-core.js +497 -17
  26. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  27. package/fesm5/senior-gestao-pessoas-payroll-core.js +528 -17
  28. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  29. package/locale/en-US.json +5 -1
  30. package/locale/es-ES.json +5 -1
  31. package/locale/pt-BR.json +5 -1
  32. package/package.json +1 -1
  33. package/public_api.d.ts +1 -0
  34. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
@@ -7731,6 +7731,517 @@
7731
7731
  return WorkstationgroupLookupModule;
7732
7732
  }());
7733
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
+
7734
8245
  var HistoricalBankAccountComponent = /** @class */ (function () {
7735
8246
  function HistoricalBankAccountComponent(confirmationService, translateService, activatedRoute, cd, formBuilder) {
7736
8247
  var _this = this;
@@ -8511,7 +9022,7 @@
8511
9022
  return HistoricalBankAccountListService;
8512
9023
  }());
8513
9024
 
8514
- var moment$c = moment_;
9025
+ var moment$f = moment_;
8515
9026
  var HistoricalBankAccountListComponent = /** @class */ (function () {
8516
9027
  function HistoricalBankAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalBankAccountListService) {
8517
9028
  this.confirmationService = confirmationService;
@@ -8567,7 +9078,7 @@
8567
9078
  HistoricalBankAccountListComponent.prototype.onLazyLoad = function (payload) {
8568
9079
  var _this = this;
8569
9080
  payload.forEach(function (value) {
8570
- value.dateWhen = moment$c(value.dateWhen).format(_this.dateFormat);
9081
+ value.dateWhen = moment$f(value.dateWhen).format(_this.dateFormat);
8571
9082
  });
8572
9083
  this.onGridLoad(payload);
8573
9084
  this.loading = false;
@@ -8578,7 +9089,7 @@
8578
9089
  {
8579
9090
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
8580
9091
  command: function () {
8581
- var dateWhen = rowData && rowData.dateWhen && moment$c(rowData.dateWhen, _this.dateFormat).format("YYYY-MM-DD");
9092
+ var dateWhen = rowData && rowData.dateWhen && moment$f(rowData.dateWhen, _this.dateFormat).format("YYYY-MM-DD");
8582
9093
  if (_this.withSidebar)
8583
9094
  _this.router.navigate(["historical-bank-account/" + dateWhen], {
8584
9095
  relativeTo: _this.activatedRoute,
@@ -8607,7 +9118,7 @@
8607
9118
  HistoricalBankAccountListComponent.prototype.delete = function (id, dateWhen) {
8608
9119
  var _this = this;
8609
9120
  if (id === this.lastRecord.id) {
8610
- var dateWhenToDto_1 = moment$c(dateWhen, this.dateFormat).format("YYYY-MM-DD");
9121
+ var dateWhenToDto_1 = moment$f(dateWhen, this.dateFormat).format("YYYY-MM-DD");
8611
9122
  this.confirmationService.confirm({
8612
9123
  message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete") + "?",
8613
9124
  accept: function () {
@@ -8814,9 +9325,9 @@
8814
9325
  return EntityODataParameter;
8815
9326
  }());
8816
9327
 
8817
- var moment$d = moment_;
8818
- var dateStartG5 = moment$d('31/12/1900', 'DD/MM/YYYY');
8819
- var dateEndG5 = moment$d('04/06/2080', 'DD/MM/YYYY');
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');
8820
9331
  var DateValidator = /** @class */ (function () {
8821
9332
  function DateValidator() {
8822
9333
  }
@@ -8832,7 +9343,7 @@
8832
9343
  var value = removeCharacteresSpecials(control.value);
8833
9344
  dateFormat = removeCharacteresSpecials(dateFormat);
8834
9345
  if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
8835
- var dateValue = moment$d(value, dateFormat);
9346
+ var dateValue = moment$g(value, dateFormat);
8836
9347
  var valid = dateValue.isValid();
8837
9348
  var isValidRange = useG5DateRange ? dateValue.isBetween(dateStartG5, dateEndG5, null, '[]') : true;
8838
9349
  return valid && isValidRange ? null : { invalidDate: true };
@@ -8868,8 +9379,8 @@
8868
9379
  var value = removeCharacteresSpecials(control.value);
8869
9380
  dateFormat = removeCharacteresSpecials(dateFormat);
8870
9381
  if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
8871
- var referenceDate = moment$d(value, dateFormat);
8872
- var compareTo = moment$d(compareToDate, dateFormat);
9382
+ var referenceDate = moment$g(value, dateFormat);
9383
+ var compareTo = moment$g(compareToDate, dateFormat);
8873
9384
  return _this.dateCompare(referenceDate, compareTo, compareType, options);
8874
9385
  }
8875
9386
  return null;
@@ -10732,7 +11243,7 @@
10732
11243
  return HistoricalPixAccountListService;
10733
11244
  }());
10734
11245
 
10735
- var moment$e = moment_;
11246
+ var moment$h = moment_;
10736
11247
  var HistoricalPixAccountListComponent = /** @class */ (function () {
10737
11248
  function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10738
11249
  this.confirmationService = confirmationService;
@@ -10775,7 +11286,7 @@
10775
11286
  HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
10776
11287
  var _this = this;
10777
11288
  payload.forEach(function (value) {
10778
- value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
11289
+ value.dateChange = moment$h(value.dateChange).format(_this.dateFormat);
10779
11290
  });
10780
11291
  this.onGridLoad(payload);
10781
11292
  this.loading = false;
@@ -10787,7 +11298,7 @@
10787
11298
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10788
11299
  command: function () {
10789
11300
  if (_this.isAllowToViewHistorical) {
10790
- var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
11301
+ var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10791
11302
  if (_this.withSidebar) {
10792
11303
  _this.isOnlyView.emit(true);
10793
11304
  _this.router.navigate(["historical-pix-account/" + dateChange], {
@@ -10807,7 +11318,7 @@
10807
11318
  label: this.translateService.instant("hcm.payroll.edit"),
10808
11319
  command: function () {
10809
11320
  if (_this.isAllowToEditHistorical) {
10810
- var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
11321
+ var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10811
11322
  if (_this.withSidebar) {
10812
11323
  _this.isOnlyView.emit(false);
10813
11324
  _this.isOnlyEdit.emit(true);
@@ -10840,7 +11351,7 @@
10840
11351
  HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
10841
11352
  var _this = this;
10842
11353
  if (id === this.lastRecord.id) {
10843
- var dateChangeToDto_1 = moment$e(dateChange, this.dateFormat).format("YYYY-MM-DD");
11354
+ var dateChangeToDto_1 = moment$h(dateChange, this.dateFormat).format("YYYY-MM-DD");
10844
11355
  this.confirmationService.confirm({
10845
11356
  message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
10846
11357
  accept: function () {
@@ -11036,6 +11547,7 @@
11036
11547
  exports.AdmissionDraftSummaryModule = AdmissionDraftSummaryModule;
11037
11548
  exports.AdmissionDraftSummaryService = AdmissionDraftSummaryService;
11038
11549
  exports.AutocompleteParametersService = AutocompleteParametersService;
11550
+ exports.AutocompleteService = AutocompleteService$1;
11039
11551
  exports.BlockUiComponent = BlockUiComponent;
11040
11552
  exports.BlockUiModule = BlockUiModule;
11041
11553
  exports.BreadcrumbComponent = BreadcrumbComponent;
@@ -11108,6 +11620,7 @@
11108
11620
  exports.ListRestModule = ListRestModule;
11109
11621
  exports.LookupModule = LookupModule;
11110
11622
  exports.LookupParametersService = LookupParametersService;
11623
+ exports.LookupService = LookupService$2;
11111
11624
  exports.NameNotSpacesDirective = NameNotSpacesDirective;
11112
11625
  exports.OnlyNumberDirective = OnlyNumberDirective;
11113
11626
  exports.PermissionService = PermissionService;
@@ -11119,6 +11632,9 @@
11119
11632
  exports.ToastComponent = ToastComponent;
11120
11633
  exports.ToastModule = ToastModule;
11121
11634
  exports.ToastService = ToastService;
11635
+ exports.TransportationVoucherScaleLookupComponent = TransportationVoucherScaleLookupComponent;
11636
+ exports.TransportationVoucherScaleLookupDto = TransportationVoucherScaleLookupDto;
11637
+ exports.TransportationVoucherScaleLookupModule = TransportationVoucherScaleLookupModule;
11122
11638
  exports.TypeAdmissionModule = TypeAdmissionModule;
11123
11639
  exports.TypeAdmissionServices = TypeAdmissionServices;
11124
11640
  exports.WorkflowDataService = WorkflowDataService;