@orbe-agro/client-core 5.6.71 → 5.6.82
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/dist/@ecme/services/axios/AxiosRequestIntrceptorConfigCallback.js +12 -0
- package/dist/@ecme/services/axios/AxiosRequestIntrceptorConfigCallback.js.map +1 -1
- package/dist/@types/@ecme/services/axios/AxiosRequestIntrceptorConfigCallback.d.ts.map +1 -1
- package/dist/@types/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.d.ts +1 -0
- package/dist/@types/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.d.ts.map +1 -1
- package/dist/@types/base/@types/models/agendamento/agendamento.d.ts +197 -0
- package/dist/@types/base/@types/models/agendamento/agendamento.d.ts.map +1 -0
- package/dist/@types/base/@types/models/agendamento/contratoVenda.d.ts +118 -0
- package/dist/@types/base/@types/models/agendamento/contratoVenda.d.ts.map +1 -0
- package/dist/@types/base/@types/models/agendamento/janela.d.ts +39 -0
- package/dist/@types/base/@types/models/agendamento/janela.d.ts.map +1 -0
- package/dist/@types/base/@types/models/agendamento/listaEmbarque.d.ts +62 -0
- package/dist/@types/base/@types/models/agendamento/listaEmbarque.d.ts.map +1 -0
- package/dist/@types/base/@types/models/agendamento/local.d.ts +66 -0
- package/dist/@types/base/@types/models/agendamento/local.d.ts.map +1 -0
- package/dist/@types/base/@types/models/agendamento/motivoCancelamento.d.ts +15 -0
- package/dist/@types/base/@types/models/agendamento/motivoCancelamento.d.ts.map +1 -0
- package/dist/@types/base/@types/models/agendamento/restricao.d.ts +38 -0
- package/dist/@types/base/@types/models/agendamento/restricao.d.ts.map +1 -0
- package/dist/@types/base/@types/models/ativos/{AnexoComponente.d.ts → anexoComponente.d.ts} +1 -1
- package/dist/@types/base/@types/models/ativos/{AnexoComponente.d.ts.map → anexoComponente.d.ts.map} +1 -1
- package/dist/@types/base/@types/models/ativos/ativo.d.ts +34 -0
- package/dist/@types/base/@types/models/ativos/ativo.d.ts.map +1 -0
- package/dist/@types/base/@types/models/ativos/documentacao.d.ts +57 -0
- package/dist/@types/base/@types/models/ativos/documentacao.d.ts.map +1 -0
- package/dist/@types/base/@types/models/ativos/formularioCampos.d.ts +22 -0
- package/dist/@types/base/@types/models/ativos/formularioCampos.d.ts.map +1 -0
- package/dist/@types/base/@types/models/ativos/index.d.ts +22 -0
- package/dist/@types/base/@types/models/ativos/index.d.ts.map +1 -0
- package/dist/@types/base/@types/models/ativos/sistemaOperacional.d.ts +1 -1
- package/dist/@types/base/@types/models/ativos/software.d.ts +1 -1
- package/dist/@types/base/@types/models/ativos/versaoMSOffice.d.ts +1 -1
- package/dist/@types/base/@types/models/index.d.ts +1 -0
- package/dist/@types/base/@types/models/index.d.ts.map +1 -1
- package/dist/@types/base/@types/models/transportadora/contratoFrete.d.ts +1 -0
- package/dist/@types/base/@types/models/transportadora/contratoFrete.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/agendamento/agendamento.d.ts +57 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/agendamento.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/agendamento/config/agendamentoCrud.d.ts +22 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/agendamentoCrud.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/contratoVenda.d.ts +11 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/contratoVenda.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/listaEmbarque.d.ts +6 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/listaEmbarque.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/local.d.ts +11 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/local.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/motivoCancelamento.d.ts +9 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/motivoCancelamento.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/restricao.d.ts +10 -0
- package/dist/@types/base/configs/endpoints.config/agendamento/config/restricao.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/ativos/ativos.d.ts +70 -0
- package/dist/@types/base/configs/endpoints.config/ativos/ativos.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/ativos/config/ativo.d.ts +28 -0
- package/dist/@types/base/configs/endpoints.config/ativos/config/ativo.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/ativos/config/documentacao.d.ts +24 -0
- package/dist/@types/base/configs/endpoints.config/ativos/config/documentacao.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/ativos/config/formularioCampos.d.ts +24 -0
- package/dist/@types/base/configs/endpoints.config/ativos/config/formularioCampos.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +129 -13
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/flux/config/grupoAtendimento.d.ts +1 -0
- package/dist/@types/base/configs/endpoints.config/flux/config/grupoAtendimento.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/flux/flux.d.ts +1 -0
- package/dist/@types/base/configs/endpoints.config/flux/flux.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/insumos/config/vendas.d.ts +1 -13
- package/dist/@types/base/configs/endpoints.config/insumos/config/vendas.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/insumos/insumos.d.ts +1 -13
- package/dist/@types/base/configs/endpoints.config/insumos/insumos.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/modules.submenu/ativos/contratos/submenu.contratos.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/modules.submenu/ativos/contratos/submenu.contratos.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/ativos.submenu.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/submenu/ativos/cadastros.submenu.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/submenu/ativos/config/ativo.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/config/ativo.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/config/documentacao.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/config/documentacao.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/config/formularioCampos.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/config/formularioCampos.submenu.d.ts.map +1 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/contratos.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/contratos.submenu.d.ts.map +1 -0
- package/dist/@types/base/hooks/dm/businessPartner/useBusinessPartnerFindMonitorFornecedorList.d.ts +3 -1
- package/dist/@types/base/hooks/dm/businessPartner/useBusinessPartnerFindMonitorFornecedorList.d.ts.map +1 -1
- package/dist/@types/base/services/http.d.ts +25 -0
- package/dist/@types/base/services/http.d.ts.map +1 -0
- package/dist/@types/base/services/index.d.ts +1 -0
- package/dist/@types/base/services/index.d.ts.map +1 -1
- package/dist/@types/base/services/modules/agendamento/AgendamentoService.d.ts +32 -0
- package/dist/@types/base/services/modules/agendamento/AgendamentoService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/agendamento/ContratoVendaService.d.ts +18 -0
- package/dist/@types/base/services/modules/agendamento/ContratoVendaService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/agendamento/ListaEmbarqueService.d.ts +5 -0
- package/dist/@types/base/services/modules/agendamento/ListaEmbarqueService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/agendamento/LocalService.d.ts +11 -0
- package/dist/@types/base/services/modules/agendamento/LocalService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/agendamento/MotivoCancelamentoService.d.ts +10 -0
- package/dist/@types/base/services/modules/agendamento/MotivoCancelamentoService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/agendamento/RestricaoService.d.ts +33 -0
- package/dist/@types/base/services/modules/agendamento/RestricaoService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/ativos/ativo/AtivoService.d.ts +9 -0
- package/dist/@types/base/services/modules/ativos/ativo/AtivoService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/ativos/documentacao/DocumentacaoService.d.ts +8 -0
- package/dist/@types/base/services/modules/ativos/documentacao/DocumentacaoService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/ativos/formularioCampos/FormularioCamposService.d.ts +8 -0
- package/dist/@types/base/services/modules/ativos/formularioCampos/FormularioCamposService.d.ts.map +1 -0
- package/dist/@types/base/services/modules/ativos/index.d.ts +18 -0
- package/dist/@types/base/services/modules/ativos/index.d.ts.map +1 -1
- package/dist/@types/base/services/modules/flux/FluxService.d.ts +1 -0
- package/dist/@types/base/services/modules/flux/FluxService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/insumos/coberturaSeguroAgricola/CoberturaSeguroAgricolaService.d.ts +8 -0
- package/dist/@types/base/services/modules/insumos/coberturaSeguroAgricola/CoberturaSeguroAgricolaService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/insumos/limiteAdiantamentoCliente/LimiteAdiantamentoClienteService.d.ts +4 -0
- package/dist/@types/base/services/modules/insumos/limiteAdiantamentoCliente/LimiteAdiantamentoClienteService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/insumos/limiteAdiantamentoGeral/LimiteAdiantamentoGeralService.d.ts +4 -0
- package/dist/@types/base/services/modules/insumos/limiteAdiantamentoGeral/LimiteAdiantamentoGeralService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/insumos/seguradoraAgricola/SeguradoraAgricolaService.d.ts +6 -0
- package/dist/@types/base/services/modules/insumos/seguradoraAgricola/SeguradoraAgricolaService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/insumos/vendas/VendasService.d.ts +1 -4
- package/dist/@types/base/services/modules/insumos/vendas/VendasService.d.ts.map +1 -1
- package/dist/base/@types/models/agendamento/agendamento.js +2 -0
- package/dist/base/@types/models/agendamento/agendamento.js.map +1 -0
- package/dist/base/@types/models/agendamento/contratoVenda.js +2 -0
- package/dist/base/@types/models/agendamento/contratoVenda.js.map +1 -0
- package/dist/base/@types/models/agendamento/janela.js +2 -0
- package/dist/base/@types/models/agendamento/janela.js.map +1 -0
- package/dist/base/@types/models/agendamento/listaEmbarque.js +2 -0
- package/dist/base/@types/models/agendamento/listaEmbarque.js.map +1 -0
- package/dist/base/@types/models/agendamento/local.js +2 -0
- package/dist/base/@types/models/agendamento/local.js.map +1 -0
- package/dist/base/@types/models/agendamento/motivoCancelamento.js +2 -0
- package/dist/base/@types/models/agendamento/motivoCancelamento.js.map +1 -0
- package/dist/base/@types/models/agendamento/restricao.js +2 -0
- package/dist/base/@types/models/agendamento/restricao.js.map +1 -0
- package/dist/base/@types/models/ativos/anexoComponente.js +2 -0
- package/dist/base/@types/models/ativos/anexoComponente.js.map +1 -0
- package/dist/base/@types/models/ativos/ativo.js +2 -0
- package/dist/base/@types/models/ativos/ativo.js.map +1 -0
- package/dist/base/@types/models/ativos/documentacao.js +2 -0
- package/dist/base/@types/models/ativos/documentacao.js.map +1 -0
- package/dist/base/@types/models/ativos/formularioCampos.js +2 -0
- package/dist/base/@types/models/ativos/formularioCampos.js.map +1 -0
- package/dist/base/@types/models/ativos/index.js +22 -0
- package/dist/base/@types/models/ativos/index.js.map +1 -0
- package/dist/base/@types/models/index.js +1 -0
- package/dist/base/@types/models/index.js.map +1 -1
- package/dist/base/configs/endpoints.config/agendamento/agendamento.js +13 -1
- package/dist/base/configs/endpoints.config/agendamento/agendamento.js.map +1 -1
- package/dist/base/configs/endpoints.config/agendamento/config/agendamentoCrud.js +24 -0
- package/dist/base/configs/endpoints.config/agendamento/config/agendamentoCrud.js.map +1 -0
- package/dist/base/configs/endpoints.config/agendamento/config/contratoVenda.js +13 -0
- package/dist/base/configs/endpoints.config/agendamento/config/contratoVenda.js.map +1 -0
- package/dist/base/configs/endpoints.config/agendamento/config/listaEmbarque.js +8 -0
- package/dist/base/configs/endpoints.config/agendamento/config/listaEmbarque.js.map +1 -0
- package/dist/base/configs/endpoints.config/agendamento/config/local.js +13 -0
- package/dist/base/configs/endpoints.config/agendamento/config/local.js.map +1 -0
- package/dist/base/configs/endpoints.config/agendamento/config/motivoCancelamento.js +11 -0
- package/dist/base/configs/endpoints.config/agendamento/config/motivoCancelamento.js.map +1 -0
- package/dist/base/configs/endpoints.config/agendamento/config/restricao.js +12 -0
- package/dist/base/configs/endpoints.config/agendamento/config/restricao.js.map +1 -0
- package/dist/base/configs/endpoints.config/ativos/ativos.js +6 -0
- package/dist/base/configs/endpoints.config/ativos/ativos.js.map +1 -1
- package/dist/base/configs/endpoints.config/ativos/config/ativo.js +13 -0
- package/dist/base/configs/endpoints.config/ativos/config/ativo.js.map +1 -0
- package/dist/base/configs/endpoints.config/ativos/config/documentacao.js +12 -0
- package/dist/base/configs/endpoints.config/ativos/config/documentacao.js.map +1 -0
- package/dist/base/configs/endpoints.config/ativos/config/formularioCampos.js +12 -0
- package/dist/base/configs/endpoints.config/ativos/config/formularioCampos.js.map +1 -0
- package/dist/base/configs/endpoints.config/flux/config/grupoAtendimento.js +1 -0
- package/dist/base/configs/endpoints.config/flux/config/grupoAtendimento.js.map +1 -1
- package/dist/base/configs/endpoints.config/insumos/config/vendas.js +3 -6
- package/dist/base/configs/endpoints.config/insumos/config/vendas.js.map +1 -1
- package/dist/base/configs/navigation.config/modules.navigation.js +4 -4
- package/dist/base/configs/navigation.config/modules.navigation.js.map +1 -1
- package/dist/base/configs/navigation.config/modules.submenu/ativos/contratos/submenu.contratos.js +17 -0
- package/dist/base/configs/navigation.config/modules.submenu/ativos/contratos/submenu.contratos.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/ativos/ativos.submenu.js +5 -1
- package/dist/base/configs/navigation.config/submenu/ativos/ativos.submenu.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/ativos/cadastros.submenu.js +2 -0
- package/dist/base/configs/navigation.config/submenu/ativos/cadastros.submenu.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/ativos/config/ativo.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/ativos/config/ativo.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/ativos/config/documentacao.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/ativos/config/documentacao.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/ativos/config/formularioCampos.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/ativos/config/formularioCampos.submenu.js.map +1 -0
- package/dist/base/configs/navigation.config/submenu/ativos/contratos.submenu.js +8 -0
- package/dist/base/configs/navigation.config/submenu/ativos/contratos.submenu.js.map +1 -0
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFindMonitorFornecedorList.js +4 -2
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFindMonitorFornecedorList.js.map +1 -1
- package/dist/base/index.js +124 -9
- package/dist/base/index.js.map +1 -1
- package/dist/base/services/http.js +38 -0
- package/dist/base/services/http.js.map +1 -0
- package/dist/base/services/index.js +124 -9
- package/dist/base/services/index.js.map +1 -1
- package/dist/base/services/modules/agendamento/AgendamentoService.js +200 -0
- package/dist/base/services/modules/agendamento/AgendamentoService.js.map +1 -0
- package/dist/base/services/modules/agendamento/ContratoVendaService.js +108 -0
- package/dist/base/services/modules/agendamento/ContratoVendaService.js.map +1 -0
- package/dist/base/services/modules/agendamento/ListaEmbarqueService.js +29 -0
- package/dist/base/services/modules/agendamento/ListaEmbarqueService.js.map +1 -0
- package/dist/base/services/modules/agendamento/LocalService.js +103 -0
- package/dist/base/services/modules/agendamento/LocalService.js.map +1 -0
- package/dist/base/services/modules/agendamento/MotivoCancelamentoService.js +54 -0
- package/dist/base/services/modules/agendamento/MotivoCancelamentoService.js.map +1 -0
- package/dist/base/services/modules/agendamento/RestricaoService.js +115 -0
- package/dist/base/services/modules/agendamento/RestricaoService.js.map +1 -0
- package/dist/base/services/modules/ativos/ativo/AtivoService.js +52 -0
- package/dist/base/services/modules/ativos/ativo/AtivoService.js.map +1 -0
- package/dist/base/services/modules/ativos/documentacao/DocumentacaoService.js +44 -0
- package/dist/base/services/modules/ativos/documentacao/DocumentacaoService.js.map +1 -0
- package/dist/base/services/modules/ativos/formularioCampos/FormularioCamposService.js +44 -0
- package/dist/base/services/modules/ativos/formularioCampos/FormularioCamposService.js.map +1 -0
- package/dist/base/services/modules/ativos/index.js +110 -1
- package/dist/base/services/modules/ativos/index.js.map +1 -1
- package/dist/base/services/modules/flux/FluxService.js +8 -0
- package/dist/base/services/modules/flux/FluxService.js.map +1 -1
- package/dist/base/services/modules/index.js +119 -9
- package/dist/base/services/modules/index.js.map +1 -1
- package/dist/base/services/modules/insumos/coberturaSeguroAgricola/CoberturaSeguroAgricolaService.js +8 -0
- package/dist/base/services/modules/insumos/coberturaSeguroAgricola/CoberturaSeguroAgricolaService.js.map +1 -1
- package/dist/base/services/modules/insumos/index.js +10 -9
- package/dist/base/services/modules/insumos/limiteAdiantamentoCliente/LimiteAdiantamentoClienteService.js +18 -0
- package/dist/base/services/modules/insumos/limiteAdiantamentoCliente/LimiteAdiantamentoClienteService.js.map +1 -1
- package/dist/base/services/modules/insumos/limiteAdiantamentoGeral/LimiteAdiantamentoGeralService.js +17 -0
- package/dist/base/services/modules/insumos/limiteAdiantamentoGeral/LimiteAdiantamentoGeralService.js.map +1 -1
- package/dist/base/services/modules/insumos/seguradoraAgricola/SeguradoraAgricolaService.js +8 -0
- package/dist/base/services/modules/insumos/seguradoraAgricola/SeguradoraAgricolaService.js.map +1 -1
- package/dist/base/services/modules/insumos/vendas/VendasService.js +4 -28
- package/dist/base/services/modules/insumos/vendas/VendasService.js.map +1 -1
- package/lib/@ecme/services/axios/AxiosRequestIntrceptorConfigCallback.ts +15 -0
- package/lib/base/@types/api/response/bayer/TFindAllEntregaBayerResponse.ts +1 -0
- package/lib/base/@types/models/agendamento/agendamento.ts +207 -0
- package/lib/base/@types/models/agendamento/contratoVenda.ts +118 -0
- package/lib/base/@types/models/agendamento/janela.ts +39 -0
- package/lib/base/@types/models/agendamento/listaEmbarque.ts +64 -0
- package/lib/base/@types/models/agendamento/local.ts +68 -0
- package/lib/base/@types/models/agendamento/motivoCancelamento.ts +15 -0
- package/lib/base/@types/models/agendamento/restricao.ts +41 -0
- package/lib/base/@types/models/ativos/{AnexoComponente.ts → anexoComponente.ts} +1 -0
- package/lib/base/@types/models/ativos/ativo.ts +36 -0
- package/lib/base/@types/models/ativos/documentacao.ts +63 -0
- package/lib/base/@types/models/ativos/formularioCampos.ts +23 -0
- package/lib/base/@types/models/ativos/index.ts +22 -0
- package/lib/base/@types/models/ativos/sistemaOperacional.ts +1 -1
- package/lib/base/@types/models/ativos/software.ts +1 -1
- package/lib/base/@types/models/ativos/versaoMSOffice.ts +1 -1
- package/lib/base/@types/models/index.ts +1 -0
- package/lib/base/@types/models/transportadora/contratoFrete.ts +1 -0
- package/lib/base/configs/endpoints.config/agendamento/agendamento.ts +12 -0
- package/lib/base/configs/endpoints.config/agendamento/config/agendamentoCrud.ts +22 -0
- package/lib/base/configs/endpoints.config/agendamento/config/contratoVenda.ts +11 -0
- package/lib/base/configs/endpoints.config/agendamento/config/listaEmbarque.ts +6 -0
- package/lib/base/configs/endpoints.config/agendamento/config/local.ts +11 -0
- package/lib/base/configs/endpoints.config/agendamento/config/motivoCancelamento.ts +9 -0
- package/lib/base/configs/endpoints.config/agendamento/config/restricao.ts +10 -0
- package/lib/base/configs/endpoints.config/ativos/ativos.ts +6 -0
- package/lib/base/configs/endpoints.config/ativos/config/ativo.ts +12 -0
- package/lib/base/configs/endpoints.config/ativos/config/documentacao.ts +11 -0
- package/lib/base/configs/endpoints.config/ativos/config/formularioCampos.ts +11 -0
- package/lib/base/configs/endpoints.config/flux/config/grupoAtendimento.ts +1 -0
- package/lib/base/configs/endpoints.config/insumos/config/vendas.ts +3 -6
- package/lib/base/configs/navigation.config/modules.navigation.ts +3 -3
- package/lib/base/configs/navigation.config/modules.submenu/ativos/contratos/submenu.contratos.ts +17 -0
- package/lib/base/configs/navigation.config/submenu/ativos/ativos.submenu.ts +4 -0
- package/lib/base/configs/navigation.config/submenu/ativos/cadastros.submenu.ts +2 -0
- package/lib/base/configs/navigation.config/submenu/ativos/config/ativo.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/ativos/config/documentacao.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/ativos/config/formularioCampos.submenu.ts +16 -0
- package/lib/base/configs/navigation.config/submenu/ativos/contratos.submenu.ts +8 -0
- package/lib/base/hooks/dm/businessPartner/useBusinessPartnerFindMonitorFornecedorList.tsx +11 -3
- package/lib/base/services/http.ts +47 -0
- package/lib/base/services/index.ts +3 -0
- package/lib/base/services/modules/agendamento/AgendamentoService.ts +234 -0
- package/lib/base/services/modules/agendamento/ContratoVendaService.ts +112 -0
- package/lib/base/services/modules/agendamento/ListaEmbarqueService.ts +34 -0
- package/lib/base/services/modules/agendamento/LocalService.ts +107 -0
- package/lib/base/services/modules/agendamento/MotivoCancelamentoService.ts +60 -0
- package/lib/base/services/modules/agendamento/RestricaoService.ts +155 -0
- package/lib/base/services/modules/ativos/ativo/AtivoService.ts +52 -0
- package/lib/base/services/modules/ativos/documentacao/DocumentacaoService.ts +44 -0
- package/lib/base/services/modules/ativos/formularioCampos/FormularioCamposService.ts +44 -0
- package/lib/base/services/modules/ativos/index.ts +19 -1
- package/lib/base/services/modules/flux/FluxService.ts +8 -0
- package/lib/base/services/modules/insumos/coberturaSeguroAgricola/CoberturaSeguroAgricolaService.ts +15 -0
- package/lib/base/services/modules/insumos/limiteAdiantamentoCliente/LimiteAdiantamentoClienteService.ts +22 -0
- package/lib/base/services/modules/insumos/limiteAdiantamentoGeral/LimiteAdiantamentoGeralService.ts +21 -0
- package/lib/base/services/modules/insumos/seguradoraAgricola/SeguradoraAgricolaService.ts +13 -0
- package/lib/base/services/modules/insumos/vendas/VendasService.ts +3 -27
- package/package.json +1 -1
- package/dist/base/@types/models/ativos/AnexoComponente.js +0 -2
- package/dist/base/@types/models/ativos/AnexoComponente.js.map +0 -1
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { IFilterParams, TQueryResponse } from '@base/@types/api'
|
|
2
|
+
import {
|
|
3
|
+
TAgendamento,
|
|
4
|
+
TAgendamentoFormSchema,
|
|
5
|
+
TAgendamentoRequest,
|
|
6
|
+
TAgendamentoListParams,
|
|
7
|
+
TJanelaDisponivel,
|
|
8
|
+
TPainelJanelasRequest,
|
|
9
|
+
TPainelCalendarioRequest,
|
|
10
|
+
TPainelBiRequest,
|
|
11
|
+
TPainelBiData,
|
|
12
|
+
TBIAgendamento,
|
|
13
|
+
TBIPainelOrdemConsumo,
|
|
14
|
+
TCancelamentoRequest,
|
|
15
|
+
} from '@base/@types/models/agendamento/agendamento'
|
|
16
|
+
import { endpointsConfig } from '@base/configs'
|
|
17
|
+
import ApiService from '@/services/ApiService'
|
|
18
|
+
|
|
19
|
+
export async function apiGetAgendamentos(body?: IFilterParams) {
|
|
20
|
+
const queryParams = new URLSearchParams()
|
|
21
|
+
|
|
22
|
+
Object.entries(body || {}).forEach(([key, value]) => {
|
|
23
|
+
if (Array.isArray(value)) {
|
|
24
|
+
value.forEach((item) => queryParams.append(key, String(item)))
|
|
25
|
+
} else if (value !== undefined && value !== null) {
|
|
26
|
+
queryParams.append(key, String(value))
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TAgendamento>>({
|
|
31
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.findAll}?${queryParams.toString()}`,
|
|
32
|
+
method: 'get',
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export async function apiGetAgendamentoById(id: string | number) {
|
|
37
|
+
return ApiService.fetchDataWithAxios<TAgendamento>({
|
|
38
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.findOne}/${id}`,
|
|
39
|
+
method: 'get',
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export async function apiCreateAgendamento(data: TAgendamentoRequest | TAgendamentoFormSchema) {
|
|
44
|
+
return ApiService.fetchDataWithAxios<TAgendamento>({
|
|
45
|
+
url: endpointsConfig.agendamento.agendamentoCrud.add,
|
|
46
|
+
method: 'post',
|
|
47
|
+
data,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export async function apiUpdateAgendamento(
|
|
52
|
+
id: string | number,
|
|
53
|
+
data: TAgendamentoRequest | TAgendamentoFormSchema,
|
|
54
|
+
) {
|
|
55
|
+
return ApiService.fetchDataWithAxios<TAgendamento>({
|
|
56
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.update}/${id}`,
|
|
57
|
+
method: 'patch',
|
|
58
|
+
data,
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export async function apiDeleteAgendamento(id: string | number) {
|
|
63
|
+
return ApiService.fetchDataWithAxios({
|
|
64
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.delete}/${id}`,
|
|
65
|
+
method: 'delete',
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export async function apiCancelarAgendamento(body?: TCancelamentoRequest) {
|
|
70
|
+
return ApiService.fetchDataWithAxios<any>({
|
|
71
|
+
url: endpointsConfig.agendamento.agendamentoCrud.cancel,
|
|
72
|
+
method: 'put',
|
|
73
|
+
data: body,
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export async function apiCancelarAgendamentoById(id: number) {
|
|
78
|
+
return ApiService.fetchDataWithAxios<TAgendamento>({
|
|
79
|
+
url: `/agendamento/api/${id}/cancel`,
|
|
80
|
+
method: 'delete',
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function apiGetBIAgendamento(
|
|
85
|
+
params?: Record<string, string | number | string[] | number[]>,
|
|
86
|
+
) {
|
|
87
|
+
const queryParams = new URLSearchParams()
|
|
88
|
+
|
|
89
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
90
|
+
if (Array.isArray(value)) {
|
|
91
|
+
value.forEach((item) => queryParams.append(key, String(item)))
|
|
92
|
+
} else if (value !== undefined && value !== null) {
|
|
93
|
+
queryParams.append(key, String(value))
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
const queryString = queryParams.toString()
|
|
98
|
+
|
|
99
|
+
return ApiService.fetchDataWithAxios<TBIAgendamento>({
|
|
100
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.bi}${queryString ? `?${queryString}` : ''}`,
|
|
101
|
+
method: 'get',
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export async function apiGetBIPainelOrdemConsumo() {
|
|
106
|
+
return ApiService.fetchDataWithAxios<TBIPainelOrdemConsumo>({
|
|
107
|
+
url: '/agendamento/api/ordem-consumo/painel/bi',
|
|
108
|
+
method: 'get',
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export async function apiListAgendamentos(params: TAgendamentoListParams = {}) {
|
|
113
|
+
const queryParams = new URLSearchParams()
|
|
114
|
+
if (params.status) queryParams.append('status', params.status)
|
|
115
|
+
if (params.localId) queryParams.append('localId', params.localId.toString())
|
|
116
|
+
if (params.page !== undefined) queryParams.append('page', params.page.toString())
|
|
117
|
+
if (params.size !== undefined) queryParams.append('size', params.size.toString())
|
|
118
|
+
|
|
119
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TAgendamento>>({
|
|
120
|
+
url: `/agendamento/apis?${queryParams.toString()}`,
|
|
121
|
+
method: 'get',
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export async function apiGetJanelasDisponiveis(params: {
|
|
126
|
+
localId: number
|
|
127
|
+
dataInicio: string
|
|
128
|
+
dataFim: string
|
|
129
|
+
}) {
|
|
130
|
+
const queryParams = new URLSearchParams()
|
|
131
|
+
queryParams.append('localId', params.localId.toString())
|
|
132
|
+
queryParams.append('dataInicio', params.dataInicio)
|
|
133
|
+
queryParams.append('dataFim', params.dataFim)
|
|
134
|
+
|
|
135
|
+
return ApiService.fetchDataWithAxios<TJanelaDisponivel[]>({
|
|
136
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.janelasDisponiveis}?${queryParams.toString()}`,
|
|
137
|
+
method: 'get',
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export async function apiGetJanelasOcupadas(localId: number) {
|
|
142
|
+
return ApiService.fetchDataWithAxios<TJanelaDisponivel[]>({
|
|
143
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.janelasOcupadas}?localId=${localId}`,
|
|
144
|
+
method: 'get',
|
|
145
|
+
})
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export async function apiGetPainelJanelas(data: TPainelJanelasRequest) {
|
|
149
|
+
return ApiService.fetchDataWithAxios<TJanelaDisponivel[]>({
|
|
150
|
+
url: endpointsConfig.agendamento.agendamentoCrud.painelJanelas,
|
|
151
|
+
method: 'post',
|
|
152
|
+
data,
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export async function apiGetPainelBi(params: TPainelBiRequest) {
|
|
157
|
+
return ApiService.fetchDataWithAxios<TPainelBiData>({
|
|
158
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.painelBi}?data=${params.data}&localId=${params.localId}`,
|
|
159
|
+
method: 'get',
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export async function apiGetPainelCalendario(data: TPainelCalendarioRequest) {
|
|
164
|
+
return ApiService.fetchDataWithAxios<TJanelaDisponivel[]>({
|
|
165
|
+
url: endpointsConfig.agendamento.agendamentoCrud.painelCalendario,
|
|
166
|
+
method: 'post',
|
|
167
|
+
data,
|
|
168
|
+
})
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export async function apiFindJanelasDisponiveis(
|
|
172
|
+
localId: number,
|
|
173
|
+
dataInicio?: string,
|
|
174
|
+
dataFim?: string,
|
|
175
|
+
) {
|
|
176
|
+
return ApiService.fetchDataWithAxios<TJanelaDisponivel[]>({
|
|
177
|
+
url: endpointsConfig.agendamento.agendamentoCrud.janelasDisponiveis,
|
|
178
|
+
method: 'get',
|
|
179
|
+
params: {
|
|
180
|
+
localId,
|
|
181
|
+
dataInicio: dataInicio || new Date().toISOString().split('T')[0],
|
|
182
|
+
dataFim: dataFim || new Date().toISOString().split('T')[0],
|
|
183
|
+
},
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export async function apiGerarRomaneios(data: Record<string, unknown>) {
|
|
188
|
+
return ApiService.fetchDataWithAxios<{
|
|
189
|
+
pesoTotal?: number
|
|
190
|
+
ordensAgendamento?: Record<string, unknown>[]
|
|
191
|
+
}>({
|
|
192
|
+
url: endpointsConfig.agendamento.agendamentoCrud.gerarRomaneios,
|
|
193
|
+
method: 'post',
|
|
194
|
+
data,
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export async function apiFetchSafrasVinculadas(centroIdSAP: string) {
|
|
199
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<Record<string, unknown>>>({
|
|
200
|
+
url: endpointsConfig.agendamento.agendamentoCrud.safrasVinculadas,
|
|
201
|
+
method: 'get',
|
|
202
|
+
params: { centroIdSAP },
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export async function apiFetchDepositos(centroIdSAP: string, tipoDeposito?: string) {
|
|
207
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<Record<string, unknown>>>({
|
|
208
|
+
url: endpointsConfig.agendamento.agendamentoCrud.depositos,
|
|
209
|
+
method: 'get',
|
|
210
|
+
params: { centroIdSAP, tipoDeposito },
|
|
211
|
+
})
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export async function apiBuscaOrdemCarregamento(documentoVenda: string) {
|
|
215
|
+
return ApiService.fetchDataWithAxios<Record<string, unknown>>({
|
|
216
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.ordemCarregamento}/${documentoVenda}`,
|
|
217
|
+
method: 'get',
|
|
218
|
+
})
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export async function apiFindAllAgendamentos(params: Record<string, unknown> = {}) {
|
|
222
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TAgendamento>>({
|
|
223
|
+
url: endpointsConfig.agendamento.agendamentoCrud.findAll,
|
|
224
|
+
method: 'get',
|
|
225
|
+
params,
|
|
226
|
+
})
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export async function apiDownloadPdf(id: number) {
|
|
230
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TAgendamento>>({
|
|
231
|
+
url: `${endpointsConfig.agendamento.agendamentoCrud.pdf}/${id}/pdf`,
|
|
232
|
+
method: 'get',
|
|
233
|
+
})
|
|
234
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { IFilterParams, TQueryResponse } from '@base/@types/api'
|
|
2
|
+
import { TContratoVenda, TRelatorioCota } from '@base/@types/models/agendamento/contratoVenda'
|
|
3
|
+
import { endpointsConfig } from '@base/configs'
|
|
4
|
+
import ApiService from '@/services/ApiService'
|
|
5
|
+
|
|
6
|
+
export async function apiFindContratoSaldo(params: Record<string, unknown>) {
|
|
7
|
+
const queryParams = new URLSearchParams()
|
|
8
|
+
|
|
9
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
10
|
+
if (Array.isArray(value)) {
|
|
11
|
+
value.forEach((item) => queryParams.append(key, String(item)))
|
|
12
|
+
} else if (value !== undefined && value !== null) {
|
|
13
|
+
queryParams.append(key, String(value))
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TContratoVenda>>({
|
|
18
|
+
url: `${endpointsConfig.agendamento.contratoVenda.findAll}?${queryParams.toString()}`,
|
|
19
|
+
method: 'get',
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function apiGetContratoVendaById(id: string | number) {
|
|
24
|
+
return ApiService.fetchDataWithAxios<TContratoVenda>({
|
|
25
|
+
url: `${endpointsConfig.agendamento.contratoVenda.findOne}/${id}`,
|
|
26
|
+
method: 'get',
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function apiFindContratosComSaldoPorCliente(clienteId: string | number) {
|
|
31
|
+
return ApiService.fetchDataWithAxios<TContratoVenda[]>({
|
|
32
|
+
url: `${endpointsConfig.agendamento.contratoVenda.comSaldoByCliente}/${clienteId}`,
|
|
33
|
+
method: 'get',
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function apiFindAllContratos(params: Record<string, unknown>) {
|
|
38
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TContratoVenda>>({
|
|
39
|
+
url: endpointsConfig.agendamento.contratoVenda.findContratos,
|
|
40
|
+
method: 'post',
|
|
41
|
+
data: params,
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export async function apiFindACDVendasContrato(contratoNumero: string) {
|
|
46
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TContratoVenda>>({
|
|
47
|
+
url: endpointsConfig.agendamento.contratoVenda.findContratos,
|
|
48
|
+
method: 'post',
|
|
49
|
+
data: {
|
|
50
|
+
pageNumber: 1,
|
|
51
|
+
pageSize: 1,
|
|
52
|
+
filter: { contratoNumero },
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function apiGetRelatorioCotas(body: IFilterParams) {
|
|
58
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TRelatorioCota>>({
|
|
59
|
+
url: endpointsConfig.agendamento.contratoVenda.relatorioCotas,
|
|
60
|
+
method: 'post',
|
|
61
|
+
data: body,
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function apiGetContratosPeriodo(filter: Record<string, unknown>) {
|
|
66
|
+
return ApiService.fetchDataWithAxios<Record<string, unknown>[]>({
|
|
67
|
+
url: endpointsConfig.agendamento.contratoVenda.periodo,
|
|
68
|
+
method: 'post',
|
|
69
|
+
data: filter,
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export async function apiGetContratosPeriodoCapacidade(filter: Record<string, unknown>) {
|
|
74
|
+
return ApiService.fetchDataWithAxios<Record<string, unknown>[]>({
|
|
75
|
+
url: endpointsConfig.agendamento.contratoVenda.periodoCapacidade,
|
|
76
|
+
method: 'post',
|
|
77
|
+
data: filter,
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export async function apiGetAgendamentosContrato(params: {
|
|
82
|
+
pageNumber: number
|
|
83
|
+
pageSize: number
|
|
84
|
+
filter: Record<string, unknown>
|
|
85
|
+
}) {
|
|
86
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<Record<string, unknown>>>({
|
|
87
|
+
url: '/agendamento/api-carga-descarga/agendamentos',
|
|
88
|
+
method: 'post',
|
|
89
|
+
data: params,
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export async function apiGetCalendarioContrato(localId: number) {
|
|
94
|
+
const response = await ApiService.fetchDataWithAxios<TQueryResponse<Record<string, unknown>>>({
|
|
95
|
+
url: '/agendamento/api-carga-descarga/calendarios',
|
|
96
|
+
method: 'post',
|
|
97
|
+
data: {
|
|
98
|
+
filter: { 'local.id': localId },
|
|
99
|
+
pageNumber: 1,
|
|
100
|
+
pageSize: 1,
|
|
101
|
+
},
|
|
102
|
+
})
|
|
103
|
+
return response.content?.[0] || null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export async function apiGetLocaisContrato() {
|
|
107
|
+
const response = await ApiService.fetchDataWithAxios<TQueryResponse<Record<string, unknown>>>({
|
|
108
|
+
url: endpointsConfig.agendamento.local.findAll,
|
|
109
|
+
method: 'GET',
|
|
110
|
+
})
|
|
111
|
+
return response.content || []
|
|
112
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TItemListaEmbarque,
|
|
3
|
+
TListaEmbarqueRequest,
|
|
4
|
+
TEventoAgendamento,
|
|
5
|
+
TRegistrarEventoRequest,
|
|
6
|
+
} from '@base/@types/models/agendamento/listaEmbarque'
|
|
7
|
+
import { endpointsConfig } from '@base/configs'
|
|
8
|
+
import ApiService from '@/services/ApiService'
|
|
9
|
+
|
|
10
|
+
export async function apiFindListaEmbarque(filter: TListaEmbarqueRequest) {
|
|
11
|
+
return ApiService.fetchDataWithAxios<TItemListaEmbarque[]>({
|
|
12
|
+
url: endpointsConfig.agendamento.listaEmbarque.find,
|
|
13
|
+
method: 'post',
|
|
14
|
+
data: filter,
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function apiBuscarEventosAgendamento(agendamentoId: number) {
|
|
19
|
+
return ApiService.fetchDataWithAxios<TEventoAgendamento>({
|
|
20
|
+
url: `${endpointsConfig.agendamento.listaEmbarque.eventos}/${agendamentoId}/eventos`,
|
|
21
|
+
method: 'get',
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function apiRegistrarEvento(
|
|
26
|
+
agendamentoId: number,
|
|
27
|
+
evento: TRegistrarEventoRequest,
|
|
28
|
+
) {
|
|
29
|
+
return ApiService.fetchDataWithAxios<TEventoAgendamento>({
|
|
30
|
+
url: `${endpointsConfig.agendamento.listaEmbarque.eventos}/${agendamentoId}/eventos`,
|
|
31
|
+
method: 'post',
|
|
32
|
+
data: evento,
|
|
33
|
+
})
|
|
34
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { IFilterParams, TQueryResponse } from '@base/@types/api'
|
|
2
|
+
import { TLocal, TLocalFormSchema } from '@base/@types/models/agendamento/local'
|
|
3
|
+
import { TJanela, TJanelaFormSchema } from '@base/@types/models/agendamento/janela'
|
|
4
|
+
import { endpointsConfig } from '@base/configs'
|
|
5
|
+
import ApiService from '@/services/ApiService'
|
|
6
|
+
|
|
7
|
+
export async function apiGetLocals(body?: IFilterParams) {
|
|
8
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TLocal>>({
|
|
9
|
+
url: endpointsConfig.agendamento.local.findAll,
|
|
10
|
+
method: 'get',
|
|
11
|
+
params: body,
|
|
12
|
+
})
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function apiGetLocalById(id: string | number) {
|
|
16
|
+
return ApiService.fetchDataWithAxios<TLocal>({
|
|
17
|
+
url: `${endpointsConfig.agendamento.local.findOne}/${id}`,
|
|
18
|
+
method: 'get',
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function apiCreateLocal(data: TLocalFormSchema) {
|
|
23
|
+
const createLocalRequest: Record<string, unknown> = {
|
|
24
|
+
descricao: data.descricao,
|
|
25
|
+
tempoOperacao: data.tempoOperacao,
|
|
26
|
+
cotaOperacao: data.cotaOperacao,
|
|
27
|
+
permitirChamadaUsina: data.permitirChamadaUsina,
|
|
28
|
+
permitirCarregamento: data.permitirCarregamento,
|
|
29
|
+
centroId: data.centroId,
|
|
30
|
+
dataInicial: data.dataInicial,
|
|
31
|
+
dataFinal: data.dataFinal,
|
|
32
|
+
calendarioJanelas: data.calendarioJanelas.map((janela) => ({
|
|
33
|
+
data: janela.data,
|
|
34
|
+
horaInicial: janela.horaInicial,
|
|
35
|
+
horaFinal: janela.horaFinal,
|
|
36
|
+
habilitadoOperacao: janela.habilitadoOperacao,
|
|
37
|
+
})),
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (data.resumoSemanal && data.resumoSemanal.length > 0) {
|
|
41
|
+
createLocalRequest.resumoSemanal = data.resumoSemanal.map((slot) => ({
|
|
42
|
+
diaSemana: slot.diaSemana,
|
|
43
|
+
horaInicial: slot.horaInicial,
|
|
44
|
+
horaFinal: slot.horaFinal,
|
|
45
|
+
habilitado: slot.habilitado,
|
|
46
|
+
}))
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return ApiService.fetchDataWithAxios<TLocal>({
|
|
50
|
+
url: endpointsConfig.agendamento.local.add,
|
|
51
|
+
method: 'post',
|
|
52
|
+
data: createLocalRequest,
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export async function apiUpdateLocal(id: string | number, data: TLocalFormSchema) {
|
|
57
|
+
const updateLocalRequest: Record<string, unknown> = {
|
|
58
|
+
tempoOperacao: data.tempoOperacao,
|
|
59
|
+
cotaOperacao: data.cotaOperacao,
|
|
60
|
+
permitirChamadaUsina: data.permitirChamadaUsina,
|
|
61
|
+
permitirCarregamento: data.permitirCarregamento,
|
|
62
|
+
dataInicial: data.dataInicial,
|
|
63
|
+
dataFinal: data.dataFinal,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (data.resumoSemanal && data.resumoSemanal.length > 0) {
|
|
67
|
+
updateLocalRequest.resumoSemanal = data.resumoSemanal.map((slot) => ({
|
|
68
|
+
diaSemana: slot.diaSemana,
|
|
69
|
+
horaInicial: slot.horaInicial,
|
|
70
|
+
horaFinal: slot.horaFinal,
|
|
71
|
+
habilitado: slot.habilitado,
|
|
72
|
+
}))
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return ApiService.fetchDataWithAxios<TLocal>({
|
|
76
|
+
url: `${endpointsConfig.agendamento.local.update}/${id}`,
|
|
77
|
+
method: 'patch',
|
|
78
|
+
data: updateLocalRequest,
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export async function apiGetJanelas(body?: IFilterParams) {
|
|
83
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TJanela>>({
|
|
84
|
+
url: endpointsConfig.agendamento.local.janelas,
|
|
85
|
+
method: 'get',
|
|
86
|
+
params: body,
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export async function apiGetJanelaById(id: string) {
|
|
91
|
+
return ApiService.fetchDataWithAxios<TJanela>({
|
|
92
|
+
url: `${endpointsConfig.agendamento.local.findOneJanela}/${id}`,
|
|
93
|
+
method: 'get',
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export async function apiUpdateJanela(id: string, data: TJanelaFormSchema) {
|
|
98
|
+
const payload = {
|
|
99
|
+
habilitadoOperacao: data.janela.habilitadoOperacao,
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return ApiService.fetchDataWithAxios<TJanela>({
|
|
103
|
+
url: `${endpointsConfig.agendamento.local.updateJanela}/${id}`,
|
|
104
|
+
method: 'put',
|
|
105
|
+
data: payload,
|
|
106
|
+
})
|
|
107
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IFilterParams, TQueryResponse } from '@base/@types/api'
|
|
2
|
+
import {
|
|
3
|
+
TMotivoCancelamento,
|
|
4
|
+
TMotivoCancelamentoFormSchema,
|
|
5
|
+
} from '@base/@types/models/agendamento/motivoCancelamento'
|
|
6
|
+
import { endpointsConfig } from '@base/configs'
|
|
7
|
+
import ApiService from '@/services/ApiService'
|
|
8
|
+
|
|
9
|
+
export async function apiGetMotivosCancelamento(body?: IFilterParams) {
|
|
10
|
+
return ApiService.fetchDataWithAxios<{ data: TQueryResponse<TMotivoCancelamento> }>({
|
|
11
|
+
url: endpointsConfig.agendamento.motivoCancelamento.findAll,
|
|
12
|
+
method: 'get',
|
|
13
|
+
params: body,
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function apiGetMotivoCancelamentoById(id: string | number) {
|
|
18
|
+
return ApiService.fetchDataWithAxios<TMotivoCancelamento>({
|
|
19
|
+
url: `${endpointsConfig.agendamento.motivoCancelamento.findOne}/${id}`,
|
|
20
|
+
method: 'get',
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function apiCreateMotivoCancelamento(data: TMotivoCancelamentoFormSchema) {
|
|
25
|
+
const createRequest = {
|
|
26
|
+
descricao: data.descricao,
|
|
27
|
+
ativo: data.ativo,
|
|
28
|
+
visivel: data.visivel,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return ApiService.fetchDataWithAxios({
|
|
32
|
+
url: endpointsConfig.agendamento.motivoCancelamento.add,
|
|
33
|
+
method: 'post',
|
|
34
|
+
data: createRequest,
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export async function apiUpdateMotivoCancelamento(
|
|
39
|
+
id: string | number,
|
|
40
|
+
data: TMotivoCancelamentoFormSchema,
|
|
41
|
+
) {
|
|
42
|
+
const updateRequest = {
|
|
43
|
+
descricao: data.descricao,
|
|
44
|
+
ativo: data.ativo,
|
|
45
|
+
visivel: data.visivel,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return ApiService.fetchDataWithAxios({
|
|
49
|
+
url: `${endpointsConfig.agendamento.motivoCancelamento.update}/${id}`,
|
|
50
|
+
method: 'put',
|
|
51
|
+
data: updateRequest,
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export async function apiDeleteMotivoCancelamento(id: string | number) {
|
|
56
|
+
return ApiService.fetchDataWithAxios({
|
|
57
|
+
url: `${endpointsConfig.agendamento.motivoCancelamento.delete}/${id}`,
|
|
58
|
+
method: 'delete',
|
|
59
|
+
})
|
|
60
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { TQueryResponse } from '@base/@types/api'
|
|
2
|
+
import {
|
|
3
|
+
TAgendamentoRestricaoResponse,
|
|
4
|
+
TRestricaoVeiculoFormSchema,
|
|
5
|
+
TRestricaoMotoristaFormSchema,
|
|
6
|
+
TRestricaoFindRequest,
|
|
7
|
+
} from '@base/@types/models/agendamento/restricao'
|
|
8
|
+
import { endpointsConfig } from '@base/configs'
|
|
9
|
+
import ApiService from '@/services/ApiService'
|
|
10
|
+
|
|
11
|
+
type TPagedResponse<T> = {
|
|
12
|
+
content: T[]
|
|
13
|
+
pageable: {
|
|
14
|
+
pageNumber: number
|
|
15
|
+
pageSize: number
|
|
16
|
+
sort: unknown[]
|
|
17
|
+
offset: number
|
|
18
|
+
paged: boolean
|
|
19
|
+
unpaged: boolean
|
|
20
|
+
}
|
|
21
|
+
last: boolean
|
|
22
|
+
totalPages: number
|
|
23
|
+
totalElements: number
|
|
24
|
+
first: boolean
|
|
25
|
+
size: number
|
|
26
|
+
number: number
|
|
27
|
+
sort: unknown[]
|
|
28
|
+
numberOfElements: number
|
|
29
|
+
empty: boolean
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export async function apiGetAgendamentoRestricoes() {
|
|
33
|
+
return ApiService.fetchDataWithAxios<TPagedResponse<TAgendamentoRestricaoResponse>>({
|
|
34
|
+
url: endpointsConfig.agendamento.restricao.findAll,
|
|
35
|
+
method: 'get',
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function apiFindAgendamentoRestricoes(params: TRestricaoFindRequest) {
|
|
40
|
+
return ApiService.fetchDataWithAxios<TPagedResponse<TAgendamentoRestricaoResponse>>({
|
|
41
|
+
url: endpointsConfig.agendamento.restricao.findAll,
|
|
42
|
+
method: 'get',
|
|
43
|
+
params,
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export async function apiGetAgendamentoRestricaoById(id: string | number) {
|
|
48
|
+
return ApiService.fetchDataWithAxios<TAgendamentoRestricaoResponse>({
|
|
49
|
+
url: `${endpointsConfig.agendamento.restricao.findOne}/${id}`,
|
|
50
|
+
method: 'get',
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export async function apiCreateRestricaoVeiculo(data: TRestricaoVeiculoFormSchema) {
|
|
55
|
+
const createRequest = {
|
|
56
|
+
tipo: 'VEICULO',
|
|
57
|
+
veiculoId: data.veiculoId,
|
|
58
|
+
justificativa: data.justificativa,
|
|
59
|
+
ativo: data.ativo,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return ApiService.fetchDataWithAxios({
|
|
63
|
+
url: endpointsConfig.agendamento.restricao.add,
|
|
64
|
+
method: 'post',
|
|
65
|
+
data: createRequest,
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export async function apiUpdateRestricaoVeiculo(
|
|
70
|
+
id: string | number,
|
|
71
|
+
data: TRestricaoVeiculoFormSchema,
|
|
72
|
+
) {
|
|
73
|
+
const updateRequest = {
|
|
74
|
+
tipo: 'VEICULO',
|
|
75
|
+
veiculoId: data.veiculoId,
|
|
76
|
+
justificativa: data.justificativa,
|
|
77
|
+
ativo: data.ativo,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return ApiService.fetchDataWithAxios({
|
|
81
|
+
url: `${endpointsConfig.agendamento.restricao.update}/${id}`,
|
|
82
|
+
method: 'put',
|
|
83
|
+
data: updateRequest,
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export async function apiCreateRestricaoMotorista(data: TRestricaoMotoristaFormSchema) {
|
|
88
|
+
const createRequest = {
|
|
89
|
+
tipo: 'MOTORISTA',
|
|
90
|
+
motoristaId: data.motoristaId,
|
|
91
|
+
justificativa: data.justificativa,
|
|
92
|
+
ativo: data.ativo,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return ApiService.fetchDataWithAxios({
|
|
96
|
+
url: endpointsConfig.agendamento.restricao.add,
|
|
97
|
+
method: 'post',
|
|
98
|
+
data: createRequest,
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export async function apiUpdateRestricaoMotorista(
|
|
103
|
+
id: string | number,
|
|
104
|
+
data: TRestricaoMotoristaFormSchema,
|
|
105
|
+
) {
|
|
106
|
+
const updateRequest = {
|
|
107
|
+
tipo: 'MOTORISTA',
|
|
108
|
+
motoristaId: data.motoristaId,
|
|
109
|
+
justificativa: data.justificativa,
|
|
110
|
+
ativo: data.ativo,
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return ApiService.fetchDataWithAxios({
|
|
114
|
+
url: `${endpointsConfig.agendamento.restricao.update}/${id}`,
|
|
115
|
+
method: 'put',
|
|
116
|
+
data: updateRequest,
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export async function apiGetMotoristasSemRestricao(params: Record<string, unknown> = {}) {
|
|
121
|
+
const { filter, pageNumber, pageSize, sortField, agendamentoId } = params
|
|
122
|
+
const filterObj = (filter as Record<string, unknown>) || {}
|
|
123
|
+
|
|
124
|
+
const queryParams = new URLSearchParams()
|
|
125
|
+
|
|
126
|
+
if (filterObj.nome) queryParams.append('nome', String(filterObj.nome))
|
|
127
|
+
if (filterObj.cpf) queryParams.append('cpf', String(filterObj.cpf))
|
|
128
|
+
if (agendamentoId) queryParams.append('agendamentoId', String(agendamentoId))
|
|
129
|
+
if (pageNumber) queryParams.append('page', String(pageNumber))
|
|
130
|
+
if (pageSize) queryParams.append('size', String(pageSize))
|
|
131
|
+
if (sortField) queryParams.append('sort', JSON.stringify([sortField]))
|
|
132
|
+
|
|
133
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<Record<string, unknown>>>({
|
|
134
|
+
url: `${endpointsConfig.agendamento.restricao.motoristasSemRestricao}?${queryParams.toString()}`,
|
|
135
|
+
method: 'get',
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export async function apiGetVeiculosSemRestricao(params: Record<string, unknown> = {}) {
|
|
140
|
+
const { filter, pageNumber, pageSize, sortField, agendamentoId } = params
|
|
141
|
+
const filterObj = (filter as Record<string, unknown>) || {}
|
|
142
|
+
|
|
143
|
+
const queryParams = new URLSearchParams()
|
|
144
|
+
|
|
145
|
+
if (filterObj.placa) queryParams.append('placa', String(filterObj.placa))
|
|
146
|
+
if (agendamentoId) queryParams.append('agendamentoId', String(agendamentoId))
|
|
147
|
+
if (pageNumber) queryParams.append('page', String(pageNumber))
|
|
148
|
+
if (pageSize) queryParams.append('size', String(pageSize))
|
|
149
|
+
if (sortField) queryParams.append('sort', JSON.stringify([sortField]))
|
|
150
|
+
|
|
151
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<Record<string, unknown>>>({
|
|
152
|
+
url: `${endpointsConfig.agendamento.restricao.veiculosSemRestricao}?${queryParams.toString()}`,
|
|
153
|
+
method: 'get',
|
|
154
|
+
})
|
|
155
|
+
}
|