@senior-agronegocio/angular-components 1.0.8 → 1.0.10
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/LLM_LIBRARY_GUIDES.md +9 -1
- package/README.md +5 -0
- package/agro-angular-components.module.d.ts +4 -6
- package/esm2022/agro-angular-components.module.mjs +21 -5
- package/esm2022/fields/lookups/config/lookup-host-project-config.mjs +10 -0
- package/esm2022/fields/lookups/config/lookup-runtime-context.mjs +12 -0
- package/esm2022/fields/lookups/core/agro-base-lookup-field.mjs +385 -0
- package/esm2022/fields/lookups/core/agro-branch-lookup.mjs +27 -0
- package/esm2022/fields/lookups/core/agro-company-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-currency-lookup.mjs +24 -0
- package/esm2022/fields/lookups/core/agro-deposit-balance-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-deposit-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-driver-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-e095-pes-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-family-group-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-family-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-harvest-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-increase-product-lookup.mjs +31 -0
- package/esm2022/fields/lookups/core/agro-lookup-base.mjs +39 -0
- package/esm2022/fields/lookups/core/agro-producer-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-product-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-product-variety-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-romaneo-lookup.mjs +24 -0
- package/esm2022/fields/lookups/core/agro-rural-estate-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/agro-ticket-lookup.mjs +25 -0
- package/esm2022/fields/lookups/core/index.mjs +21 -0
- package/esm2022/fields/lookups/core/lookup-field.handlers.mjs +82 -0
- package/esm2022/fields/lookups/core/lookup-field.types.mjs +2 -0
- package/esm2022/fields/lookups/index.mjs +5 -0
- package/esm2022/fields/lookups/services/agro-lookup-entity.service.mjs +132 -0
- package/esm2022/fields/lookups/services/driver/agro-lookup-driver.service.mjs +34 -0
- package/esm2022/fields/lookups/services/driver/driver-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-001-pes/agro-lookup-e001-pes.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-001-pes/e-001-pes-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-012-fam/agro-lookup-e012-fam.service.mjs +34 -0
- package/esm2022/fields/lookups/services/e-012-fam/e-012-fam-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-031-moe/agro-lookup-e031-moe.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-031-moe/e-031-moe-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-070-emp/agro-lookup-e070-emp.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-070-emp/e-070-emp-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-070-fil/agro-lookup-e070-fil.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-070-fil/e-070-fil-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-075-der/agro-lookup-e075-der.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-075-der/e-075-der-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-095-pes/agro-lookup-e095-pes.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-095-pes/e-095-pes-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-113-saf/agro-lookup-e113-saf.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-113-saf/e-113-saf-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-205-dep/agro-lookup-e205-dep.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-205-dep/e-205-dep-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/e-210-dxp/agro-lookup-e210-dxp.service.mjs +41 -0
- package/esm2022/fields/lookups/services/e-210-dxp/e-210-dxp-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/family-group/agro-lookup-family-group.service.mjs +41 -0
- package/esm2022/fields/lookups/services/family-group/family-group-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/increase-product/agro-lookup-increase-product.service.mjs +41 -0
- package/esm2022/fields/lookups/services/increase-product/increase-product-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/index.mjs +18 -0
- package/esm2022/fields/lookups/services/product-variety/agro-lookup-product-variety.service.mjs +41 -0
- package/esm2022/fields/lookups/services/product-variety/product-variety-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/rural-estate/agro-lookup-rural-estate.service.mjs +41 -0
- package/esm2022/fields/lookups/services/rural-estate/rural-estate-dto.mjs +2 -0
- package/esm2022/fields/lookups/services/ticket/agro-lookup-ticket.service.mjs +34 -0
- package/esm2022/fields/lookups/services/ticket/ticket-dto.mjs +2 -0
- package/esm2022/fields/lookups/utils/agro-lookup-utils.mjs +303 -0
- package/esm2022/fields/lookups/utils/cpf-cnpj-formatter.mjs +23 -0
- package/esm2022/fields/lookups/utils/index.mjs +3 -0
- package/esm2022/lib-config.token.mjs +3 -0
- package/esm2022/public-api.mjs +3 -1
- package/esm2022/services/i18n/en-US.mjs +58 -1
- package/esm2022/services/i18n/es-CO.mjs +58 -1
- package/esm2022/services/i18n/pt-BR.mjs +58 -1
- package/fesm2022/senior-agronegocio-angular-components.mjs +2044 -6
- package/fesm2022/senior-agronegocio-angular-components.mjs.map +1 -1
- package/fields/lookups/config/lookup-host-project-config.d.ts +2 -0
- package/fields/lookups/config/lookup-runtime-context.d.ts +3 -0
- package/fields/lookups/core/agro-base-lookup-field.d.ts +30 -0
- package/fields/lookups/core/agro-branch-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-company-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-currency-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-deposit-balance-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-deposit-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-driver-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-e095-pes-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-family-group-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-family-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-harvest-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-increase-product-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-lookup-base.d.ts +24 -0
- package/fields/lookups/core/agro-producer-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-product-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-product-variety-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-romaneo-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-rural-estate-lookup.d.ts +7 -0
- package/fields/lookups/core/agro-ticket-lookup.d.ts +7 -0
- package/fields/lookups/core/index.d.ts +22 -0
- package/fields/lookups/core/lookup-field.handlers.d.ts +12 -0
- package/fields/lookups/core/lookup-field.types.d.ts +45 -0
- package/fields/lookups/index.d.ts +5 -0
- package/fields/lookups/services/agro-lookup-entity.service.d.ts +42 -0
- package/fields/lookups/services/driver/agro-lookup-driver.service.d.ts +15 -0
- package/fields/lookups/services/driver/driver-dto.d.ts +10 -0
- package/fields/lookups/services/e-001-pes/agro-lookup-e001-pes.service.d.ts +16 -0
- package/fields/lookups/services/e-001-pes/e-001-pes-dto.d.ts +14 -0
- package/fields/lookups/services/e-012-fam/agro-lookup-e012-fam.service.d.ts +15 -0
- package/fields/lookups/services/e-012-fam/e-012-fam-dto.d.ts +11 -0
- package/fields/lookups/services/e-031-moe/agro-lookup-e031-moe.service.d.ts +16 -0
- package/fields/lookups/services/e-031-moe/e-031-moe-dto.d.ts +22 -0
- package/fields/lookups/services/e-070-emp/agro-lookup-e070-emp.service.d.ts +16 -0
- package/fields/lookups/services/e-070-emp/e-070-emp-dto.d.ts +12 -0
- package/fields/lookups/services/e-070-fil/agro-lookup-e070-fil.service.d.ts +16 -0
- package/fields/lookups/services/e-070-fil/e-070-fil-dto.d.ts +16 -0
- package/fields/lookups/services/e-075-der/agro-lookup-e075-der.service.d.ts +16 -0
- package/fields/lookups/services/e-075-der/e-075-der-dto.d.ts +14 -0
- package/fields/lookups/services/e-095-pes/agro-lookup-e095-pes.service.d.ts +16 -0
- package/fields/lookups/services/e-095-pes/e-095-pes-dto.d.ts +10 -0
- package/fields/lookups/services/e-113-saf/agro-lookup-e113-saf.service.d.ts +16 -0
- package/fields/lookups/services/e-113-saf/e-113-saf-dto.d.ts +15 -0
- package/fields/lookups/services/e-205-dep/agro-lookup-e205-dep.service.d.ts +16 -0
- package/fields/lookups/services/e-205-dep/e-205-dep-dto.d.ts +14 -0
- package/fields/lookups/services/e-210-dxp/agro-lookup-e210-dxp.service.d.ts +16 -0
- package/fields/lookups/services/e-210-dxp/e-210-dxp-dto.d.ts +13 -0
- package/fields/lookups/services/family-group/agro-lookup-family-group.service.d.ts +16 -0
- package/fields/lookups/services/family-group/family-group-dto.d.ts +14 -0
- package/fields/lookups/services/increase-product/agro-lookup-increase-product.service.d.ts +16 -0
- package/fields/lookups/services/increase-product/increase-product-dto.d.ts +16 -0
- package/fields/lookups/services/index.d.ts +34 -0
- package/fields/lookups/services/product-variety/agro-lookup-product-variety.service.d.ts +16 -0
- package/fields/lookups/services/product-variety/product-variety-dto.d.ts +14 -0
- package/fields/lookups/services/rural-estate/agro-lookup-rural-estate.service.d.ts +16 -0
- package/fields/lookups/services/rural-estate/rural-estate-dto.d.ts +28 -0
- package/fields/lookups/services/ticket/agro-lookup-ticket.service.d.ts +15 -0
- package/fields/lookups/services/ticket/ticket-dto.d.ts +15 -0
- package/fields/lookups/utils/agro-lookup-utils.d.ts +37 -0
- package/fields/lookups/utils/cpf-cnpj-formatter.d.ts +12 -0
- package/fields/lookups/utils/index.d.ts +2 -0
- package/lib-config.token.d.ts +6 -0
- package/package.json +5 -1
- package/public-api.d.ts +2 -0
- package/services/i18n/en-US.d.ts +57 -0
- package/services/i18n/es-CO.d.ts +57 -0
- package/services/i18n/pt-BR.d.ts +57 -0
|
@@ -2,7 +2,7 @@ import moment from 'moment';
|
|
|
2
2
|
import * as i6 from '@angular/common';
|
|
3
3
|
import { CommonModule, registerLocaleData, DecimalPipe, DatePipe, CurrencyPipe } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { NgModule, EventEmitter, Component, Input, Output, Injectable, Pipe, LOCALE_ID, Directive, ViewChild, inject, ChangeDetectorRef, ChangeDetectionStrategy, InjectionToken } from '@angular/core';
|
|
5
|
+
import { NgModule, EventEmitter, Component, Input, Output, Injectable, Pipe, LOCALE_ID, Directive, ViewChild, inject, ChangeDetectorRef, ChangeDetectionStrategy, InjectionToken, Optional, Inject, ENVIRONMENT_INITIALIZER, Injector } from '@angular/core';
|
|
6
6
|
import * as i11 from '@angular/forms';
|
|
7
7
|
import { FormsModule, ReactiveFormsModule, Validators, FormControl, FormGroup, FormArray } from '@angular/forms';
|
|
8
8
|
import * as i18 from '@seniorsistemas/angular-components/badge';
|
|
@@ -50,7 +50,7 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
50
50
|
import localePt from '@angular/common/locales/pt';
|
|
51
51
|
import { StepState as StepState$1 } from '@seniorsistemas/angular-components/stepper';
|
|
52
52
|
import { of, Subject, BehaviorSubject, throwError, scheduled, asyncScheduler, timer, EMPTY, filter as filter$1, firstValueFrom } from 'rxjs';
|
|
53
|
-
import { filter, take, finalize, switchMap, map, catchError, takeUntil, concatMap, tap, scan, defaultIfEmpty, debounceTime } from 'rxjs/operators';
|
|
53
|
+
import { filter, take, finalize, switchMap, map, catchError, takeUntil, concatMap, tap, scan, defaultIfEmpty, debounceTime, distinctUntilChanged, startWith, pairwise } from 'rxjs/operators';
|
|
54
54
|
import * as i2$1 from 'primeng/dynamicdialog';
|
|
55
55
|
import { Client, FrameImpl } from '@stomp/stompjs';
|
|
56
56
|
import SockJS from 'sockjs-client';
|
|
@@ -3775,6 +3775,63 @@ const ptBR = {
|
|
|
3775
3775
|
"agro.angular_components.link_invoice": "Vincular nota fiscal",
|
|
3776
3776
|
"agro.grain_classification.label_number": "Ticket",
|
|
3777
3777
|
"agro.grain_classification.origination_create_stock_movement": "Movimentação de estoque",
|
|
3778
|
+
"agro.angular_components.lookup_nothing_found": "Nenhum registro encontrado",
|
|
3779
|
+
"agro.angular_components.lookup_filter": "Filtrar",
|
|
3780
|
+
"agro.angular_components.lookup_filters": "Filtros",
|
|
3781
|
+
"agro.angular_components.lookup_clear": "Limpar",
|
|
3782
|
+
"agro.angular_components.lookup_cancel": "Cancelar",
|
|
3783
|
+
"agro.angular_components.lookup_select": "Selecione",
|
|
3784
|
+
"agro.angular_components.lookup_list_grid_boolean_true": "Sim",
|
|
3785
|
+
"agro.angular_components.lookup_list_grid_boolean_false": "Não",
|
|
3786
|
+
"agro.angular_components.lookup_error_delete_entity_constraint_violation_title": "Erro de exclusão",
|
|
3787
|
+
"agro.angular_components.lookup_error_delete_entity_constraint_violation_description": "Não é possível excluir este registro pois existem vínculos relacionados.",
|
|
3788
|
+
"agro.angular_components.lookup_label_code": "Código",
|
|
3789
|
+
"agro.angular_components.lookup_label_code_company": "Código da empresa",
|
|
3790
|
+
"agro.angular_components.lookup_label_name": "Nome",
|
|
3791
|
+
"agro.angular_components.lookup_label_description": "Descrição",
|
|
3792
|
+
"agro.angular_components.lookup_label_branch": "Filial",
|
|
3793
|
+
"agro.angular_components.lookup_label_city": "Cidade",
|
|
3794
|
+
"agro.angular_components.lookup_cnpj_cpf": "CNPJ/CPF",
|
|
3795
|
+
"agro.angular_components.lookup_e_070_emp_sig_emp": "Nome fantasia / Sigla da empresa",
|
|
3796
|
+
"agro.angular_components.lookup_e_070_fil_num_cgc": "CNPJ",
|
|
3797
|
+
"agro.angular_components.lookup_e_031_moe_cod_moe": "Código da moeda",
|
|
3798
|
+
"agro.angular_components.lookup_e_031_moe_des_moe": "Descrição da moeda",
|
|
3799
|
+
"agro.angular_components.lookup_rural_estate_sequential": "Sequencial",
|
|
3800
|
+
"agro.angular_components.lookup_rural_estate_name": "Nome do imóvel",
|
|
3801
|
+
"agro.angular_components.lookup_contract_company": "Empresa",
|
|
3802
|
+
"agro.angular_components.lookup_contract_company_search_title": "Selecione a empresa",
|
|
3803
|
+
"agro.angular_components.lookup_contract_branch": "Filial",
|
|
3804
|
+
"agro.angular_components.lookup_contract_branch_search_title": "Selecione a filial",
|
|
3805
|
+
"agro.angular_components.lookup_product": "Produto",
|
|
3806
|
+
"agro.angular_components.lookup_contract_product_product_search_title": "Selecione o produto",
|
|
3807
|
+
"agro.angular_components.lookup_producer": "Produtor",
|
|
3808
|
+
"agro.angular_components.lookup_contract_product_producer_producer_search_title": "Selecione o produtor",
|
|
3809
|
+
"agro.angular_components.lookup_contract_product_harvest": "Safra",
|
|
3810
|
+
"agro.angular_components.lookup_contract_product_harvest_search_title": "Selecione a safra",
|
|
3811
|
+
"agro.angular_components.lookup_contract_product_currency": "Moeda",
|
|
3812
|
+
"agro.angular_components.lookup_contract_product_currency_search_title": "Selecione a moeda",
|
|
3813
|
+
"agro.angular_components.lookup_contract_product_producer_rural_estate": "Imóvel rural",
|
|
3814
|
+
"agro.angular_components.lookup_contract_product_producer_rural_estate_search_title": "Selecione o imóvel rural",
|
|
3815
|
+
"agro.angular_components.lookup_contract_financial_increase": "Acréscimo",
|
|
3816
|
+
"agro.angular_components.lookup_contract_financial_increase_search_title": "Selecione o acréscimo",
|
|
3817
|
+
"agro.angular_components.lookup_contract_family_group": "Grupo familiar",
|
|
3818
|
+
"agro.angular_components.lookup_contract_family_group_search_title": "Selecione o grupo familiar",
|
|
3819
|
+
"agro.angular_components.lookup_family": "Família",
|
|
3820
|
+
"agro.angular_components.lookup_family_search_title": "Selecione a família",
|
|
3821
|
+
"agro.angular_components.lookup_driver": "Motorista",
|
|
3822
|
+
"agro.angular_components.lookup_driver_search_title": "Selecione o motorista",
|
|
3823
|
+
"agro.angular_components.lookup_deposit": "Depósito",
|
|
3824
|
+
"agro.angular_components.lookup_deposit_search_title": "Selecione o depósito",
|
|
3825
|
+
"agro.angular_components.lookup_e095_pes": "Produtor (E095)",
|
|
3826
|
+
"agro.angular_components.lookup_e095_pes_search_title": "Selecione o produtor (E095)",
|
|
3827
|
+
"agro.angular_components.lookup_ticket": "Ticket",
|
|
3828
|
+
"agro.angular_components.lookup_ticket_search_title": "Selecione o ticket",
|
|
3829
|
+
"agro.angular_components.lookup_romaneo": "Romaneio",
|
|
3830
|
+
"agro.angular_components.lookup_romaneo_search_title": "Selecione o romaneio",
|
|
3831
|
+
"agro.angular_components.lookup_product_variety": "Variedade do produto",
|
|
3832
|
+
"agro.angular_components.lookup_product_variety_search_title": "Selecione a variedade do produto",
|
|
3833
|
+
"agro.angular_components.lookup_license_plate": "Placa",
|
|
3834
|
+
"agro.angular_components.lookup_royalties_percentage": "Percentual de royalties",
|
|
3778
3835
|
};
|
|
3779
3836
|
|
|
3780
3837
|
const enUS = {
|
|
@@ -4096,6 +4153,63 @@ const enUS = {
|
|
|
4096
4153
|
"agro.angular_components.invoice_created_successfully": "Invoice created successfully.",
|
|
4097
4154
|
"agro.angular_components.invoice_already_linked": "Invoice is already fully linked to another item",
|
|
4098
4155
|
"agro.angular_components.link_invoice": "Link invoice",
|
|
4156
|
+
"agro.angular_components.lookup_nothing_found": "No records found",
|
|
4157
|
+
"agro.angular_components.lookup_filter": "Filter",
|
|
4158
|
+
"agro.angular_components.lookup_filters": "Filters",
|
|
4159
|
+
"agro.angular_components.lookup_clear": "Clear",
|
|
4160
|
+
"agro.angular_components.lookup_cancel": "Cancel",
|
|
4161
|
+
"agro.angular_components.lookup_select": "Select",
|
|
4162
|
+
"agro.angular_components.lookup_list_grid_boolean_true": "Yes",
|
|
4163
|
+
"agro.angular_components.lookup_list_grid_boolean_false": "No",
|
|
4164
|
+
"agro.angular_components.lookup_error_delete_entity_constraint_violation_title": "Delete error",
|
|
4165
|
+
"agro.angular_components.lookup_error_delete_entity_constraint_violation_description": "This record cannot be deleted because it has related links.",
|
|
4166
|
+
"agro.angular_components.lookup_label_code": "Code",
|
|
4167
|
+
"agro.angular_components.lookup_label_code_company": "Company code",
|
|
4168
|
+
"agro.angular_components.lookup_label_name": "Name",
|
|
4169
|
+
"agro.angular_components.lookup_label_description": "Description",
|
|
4170
|
+
"agro.angular_components.lookup_label_branch": "Branch",
|
|
4171
|
+
"agro.angular_components.lookup_label_city": "City",
|
|
4172
|
+
"agro.angular_components.lookup_cnpj_cpf": "CNPJ/CPF",
|
|
4173
|
+
"agro.angular_components.lookup_e_070_emp_sig_emp": "Trade name / Company abbreviation",
|
|
4174
|
+
"agro.angular_components.lookup_e_070_fil_num_cgc": "CNPJ",
|
|
4175
|
+
"agro.angular_components.lookup_e_031_moe_cod_moe": "Currency code",
|
|
4176
|
+
"agro.angular_components.lookup_e_031_moe_des_moe": "Currency description",
|
|
4177
|
+
"agro.angular_components.lookup_rural_estate_sequential": "Sequential",
|
|
4178
|
+
"agro.angular_components.lookup_rural_estate_name": "Rural estate name",
|
|
4179
|
+
"agro.angular_components.lookup_contract_company": "Company",
|
|
4180
|
+
"agro.angular_components.lookup_contract_company_search_title": "Select company",
|
|
4181
|
+
"agro.angular_components.lookup_contract_branch": "Branch",
|
|
4182
|
+
"agro.angular_components.lookup_contract_branch_search_title": "Select branch",
|
|
4183
|
+
"agro.angular_components.lookup_product": "Product",
|
|
4184
|
+
"agro.angular_components.lookup_contract_product_product_search_title": "Select product",
|
|
4185
|
+
"agro.angular_components.lookup_producer": "Producer",
|
|
4186
|
+
"agro.angular_components.lookup_contract_product_producer_producer_search_title": "Select producer",
|
|
4187
|
+
"agro.angular_components.lookup_contract_product_harvest": "Harvest",
|
|
4188
|
+
"agro.angular_components.lookup_contract_product_harvest_search_title": "Select harvest",
|
|
4189
|
+
"agro.angular_components.lookup_contract_product_currency": "Currency",
|
|
4190
|
+
"agro.angular_components.lookup_contract_product_currency_search_title": "Select currency",
|
|
4191
|
+
"agro.angular_components.lookup_contract_product_producer_rural_estate": "Rural estate",
|
|
4192
|
+
"agro.angular_components.lookup_contract_product_producer_rural_estate_search_title": "Select rural estate",
|
|
4193
|
+
"agro.angular_components.lookup_contract_financial_increase": "Increase",
|
|
4194
|
+
"agro.angular_components.lookup_contract_financial_increase_search_title": "Select increase",
|
|
4195
|
+
"agro.angular_components.lookup_contract_family_group": "Family group",
|
|
4196
|
+
"agro.angular_components.lookup_contract_family_group_search_title": "Select family group",
|
|
4197
|
+
"agro.angular_components.lookup_family": "Family",
|
|
4198
|
+
"agro.angular_components.lookup_family_search_title": "Select family",
|
|
4199
|
+
"agro.angular_components.lookup_driver": "Driver",
|
|
4200
|
+
"agro.angular_components.lookup_driver_search_title": "Select driver",
|
|
4201
|
+
"agro.angular_components.lookup_deposit": "Deposit",
|
|
4202
|
+
"agro.angular_components.lookup_deposit_search_title": "Select deposit",
|
|
4203
|
+
"agro.angular_components.lookup_e095_pes": "Producer (E095)",
|
|
4204
|
+
"agro.angular_components.lookup_e095_pes_search_title": "Select producer (E095)",
|
|
4205
|
+
"agro.angular_components.lookup_ticket": "Ticket",
|
|
4206
|
+
"agro.angular_components.lookup_ticket_search_title": "Select ticket",
|
|
4207
|
+
"agro.angular_components.lookup_romaneo": "Romaneo",
|
|
4208
|
+
"agro.angular_components.lookup_romaneo_search_title": "Select romaneo",
|
|
4209
|
+
"agro.angular_components.lookup_product_variety": "Product variety",
|
|
4210
|
+
"agro.angular_components.lookup_product_variety_search_title": "Select product variety",
|
|
4211
|
+
"agro.angular_components.lookup_license_plate": "License plate",
|
|
4212
|
+
"agro.angular_components.lookup_royalties_percentage": "Royalties percentage",
|
|
4099
4213
|
};
|
|
4100
4214
|
|
|
4101
4215
|
const esCO = {
|
|
@@ -4417,6 +4531,63 @@ const esCO = {
|
|
|
4417
4531
|
"agro.angular_components.invoice_created_successfully": "Factura creada con éxito.",
|
|
4418
4532
|
"agro.angular_components.invoice_already_linked": "La factura ya está totalmente vinculada a otro ítem",
|
|
4419
4533
|
"agro.angular_components.link_invoice": "Vincular factura",
|
|
4534
|
+
"agro.angular_components.lookup_nothing_found": "Ningún registro encontrado",
|
|
4535
|
+
"agro.angular_components.lookup_filter": "Filtrar",
|
|
4536
|
+
"agro.angular_components.lookup_filters": "Filtros",
|
|
4537
|
+
"agro.angular_components.lookup_clear": "Limpiar",
|
|
4538
|
+
"agro.angular_components.lookup_cancel": "Cancelar",
|
|
4539
|
+
"agro.angular_components.lookup_select": "Seleccionar",
|
|
4540
|
+
"agro.angular_components.lookup_list_grid_boolean_true": "Sí",
|
|
4541
|
+
"agro.angular_components.lookup_list_grid_boolean_false": "No",
|
|
4542
|
+
"agro.angular_components.lookup_error_delete_entity_constraint_violation_title": "Error al eliminar",
|
|
4543
|
+
"agro.angular_components.lookup_error_delete_entity_constraint_violation_description": "No se puede eliminar este registro porque tiene vínculos relacionados.",
|
|
4544
|
+
"agro.angular_components.lookup_label_code": "Código",
|
|
4545
|
+
"agro.angular_components.lookup_label_code_company": "Código de la empresa",
|
|
4546
|
+
"agro.angular_components.lookup_label_name": "Nombre",
|
|
4547
|
+
"agro.angular_components.lookup_label_description": "Descripción",
|
|
4548
|
+
"agro.angular_components.lookup_label_branch": "Sucursal",
|
|
4549
|
+
"agro.angular_components.lookup_label_city": "Ciudad",
|
|
4550
|
+
"agro.angular_components.lookup_cnpj_cpf": "CNPJ/CPF",
|
|
4551
|
+
"agro.angular_components.lookup_e_070_emp_sig_emp": "Nombre comercial / Sigla de la empresa",
|
|
4552
|
+
"agro.angular_components.lookup_e_070_fil_num_cgc": "CNPJ",
|
|
4553
|
+
"agro.angular_components.lookup_e_031_moe_cod_moe": "Código de moneda",
|
|
4554
|
+
"agro.angular_components.lookup_e_031_moe_des_moe": "Descripción de moneda",
|
|
4555
|
+
"agro.angular_components.lookup_rural_estate_sequential": "Secuencial",
|
|
4556
|
+
"agro.angular_components.lookup_rural_estate_name": "Nombre del inmueble rural",
|
|
4557
|
+
"agro.angular_components.lookup_contract_company": "Empresa",
|
|
4558
|
+
"agro.angular_components.lookup_contract_company_search_title": "Seleccione la empresa",
|
|
4559
|
+
"agro.angular_components.lookup_contract_branch": "Sucursal",
|
|
4560
|
+
"agro.angular_components.lookup_contract_branch_search_title": "Seleccione la sucursal",
|
|
4561
|
+
"agro.angular_components.lookup_product": "Producto",
|
|
4562
|
+
"agro.angular_components.lookup_contract_product_product_search_title": "Seleccione el producto",
|
|
4563
|
+
"agro.angular_components.lookup_producer": "Productor",
|
|
4564
|
+
"agro.angular_components.lookup_contract_product_producer_producer_search_title": "Seleccione el productor",
|
|
4565
|
+
"agro.angular_components.lookup_contract_product_harvest": "Cosecha",
|
|
4566
|
+
"agro.angular_components.lookup_contract_product_harvest_search_title": "Seleccione la cosecha",
|
|
4567
|
+
"agro.angular_components.lookup_contract_product_currency": "Moneda",
|
|
4568
|
+
"agro.angular_components.lookup_contract_product_currency_search_title": "Seleccione la moneda",
|
|
4569
|
+
"agro.angular_components.lookup_contract_product_producer_rural_estate": "Inmueble rural",
|
|
4570
|
+
"agro.angular_components.lookup_contract_product_producer_rural_estate_search_title": "Seleccione el inmueble rural",
|
|
4571
|
+
"agro.angular_components.lookup_contract_financial_increase": "Incremento",
|
|
4572
|
+
"agro.angular_components.lookup_contract_financial_increase_search_title": "Seleccione el incremento",
|
|
4573
|
+
"agro.angular_components.lookup_contract_family_group": "Grupo familiar",
|
|
4574
|
+
"agro.angular_components.lookup_contract_family_group_search_title": "Seleccione el grupo familiar",
|
|
4575
|
+
"agro.angular_components.lookup_family": "Familia",
|
|
4576
|
+
"agro.angular_components.lookup_family_search_title": "Seleccione la familia",
|
|
4577
|
+
"agro.angular_components.lookup_driver": "Conductor",
|
|
4578
|
+
"agro.angular_components.lookup_driver_search_title": "Seleccione el conductor",
|
|
4579
|
+
"agro.angular_components.lookup_deposit": "Depósito",
|
|
4580
|
+
"agro.angular_components.lookup_deposit_search_title": "Seleccione el depósito",
|
|
4581
|
+
"agro.angular_components.lookup_e095_pes": "Productor (E095)",
|
|
4582
|
+
"agro.angular_components.lookup_e095_pes_search_title": "Seleccione el productor (E095)",
|
|
4583
|
+
"agro.angular_components.lookup_ticket": "Ticket",
|
|
4584
|
+
"agro.angular_components.lookup_ticket_search_title": "Seleccione el ticket",
|
|
4585
|
+
"agro.angular_components.lookup_romaneo": "Romaneo",
|
|
4586
|
+
"agro.angular_components.lookup_romaneo_search_title": "Seleccione el romaneo",
|
|
4587
|
+
"agro.angular_components.lookup_product_variety": "Variedad del producto",
|
|
4588
|
+
"agro.angular_components.lookup_product_variety_search_title": "Seleccione la variedad del producto",
|
|
4589
|
+
"agro.angular_components.lookup_license_plate": "Placa",
|
|
4590
|
+
"agro.angular_components.lookup_royalties_percentage": "Porcentaje de regalías",
|
|
4420
4591
|
};
|
|
4421
4592
|
|
|
4422
4593
|
class LibTranslationService {
|
|
@@ -9509,7 +9680,1860 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
9509
9680
|
}]
|
|
9510
9681
|
}] });
|
|
9511
9682
|
|
|
9512
|
-
|
|
9683
|
+
/**
|
|
9684
|
+
* Formats CPF or CNPJ using AgroStringUtils.applyMask().
|
|
9685
|
+
* Automatically detects whether the input is a valid CPF or CNPJ and applies the appropriate mask.
|
|
9686
|
+
*
|
|
9687
|
+
* @param value - The unformatted CPF/CNPJ string (digits only or with formatting)
|
|
9688
|
+
* @returns Formatted string with CPF or CNPJ mask, or original value if validation fails
|
|
9689
|
+
*
|
|
9690
|
+
* @example
|
|
9691
|
+
* formatCPFCNPJWithMask('12345678901') // Returns '123.456.789-01' (CPF)
|
|
9692
|
+
* formatCPFCNPJWithMask('12345678901234') // Returns '12.345.678/0001-34' (CNPJ)
|
|
9693
|
+
*/
|
|
9694
|
+
function formatCPFCNPJWithMask(value) {
|
|
9695
|
+
if (AgroStringUtils.validateCNPJ(value)) {
|
|
9696
|
+
return AgroStringUtils.applyMask(value, AgroStringMasks.CNPJ);
|
|
9697
|
+
}
|
|
9698
|
+
if (AgroStringUtils.validateCPF(value)) {
|
|
9699
|
+
return AgroStringUtils.applyMask(value, AgroStringMasks.CPF);
|
|
9700
|
+
}
|
|
9701
|
+
return value;
|
|
9702
|
+
}
|
|
9703
|
+
|
|
9704
|
+
const numberTypes = ['integer', 'double'];
|
|
9705
|
+
const numberPattern = /^\d+\b$/;
|
|
9706
|
+
const YYYY_MM_DD_FORMAT = 'YYYY-MM-DD';
|
|
9707
|
+
const LOOKUP_DOCUMENT_FIELDS = ['cnpCpf', 'numCgc'];
|
|
9708
|
+
const mergeUnique = (array, otherArray) => array.concat(otherArray.filter((item) => !array.includes(item)));
|
|
9709
|
+
const getTypeInformation = (type, value) => {
|
|
9710
|
+
switch (type) {
|
|
9711
|
+
case 'time':
|
|
9712
|
+
case 'date':
|
|
9713
|
+
case 'localDateTime':
|
|
9714
|
+
case 'dateTime':
|
|
9715
|
+
return { isValidValue: false, typeExists: true };
|
|
9716
|
+
case 'integer':
|
|
9717
|
+
case 'double':
|
|
9718
|
+
return {
|
|
9719
|
+
isValidValue: value.match(numberPattern),
|
|
9720
|
+
typeExists: numberTypes.includes(type),
|
|
9721
|
+
};
|
|
9722
|
+
default:
|
|
9723
|
+
return {
|
|
9724
|
+
isValidValue: false,
|
|
9725
|
+
typeExists: false,
|
|
9726
|
+
};
|
|
9727
|
+
}
|
|
9728
|
+
};
|
|
9729
|
+
const getSuggestionValue = (displayFields, ownerEntity, value, separator) => {
|
|
9730
|
+
if (!displayFields || displayFields.length === 0) {
|
|
9731
|
+
return '';
|
|
9732
|
+
}
|
|
9733
|
+
return displayFields
|
|
9734
|
+
.map((field) => {
|
|
9735
|
+
if (LOOKUP_DOCUMENT_FIELDS.includes(field)) {
|
|
9736
|
+
return formatCPFCNPJWithMask(getProp(value, `${ownerEntity}.${field}`));
|
|
9737
|
+
}
|
|
9738
|
+
return getProp(value, `${ownerEntity}.${field}`);
|
|
9739
|
+
})
|
|
9740
|
+
.filter(f => {
|
|
9741
|
+
return AgroStringUtils.isValid(String(f));
|
|
9742
|
+
})
|
|
9743
|
+
.join(separator);
|
|
9744
|
+
};
|
|
9745
|
+
const buildEnumClause = (name, selected) => `${name} eq '${selected}'`;
|
|
9746
|
+
const getEnumQuery = (name, value, multiple = false) => {
|
|
9747
|
+
if (multiple) {
|
|
9748
|
+
return `(${value.map((selected) => buildEnumClause(name, selected)).join(' or ')})`;
|
|
9749
|
+
}
|
|
9750
|
+
return `${name} eq '${value}'`;
|
|
9751
|
+
};
|
|
9752
|
+
const createFilterString = (any, value) => {
|
|
9753
|
+
const { name, type, multiple } = any;
|
|
9754
|
+
if (typeof value == 'number') {
|
|
9755
|
+
return `${name} eq ${value}`;
|
|
9756
|
+
}
|
|
9757
|
+
switch (type) {
|
|
9758
|
+
case 'date':
|
|
9759
|
+
return `${name} eq '${moment(value).format(YYYY_MM_DD_FORMAT)}'`;
|
|
9760
|
+
case 'time':
|
|
9761
|
+
return `${name} eq '${moment(value).format('HH:mm:ss')}'`;
|
|
9762
|
+
case 'dateTime':
|
|
9763
|
+
return `${name} eq '${moment(value).format()}'`;
|
|
9764
|
+
case 'localDateTime':
|
|
9765
|
+
return `${name} eq '${moment(value).format('YYYY-MM-DD[T]HH:mm:ss.SSS')}'`;
|
|
9766
|
+
case 'enum':
|
|
9767
|
+
return getEnumQuery(name, value, multiple);
|
|
9768
|
+
case 'string':
|
|
9769
|
+
return `upper(${name}) like upper('%${value.replace(/'/g, "'")}%')`;
|
|
9770
|
+
case 'lookup':
|
|
9771
|
+
return `${name} eq '${value.id}'`;
|
|
9772
|
+
default:
|
|
9773
|
+
return `${name} eq '${value}'`;
|
|
9774
|
+
}
|
|
9775
|
+
};
|
|
9776
|
+
const createFilterTokens = (any, value, translate) => {
|
|
9777
|
+
const { name, type, label, searchFields, options } = any;
|
|
9778
|
+
let labelValue = value;
|
|
9779
|
+
switch (type) {
|
|
9780
|
+
case 'date':
|
|
9781
|
+
labelValue = moment(value).format('L');
|
|
9782
|
+
break;
|
|
9783
|
+
case 'time':
|
|
9784
|
+
labelValue = moment(value).format('LTS');
|
|
9785
|
+
break;
|
|
9786
|
+
case 'localDateTime':
|
|
9787
|
+
case 'dateTime':
|
|
9788
|
+
labelValue = moment(value).format('L LTS');
|
|
9789
|
+
break;
|
|
9790
|
+
case 'lookup':
|
|
9791
|
+
labelValue = searchFields.map((field) => getProp(value, field.name)).join(' - ');
|
|
9792
|
+
break;
|
|
9793
|
+
case 'enum':
|
|
9794
|
+
labelValue = options.filter((option) => option.value === labelValue)[0].label;
|
|
9795
|
+
break;
|
|
9796
|
+
case 'boolean':
|
|
9797
|
+
if (value) {
|
|
9798
|
+
labelValue = translate.instant('agro.angular_components.lookup_list_grid_boolean_true');
|
|
9799
|
+
}
|
|
9800
|
+
else {
|
|
9801
|
+
labelValue = translate.instant('agro.angular_components.lookup_list_grid_boolean_false');
|
|
9802
|
+
}
|
|
9803
|
+
break;
|
|
9804
|
+
default:
|
|
9805
|
+
break;
|
|
9806
|
+
}
|
|
9807
|
+
return { id: name, label: `${label}: ${labelValue}` };
|
|
9808
|
+
};
|
|
9809
|
+
const resolveRefs = (payload) => {
|
|
9810
|
+
const getDataFromRef = (ref, rootObj) => {
|
|
9811
|
+
const regex = /\["(.*?)"\]/g;
|
|
9812
|
+
const result = [];
|
|
9813
|
+
let match;
|
|
9814
|
+
while ((match = regex.exec(ref)) !== null) {
|
|
9815
|
+
result.push(match[1]);
|
|
9816
|
+
}
|
|
9817
|
+
return result.reduce((acc, part) => acc?.[part], rootObj);
|
|
9818
|
+
};
|
|
9819
|
+
const resolve = (obj, rootObj, visited = new Set()) => {
|
|
9820
|
+
if (obj === null || typeof obj !== 'object' || visited.has(obj)) {
|
|
9821
|
+
return;
|
|
9822
|
+
}
|
|
9823
|
+
visited.add(obj);
|
|
9824
|
+
if (Array.isArray(obj)) {
|
|
9825
|
+
obj.forEach((item) => resolve(item, rootObj, visited));
|
|
9826
|
+
}
|
|
9827
|
+
else {
|
|
9828
|
+
Object.keys(obj).forEach((key) => {
|
|
9829
|
+
if (key === '$ref' && obj[key]) {
|
|
9830
|
+
const refPath = obj[key];
|
|
9831
|
+
Object.assign(obj, getDataFromRef(refPath, rootObj));
|
|
9832
|
+
delete obj[key];
|
|
9833
|
+
}
|
|
9834
|
+
else {
|
|
9835
|
+
resolve(obj[key], rootObj, visited);
|
|
9836
|
+
}
|
|
9837
|
+
});
|
|
9838
|
+
}
|
|
9839
|
+
};
|
|
9840
|
+
resolve(payload, payload);
|
|
9841
|
+
return payload;
|
|
9842
|
+
};
|
|
9843
|
+
const applyRelationTransforms = (entity, originEntity, relations) => {
|
|
9844
|
+
relations.forEach(({ origin, key, transform }) => {
|
|
9845
|
+
if (originEntity !== origin && entity[key]) {
|
|
9846
|
+
entity[key] = transform(entity[key]);
|
|
9847
|
+
}
|
|
9848
|
+
});
|
|
9849
|
+
return entity;
|
|
9850
|
+
};
|
|
9851
|
+
const datePatternYYYYMMDD = /^\d{4}-\d{2}-\d{2}$/;
|
|
9852
|
+
const isValidFilter = (type, value) => {
|
|
9853
|
+
const { isValidValue, typeExists } = getTypeInformation(type, value);
|
|
9854
|
+
return !(typeExists && !isValidValue);
|
|
9855
|
+
};
|
|
9856
|
+
const getProp = (obj, path, APPLY_CPFCNPJ_FILTER = false) => {
|
|
9857
|
+
let r = path.split(".").reduce((result, prop) => (result[prop] === undefined ? "" : result[prop]), obj);
|
|
9858
|
+
const normalizedPath = typeof path === 'string' ? path : '';
|
|
9859
|
+
const fieldName = normalizedPath.split('.').pop() ?? normalizedPath;
|
|
9860
|
+
if (datePatternYYYYMMDD.test(r)) {
|
|
9861
|
+
r = moment(r, YYYY_MM_DD_FORMAT).format("DD/MM/YYYY");
|
|
9862
|
+
}
|
|
9863
|
+
if ((APPLY_CPFCNPJ_FILTER || LOOKUP_DOCUMENT_FIELDS.includes(fieldName)) && AgroStringUtils.isValid(r)) {
|
|
9864
|
+
return formatCPFCNPJWithMask(r);
|
|
9865
|
+
}
|
|
9866
|
+
return r;
|
|
9867
|
+
};
|
|
9868
|
+
const getLabelValueRequest = (contents, displayFields, APPLY_CPFCNPJ_FILTER = false) => {
|
|
9869
|
+
const r = contents.map((item) => {
|
|
9870
|
+
const numberPatternToTest = /^\d+(\.\d{1,2})?$/;
|
|
9871
|
+
const formattedItem = { ...item };
|
|
9872
|
+
// Format currency fields (vlrCot)
|
|
9873
|
+
["vlrCot"].forEach((field) => {
|
|
9874
|
+
if (formattedItem[field] && numberPatternToTest.test(formattedItem[field])) {
|
|
9875
|
+
formattedItem[field] = parseFloat(formattedItem[field]).toLocaleString("pt-BR", {
|
|
9876
|
+
minimumFractionDigits: 2,
|
|
9877
|
+
maximumFractionDigits: 2
|
|
9878
|
+
});
|
|
9879
|
+
}
|
|
9880
|
+
});
|
|
9881
|
+
LOOKUP_DOCUMENT_FIELDS.forEach((fieldName) => {
|
|
9882
|
+
if (formattedItem[fieldName] !== null && formattedItem[fieldName] !== undefined && formattedItem[fieldName] !== '') {
|
|
9883
|
+
formattedItem[fieldName] = formatCPFCNPJWithMask(String(formattedItem[fieldName]));
|
|
9884
|
+
}
|
|
9885
|
+
});
|
|
9886
|
+
return {
|
|
9887
|
+
...formattedItem,
|
|
9888
|
+
label: displayFields.map(field => getProp(formattedItem, field, APPLY_CPFCNPJ_FILTER)).join(" - ")
|
|
9889
|
+
};
|
|
9890
|
+
});
|
|
9891
|
+
return r;
|
|
9892
|
+
};
|
|
9893
|
+
function formatFilters(filters, value, statusFilter, columnName) {
|
|
9894
|
+
return filters
|
|
9895
|
+
.filter(({ type }) => isValidFilter(type, value))
|
|
9896
|
+
.filter(({ name }) => name !== "status")
|
|
9897
|
+
.map(({ name, type }) => {
|
|
9898
|
+
return convertValueByType(name, value, type);
|
|
9899
|
+
})
|
|
9900
|
+
.join(" or ")
|
|
9901
|
+
.concat(`and ${columnName} eq 'VA' `);
|
|
9902
|
+
}
|
|
9903
|
+
function formatFiltersAdvanced(filters, filterData, statusFilter, columnName, e070empId) {
|
|
9904
|
+
return filters
|
|
9905
|
+
.filter(({ name }) => filterData[name] !== undefined && filterData[name] !== "")
|
|
9906
|
+
.map(({ name, type }) => {
|
|
9907
|
+
const value = filterData[name];
|
|
9908
|
+
return convertValueByType(name, value, type);
|
|
9909
|
+
})
|
|
9910
|
+
.concat(statusFilter ? [`${columnName} eq 'VA' and e070emp eq '${e070empId}'`] : [])
|
|
9911
|
+
.join(" and ");
|
|
9912
|
+
}
|
|
9913
|
+
function convertValueByType(name, value, type) {
|
|
9914
|
+
if (value == null) {
|
|
9915
|
+
value = "";
|
|
9916
|
+
}
|
|
9917
|
+
if (typeof value == "number") {
|
|
9918
|
+
return `${name} eq ${value}`;
|
|
9919
|
+
}
|
|
9920
|
+
else if (type === 'date') {
|
|
9921
|
+
return `${name} eq '${moment(value).format(YYYY_MM_DD_FORMAT)}'`;
|
|
9922
|
+
}
|
|
9923
|
+
else if (type === 'time') {
|
|
9924
|
+
return `${name} eq '${moment(value).format("HH:mm:ss")}'`;
|
|
9925
|
+
}
|
|
9926
|
+
else if (type === 'dateTime') {
|
|
9927
|
+
return `${name} eq '${moment(value).format()}'`;
|
|
9928
|
+
}
|
|
9929
|
+
else if (type === 'string') {
|
|
9930
|
+
return `containing(upper(${name}), upper('${String(value).replace(/'/g, "\\'")}'))`;
|
|
9931
|
+
}
|
|
9932
|
+
else {
|
|
9933
|
+
return `${name} eq '${value}'`;
|
|
9934
|
+
}
|
|
9935
|
+
}
|
|
9936
|
+
function formatFiltersWithoutStatus(filters, value) {
|
|
9937
|
+
return filters
|
|
9938
|
+
.filter(({ type }) => isValidFilter(type, value))
|
|
9939
|
+
.filter(({ name }) => name !== "status")
|
|
9940
|
+
.map(({ name, type }) => {
|
|
9941
|
+
if (typeof value == "number") {
|
|
9942
|
+
return `${name} eq ${value}`;
|
|
9943
|
+
}
|
|
9944
|
+
else if (type === 'date') {
|
|
9945
|
+
return `${name} eq '${moment(value).format(YYYY_MM_DD_FORMAT)}'`;
|
|
9946
|
+
}
|
|
9947
|
+
else if (type === 'time') {
|
|
9948
|
+
return `${name} eq '${moment(value).format("HH:mm:ss")}'`;
|
|
9949
|
+
}
|
|
9950
|
+
else if (type === 'dateTime') {
|
|
9951
|
+
return `${name} eq '${moment(value).format()}'`;
|
|
9952
|
+
}
|
|
9953
|
+
else if (type === 'string') {
|
|
9954
|
+
return `containing(upper(${name}), upper('${value.replace(/'/g, "\\'")}'))`;
|
|
9955
|
+
}
|
|
9956
|
+
else {
|
|
9957
|
+
return `${name} eq '${value}'`;
|
|
9958
|
+
}
|
|
9959
|
+
})
|
|
9960
|
+
.join(" and ");
|
|
9961
|
+
}
|
|
9962
|
+
function roundToThree(num) {
|
|
9963
|
+
return Math.round(num * 1000) / 1000;
|
|
9964
|
+
}
|
|
9965
|
+
function calculateAdjustedPercentagesAndWeights(total, maxPercentage, maxWeight) {
|
|
9966
|
+
const calculatedPercentages = calculateAdjustedPercentages(total, maxPercentage);
|
|
9967
|
+
const calculatedWeights = calculateAdjustedWeights(calculatedPercentages, maxWeight);
|
|
9968
|
+
return { calculatedPercentages, calculatedWeights };
|
|
9969
|
+
}
|
|
9970
|
+
function calculateAdjustedPercentages(total, maxPercentage) {
|
|
9971
|
+
const basePercentage = roundToThree(maxPercentage / total);
|
|
9972
|
+
const calculatedPercentages = Array(total).fill(basePercentage);
|
|
9973
|
+
return adjustValuesIfNecessary(calculatedPercentages, maxPercentage);
|
|
9974
|
+
}
|
|
9975
|
+
function calculateAdjustedWeights(calculatedPercentages, maxWeight) {
|
|
9976
|
+
const totalPercentage = calculatedPercentages.reduce((sum, percentage) => sum + percentage, 0);
|
|
9977
|
+
const calculatedWeights = calculatedPercentages.map(percentage => roundToThree((percentage / 100) * maxWeight));
|
|
9978
|
+
if (roundToThree(totalPercentage) === 100) {
|
|
9979
|
+
return adjustValuesIfNecessary(calculatedWeights, maxWeight);
|
|
9980
|
+
}
|
|
9981
|
+
return calculatedWeights;
|
|
9982
|
+
}
|
|
9983
|
+
function adjustValuesIfNecessary(values, total) {
|
|
9984
|
+
const adjustedValues = values.slice();
|
|
9985
|
+
const currentTotal = adjustedValues.reduce((sum, value) => sum + value, 0);
|
|
9986
|
+
const difference = roundToThree(total - currentTotal);
|
|
9987
|
+
if (difference !== 0) {
|
|
9988
|
+
adjustedValues[0] += difference;
|
|
9989
|
+
}
|
|
9990
|
+
return adjustedValues;
|
|
9991
|
+
}
|
|
9992
|
+
function formatBrlCurrency(currencyPipe, value) {
|
|
9993
|
+
if (!currencyPipe || !value) {
|
|
9994
|
+
return null;
|
|
9995
|
+
}
|
|
9996
|
+
return currencyPipe
|
|
9997
|
+
.transform(value, "BRL", "symbol", `1.2-2`)
|
|
9998
|
+
?.replace(".", "#")
|
|
9999
|
+
.replace(",", ".")
|
|
10000
|
+
.replace("#", ",")
|
|
10001
|
+
.replace(/^(.{2})/, "$1 ");
|
|
10002
|
+
}
|
|
10003
|
+
|
|
10004
|
+
const DEBOUNCE_MS = 300;
|
|
10005
|
+
const buildDependencyQuery = (formGroup, dependencies = []) => {
|
|
10006
|
+
const clauses = dependencies
|
|
10007
|
+
.map(({ formControlName, apiField }) => {
|
|
10008
|
+
const dependencyId = formGroup.get(formControlName)?.value?.id;
|
|
10009
|
+
return dependencyId ? `${apiField} eq '${dependencyId}'` : '';
|
|
10010
|
+
})
|
|
10011
|
+
.filter(Boolean);
|
|
10012
|
+
return clauses.join(' and ');
|
|
10013
|
+
};
|
|
10014
|
+
const combineQueries = (baseQuery, dependencyQuery) => {
|
|
10015
|
+
if (dependencyQuery && baseQuery) {
|
|
10016
|
+
return `${dependencyQuery} and (${baseQuery})`;
|
|
10017
|
+
}
|
|
10018
|
+
return dependencyQuery || baseQuery;
|
|
10019
|
+
};
|
|
10020
|
+
const getCustomFilterQuery = (config) => {
|
|
10021
|
+
const query = config.customFilterQuery?.();
|
|
10022
|
+
return typeof query === 'string' ? query.trim() : '';
|
|
10023
|
+
};
|
|
10024
|
+
const combineAllQueries = (baseQuery, dependencyQuery, customQuery) => {
|
|
10025
|
+
const firstMerge = combineQueries(baseQuery, dependencyQuery);
|
|
10026
|
+
return combineQueries(firstMerge, customQuery);
|
|
10027
|
+
};
|
|
10028
|
+
const createGenericOnLookupRequest = (ctx) => (value) => {
|
|
10029
|
+
const { config, suggestionsSubject } = ctx;
|
|
10030
|
+
const sort = config.lookupDisplayFields.map((field) => ({ field, order: 1 }));
|
|
10031
|
+
const baseQuery = config.searchFields
|
|
10032
|
+
.filter(({ type }) => type !== undefined && isValidFilter(type, value))
|
|
10033
|
+
.map((field) => createFilterString(field, value))
|
|
10034
|
+
.join(' or ');
|
|
10035
|
+
const dependencyQuery = buildDependencyQuery(ctx.config.formGroup, ctx.config.dependencies);
|
|
10036
|
+
const customQuery = getCustomFilterQuery(config);
|
|
10037
|
+
const filterQuery = combineAllQueries(baseQuery, dependencyQuery, customQuery);
|
|
10038
|
+
const displayFields = mergeUnique(config.lookupDisplayFields, config.advancedDisplayFields);
|
|
10039
|
+
config.service
|
|
10040
|
+
.list({ sort, filterQuery, displayFields })
|
|
10041
|
+
.pipe(debounceTime(DEBOUNCE_MS), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)))
|
|
10042
|
+
.subscribe((list) => suggestionsSubject.next(getLabelValueRequest(list.contents, config.lookupDisplayFields, config.applyCPFCNPJFormat ?? false)));
|
|
10043
|
+
};
|
|
10044
|
+
const createGenericOnSearchRequest = (ctx) => (event) => {
|
|
10045
|
+
const { config, searchSubject } = ctx;
|
|
10046
|
+
const { first, rows, multiSortMeta, filterData } = event;
|
|
10047
|
+
const page = first / rows;
|
|
10048
|
+
const sort = multiSortMeta;
|
|
10049
|
+
const baseQuery = config.searchFields
|
|
10050
|
+
.filter(({ name }) => filterData[name] !== undefined && filterData[name] !== null && filterData[name] !== '')
|
|
10051
|
+
.map((field) => createFilterString(field, filterData[field.name]))
|
|
10052
|
+
.join(' and ');
|
|
10053
|
+
const dependencyQuery = buildDependencyQuery(config.formGroup, config.dependencies);
|
|
10054
|
+
const customQuery = getCustomFilterQuery(config);
|
|
10055
|
+
const filterQuery = combineAllQueries(baseQuery, dependencyQuery, customQuery);
|
|
10056
|
+
const displayFields = mergeUnique(config.lookupDisplayFields, config.advancedDisplayFields);
|
|
10057
|
+
config.service
|
|
10058
|
+
.list({ page, sort, filterQuery, displayFields })
|
|
10059
|
+
.subscribe((list) => searchSubject.next({
|
|
10060
|
+
gridData: getLabelValueRequest(list.contents, config.lookupDisplayFields, config.applyCPFCNPJFormat ?? false),
|
|
10061
|
+
totalRecords: list.totalElements,
|
|
10062
|
+
}));
|
|
10063
|
+
};
|
|
10064
|
+
const isLookupValueValid = (value, dataKey) => {
|
|
10065
|
+
if (value === null || value === undefined || value === '') {
|
|
10066
|
+
return true;
|
|
10067
|
+
}
|
|
10068
|
+
if (Array.isArray(value)) {
|
|
10069
|
+
return value.every((item) => item && typeof item === 'object' && item[dataKey] !== undefined && item[dataKey] !== null);
|
|
10070
|
+
}
|
|
10071
|
+
return typeof value === 'object' && value[dataKey] !== undefined && value[dataKey] !== null;
|
|
10072
|
+
};
|
|
10073
|
+
const createGenericOnBlur = (formGroup, fieldName, dataKey = 'id') => () => {
|
|
10074
|
+
const control = formGroup.get(fieldName);
|
|
10075
|
+
if (!control) {
|
|
10076
|
+
return;
|
|
10077
|
+
}
|
|
10078
|
+
if (!isLookupValueValid(control.value, dataKey)) {
|
|
10079
|
+
control.patchValue(null, { emitEvent: true });
|
|
10080
|
+
control.updateValueAndValidity({ emitEvent: true });
|
|
10081
|
+
}
|
|
10082
|
+
};
|
|
10083
|
+
|
|
10084
|
+
const LOOKUP_DEBOUNCE_MS = 300;
|
|
10085
|
+
const LOOKUP_DOCUMENT_FIELDS_TO_FORMAT = ['cnpCpf', 'numCgc'];
|
|
10086
|
+
class AgroBaseLookupField {
|
|
10087
|
+
config;
|
|
10088
|
+
translate;
|
|
10089
|
+
suggestionsSubject = new Subject();
|
|
10090
|
+
searchSubject = new Subject();
|
|
10091
|
+
hasDependencyListenerStarted = false;
|
|
10092
|
+
constructor(config, translate) {
|
|
10093
|
+
this.config = config;
|
|
10094
|
+
this.translate = translate;
|
|
10095
|
+
}
|
|
10096
|
+
isLookupValueValid(value) {
|
|
10097
|
+
if (value === null || value === undefined || value === '') {
|
|
10098
|
+
return false;
|
|
10099
|
+
}
|
|
10100
|
+
if (Array.isArray(value)) {
|
|
10101
|
+
return value.length > 0 && value.every((item) => item && typeof item === 'object' && item.id !== undefined && item.id !== null);
|
|
10102
|
+
}
|
|
10103
|
+
return typeof value === 'object' && value.id !== undefined && value.id !== null;
|
|
10104
|
+
}
|
|
10105
|
+
formatEntityDocumentFields(entity) {
|
|
10106
|
+
if (!entity || typeof entity !== 'object' || Array.isArray(entity)) {
|
|
10107
|
+
return entity;
|
|
10108
|
+
}
|
|
10109
|
+
let formattedEntity = entity;
|
|
10110
|
+
LOOKUP_DOCUMENT_FIELDS_TO_FORMAT.forEach((fieldName) => {
|
|
10111
|
+
if (!Object.hasOwn(entity, fieldName)) {
|
|
10112
|
+
return;
|
|
10113
|
+
}
|
|
10114
|
+
const originalValue = entity[fieldName];
|
|
10115
|
+
if (originalValue === null || originalValue === undefined || originalValue === '') {
|
|
10116
|
+
return;
|
|
10117
|
+
}
|
|
10118
|
+
const formattedValue = formatCPFCNPJWithMask(originalValue);
|
|
10119
|
+
if (formattedValue !== originalValue) {
|
|
10120
|
+
if (formattedEntity === entity) {
|
|
10121
|
+
formattedEntity = { ...entity };
|
|
10122
|
+
}
|
|
10123
|
+
formattedEntity[fieldName] = formattedValue;
|
|
10124
|
+
}
|
|
10125
|
+
});
|
|
10126
|
+
return formattedEntity;
|
|
10127
|
+
}
|
|
10128
|
+
normalizeLookupValue(value) {
|
|
10129
|
+
if (Array.isArray(value)) {
|
|
10130
|
+
let hasChanges = false;
|
|
10131
|
+
const normalizedArray = value.map((item) => {
|
|
10132
|
+
const normalizedItem = this.normalizeLookupValue(item);
|
|
10133
|
+
hasChanges = hasChanges || normalizedItem !== item;
|
|
10134
|
+
return normalizedItem;
|
|
10135
|
+
});
|
|
10136
|
+
return hasChanges ? normalizedArray : value;
|
|
10137
|
+
}
|
|
10138
|
+
return this.formatEntityDocumentFields(value);
|
|
10139
|
+
}
|
|
10140
|
+
syncControlValueWithNormalization(control) {
|
|
10141
|
+
if (!control) {
|
|
10142
|
+
return null;
|
|
10143
|
+
}
|
|
10144
|
+
const normalizedValue = this.normalizeLookupValue(control.value);
|
|
10145
|
+
if (normalizedValue !== control.value) {
|
|
10146
|
+
control.setValue(normalizedValue, { emitEvent: false });
|
|
10147
|
+
}
|
|
10148
|
+
return normalizedValue;
|
|
10149
|
+
}
|
|
10150
|
+
hasUserInteraction(control) {
|
|
10151
|
+
if (!control) {
|
|
10152
|
+
return false;
|
|
10153
|
+
}
|
|
10154
|
+
return control.dirty || control.touched;
|
|
10155
|
+
}
|
|
10156
|
+
markControlAsUserInteracted(control) {
|
|
10157
|
+
if (!control) {
|
|
10158
|
+
return;
|
|
10159
|
+
}
|
|
10160
|
+
if (!control.dirty) {
|
|
10161
|
+
control.markAsDirty({ onlySelf: true });
|
|
10162
|
+
}
|
|
10163
|
+
if (!control.touched) {
|
|
10164
|
+
control.markAsTouched({ onlySelf: true });
|
|
10165
|
+
}
|
|
10166
|
+
}
|
|
10167
|
+
isControlFilled(value) {
|
|
10168
|
+
if (value === null || value === undefined) {
|
|
10169
|
+
return false;
|
|
10170
|
+
}
|
|
10171
|
+
if (typeof value === 'string') {
|
|
10172
|
+
return value.trim() !== '';
|
|
10173
|
+
}
|
|
10174
|
+
if (Array.isArray(value)) {
|
|
10175
|
+
return value.length > 0;
|
|
10176
|
+
}
|
|
10177
|
+
return true;
|
|
10178
|
+
}
|
|
10179
|
+
areDependenciesReady() {
|
|
10180
|
+
const dependsOf = this.config.dependsOf ?? [];
|
|
10181
|
+
if (dependsOf.length === 0) {
|
|
10182
|
+
return true;
|
|
10183
|
+
}
|
|
10184
|
+
return dependsOf.every((fieldName) => {
|
|
10185
|
+
const control = this.config.formGroup.get(fieldName);
|
|
10186
|
+
return this.isLookupValueValid(this.syncControlValueWithNormalization(control));
|
|
10187
|
+
});
|
|
10188
|
+
}
|
|
10189
|
+
isAutofillEnabled() {
|
|
10190
|
+
return this.config.autofill !== false;
|
|
10191
|
+
}
|
|
10192
|
+
buildDependencyQuery() {
|
|
10193
|
+
const dependencies = this.config.dependencies ?? [];
|
|
10194
|
+
return dependencies
|
|
10195
|
+
.map(({ formControlName, apiField }) => {
|
|
10196
|
+
const dependencyId = this.config.formGroup.get(formControlName)?.value?.id;
|
|
10197
|
+
return dependencyId ? `${apiField} eq '${dependencyId}'` : '';
|
|
10198
|
+
})
|
|
10199
|
+
.filter(Boolean)
|
|
10200
|
+
.join(' and ');
|
|
10201
|
+
}
|
|
10202
|
+
buildCustomFilterQuery() {
|
|
10203
|
+
const query = this.config.customFilterQuery?.();
|
|
10204
|
+
return typeof query === 'string' ? query.trim() : '';
|
|
10205
|
+
}
|
|
10206
|
+
combineFilterQueries(...queries) {
|
|
10207
|
+
return queries.filter((query) => !!query).join(' and ');
|
|
10208
|
+
}
|
|
10209
|
+
tryAutofillWhenSingleResult() {
|
|
10210
|
+
if (!this.isAutofillEnabled()) {
|
|
10211
|
+
return;
|
|
10212
|
+
}
|
|
10213
|
+
const dependsOf = this.config.dependsOf ?? [];
|
|
10214
|
+
if (dependsOf.length === 0) {
|
|
10215
|
+
return;
|
|
10216
|
+
}
|
|
10217
|
+
const targetControl = this.config.formGroup.get(this.config.name);
|
|
10218
|
+
if (!targetControl || targetControl.disabled || this.isLookupValueValid(targetControl.value)) {
|
|
10219
|
+
return;
|
|
10220
|
+
}
|
|
10221
|
+
const dependencyQuery = this.buildDependencyQuery();
|
|
10222
|
+
const customQuery = this.buildCustomFilterQuery();
|
|
10223
|
+
const filterQuery = this.combineFilterQueries(dependencyQuery, customQuery);
|
|
10224
|
+
if (!filterQuery) {
|
|
10225
|
+
return;
|
|
10226
|
+
}
|
|
10227
|
+
const sort = this.config.lookupDisplayFields.map((field) => ({ field, order: 1 }));
|
|
10228
|
+
const displayFields = mergeUnique(this.config.lookupDisplayFields, this.config.advancedDisplayFields);
|
|
10229
|
+
this.config.service
|
|
10230
|
+
.list({ page: 0, size: 2, sort, filterQuery, displayFields })
|
|
10231
|
+
.subscribe((list) => {
|
|
10232
|
+
const contents = list?.contents ?? [];
|
|
10233
|
+
if (contents.length !== 1) {
|
|
10234
|
+
return;
|
|
10235
|
+
}
|
|
10236
|
+
const [singleValue] = getLabelValueRequest(contents, this.config.lookupDisplayFields);
|
|
10237
|
+
if (singleValue) {
|
|
10238
|
+
targetControl.setValue(this.normalizeLookupValue(singleValue), { emitEvent: true });
|
|
10239
|
+
}
|
|
10240
|
+
});
|
|
10241
|
+
}
|
|
10242
|
+
isPrefilledAndIndependent(hasAnyUserInteraction, targetIsValid, targetIsFilled) {
|
|
10243
|
+
return !hasAnyUserInteraction && (targetIsValid || targetIsFilled);
|
|
10244
|
+
}
|
|
10245
|
+
handleDependenciesState(forceReset = false) {
|
|
10246
|
+
const targetControl = this.config.formGroup.get(this.config.name);
|
|
10247
|
+
if (!targetControl) {
|
|
10248
|
+
return;
|
|
10249
|
+
}
|
|
10250
|
+
const dependsOf = this.config.dependsOf ?? [];
|
|
10251
|
+
if (dependsOf.length === 0) {
|
|
10252
|
+
return;
|
|
10253
|
+
}
|
|
10254
|
+
const hasAnyUserInteraction = dependsOf.some((fieldName) => this.hasUserInteraction(this.config.formGroup.get(fieldName)));
|
|
10255
|
+
const targetValue = this.syncControlValueWithNormalization(targetControl);
|
|
10256
|
+
const targetIsValid = this.isLookupValueValid(targetValue);
|
|
10257
|
+
const targetIsFilled = this.isControlFilled(targetValue);
|
|
10258
|
+
if (forceReset) {
|
|
10259
|
+
targetControl.setValue(null, { emitEvent: false });
|
|
10260
|
+
targetControl.disable({ emitEvent: false });
|
|
10261
|
+
return;
|
|
10262
|
+
}
|
|
10263
|
+
// Rule: dependent fields start disabled, except when already filled/valid (prefilled scenario).
|
|
10264
|
+
if (this.isPrefilledAndIndependent(hasAnyUserInteraction, targetIsValid, targetIsFilled)) {
|
|
10265
|
+
targetControl.enable({ emitEvent: false });
|
|
10266
|
+
this.tryAutofillWhenSingleResult();
|
|
10267
|
+
return;
|
|
10268
|
+
}
|
|
10269
|
+
if (this.areDependenciesReady()) {
|
|
10270
|
+
targetControl.enable({ emitEvent: false });
|
|
10271
|
+
this.tryAutofillWhenSingleResult();
|
|
10272
|
+
return;
|
|
10273
|
+
}
|
|
10274
|
+
// Keep prefilled values; clear only when there is user interaction or value is invalid for lookup.
|
|
10275
|
+
if (hasAnyUserInteraction || (targetIsFilled && !targetIsValid)) {
|
|
10276
|
+
targetControl.setValue(null, { emitEvent: false });
|
|
10277
|
+
}
|
|
10278
|
+
targetControl.disable({ emitEvent: false });
|
|
10279
|
+
}
|
|
10280
|
+
clearTargetKeepingEnabled() {
|
|
10281
|
+
const targetControl = this.config.formGroup.get(this.config.name);
|
|
10282
|
+
if (!targetControl) {
|
|
10283
|
+
return;
|
|
10284
|
+
}
|
|
10285
|
+
targetControl.setValue(null, { emitEvent: true });
|
|
10286
|
+
if (this.areDependenciesReady()) {
|
|
10287
|
+
targetControl.enable({ emitEvent: false });
|
|
10288
|
+
this.tryAutofillWhenSingleResult();
|
|
10289
|
+
}
|
|
10290
|
+
}
|
|
10291
|
+
getComparableLookupValue(value) {
|
|
10292
|
+
const normalizedValue = this.normalizeLookupValue(value);
|
|
10293
|
+
if (normalizedValue === null || normalizedValue === undefined || normalizedValue === '') {
|
|
10294
|
+
return null;
|
|
10295
|
+
}
|
|
10296
|
+
if (Array.isArray(normalizedValue)) {
|
|
10297
|
+
return normalizedValue.map((item) => this.getComparableLookupValue(item));
|
|
10298
|
+
}
|
|
10299
|
+
if (typeof normalizedValue === 'object') {
|
|
10300
|
+
if (normalizedValue.id !== undefined && normalizedValue.id !== null) {
|
|
10301
|
+
return normalizedValue.id;
|
|
10302
|
+
}
|
|
10303
|
+
return JSON.stringify(normalizedValue);
|
|
10304
|
+
}
|
|
10305
|
+
return normalizedValue;
|
|
10306
|
+
}
|
|
10307
|
+
didDependencyValueChange(previousComparable, currentComparable) {
|
|
10308
|
+
return JSON.stringify(previousComparable) !== JSON.stringify(currentComparable);
|
|
10309
|
+
}
|
|
10310
|
+
startDependenciesListener() {
|
|
10311
|
+
if (this.hasDependencyListenerStarted) {
|
|
10312
|
+
return;
|
|
10313
|
+
}
|
|
10314
|
+
const dependsOf = this.config.dependsOf ?? [];
|
|
10315
|
+
if (dependsOf.length === 0) {
|
|
10316
|
+
return;
|
|
10317
|
+
}
|
|
10318
|
+
this.hasDependencyListenerStarted = true;
|
|
10319
|
+
// Observe each dependency directly and compare previous/current values.
|
|
10320
|
+
dependsOf.forEach((fieldName) => {
|
|
10321
|
+
const control = this.config.formGroup.get(fieldName);
|
|
10322
|
+
control?.valueChanges.pipe(startWith(control.value), debounceTime(LOOKUP_DEBOUNCE_MS), pairwise()).subscribe(([previousValue, currentValue]) => {
|
|
10323
|
+
const normalizedPreviousValue = this.normalizeLookupValue(previousValue);
|
|
10324
|
+
const normalizedCurrentValue = this.normalizeLookupValue(currentValue);
|
|
10325
|
+
if (normalizedCurrentValue !== currentValue) {
|
|
10326
|
+
control.setValue(normalizedCurrentValue, { emitEvent: false });
|
|
10327
|
+
}
|
|
10328
|
+
const previousValidity = this.isLookupValueValid(normalizedPreviousValue);
|
|
10329
|
+
const currentValidity = this.isLookupValueValid(normalizedCurrentValue);
|
|
10330
|
+
const previousComparable = this.getComparableLookupValue(normalizedPreviousValue);
|
|
10331
|
+
const currentComparable = this.getComparableLookupValue(normalizedCurrentValue);
|
|
10332
|
+
const didValueChange = this.didDependencyValueChange(previousComparable, currentComparable);
|
|
10333
|
+
if (previousValidity && !currentValidity) {
|
|
10334
|
+
this.handleDependenciesState(true);
|
|
10335
|
+
return;
|
|
10336
|
+
}
|
|
10337
|
+
if (previousValidity && currentValidity && didValueChange) {
|
|
10338
|
+
this.clearTargetKeepingEnabled();
|
|
10339
|
+
return;
|
|
10340
|
+
}
|
|
10341
|
+
if (!previousValidity && currentValidity) {
|
|
10342
|
+
this.handleDependenciesState(false);
|
|
10343
|
+
}
|
|
10344
|
+
});
|
|
10345
|
+
control?.statusChanges.subscribe(() => {
|
|
10346
|
+
if (this.areDependenciesReady()) {
|
|
10347
|
+
this.handleDependenciesState(false);
|
|
10348
|
+
}
|
|
10349
|
+
});
|
|
10350
|
+
});
|
|
10351
|
+
// Evaluate once after init to honor prefilled valid dependencies without forcing resets.
|
|
10352
|
+
this.handleDependenciesState(false);
|
|
10353
|
+
}
|
|
10354
|
+
makeIt() {
|
|
10355
|
+
this.startDependenciesListener();
|
|
10356
|
+
return {
|
|
10357
|
+
name: this.config.name,
|
|
10358
|
+
formControlName: this.config.name, // Explicitly set formControlName for s-dynamic-form binding
|
|
10359
|
+
filterFieldName: this.config.filterFieldName ?? this.config.name,
|
|
10360
|
+
required: this.config.required ?? (() => false),
|
|
10361
|
+
size: this.config.size ?? { sm: 4, md: 4, lg: 4, xl: 4 },
|
|
10362
|
+
dependsOf: this.config.dependsOf ?? [],
|
|
10363
|
+
label: this.translate.instant(this.config.labelKey),
|
|
10364
|
+
type: 'lookup',
|
|
10365
|
+
dataKey: 'id',
|
|
10366
|
+
lookupDisplayField: 'label',
|
|
10367
|
+
searchTitle: this.translate.instant(this.config.searchTitleKey),
|
|
10368
|
+
searchEmptyTitle: this.translate.instant('agro.angular_components.lookup_nothing_found'),
|
|
10369
|
+
filterLabel: this.translate.instant('agro.angular_components.lookup_filter'),
|
|
10370
|
+
filterTitle: this.translate.instant('agro.angular_components.lookup_filters'),
|
|
10371
|
+
clearLabel: this.translate.instant('agro.angular_components.lookup_clear'),
|
|
10372
|
+
cancelLabel: this.translate.instant('agro.angular_components.lookup_cancel'),
|
|
10373
|
+
selectLabel: this.translate.instant('agro.angular_components.lookup_select'),
|
|
10374
|
+
suggestionsObservable: this.suggestionsSubject.asObservable(),
|
|
10375
|
+
searchObservable: this.searchSubject.asObservable(),
|
|
10376
|
+
onLookupRequest: createGenericOnLookupRequest({
|
|
10377
|
+
config: this.config,
|
|
10378
|
+
suggestionsSubject: this.suggestionsSubject,
|
|
10379
|
+
searchSubject: this.searchSubject,
|
|
10380
|
+
}),
|
|
10381
|
+
onSearchRequest: createGenericOnSearchRequest({
|
|
10382
|
+
config: this.config,
|
|
10383
|
+
suggestionsSubject: this.suggestionsSubject,
|
|
10384
|
+
searchSubject: this.searchSubject,
|
|
10385
|
+
}),
|
|
10386
|
+
onBlur: (event) => {
|
|
10387
|
+
const control = this.config.formGroup.get(this.config.name);
|
|
10388
|
+
if (control) {
|
|
10389
|
+
this.markControlAsUserInteracted(control);
|
|
10390
|
+
const uiRawValue = event?.target?.value ?? event?.value ?? '';
|
|
10391
|
+
const uiTextValue = typeof uiRawValue === 'string' ? uiRawValue.trim() : uiRawValue;
|
|
10392
|
+
const isUiEmpty = !uiTextValue;
|
|
10393
|
+
const currentValue = this.syncControlValueWithNormalization(control);
|
|
10394
|
+
const isValueValid = this.isLookupValueValid(currentValue);
|
|
10395
|
+
// If UI was cleared but control still has a value, force sync to null.
|
|
10396
|
+
if (isUiEmpty && currentValue != null && currentValue !== '') {
|
|
10397
|
+
control.setValue(null, { emitEvent: true });
|
|
10398
|
+
control.updateValueAndValidity({ emitEvent: true });
|
|
10399
|
+
return;
|
|
10400
|
+
}
|
|
10401
|
+
// If the control has a value but it's not a valid lookup object, clear it
|
|
10402
|
+
// This catches cases where the UI cleared the field but the FormControl wasn't updated
|
|
10403
|
+
if (currentValue && !isValueValid) {
|
|
10404
|
+
this.config.formGroup.patchValue({ [this.config.name]: null }, { emitEvent: true });
|
|
10405
|
+
}
|
|
10406
|
+
}
|
|
10407
|
+
},
|
|
10408
|
+
onSelectHandler: (event) => {
|
|
10409
|
+
const actualValue = event?.value || event;
|
|
10410
|
+
const control = this.config.formGroup.get(this.config.name);
|
|
10411
|
+
if (control && actualValue && typeof actualValue === 'object' && actualValue.id) {
|
|
10412
|
+
const normalizedValue = this.normalizeLookupValue(actualValue);
|
|
10413
|
+
this.markControlAsUserInteracted(control);
|
|
10414
|
+
control.setValue(normalizedValue, { emitEvent: true });
|
|
10415
|
+
}
|
|
10416
|
+
},
|
|
10417
|
+
onSelect: (event) => {
|
|
10418
|
+
const actualValue = event?.value || event;
|
|
10419
|
+
const control = this.config.formGroup.get(this.config.name);
|
|
10420
|
+
if (control && actualValue && typeof actualValue === 'object' && actualValue.id) {
|
|
10421
|
+
const normalizedValue = this.normalizeLookupValue(actualValue);
|
|
10422
|
+
this.markControlAsUserInteracted(control);
|
|
10423
|
+
control.setValue(normalizedValue, { emitEvent: true });
|
|
10424
|
+
}
|
|
10425
|
+
},
|
|
10426
|
+
onClear: () => {
|
|
10427
|
+
const control = this.config.formGroup.get(this.config.name);
|
|
10428
|
+
if (control) {
|
|
10429
|
+
this.markControlAsUserInteracted(control);
|
|
10430
|
+
control.setValue(null, { emitEvent: true });
|
|
10431
|
+
}
|
|
10432
|
+
},
|
|
10433
|
+
onChange: (event) => {
|
|
10434
|
+
const control = this.config.formGroup.get(this.config.name);
|
|
10435
|
+
const actualValue = event?.value || event;
|
|
10436
|
+
if (control && actualValue && typeof actualValue === 'object') {
|
|
10437
|
+
const normalizedValue = this.normalizeLookupValue(actualValue);
|
|
10438
|
+
if (normalizedValue !== actualValue) {
|
|
10439
|
+
this.markControlAsUserInteracted(control);
|
|
10440
|
+
control.setValue(normalizedValue, { emitEvent: true });
|
|
10441
|
+
return;
|
|
10442
|
+
}
|
|
10443
|
+
}
|
|
10444
|
+
if (control && !actualValue) {
|
|
10445
|
+
this.markControlAsUserInteracted(control);
|
|
10446
|
+
control.setValue(null, { emitEvent: true });
|
|
10447
|
+
}
|
|
10448
|
+
},
|
|
10449
|
+
onUnselect: () => {
|
|
10450
|
+
const control = this.config.formGroup.get(this.config.name);
|
|
10451
|
+
if (control) {
|
|
10452
|
+
this.markControlAsUserInteracted(control);
|
|
10453
|
+
control.setValue(null, { emitEvent: true });
|
|
10454
|
+
}
|
|
10455
|
+
},
|
|
10456
|
+
searchFields: this.config.searchFields,
|
|
10457
|
+
searchGridFields: this.config.searchFields,
|
|
10458
|
+
appendTo: 'body',
|
|
10459
|
+
baseZIndex: 10000,
|
|
10460
|
+
};
|
|
10461
|
+
}
|
|
10462
|
+
}
|
|
10463
|
+
|
|
10464
|
+
class AgroLookupBase {
|
|
10465
|
+
translate;
|
|
10466
|
+
formGroup;
|
|
10467
|
+
formFieldName;
|
|
10468
|
+
filterFieldName;
|
|
10469
|
+
required;
|
|
10470
|
+
dependsOf;
|
|
10471
|
+
size;
|
|
10472
|
+
autofill;
|
|
10473
|
+
customFilterQuery;
|
|
10474
|
+
constructor(config, defaults) {
|
|
10475
|
+
const { formGroup, formFieldName, filterFieldName, required, dependsOf, size, autofill, customFilterQuery } = config;
|
|
10476
|
+
this.formGroup = formGroup;
|
|
10477
|
+
this.formFieldName = formFieldName ?? defaults.defaultFieldName;
|
|
10478
|
+
this.filterFieldName = filterFieldName ?? defaults.defaultFilterFieldName;
|
|
10479
|
+
this.required = required ?? (() => false);
|
|
10480
|
+
this.dependsOf = dependsOf ?? [];
|
|
10481
|
+
this.size = size ?? 4;
|
|
10482
|
+
this.autofill = autofill ?? (defaults.defaultAutofill ?? true);
|
|
10483
|
+
this.customFilterQuery = customFilterQuery;
|
|
10484
|
+
this.translate = new LibTranslationService();
|
|
10485
|
+
}
|
|
10486
|
+
makeIt() {
|
|
10487
|
+
return new AgroBaseLookupField({
|
|
10488
|
+
formGroup: this.formGroup,
|
|
10489
|
+
name: this.formFieldName,
|
|
10490
|
+
filterFieldName: this.filterFieldName,
|
|
10491
|
+
required: this.required,
|
|
10492
|
+
size: this.size,
|
|
10493
|
+
autofill: this.autofill,
|
|
10494
|
+
customFilterQuery: this.customFilterQuery,
|
|
10495
|
+
dependsOf: this.dependsOf,
|
|
10496
|
+
...this.getLookupConfig(),
|
|
10497
|
+
}, this.translate).makeIt();
|
|
10498
|
+
}
|
|
10499
|
+
}
|
|
10500
|
+
|
|
10501
|
+
function resolveLookupHostProjectConfig(config, serviceName) {
|
|
10502
|
+
const domain = config?.domain;
|
|
10503
|
+
const service = config?.service;
|
|
10504
|
+
if (domain && service) {
|
|
10505
|
+
return { domain, service };
|
|
10506
|
+
}
|
|
10507
|
+
throw new Error(`[${serviceName}] Missing host project configuration. ` +
|
|
10508
|
+
`Provide 'domain' and 'service' in the lookup config or configure LIB_CONFIG in the module.`);
|
|
10509
|
+
}
|
|
10510
|
+
|
|
10511
|
+
let runtimeInjector = null;
|
|
10512
|
+
function registerLookupRuntimeInjector(injector) {
|
|
10513
|
+
runtimeInjector = injector;
|
|
10514
|
+
}
|
|
10515
|
+
function resolveLookupRuntimeInjector(callerName) {
|
|
10516
|
+
if (!runtimeInjector) {
|
|
10517
|
+
throw new Error(`[${callerName}] No runtime injector registered. ` +
|
|
10518
|
+
`Import AgroAngularComponentsModule in your AppModule or call registerLookupRuntimeInjector().`);
|
|
10519
|
+
}
|
|
10520
|
+
return runtimeInjector;
|
|
10521
|
+
}
|
|
10522
|
+
|
|
10523
|
+
const HTTP_STATUS_UNAUTHORIZED = 401;
|
|
10524
|
+
class AgroLookupEntityService {
|
|
10525
|
+
constructor(httpOrConfig, messageServiceOrEntityPath, entityUrlOrActionsPath, actionsUrl, translate) {
|
|
10526
|
+
if (typeof messageServiceOrEntityPath === 'string' && !translate) {
|
|
10527
|
+
const resolvedConfig = resolveLookupHostProjectConfig(httpOrConfig, this.constructor.name);
|
|
10528
|
+
const runtimeInjector = resolveLookupRuntimeInjector(this.constructor.name);
|
|
10529
|
+
this.http = runtimeInjector.get(HttpClient);
|
|
10530
|
+
this.messageService = runtimeInjector.get(MessageService);
|
|
10531
|
+
this.translate = new LibTranslationService();
|
|
10532
|
+
this.entityUrl = `${resolvedConfig.domain}/${resolvedConfig.service}/${messageServiceOrEntityPath}`;
|
|
10533
|
+
this.actionsUrl = `${resolvedConfig.domain}/${resolvedConfig.service}/${entityUrlOrActionsPath || 'actions'}`;
|
|
10534
|
+
}
|
|
10535
|
+
else {
|
|
10536
|
+
this.http = httpOrConfig;
|
|
10537
|
+
this.messageService = messageServiceOrEntityPath;
|
|
10538
|
+
this.entityUrl = entityUrlOrActionsPath;
|
|
10539
|
+
this.actionsUrl = actionsUrl;
|
|
10540
|
+
this.translate = translate;
|
|
10541
|
+
}
|
|
10542
|
+
this.defaultCatch = this.defaultCatch.bind(this);
|
|
10543
|
+
}
|
|
10544
|
+
http;
|
|
10545
|
+
messageService;
|
|
10546
|
+
entityUrl;
|
|
10547
|
+
actionsUrl;
|
|
10548
|
+
translate;
|
|
10549
|
+
getSortOrderSuffix(order) {
|
|
10550
|
+
if (order === 1) {
|
|
10551
|
+
return ' asc';
|
|
10552
|
+
}
|
|
10553
|
+
else if (order === -1) {
|
|
10554
|
+
return ' desc';
|
|
10555
|
+
}
|
|
10556
|
+
else {
|
|
10557
|
+
return '';
|
|
10558
|
+
}
|
|
10559
|
+
}
|
|
10560
|
+
getListQueryParams(listParams) {
|
|
10561
|
+
const { page = 0, size = 10, sort = [], filterQuery = '', displayFields = [] } = listParams;
|
|
10562
|
+
let params = new HttpParams();
|
|
10563
|
+
params = params.append('size', String(size));
|
|
10564
|
+
params = params.append('offset', String(page));
|
|
10565
|
+
if (sort?.length) {
|
|
10566
|
+
params = params.append('orderby', sort
|
|
10567
|
+
.map((s) => `${s.field}${this.getSortOrderSuffix(s.order)}`)
|
|
10568
|
+
.join(', '));
|
|
10569
|
+
}
|
|
10570
|
+
if (filterQuery) {
|
|
10571
|
+
params = params.append('filter', filterQuery);
|
|
10572
|
+
}
|
|
10573
|
+
if (displayFields?.length) {
|
|
10574
|
+
params = params.append('displayfields', displayFields.join());
|
|
10575
|
+
}
|
|
10576
|
+
return params;
|
|
10577
|
+
}
|
|
10578
|
+
getBodyParams(listParams) {
|
|
10579
|
+
const { page = 0, size = 10, sort = [], filterQuery = '', displayFields = [] } = listParams;
|
|
10580
|
+
const bodyParams = {};
|
|
10581
|
+
bodyParams.size = size;
|
|
10582
|
+
bodyParams.offset = page;
|
|
10583
|
+
if (sort?.length) {
|
|
10584
|
+
bodyParams.orderBy = sort
|
|
10585
|
+
.map((s) => `${s.field}${this.getSortOrderSuffix(s.order)}`)
|
|
10586
|
+
.join(', ');
|
|
10587
|
+
}
|
|
10588
|
+
if (filterQuery) {
|
|
10589
|
+
bodyParams.filter = filterQuery;
|
|
10590
|
+
}
|
|
10591
|
+
if (displayFields?.length) {
|
|
10592
|
+
bodyParams.displayfields = displayFields.join();
|
|
10593
|
+
}
|
|
10594
|
+
return bodyParams;
|
|
10595
|
+
}
|
|
10596
|
+
defaultCatch(options) {
|
|
10597
|
+
return catchError((err) => {
|
|
10598
|
+
const suppressStatuses = options?.suppressStatuses ?? [];
|
|
10599
|
+
if (suppressStatuses.includes(err?.status)) {
|
|
10600
|
+
return throwError(err);
|
|
10601
|
+
}
|
|
10602
|
+
if (err) {
|
|
10603
|
+
let title = 'Error';
|
|
10604
|
+
if (err.status) {
|
|
10605
|
+
title = String(err.status);
|
|
10606
|
+
}
|
|
10607
|
+
let text = err?.error?.message ?? err?.statusText ?? err?.message ?? 'Error';
|
|
10608
|
+
if (text.includes('delete_entity_constraint_violation_')) {
|
|
10609
|
+
title = this.translate.instant('agro.angular_components.lookup_error_delete_entity_constraint_violation_title');
|
|
10610
|
+
text = this.translate.instant('agro.angular_components.lookup_error_delete_entity_constraint_violation_description');
|
|
10611
|
+
}
|
|
10612
|
+
else if (err.status === HTTP_STATUS_UNAUTHORIZED) {
|
|
10613
|
+
title = this.translate.instant('agro.angular_components.error_unauthorized_title');
|
|
10614
|
+
text = this.translate.instant('agro.angular_components.error_unauthorized_description');
|
|
10615
|
+
}
|
|
10616
|
+
else {
|
|
10617
|
+
// no additional error handling
|
|
10618
|
+
}
|
|
10619
|
+
this.messageService.add({
|
|
10620
|
+
severity: 'error',
|
|
10621
|
+
summary: title,
|
|
10622
|
+
detail: text,
|
|
10623
|
+
});
|
|
10624
|
+
}
|
|
10625
|
+
return throwError(err);
|
|
10626
|
+
});
|
|
10627
|
+
}
|
|
10628
|
+
list(listParams) {
|
|
10629
|
+
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
10630
|
+
}
|
|
10631
|
+
get(id) {
|
|
10632
|
+
return this.http.get(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
10633
|
+
}
|
|
10634
|
+
insert(entity) {
|
|
10635
|
+
return this.http.post(`${this.entityUrl}`, entity).pipe(this.defaultCatch());
|
|
10636
|
+
}
|
|
10637
|
+
update(id, entity) {
|
|
10638
|
+
return this.http.put(`${this.entityUrl}/${id}`, entity).pipe(this.defaultCatch());
|
|
10639
|
+
}
|
|
10640
|
+
delete(id, options) {
|
|
10641
|
+
return this.http.delete(`${this.entityUrl}/${id}`).pipe(this.defaultCatch(options));
|
|
10642
|
+
}
|
|
10643
|
+
listCustomFilter(listParams, action) {
|
|
10644
|
+
return this.http.post(`${this.actionsUrl}/${action}`, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
10645
|
+
}
|
|
10646
|
+
}
|
|
10647
|
+
|
|
10648
|
+
class AgroCompanyLookup extends AgroLookupBase {
|
|
10649
|
+
e070EmpService;
|
|
10650
|
+
constructor(config) {
|
|
10651
|
+
super(config, { defaultFieldName: 'company', defaultFilterFieldName: 'company.id' });
|
|
10652
|
+
this.e070EmpService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroCompanyLookup.name), 'entities/e070emp');
|
|
10653
|
+
}
|
|
10654
|
+
getLookupConfig() {
|
|
10655
|
+
return {
|
|
10656
|
+
labelKey: 'agro.angular_components.lookup_contract_company',
|
|
10657
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_company_search_title',
|
|
10658
|
+
lookupDisplayFields: ['codEmp', 'nomEmp'],
|
|
10659
|
+
advancedDisplayFields: ['codEmp', 'nomEmp'],
|
|
10660
|
+
searchFields: [
|
|
10661
|
+
{ name: 'codEmp', label: this.translate.instant('agro.angular_components.lookup_label_code_company'), type: 'integer', allowNegative: false, precision: 11, scale: 0 },
|
|
10662
|
+
{ name: 'nomEmp', label: this.translate.instant('agro.angular_components.lookup_label_name'), type: 'string', maxLength: 100 },
|
|
10663
|
+
{ name: 'sigEmp', label: this.translate.instant('agro.angular_components.lookup_e_070_emp_sig_emp'), type: 'string', maxLength: 100 },
|
|
10664
|
+
],
|
|
10665
|
+
service: this.e070EmpService,
|
|
10666
|
+
};
|
|
10667
|
+
}
|
|
10668
|
+
}
|
|
10669
|
+
|
|
10670
|
+
class AgroBranchLookup extends AgroLookupBase {
|
|
10671
|
+
e070FilService;
|
|
10672
|
+
constructor(config) {
|
|
10673
|
+
super(config, { defaultFieldName: 'branch', defaultFilterFieldName: 'branch.id' });
|
|
10674
|
+
this.e070FilService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroBranchLookup.name), 'entities/e070fil');
|
|
10675
|
+
}
|
|
10676
|
+
getLookupConfig() {
|
|
10677
|
+
return {
|
|
10678
|
+
labelKey: 'agro.angular_components.lookup_contract_branch',
|
|
10679
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_branch_search_title',
|
|
10680
|
+
lookupDisplayFields: ['codFil', 'nomFil'],
|
|
10681
|
+
advancedDisplayFields: ['codFil', 'nomFil'],
|
|
10682
|
+
searchFields: [
|
|
10683
|
+
{ name: 'codFil', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'integer', allowNegative: false, precision: 11, scale: 0 },
|
|
10684
|
+
{ name: 'nomFil', label: this.translate.instant('agro.angular_components.lookup_label_branch'), type: 'string' },
|
|
10685
|
+
{ name: 'numCgc', label: this.translate.instant('agro.angular_components.lookup_e_070_fil_num_cgc'), type: 'string' },
|
|
10686
|
+
{ name: 'cidFil', label: this.translate.instant('agro.angular_components.lookup_label_city'), type: 'string' },
|
|
10687
|
+
],
|
|
10688
|
+
dependencies: [{ formControlName: 'company', apiField: 'e070emp.id' }],
|
|
10689
|
+
service: this.e070FilService,
|
|
10690
|
+
};
|
|
10691
|
+
}
|
|
10692
|
+
}
|
|
10693
|
+
|
|
10694
|
+
class AgroDepositLookup extends AgroLookupBase {
|
|
10695
|
+
e205DepService;
|
|
10696
|
+
constructor(config) {
|
|
10697
|
+
super(config, { defaultFieldName: 'e205dep', defaultFilterFieldName: 'e205dep.id' });
|
|
10698
|
+
this.e205DepService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroDepositLookup.name), 'entities/e205dep');
|
|
10699
|
+
}
|
|
10700
|
+
getLookupConfig() {
|
|
10701
|
+
return {
|
|
10702
|
+
labelKey: 'agro.angular_components.lookup_deposit',
|
|
10703
|
+
searchTitleKey: 'agro.angular_components.lookup_deposit_search_title',
|
|
10704
|
+
lookupDisplayFields: ['codDep', 'desDep'],
|
|
10705
|
+
advancedDisplayFields: ['codDep', 'desDep'],
|
|
10706
|
+
searchFields: [
|
|
10707
|
+
{ name: 'codDep', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'string' },
|
|
10708
|
+
{ name: 'desDep', label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
10709
|
+
],
|
|
10710
|
+
dependencies: [{ formControlName: 'company', apiField: 'e070emp.id' }],
|
|
10711
|
+
service: this.e205DepService,
|
|
10712
|
+
};
|
|
10713
|
+
}
|
|
10714
|
+
}
|
|
10715
|
+
|
|
10716
|
+
class AgroDepositBalanceLookup extends AgroLookupBase {
|
|
10717
|
+
e210DxpService;
|
|
10718
|
+
constructor(config) {
|
|
10719
|
+
super(config, { defaultFieldName: 'e210dxp', defaultFilterFieldName: 'e210dxp.id' });
|
|
10720
|
+
this.e210DxpService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroDepositBalanceLookup.name), 'entities/e210dxp');
|
|
10721
|
+
}
|
|
10722
|
+
getLookupConfig() {
|
|
10723
|
+
return {
|
|
10724
|
+
labelKey: 'agro.angular_components.lookup_deposit',
|
|
10725
|
+
searchTitleKey: 'agro.angular_components.lookup_deposit_search_title',
|
|
10726
|
+
lookupDisplayFields: ['e205dep.codDep', 'e205dep.desDep'],
|
|
10727
|
+
advancedDisplayFields: ['e205dep.codDep', 'e205dep.desDep'],
|
|
10728
|
+
searchFields: [
|
|
10729
|
+
{ name: 'e205dep.codDep', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'string' },
|
|
10730
|
+
{ name: 'e205dep.desDep', label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
10731
|
+
],
|
|
10732
|
+
dependencies: [{ formControlName: 'company', apiField: 'e070emp.id' }],
|
|
10733
|
+
service: this.e210DxpService,
|
|
10734
|
+
};
|
|
10735
|
+
}
|
|
10736
|
+
}
|
|
10737
|
+
|
|
10738
|
+
class AgroDriverLookup extends AgroLookupBase {
|
|
10739
|
+
driverService;
|
|
10740
|
+
constructor(config) {
|
|
10741
|
+
super(config, { defaultFieldName: 'driver', defaultFilterFieldName: 'driver.id', defaultAutofill: false });
|
|
10742
|
+
this.driverService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroDriverLookup.name), 'entities/driver');
|
|
10743
|
+
}
|
|
10744
|
+
getLookupConfig() {
|
|
10745
|
+
return {
|
|
10746
|
+
labelKey: 'agro.angular_components.lookup_driver',
|
|
10747
|
+
searchTitleKey: 'agro.angular_components.lookup_driver_search_title',
|
|
10748
|
+
lookupDisplayFields: ['cnpjCpf', 'name'],
|
|
10749
|
+
advancedDisplayFields: ['cnpjCpf', 'name'],
|
|
10750
|
+
searchFields: [
|
|
10751
|
+
{ name: 'cnpjCpf', label: this.translate.instant('agro.angular_components.lookup_cnpj_cpf'), type: 'string' },
|
|
10752
|
+
{ name: 'name', label: this.translate.instant('agro.angular_components.lookup_label_name'), type: 'string' },
|
|
10753
|
+
],
|
|
10754
|
+
service: this.driverService,
|
|
10755
|
+
applyCPFCNPJFormat: true,
|
|
10756
|
+
};
|
|
10757
|
+
}
|
|
10758
|
+
}
|
|
10759
|
+
|
|
10760
|
+
class AgroE095PesLookup extends AgroLookupBase {
|
|
10761
|
+
e095PesService;
|
|
10762
|
+
constructor(config) {
|
|
10763
|
+
super(config, { defaultFieldName: 'e095pes', defaultFilterFieldName: 'e095pes.id', defaultAutofill: false });
|
|
10764
|
+
this.e095PesService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroE095PesLookup.name), 'entities/e095pes');
|
|
10765
|
+
}
|
|
10766
|
+
getLookupConfig() {
|
|
10767
|
+
return {
|
|
10768
|
+
labelKey: 'agro.angular_components.lookup_e095_pes',
|
|
10769
|
+
searchTitleKey: 'agro.angular_components.lookup_e095_pes_search_title',
|
|
10770
|
+
lookupDisplayFields: ['e001pes.cnpCpf', 'e001pes.nomPes'],
|
|
10771
|
+
advancedDisplayFields: ['e001pes.cnpCpf', 'e001pes.nomPes'],
|
|
10772
|
+
applyCPFCNPJFormat: true,
|
|
10773
|
+
searchFields: [
|
|
10774
|
+
{ name: 'e001pes.cnpCpf', label: this.translate.instant('agro.angular_components.lookup_cnpj_cpf'), type: 'string' },
|
|
10775
|
+
{ name: 'e001pes.nomPes', label: this.translate.instant('agro.angular_components.lookup_label_name'), type: 'string' },
|
|
10776
|
+
],
|
|
10777
|
+
service: this.e095PesService,
|
|
10778
|
+
};
|
|
10779
|
+
}
|
|
10780
|
+
}
|
|
10781
|
+
|
|
10782
|
+
class AgroFamilyLookup extends AgroLookupBase {
|
|
10783
|
+
e012FamService;
|
|
10784
|
+
constructor(config) {
|
|
10785
|
+
super(config, { defaultFieldName: 'e012fam', defaultFilterFieldName: 'e012fam.id' });
|
|
10786
|
+
this.e012FamService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroFamilyLookup.name), 'entities/e012fam');
|
|
10787
|
+
}
|
|
10788
|
+
getLookupConfig() {
|
|
10789
|
+
return {
|
|
10790
|
+
labelKey: 'agro.angular_components.lookup_family',
|
|
10791
|
+
searchTitleKey: 'agro.angular_components.lookup_family_search_title',
|
|
10792
|
+
lookupDisplayFields: ['codFam', 'desFam'],
|
|
10793
|
+
advancedDisplayFields: ['codFam', 'desFam'],
|
|
10794
|
+
searchFields: [
|
|
10795
|
+
{ name: 'codFam', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'string' },
|
|
10796
|
+
{ name: 'desFam', label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
10797
|
+
],
|
|
10798
|
+
dependencies: [{ formControlName: 'company', apiField: 'e070emp.id' }],
|
|
10799
|
+
service: this.e012FamService,
|
|
10800
|
+
};
|
|
10801
|
+
}
|
|
10802
|
+
}
|
|
10803
|
+
|
|
10804
|
+
class AgroProductLookup extends AgroLookupBase {
|
|
10805
|
+
e075DerService;
|
|
10806
|
+
constructor(config) {
|
|
10807
|
+
super(config, { defaultFieldName: 'contractProducts', defaultFilterFieldName: 'contractProducts.product.id' });
|
|
10808
|
+
this.e075DerService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroProductLookup.name), 'entities/e075der');
|
|
10809
|
+
}
|
|
10810
|
+
getLookupConfig() {
|
|
10811
|
+
return {
|
|
10812
|
+
labelKey: 'agro.angular_components.lookup_product',
|
|
10813
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_product_product_search_title',
|
|
10814
|
+
lookupDisplayFields: ['codDer', 'desDer'],
|
|
10815
|
+
advancedDisplayFields: ['codDer', 'desDer'],
|
|
10816
|
+
searchFields: [
|
|
10817
|
+
{ name: 'codDer', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'string' },
|
|
10818
|
+
{ name: 'desDer', label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
10819
|
+
],
|
|
10820
|
+
dependencies: [{ formControlName: 'company', apiField: 'e070emp.id' }],
|
|
10821
|
+
service: this.e075DerService,
|
|
10822
|
+
};
|
|
10823
|
+
}
|
|
10824
|
+
}
|
|
10825
|
+
|
|
10826
|
+
class AgroProducerLookup extends AgroLookupBase {
|
|
10827
|
+
e001PesService;
|
|
10828
|
+
constructor(config) {
|
|
10829
|
+
super(config, { defaultFieldName: 'e001pes', defaultFilterFieldName: 'contractProducts.contractProductProducers.producer.id' });
|
|
10830
|
+
this.e001PesService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroProducerLookup.name), 'entities/e001pes');
|
|
10831
|
+
}
|
|
10832
|
+
getLookupConfig() {
|
|
10833
|
+
return {
|
|
10834
|
+
labelKey: 'agro.angular_components.lookup_producer',
|
|
10835
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_product_producer_producer_search_title',
|
|
10836
|
+
lookupDisplayFields: ['cnpCpf', 'nomPes'],
|
|
10837
|
+
advancedDisplayFields: ['cnpCpf', 'nomPes', 'sitPes', 'extIntSts', 'extIntMsg'],
|
|
10838
|
+
searchFields: [
|
|
10839
|
+
{ name: 'cnpCpf', label: this.translate.instant('agro.angular_components.lookup_cnpj_cpf'), type: 'string' },
|
|
10840
|
+
{ name: 'nomPes', label: this.translate.instant('agro.angular_components.lookup_label_name'), type: 'string' },
|
|
10841
|
+
],
|
|
10842
|
+
service: this.e001PesService,
|
|
10843
|
+
applyCPFCNPJFormat: true,
|
|
10844
|
+
};
|
|
10845
|
+
}
|
|
10846
|
+
}
|
|
10847
|
+
|
|
10848
|
+
class AgroHarvestLookup extends AgroLookupBase {
|
|
10849
|
+
e113SafService;
|
|
10850
|
+
constructor(config) {
|
|
10851
|
+
super(config, { defaultFieldName: 'e113saf', defaultFilterFieldName: 'contractProducts.harvest.id' });
|
|
10852
|
+
this.e113SafService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroHarvestLookup.name), 'entities/e113saf');
|
|
10853
|
+
}
|
|
10854
|
+
getLookupConfig() {
|
|
10855
|
+
return {
|
|
10856
|
+
labelKey: 'agro.angular_components.lookup_contract_product_harvest',
|
|
10857
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_product_harvest_search_title',
|
|
10858
|
+
lookupDisplayFields: ['codSaf', 'desSaf'],
|
|
10859
|
+
advancedDisplayFields: ['codSaf', 'desSaf'],
|
|
10860
|
+
searchFields: [
|
|
10861
|
+
{ name: 'codSaf', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'string' },
|
|
10862
|
+
{ name: 'desSaf', label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
10863
|
+
],
|
|
10864
|
+
dependencies: [{ formControlName: 'company', apiField: 'e070emp.id' }],
|
|
10865
|
+
service: this.e113SafService,
|
|
10866
|
+
};
|
|
10867
|
+
}
|
|
10868
|
+
}
|
|
10869
|
+
|
|
10870
|
+
class AgroCurrencyLookup extends AgroLookupBase {
|
|
10871
|
+
e031MoeService;
|
|
10872
|
+
constructor(config) {
|
|
10873
|
+
super(config, { defaultFieldName: 'currency', defaultFilterFieldName: 'currency.id' });
|
|
10874
|
+
this.e031MoeService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroCurrencyLookup.name), 'entities/e031moe');
|
|
10875
|
+
}
|
|
10876
|
+
getLookupConfig() {
|
|
10877
|
+
return {
|
|
10878
|
+
labelKey: 'agro.angular_components.lookup_contract_product_currency',
|
|
10879
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_product_currency_search_title',
|
|
10880
|
+
lookupDisplayFields: ['codMoe', 'desMoe'],
|
|
10881
|
+
advancedDisplayFields: ['codMoe', 'desMoe', 'sigMoe'],
|
|
10882
|
+
searchFields: [
|
|
10883
|
+
{ name: 'codMoe', label: this.translate.instant('agro.angular_components.lookup_e_031_moe_cod_moe'), type: 'string' },
|
|
10884
|
+
{ name: 'desMoe', label: this.translate.instant('agro.angular_components.lookup_e_031_moe_des_moe'), type: 'string' },
|
|
10885
|
+
],
|
|
10886
|
+
service: this.e031MoeService,
|
|
10887
|
+
};
|
|
10888
|
+
}
|
|
10889
|
+
}
|
|
10890
|
+
|
|
10891
|
+
const LICENSE_PLATE_FIELD = 'balanceEntryControl.licensePlate';
|
|
10892
|
+
class AgroTicketLookup extends AgroLookupBase {
|
|
10893
|
+
ticketService;
|
|
10894
|
+
constructor(config) {
|
|
10895
|
+
super(config, { defaultFieldName: 'ticket', defaultFilterFieldName: 'ticket.id', defaultAutofill: false });
|
|
10896
|
+
this.ticketService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroTicketLookup.name), 'entities/ticket');
|
|
10897
|
+
}
|
|
10898
|
+
getLookupConfig() {
|
|
10899
|
+
return {
|
|
10900
|
+
labelKey: 'agro.angular_components.lookup_ticket',
|
|
10901
|
+
searchTitleKey: 'agro.angular_components.lookup_ticket_search_title',
|
|
10902
|
+
lookupDisplayFields: ['number', LICENSE_PLATE_FIELD],
|
|
10903
|
+
advancedDisplayFields: ['number', LICENSE_PLATE_FIELD],
|
|
10904
|
+
searchFields: [
|
|
10905
|
+
{ name: 'number', label: this.translate.instant('agro.angular_components.lookup_ticket'), type: 'integer', allowNegative: false, precision: 11, scale: 0 },
|
|
10906
|
+
{ name: LICENSE_PLATE_FIELD, label: this.translate.instant('agro.angular_components.lookup_license_plate'), type: 'string' },
|
|
10907
|
+
],
|
|
10908
|
+
service: this.ticketService,
|
|
10909
|
+
};
|
|
10910
|
+
}
|
|
10911
|
+
}
|
|
10912
|
+
|
|
10913
|
+
class AgroRomaneoLookup extends AgroLookupBase {
|
|
10914
|
+
ticketService;
|
|
10915
|
+
constructor(config) {
|
|
10916
|
+
super(config, { defaultFieldName: 'romaneo', defaultFilterFieldName: 'romaneo.id', defaultAutofill: false });
|
|
10917
|
+
this.ticketService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroRomaneoLookup.name), 'entities/ticket');
|
|
10918
|
+
}
|
|
10919
|
+
getLookupConfig() {
|
|
10920
|
+
return {
|
|
10921
|
+
labelKey: 'agro.angular_components.lookup_romaneo',
|
|
10922
|
+
searchTitleKey: 'agro.angular_components.lookup_romaneo_search_title',
|
|
10923
|
+
lookupDisplayFields: ['ticket.number', 'licensePlate'],
|
|
10924
|
+
advancedDisplayFields: ['ticket.number', 'licensePlate'],
|
|
10925
|
+
searchFields: [
|
|
10926
|
+
{ name: 'ticket.number', label: this.translate.instant('agro.angular_components.lookup_ticket'), type: 'integer', allowNegative: false, precision: 11, scale: 0 },
|
|
10927
|
+
{ name: 'licensePlate', label: this.translate.instant('agro.angular_components.lookup_license_plate'), type: 'string' },
|
|
10928
|
+
],
|
|
10929
|
+
service: this.ticketService,
|
|
10930
|
+
};
|
|
10931
|
+
}
|
|
10932
|
+
}
|
|
10933
|
+
|
|
10934
|
+
class AgroProductVarietyLookup extends AgroLookupBase {
|
|
10935
|
+
productVarietyService;
|
|
10936
|
+
constructor(config) {
|
|
10937
|
+
super(config, { defaultFieldName: 'productVariety', defaultFilterFieldName: 'productVariety.id', defaultAutofill: false });
|
|
10938
|
+
this.productVarietyService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroProductVarietyLookup.name), 'entities/productVariety');
|
|
10939
|
+
}
|
|
10940
|
+
getLookupConfig() {
|
|
10941
|
+
return {
|
|
10942
|
+
labelKey: 'agro.angular_components.lookup_product_variety',
|
|
10943
|
+
searchTitleKey: 'agro.angular_components.lookup_product_variety_search_title',
|
|
10944
|
+
lookupDisplayFields: ['variety.code', 'variety.description', 'royaltiesPercentage'],
|
|
10945
|
+
advancedDisplayFields: ['variety.code', 'variety.description', 'royaltiesPercentage'],
|
|
10946
|
+
searchFields: [
|
|
10947
|
+
{ name: 'variety.code', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'integer', allowNegative: false, precision: 11, scale: 0 },
|
|
10948
|
+
{ name: 'variety.description', label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
10949
|
+
{ name: 'royaltiesPercentage', label: this.translate.instant('agro.angular_components.lookup_royalties_percentage'), type: 'number' },
|
|
10950
|
+
],
|
|
10951
|
+
service: this.productVarietyService,
|
|
10952
|
+
};
|
|
10953
|
+
}
|
|
10954
|
+
}
|
|
10955
|
+
|
|
10956
|
+
class AgroRuralEstateLookup extends AgroLookupBase {
|
|
10957
|
+
ruralEstateService;
|
|
10958
|
+
constructor(config) {
|
|
10959
|
+
super(config, { defaultFieldName: 'ruralEstate', defaultFilterFieldName: 'ruralEstate.id' });
|
|
10960
|
+
this.ruralEstateService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroRuralEstateLookup.name), 'entities/ruralEstate');
|
|
10961
|
+
}
|
|
10962
|
+
getLookupConfig() {
|
|
10963
|
+
return {
|
|
10964
|
+
labelKey: 'agro.angular_components.lookup_contract_product_producer_rural_estate',
|
|
10965
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_product_producer_rural_estate_search_title',
|
|
10966
|
+
lookupDisplayFields: ['sequential', 'name'],
|
|
10967
|
+
advancedDisplayFields: ['sequential', 'name', 'ie'],
|
|
10968
|
+
searchFields: [
|
|
10969
|
+
{ name: 'sequential', label: this.translate.instant('agro.angular_components.lookup_rural_estate_sequential'), type: 'integer' },
|
|
10970
|
+
{ name: 'name', label: this.translate.instant('agro.angular_components.lookup_rural_estate_name'), type: 'string' },
|
|
10971
|
+
],
|
|
10972
|
+
dependencies: [{ formControlName: 'producer', apiField: 'producers.id' }],
|
|
10973
|
+
service: this.ruralEstateService,
|
|
10974
|
+
};
|
|
10975
|
+
}
|
|
10976
|
+
}
|
|
10977
|
+
|
|
10978
|
+
const INCREASE_COD_FIELD = 'increase.codInc';
|
|
10979
|
+
const INCREASE_DES_FIELD = 'increase.desInc';
|
|
10980
|
+
const INCREASE_VALUE_FIELD = 'valInc';
|
|
10981
|
+
class AgroIncreaseProductLookup extends AgroLookupBase {
|
|
10982
|
+
increaseProductService;
|
|
10983
|
+
constructor(config) {
|
|
10984
|
+
super(config, { defaultFieldName: 'increaseProduct', defaultFilterFieldName: 'increaseProduct.id' });
|
|
10985
|
+
this.increaseProductService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroIncreaseProductLookup.name), 'entities/increaseProduct');
|
|
10986
|
+
}
|
|
10987
|
+
getLookupConfig() {
|
|
10988
|
+
return {
|
|
10989
|
+
labelKey: 'agro.angular_components.lookup_contract_financial_increase',
|
|
10990
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_financial_increase_search_title',
|
|
10991
|
+
lookupDisplayFields: [INCREASE_COD_FIELD, INCREASE_DES_FIELD],
|
|
10992
|
+
advancedDisplayFields: [INCREASE_COD_FIELD, INCREASE_DES_FIELD, INCREASE_VALUE_FIELD],
|
|
10993
|
+
searchFields: [
|
|
10994
|
+
{ name: INCREASE_COD_FIELD, label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'string' },
|
|
10995
|
+
{ name: INCREASE_DES_FIELD, label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
10996
|
+
],
|
|
10997
|
+
dependencies: [
|
|
10998
|
+
{ formControlName: 'company', apiField: 'company.id' },
|
|
10999
|
+
{ formControlName: 'product', apiField: 'product.id' },
|
|
11000
|
+
],
|
|
11001
|
+
service: this.increaseProductService,
|
|
11002
|
+
};
|
|
11003
|
+
}
|
|
11004
|
+
}
|
|
11005
|
+
|
|
11006
|
+
class AgroFamilyGroupLookup extends AgroLookupBase {
|
|
11007
|
+
familyGroupService;
|
|
11008
|
+
constructor(config) {
|
|
11009
|
+
super(config, { defaultFieldName: 'familyGroup', defaultFilterFieldName: 'familyGroup.id', defaultAutofill: false });
|
|
11010
|
+
this.familyGroupService = new AgroLookupEntityService(resolveLookupHostProjectConfig(config, AgroFamilyGroupLookup.name), 'entities/familyGroup');
|
|
11011
|
+
}
|
|
11012
|
+
getLookupConfig() {
|
|
11013
|
+
return {
|
|
11014
|
+
labelKey: 'agro.angular_components.lookup_contract_family_group',
|
|
11015
|
+
searchTitleKey: 'agro.angular_components.lookup_contract_family_group_search_title',
|
|
11016
|
+
lookupDisplayFields: ['code', 'name'],
|
|
11017
|
+
advancedDisplayFields: ['code', 'name', 'status'],
|
|
11018
|
+
searchFields: [
|
|
11019
|
+
{ name: 'code', label: this.translate.instant('agro.angular_components.lookup_label_code'), type: 'integer' },
|
|
11020
|
+
{ name: 'name', label: this.translate.instant('agro.angular_components.lookup_label_description'), type: 'string' },
|
|
11021
|
+
],
|
|
11022
|
+
dependencies: [{ formControlName: 'producer', apiField: 'producers.id' }],
|
|
11023
|
+
service: this.familyGroupService,
|
|
11024
|
+
};
|
|
11025
|
+
}
|
|
11026
|
+
}
|
|
11027
|
+
|
|
11028
|
+
const LIB_CONFIG = new InjectionToken('AgroAngularComponentsConfig');
|
|
11029
|
+
|
|
11030
|
+
class AgroLookupE070EmpService extends AgroLookupEntityService {
|
|
11031
|
+
http;
|
|
11032
|
+
messageService;
|
|
11033
|
+
translate;
|
|
11034
|
+
constructor(http, messageService, translate, config) {
|
|
11035
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE070EmpService');
|
|
11036
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e070emp`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11037
|
+
this.http = http;
|
|
11038
|
+
this.messageService = messageService;
|
|
11039
|
+
this.translate = translate;
|
|
11040
|
+
}
|
|
11041
|
+
listExternalE070Emp(listParams) {
|
|
11042
|
+
return this.http
|
|
11043
|
+
.get('erpx_fnd/empresa/entities/e070emp', {
|
|
11044
|
+
params: this.getListQueryParams(listParams),
|
|
11045
|
+
})
|
|
11046
|
+
.pipe(this.defaultCatch());
|
|
11047
|
+
}
|
|
11048
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE070EmpService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11049
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE070EmpService, providedIn: 'root' });
|
|
11050
|
+
}
|
|
11051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE070EmpService, decorators: [{
|
|
11052
|
+
type: Injectable,
|
|
11053
|
+
args: [{
|
|
11054
|
+
providedIn: 'root',
|
|
11055
|
+
}]
|
|
11056
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11057
|
+
type: Optional
|
|
11058
|
+
}, {
|
|
11059
|
+
type: Inject,
|
|
11060
|
+
args: [LIB_CONFIG]
|
|
11061
|
+
}] }] });
|
|
11062
|
+
|
|
11063
|
+
class AgroLookupE070FilService extends AgroLookupEntityService {
|
|
11064
|
+
http;
|
|
11065
|
+
messageService;
|
|
11066
|
+
translate;
|
|
11067
|
+
constructor(http, messageService, translate, config) {
|
|
11068
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE070FilService');
|
|
11069
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e070fil`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11070
|
+
this.http = http;
|
|
11071
|
+
this.messageService = messageService;
|
|
11072
|
+
this.translate = translate;
|
|
11073
|
+
}
|
|
11074
|
+
listExternalE070Fil(listParams) {
|
|
11075
|
+
return this.http
|
|
11076
|
+
.get('erpx_fnd/empresa/entities/e070fil', {
|
|
11077
|
+
params: this.getListQueryParams(listParams),
|
|
11078
|
+
})
|
|
11079
|
+
.pipe(this.defaultCatch());
|
|
11080
|
+
}
|
|
11081
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE070FilService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11082
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE070FilService, providedIn: 'root' });
|
|
11083
|
+
}
|
|
11084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE070FilService, decorators: [{
|
|
11085
|
+
type: Injectable,
|
|
11086
|
+
args: [{
|
|
11087
|
+
providedIn: 'root',
|
|
11088
|
+
}]
|
|
11089
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11090
|
+
type: Optional
|
|
11091
|
+
}, {
|
|
11092
|
+
type: Inject,
|
|
11093
|
+
args: [LIB_CONFIG]
|
|
11094
|
+
}] }] });
|
|
11095
|
+
|
|
11096
|
+
class AgroLookupE075DerService extends AgroLookupEntityService {
|
|
11097
|
+
http;
|
|
11098
|
+
messageService;
|
|
11099
|
+
translate;
|
|
11100
|
+
constructor(http, messageService, translate, config) {
|
|
11101
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE075DerService');
|
|
11102
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e075der`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11103
|
+
this.http = http;
|
|
11104
|
+
this.messageService = messageService;
|
|
11105
|
+
this.translate = translate;
|
|
11106
|
+
}
|
|
11107
|
+
listExternalE075Der(listParams) {
|
|
11108
|
+
return this.http
|
|
11109
|
+
.get('erpx_fnd/produto/entities/e075der', {
|
|
11110
|
+
params: this.getListQueryParams(listParams),
|
|
11111
|
+
})
|
|
11112
|
+
.pipe(this.defaultCatch());
|
|
11113
|
+
}
|
|
11114
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE075DerService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11115
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE075DerService, providedIn: 'root' });
|
|
11116
|
+
}
|
|
11117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE075DerService, decorators: [{
|
|
11118
|
+
type: Injectable,
|
|
11119
|
+
args: [{
|
|
11120
|
+
providedIn: 'root',
|
|
11121
|
+
}]
|
|
11122
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11123
|
+
type: Optional
|
|
11124
|
+
}, {
|
|
11125
|
+
type: Inject,
|
|
11126
|
+
args: [LIB_CONFIG]
|
|
11127
|
+
}] }] });
|
|
11128
|
+
|
|
11129
|
+
class AgroLookupE001PesService extends AgroLookupEntityService {
|
|
11130
|
+
http;
|
|
11131
|
+
messageService;
|
|
11132
|
+
translate;
|
|
11133
|
+
constructor(http, messageService, translate, config) {
|
|
11134
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE001PesService');
|
|
11135
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e001pes`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11136
|
+
this.http = http;
|
|
11137
|
+
this.messageService = messageService;
|
|
11138
|
+
this.translate = translate;
|
|
11139
|
+
}
|
|
11140
|
+
listExternalE001Pes(listParams) {
|
|
11141
|
+
return this.http
|
|
11142
|
+
.get('erpx_fnd/pessoa/entities/e001pes', {
|
|
11143
|
+
params: this.getListQueryParams(listParams),
|
|
11144
|
+
})
|
|
11145
|
+
.pipe(this.defaultCatch());
|
|
11146
|
+
}
|
|
11147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE001PesService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11148
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE001PesService, providedIn: 'root' });
|
|
11149
|
+
}
|
|
11150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE001PesService, decorators: [{
|
|
11151
|
+
type: Injectable,
|
|
11152
|
+
args: [{
|
|
11153
|
+
providedIn: 'root',
|
|
11154
|
+
}]
|
|
11155
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11156
|
+
type: Optional
|
|
11157
|
+
}, {
|
|
11158
|
+
type: Inject,
|
|
11159
|
+
args: [LIB_CONFIG]
|
|
11160
|
+
}] }] });
|
|
11161
|
+
|
|
11162
|
+
class AgroLookupE095PesService extends AgroLookupEntityService {
|
|
11163
|
+
http;
|
|
11164
|
+
messageService;
|
|
11165
|
+
translate;
|
|
11166
|
+
constructor(http, messageService, translate, config) {
|
|
11167
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE095PesService');
|
|
11168
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e095pes`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11169
|
+
this.http = http;
|
|
11170
|
+
this.messageService = messageService;
|
|
11171
|
+
this.translate = translate;
|
|
11172
|
+
}
|
|
11173
|
+
listExternalE095Pes(listParams) {
|
|
11174
|
+
return this.http
|
|
11175
|
+
.get('erpx_fnd/pessoa/entities/e095pes', {
|
|
11176
|
+
params: this.getListQueryParams(listParams),
|
|
11177
|
+
})
|
|
11178
|
+
.pipe(this.defaultCatch());
|
|
11179
|
+
}
|
|
11180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE095PesService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11181
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE095PesService, providedIn: 'root' });
|
|
11182
|
+
}
|
|
11183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE095PesService, decorators: [{
|
|
11184
|
+
type: Injectable,
|
|
11185
|
+
args: [{
|
|
11186
|
+
providedIn: 'root',
|
|
11187
|
+
}]
|
|
11188
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11189
|
+
type: Optional
|
|
11190
|
+
}, {
|
|
11191
|
+
type: Inject,
|
|
11192
|
+
args: [LIB_CONFIG]
|
|
11193
|
+
}] }] });
|
|
11194
|
+
|
|
11195
|
+
class AgroLookupE012FamService extends AgroLookupEntityService {
|
|
11196
|
+
http;
|
|
11197
|
+
messageService;
|
|
11198
|
+
translate;
|
|
11199
|
+
constructor(http, messageService, translate, config) {
|
|
11200
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE012FamService');
|
|
11201
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e012fam`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11202
|
+
this.http = http;
|
|
11203
|
+
this.messageService = messageService;
|
|
11204
|
+
this.translate = translate;
|
|
11205
|
+
}
|
|
11206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE012FamService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11207
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE012FamService, providedIn: 'root' });
|
|
11208
|
+
}
|
|
11209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE012FamService, decorators: [{
|
|
11210
|
+
type: Injectable,
|
|
11211
|
+
args: [{
|
|
11212
|
+
providedIn: 'root',
|
|
11213
|
+
}]
|
|
11214
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11215
|
+
type: Optional
|
|
11216
|
+
}, {
|
|
11217
|
+
type: Inject,
|
|
11218
|
+
args: [LIB_CONFIG]
|
|
11219
|
+
}] }] });
|
|
11220
|
+
|
|
11221
|
+
class AgroLookupE113SafService extends AgroLookupEntityService {
|
|
11222
|
+
http;
|
|
11223
|
+
messageService;
|
|
11224
|
+
translate;
|
|
11225
|
+
constructor(http, messageService, translate, config) {
|
|
11226
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE113SafService');
|
|
11227
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e113saf`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11228
|
+
this.http = http;
|
|
11229
|
+
this.messageService = messageService;
|
|
11230
|
+
this.translate = translate;
|
|
11231
|
+
}
|
|
11232
|
+
listExternalE113Saf(listParams) {
|
|
11233
|
+
return this.http
|
|
11234
|
+
.get('agro/harvest/entities/e113saf', {
|
|
11235
|
+
params: this.getListQueryParams(listParams),
|
|
11236
|
+
})
|
|
11237
|
+
.pipe(this.defaultCatch());
|
|
11238
|
+
}
|
|
11239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE113SafService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11240
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE113SafService, providedIn: 'root' });
|
|
11241
|
+
}
|
|
11242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE113SafService, decorators: [{
|
|
11243
|
+
type: Injectable,
|
|
11244
|
+
args: [{
|
|
11245
|
+
providedIn: 'root',
|
|
11246
|
+
}]
|
|
11247
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11248
|
+
type: Optional
|
|
11249
|
+
}, {
|
|
11250
|
+
type: Inject,
|
|
11251
|
+
args: [LIB_CONFIG]
|
|
11252
|
+
}] }] });
|
|
11253
|
+
|
|
11254
|
+
class AgroLookupE031MoeService extends AgroLookupEntityService {
|
|
11255
|
+
http;
|
|
11256
|
+
messageService;
|
|
11257
|
+
translate;
|
|
11258
|
+
constructor(http, messageService, translate, config) {
|
|
11259
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE031MoeService');
|
|
11260
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e031moe`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11261
|
+
this.http = http;
|
|
11262
|
+
this.messageService = messageService;
|
|
11263
|
+
this.translate = translate;
|
|
11264
|
+
}
|
|
11265
|
+
listExternalE031Moe(listParams) {
|
|
11266
|
+
return this.http
|
|
11267
|
+
.get('erpx_fnd/financeiro/entities/e031moe', {
|
|
11268
|
+
params: this.getListQueryParams(listParams),
|
|
11269
|
+
})
|
|
11270
|
+
.pipe(this.defaultCatch());
|
|
11271
|
+
}
|
|
11272
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE031MoeService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11273
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE031MoeService, providedIn: 'root' });
|
|
11274
|
+
}
|
|
11275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE031MoeService, decorators: [{
|
|
11276
|
+
type: Injectable,
|
|
11277
|
+
args: [{
|
|
11278
|
+
providedIn: 'root',
|
|
11279
|
+
}]
|
|
11280
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11281
|
+
type: Optional
|
|
11282
|
+
}, {
|
|
11283
|
+
type: Inject,
|
|
11284
|
+
args: [LIB_CONFIG]
|
|
11285
|
+
}] }] });
|
|
11286
|
+
|
|
11287
|
+
class AgroLookupDriverService extends AgroLookupEntityService {
|
|
11288
|
+
http;
|
|
11289
|
+
messageService;
|
|
11290
|
+
translate;
|
|
11291
|
+
constructor(http, messageService, translate, config) {
|
|
11292
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupDriverService');
|
|
11293
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/driver`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11294
|
+
this.http = http;
|
|
11295
|
+
this.messageService = messageService;
|
|
11296
|
+
this.translate = translate;
|
|
11297
|
+
}
|
|
11298
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupDriverService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11299
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupDriverService, providedIn: 'root' });
|
|
11300
|
+
}
|
|
11301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupDriverService, decorators: [{
|
|
11302
|
+
type: Injectable,
|
|
11303
|
+
args: [{
|
|
11304
|
+
providedIn: 'root',
|
|
11305
|
+
}]
|
|
11306
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11307
|
+
type: Optional
|
|
11308
|
+
}, {
|
|
11309
|
+
type: Inject,
|
|
11310
|
+
args: [LIB_CONFIG]
|
|
11311
|
+
}] }] });
|
|
11312
|
+
|
|
11313
|
+
class AgroLookupE205DepService extends AgroLookupEntityService {
|
|
11314
|
+
http;
|
|
11315
|
+
messageService;
|
|
11316
|
+
translate;
|
|
11317
|
+
constructor(http, messageService, translate, config) {
|
|
11318
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE205DepService');
|
|
11319
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e205dep`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11320
|
+
this.http = http;
|
|
11321
|
+
this.messageService = messageService;
|
|
11322
|
+
this.translate = translate;
|
|
11323
|
+
}
|
|
11324
|
+
listExternalE205Dep(listParams) {
|
|
11325
|
+
return this.http
|
|
11326
|
+
.get('erpx_sup/foundation/entities/e205dep', {
|
|
11327
|
+
params: this.getListQueryParams(listParams),
|
|
11328
|
+
})
|
|
11329
|
+
.pipe(this.defaultCatch());
|
|
11330
|
+
}
|
|
11331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE205DepService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11332
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE205DepService, providedIn: 'root' });
|
|
11333
|
+
}
|
|
11334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE205DepService, decorators: [{
|
|
11335
|
+
type: Injectable,
|
|
11336
|
+
args: [{
|
|
11337
|
+
providedIn: 'root',
|
|
11338
|
+
}]
|
|
11339
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11340
|
+
type: Optional
|
|
11341
|
+
}, {
|
|
11342
|
+
type: Inject,
|
|
11343
|
+
args: [LIB_CONFIG]
|
|
11344
|
+
}] }] });
|
|
11345
|
+
|
|
11346
|
+
class AgroLookupE210DxpService extends AgroLookupEntityService {
|
|
11347
|
+
http;
|
|
11348
|
+
messageService;
|
|
11349
|
+
translate;
|
|
11350
|
+
constructor(http, messageService, translate, config) {
|
|
11351
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupE210DxpService');
|
|
11352
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/e210dxp`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11353
|
+
this.http = http;
|
|
11354
|
+
this.messageService = messageService;
|
|
11355
|
+
this.translate = translate;
|
|
11356
|
+
}
|
|
11357
|
+
listExternalE210Dxp(listParams) {
|
|
11358
|
+
return this.http
|
|
11359
|
+
.get('erpx_sup/foundation/entities/e210dxp', {
|
|
11360
|
+
params: this.getListQueryParams(listParams),
|
|
11361
|
+
})
|
|
11362
|
+
.pipe(this.defaultCatch());
|
|
11363
|
+
}
|
|
11364
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE210DxpService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11365
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE210DxpService, providedIn: 'root' });
|
|
11366
|
+
}
|
|
11367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupE210DxpService, decorators: [{
|
|
11368
|
+
type: Injectable,
|
|
11369
|
+
args: [{
|
|
11370
|
+
providedIn: 'root',
|
|
11371
|
+
}]
|
|
11372
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11373
|
+
type: Optional
|
|
11374
|
+
}, {
|
|
11375
|
+
type: Inject,
|
|
11376
|
+
args: [LIB_CONFIG]
|
|
11377
|
+
}] }] });
|
|
11378
|
+
|
|
11379
|
+
class AgroLookupTicketService extends AgroLookupEntityService {
|
|
11380
|
+
http;
|
|
11381
|
+
messageService;
|
|
11382
|
+
translate;
|
|
11383
|
+
constructor(http, messageService, translate, config) {
|
|
11384
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupTicketService');
|
|
11385
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/ticket`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11386
|
+
this.http = http;
|
|
11387
|
+
this.messageService = messageService;
|
|
11388
|
+
this.translate = translate;
|
|
11389
|
+
}
|
|
11390
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupTicketService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11391
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupTicketService, providedIn: 'root' });
|
|
11392
|
+
}
|
|
11393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupTicketService, decorators: [{
|
|
11394
|
+
type: Injectable,
|
|
11395
|
+
args: [{
|
|
11396
|
+
providedIn: 'root',
|
|
11397
|
+
}]
|
|
11398
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11399
|
+
type: Optional
|
|
11400
|
+
}, {
|
|
11401
|
+
type: Inject,
|
|
11402
|
+
args: [LIB_CONFIG]
|
|
11403
|
+
}] }] });
|
|
11404
|
+
|
|
11405
|
+
class AgroLookupProductVarietyService extends AgroLookupEntityService {
|
|
11406
|
+
http;
|
|
11407
|
+
messageService;
|
|
11408
|
+
translate;
|
|
11409
|
+
constructor(http, messageService, translate, config) {
|
|
11410
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupProductVarietyService');
|
|
11411
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/productVariety`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11412
|
+
this.http = http;
|
|
11413
|
+
this.messageService = messageService;
|
|
11414
|
+
this.translate = translate;
|
|
11415
|
+
}
|
|
11416
|
+
listExternalProductVariety(listParams) {
|
|
11417
|
+
return this.http
|
|
11418
|
+
.get('erpx_fnd/variety_royalties/entities/productVariety', {
|
|
11419
|
+
params: this.getListQueryParams(listParams),
|
|
11420
|
+
})
|
|
11421
|
+
.pipe(this.defaultCatch());
|
|
11422
|
+
}
|
|
11423
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupProductVarietyService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11424
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupProductVarietyService, providedIn: 'root' });
|
|
11425
|
+
}
|
|
11426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupProductVarietyService, decorators: [{
|
|
11427
|
+
type: Injectable,
|
|
11428
|
+
args: [{
|
|
11429
|
+
providedIn: 'root',
|
|
11430
|
+
}]
|
|
11431
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11432
|
+
type: Optional
|
|
11433
|
+
}, {
|
|
11434
|
+
type: Inject,
|
|
11435
|
+
args: [LIB_CONFIG]
|
|
11436
|
+
}] }] });
|
|
11437
|
+
|
|
11438
|
+
class AgroLookupRuralEstateService extends AgroLookupEntityService {
|
|
11439
|
+
http;
|
|
11440
|
+
messageService;
|
|
11441
|
+
translate;
|
|
11442
|
+
constructor(http, messageService, translate, config) {
|
|
11443
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupRuralEstateService');
|
|
11444
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/ruralEstate`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11445
|
+
this.http = http;
|
|
11446
|
+
this.messageService = messageService;
|
|
11447
|
+
this.translate = translate;
|
|
11448
|
+
}
|
|
11449
|
+
listExternalRuralEstate(listParams) {
|
|
11450
|
+
return this.http
|
|
11451
|
+
.get('agro/database/entities/ruralEstate', {
|
|
11452
|
+
params: this.getListQueryParams(listParams),
|
|
11453
|
+
})
|
|
11454
|
+
.pipe(this.defaultCatch());
|
|
11455
|
+
}
|
|
11456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupRuralEstateService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11457
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupRuralEstateService, providedIn: 'root' });
|
|
11458
|
+
}
|
|
11459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupRuralEstateService, decorators: [{
|
|
11460
|
+
type: Injectable,
|
|
11461
|
+
args: [{
|
|
11462
|
+
providedIn: 'root',
|
|
11463
|
+
}]
|
|
11464
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11465
|
+
type: Optional
|
|
11466
|
+
}, {
|
|
11467
|
+
type: Inject,
|
|
11468
|
+
args: [LIB_CONFIG]
|
|
11469
|
+
}] }] });
|
|
11470
|
+
|
|
11471
|
+
class AgroLookupIncreaseProductService extends AgroLookupEntityService {
|
|
11472
|
+
http;
|
|
11473
|
+
messageService;
|
|
11474
|
+
translate;
|
|
11475
|
+
constructor(http, messageService, translate, config) {
|
|
11476
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupIncreaseProductService');
|
|
11477
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/increaseProduct`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11478
|
+
this.http = http;
|
|
11479
|
+
this.messageService = messageService;
|
|
11480
|
+
this.translate = translate;
|
|
11481
|
+
}
|
|
11482
|
+
listExternalIncreaseProduct(listParams) {
|
|
11483
|
+
return this.http
|
|
11484
|
+
.get('erpx_fnd/financial_increase/entities/increaseProduct', {
|
|
11485
|
+
params: this.getListQueryParams(listParams),
|
|
11486
|
+
})
|
|
11487
|
+
.pipe(this.defaultCatch());
|
|
11488
|
+
}
|
|
11489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupIncreaseProductService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11490
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupIncreaseProductService, providedIn: 'root' });
|
|
11491
|
+
}
|
|
11492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupIncreaseProductService, decorators: [{
|
|
11493
|
+
type: Injectable,
|
|
11494
|
+
args: [{
|
|
11495
|
+
providedIn: 'root',
|
|
11496
|
+
}]
|
|
11497
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11498
|
+
type: Optional
|
|
11499
|
+
}, {
|
|
11500
|
+
type: Inject,
|
|
11501
|
+
args: [LIB_CONFIG]
|
|
11502
|
+
}] }] });
|
|
11503
|
+
|
|
11504
|
+
class AgroLookupFamilyGroupService extends AgroLookupEntityService {
|
|
11505
|
+
http;
|
|
11506
|
+
messageService;
|
|
11507
|
+
translate;
|
|
11508
|
+
constructor(http, messageService, translate, config) {
|
|
11509
|
+
const resolved = resolveLookupHostProjectConfig(config, 'AgroLookupFamilyGroupService');
|
|
11510
|
+
super(http, messageService, `${resolved.domain}/${resolved.service}/entities/familyGroup`, `${resolved.domain}/${resolved.service}/actions`, translate);
|
|
11511
|
+
this.http = http;
|
|
11512
|
+
this.messageService = messageService;
|
|
11513
|
+
this.translate = translate;
|
|
11514
|
+
}
|
|
11515
|
+
listExternalFamilyGroup(listParams) {
|
|
11516
|
+
return this.http
|
|
11517
|
+
.get('erpx_fnd/family_group/entities/familyGroup', {
|
|
11518
|
+
params: this.getListQueryParams(listParams),
|
|
11519
|
+
})
|
|
11520
|
+
.pipe(this.defaultCatch());
|
|
11521
|
+
}
|
|
11522
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupFamilyGroupService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }, { token: LIB_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11523
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupFamilyGroupService, providedIn: 'root' });
|
|
11524
|
+
}
|
|
11525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroLookupFamilyGroupService, decorators: [{
|
|
11526
|
+
type: Injectable,
|
|
11527
|
+
args: [{
|
|
11528
|
+
providedIn: 'root',
|
|
11529
|
+
}]
|
|
11530
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }, { type: undefined, decorators: [{
|
|
11531
|
+
type: Optional
|
|
11532
|
+
}, {
|
|
11533
|
+
type: Inject,
|
|
11534
|
+
args: [LIB_CONFIG]
|
|
11535
|
+
}] }] });
|
|
11536
|
+
|
|
9513
11537
|
class AgroAngularComponentsModule {
|
|
9514
11538
|
static forRoot(config) {
|
|
9515
11539
|
return {
|
|
@@ -9524,11 +11548,25 @@ class AgroAngularComponentsModule {
|
|
|
9524
11548
|
}
|
|
9525
11549
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroAngularComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9526
11550
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: AgroAngularComponentsModule });
|
|
9527
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroAngularComponentsModule
|
|
11551
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroAngularComponentsModule, providers: [
|
|
11552
|
+
{
|
|
11553
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
11554
|
+
multi: true,
|
|
11555
|
+
useValue: () => registerLookupRuntimeInjector(inject(Injector)),
|
|
11556
|
+
}
|
|
11557
|
+
] });
|
|
9528
11558
|
}
|
|
9529
11559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroAngularComponentsModule, decorators: [{
|
|
9530
11560
|
type: NgModule,
|
|
9531
|
-
args: [{
|
|
11561
|
+
args: [{
|
|
11562
|
+
providers: [
|
|
11563
|
+
{
|
|
11564
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
11565
|
+
multi: true,
|
|
11566
|
+
useValue: () => registerLookupRuntimeInjector(inject(Injector)),
|
|
11567
|
+
}
|
|
11568
|
+
]
|
|
11569
|
+
}]
|
|
9532
11570
|
}] });
|
|
9533
11571
|
|
|
9534
11572
|
// Main entry point - exports everything organized by category
|
|
@@ -9537,5 +11575,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
9537
11575
|
* Generated bundle index. Do not edit.
|
|
9538
11576
|
*/
|
|
9539
11577
|
|
|
9540
|
-
export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroCookieUtils, AgroDateUtils, AgroEntityStatus, AgroFinancialService, AgroFormValidator, AgroInvoiceModule, AgroInvoiceService, AgroLogics, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroStringMasks, AgroStringUtils, AgroUnitConverter, AgroWorkspaceComponent, AgroWorkspaceModule, AgroWorkspaceSwitchService, AsyncLock, CancelEventDialogComponent, CancelEventDialogModule, CnpjCpfPipe, CnpjCpfPipeModule, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule$1 as E070EmpModule, E070FilModule$1 as E070FilModule, E075DerModule, E205depService, EDLQueryBuilder, EventControlBoardComponent, EventControlBoardModule, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FinancialTitleTableComponent, FinancialTitleTableModule, FixationModule, HttpCodes, InvoiceModule, KilogramModule, KilogramPipe, LIB_CONFIG, LibTranslatePipe, LibTranslationModule, LibTranslationService, ModalBeautyEventsComponent, ModalBeautyEventsService, ModalInvoicePjForContractsComponent, ModalInvoicePjForContractsModule, ModalInvoicePjForFixationComponent, ModalInvoicePjForFixationModule, ModalInvoicePjForOriginationComponent, ModalInvoicePjForOriginationModule, ModalInvoicePjForTransferComponent, ModalInvoicePjForTransferModule, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerListModalComponent, ProducerListModalModule, ProducerListModalService, RuralEstateModule, SharedModule, StatusType, StringifierPipe, StringifierPipeModule, TelephonePipe, TelephonePipeModule, TicketModule, TransferModule, TypeAccount, UnitOfMeasurement, UserInformationService, WebsocketModule, WebsocketService };
|
|
11578
|
+
export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroBaseLookupField, AgroBranchLookup, AgroCompanyLookup, AgroCookieUtils, AgroCurrencyLookup, AgroDateUtils, AgroDepositBalanceLookup, AgroDepositLookup, AgroDriverLookup, AgroE095PesLookup, AgroEntityStatus, AgroFamilyGroupLookup, AgroFamilyLookup, AgroFinancialService, AgroFormValidator, AgroHarvestLookup, AgroIncreaseProductLookup, AgroInvoiceModule, AgroInvoiceService, AgroLogics, AgroLookupBase, AgroLookupDriverService, AgroLookupE001PesService, AgroLookupE012FamService, AgroLookupE031MoeService, AgroLookupE070EmpService, AgroLookupE070FilService, AgroLookupE075DerService, AgroLookupE095PesService, AgroLookupE113SafService, AgroLookupE205DepService, AgroLookupE210DxpService, AgroLookupEntityService, AgroLookupFamilyGroupService, AgroLookupIncreaseProductService, AgroLookupProductVarietyService, AgroLookupRuralEstateService, AgroLookupTicketService, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroProducerLookup, AgroProductLookup, AgroProductVarietyLookup, AgroRomaneoLookup, AgroRuralEstateLookup, AgroStringMasks, AgroStringUtils, AgroTicketLookup, AgroUnitConverter, AgroWorkspaceComponent, AgroWorkspaceModule, AgroWorkspaceSwitchService, AsyncLock, CancelEventDialogComponent, CancelEventDialogModule, CnpjCpfPipe, CnpjCpfPipeModule, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule$1 as E070EmpModule, E070FilModule$1 as E070FilModule, E075DerModule, E205depService, EDLQueryBuilder, EventControlBoardComponent, EventControlBoardModule, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FinancialTitleTableComponent, FinancialTitleTableModule, FixationModule, HttpCodes, InvoiceModule, KilogramModule, KilogramPipe, LIB_CONFIG, LibTranslatePipe, LibTranslationModule, LibTranslationService, ModalBeautyEventsComponent, ModalBeautyEventsService, ModalInvoicePjForContractsComponent, ModalInvoicePjForContractsModule, ModalInvoicePjForFixationComponent, ModalInvoicePjForFixationModule, ModalInvoicePjForOriginationComponent, ModalInvoicePjForOriginationModule, ModalInvoicePjForTransferComponent, ModalInvoicePjForTransferModule, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerListModalComponent, ProducerListModalModule, ProducerListModalService, RuralEstateModule, SharedModule, StatusType, StringifierPipe, StringifierPipeModule, TelephonePipe, TelephonePipeModule, TicketModule, TransferModule, TypeAccount, UnitOfMeasurement, UserInformationService, WebsocketModule, WebsocketService, adjustValuesIfNecessary, applyRelationTransforms, calculateAdjustedPercentages, calculateAdjustedPercentagesAndWeights, calculateAdjustedWeights, convertValueByType, createFilterString, createFilterTokens, createGenericOnBlur, createGenericOnLookupRequest, createGenericOnSearchRequest, formatBrlCurrency, formatCPFCNPJWithMask, formatFilters, formatFiltersAdvanced, formatFiltersWithoutStatus, getEnumQuery, getLabelValueRequest, getProp, getSuggestionValue, getTypeInformation, isValidFilter, mergeUnique, resolveLookupHostProjectConfig, resolveRefs, roundToThree };
|
|
9541
11579
|
//# sourceMappingURL=senior-agronegocio-angular-components.mjs.map
|