@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
@@ -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';
@@ -7565,6 +7565,517 @@ var WorkstationgroupLookupModule = /** @class */ (function () {
7565
7565
  return WorkstationgroupLookupModule;
7566
7566
  }());
7567
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
+
7568
8079
  var HistoricalBankAccountComponent = /** @class */ (function () {
7569
8080
  function HistoricalBankAccountComponent(confirmationService, translateService, activatedRoute, cd, formBuilder) {
7570
8081
  var _this = this;
@@ -8345,7 +8856,7 @@ var HistoricalBankAccountListService = /** @class */ (function () {
8345
8856
  return HistoricalBankAccountListService;
8346
8857
  }());
8347
8858
 
8348
- var moment$c = moment_;
8859
+ var moment$f = moment_;
8349
8860
  var HistoricalBankAccountListComponent = /** @class */ (function () {
8350
8861
  function HistoricalBankAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalBankAccountListService) {
8351
8862
  this.confirmationService = confirmationService;
@@ -8401,7 +8912,7 @@ var HistoricalBankAccountListComponent = /** @class */ (function () {
8401
8912
  HistoricalBankAccountListComponent.prototype.onLazyLoad = function (payload) {
8402
8913
  var _this = this;
8403
8914
  payload.forEach(function (value) {
8404
- value.dateWhen = moment$c(value.dateWhen).format(_this.dateFormat);
8915
+ value.dateWhen = moment$f(value.dateWhen).format(_this.dateFormat);
8405
8916
  });
8406
8917
  this.onGridLoad(payload);
8407
8918
  this.loading = false;
@@ -8412,7 +8923,7 @@ var HistoricalBankAccountListComponent = /** @class */ (function () {
8412
8923
  {
8413
8924
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
8414
8925
  command: function () {
8415
- var dateWhen = rowData && rowData.dateWhen && moment$c(rowData.dateWhen, _this.dateFormat).format("YYYY-MM-DD");
8926
+ var dateWhen = rowData && rowData.dateWhen && moment$f(rowData.dateWhen, _this.dateFormat).format("YYYY-MM-DD");
8416
8927
  if (_this.withSidebar)
8417
8928
  _this.router.navigate(["historical-bank-account/" + dateWhen], {
8418
8929
  relativeTo: _this.activatedRoute,
@@ -8441,7 +8952,7 @@ var HistoricalBankAccountListComponent = /** @class */ (function () {
8441
8952
  HistoricalBankAccountListComponent.prototype.delete = function (id, dateWhen) {
8442
8953
  var _this = this;
8443
8954
  if (id === this.lastRecord.id) {
8444
- var dateWhenToDto_1 = moment$c(dateWhen, this.dateFormat).format("YYYY-MM-DD");
8955
+ var dateWhenToDto_1 = moment$f(dateWhen, this.dateFormat).format("YYYY-MM-DD");
8445
8956
  this.confirmationService.confirm({
8446
8957
  message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete") + "?",
8447
8958
  accept: function () {
@@ -8648,9 +9159,9 @@ var EntityODataParameter = /** @class */ (function () {
8648
9159
  return EntityODataParameter;
8649
9160
  }());
8650
9161
 
8651
- var moment$d = moment_;
8652
- var dateStartG5 = moment$d('31/12/1900', 'DD/MM/YYYY');
8653
- var dateEndG5 = moment$d('04/06/2080', 'DD/MM/YYYY');
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');
8654
9165
  var DateValidator = /** @class */ (function () {
8655
9166
  function DateValidator() {
8656
9167
  }
@@ -8666,7 +9177,7 @@ var DateValidator = /** @class */ (function () {
8666
9177
  var value = removeCharacteresSpecials(control.value);
8667
9178
  dateFormat = removeCharacteresSpecials(dateFormat);
8668
9179
  if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
8669
- var dateValue = moment$d(value, dateFormat);
9180
+ var dateValue = moment$g(value, dateFormat);
8670
9181
  var valid = dateValue.isValid();
8671
9182
  var isValidRange = useG5DateRange ? dateValue.isBetween(dateStartG5, dateEndG5, null, '[]') : true;
8672
9183
  return valid && isValidRange ? null : { invalidDate: true };
@@ -8702,8 +9213,8 @@ var DateValidator = /** @class */ (function () {
8702
9213
  var value = removeCharacteresSpecials(control.value);
8703
9214
  dateFormat = removeCharacteresSpecials(dateFormat);
8704
9215
  if (value && dateFormat && value.length === dateFormat.length && !control.value.includes('_')) {
8705
- var referenceDate = moment$d(value, dateFormat);
8706
- var compareTo = moment$d(compareToDate, dateFormat);
9216
+ var referenceDate = moment$g(value, dateFormat);
9217
+ var compareTo = moment$g(compareToDate, dateFormat);
8707
9218
  return _this.dateCompare(referenceDate, compareTo, compareType, options);
8708
9219
  }
8709
9220
  return null;
@@ -10566,7 +11077,7 @@ var HistoricalPixAccountListService = /** @class */ (function () {
10566
11077
  return HistoricalPixAccountListService;
10567
11078
  }());
10568
11079
 
10569
- var moment$e = moment_;
11080
+ var moment$h = moment_;
10570
11081
  var HistoricalPixAccountListComponent = /** @class */ (function () {
10571
11082
  function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10572
11083
  this.confirmationService = confirmationService;
@@ -10609,7 +11120,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10609
11120
  HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
10610
11121
  var _this = this;
10611
11122
  payload.forEach(function (value) {
10612
- value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
11123
+ value.dateChange = moment$h(value.dateChange).format(_this.dateFormat);
10613
11124
  });
10614
11125
  this.onGridLoad(payload);
10615
11126
  this.loading = false;
@@ -10621,7 +11132,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10621
11132
  label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10622
11133
  command: function () {
10623
11134
  if (_this.isAllowToViewHistorical) {
10624
- var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
11135
+ var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10625
11136
  if (_this.withSidebar) {
10626
11137
  _this.isOnlyView.emit(true);
10627
11138
  _this.router.navigate(["historical-pix-account/" + dateChange], {
@@ -10641,7 +11152,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10641
11152
  label: this.translateService.instant("hcm.payroll.edit"),
10642
11153
  command: function () {
10643
11154
  if (_this.isAllowToEditHistorical) {
10644
- var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
11155
+ var dateChange = rowData && rowData.dateChange && moment$h(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10645
11156
  if (_this.withSidebar) {
10646
11157
  _this.isOnlyView.emit(false);
10647
11158
  _this.isOnlyEdit.emit(true);
@@ -10674,7 +11185,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
10674
11185
  HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
10675
11186
  var _this = this;
10676
11187
  if (id === this.lastRecord.id) {
10677
- var dateChangeToDto_1 = moment$e(dateChange, this.dateFormat).format("YYYY-MM-DD");
11188
+ var dateChangeToDto_1 = moment$h(dateChange, this.dateFormat).format("YYYY-MM-DD");
10678
11189
  this.confirmationService.confirm({
10679
11190
  message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
10680
11191
  accept: function () {
@@ -10874,5 +11385,5 @@ var HistoricalPixAccountListModule = /** @class */ (function () {
10874
11385
  * Generated bundle index. Do not edit.
10875
11386
  */
10876
11387
 
10877
- 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 };
10878
11389
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map