@orbe-agro/client-core 5.3.219 → 5.3.221
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/@types/base/@types/api/response/originacao/TFindAllPagamentoResponse.d.ts +1 -0
- package/dist/@types/base/@types/api/response/originacao/TFindAllPagamentoResponse.d.ts.map +1 -1
- package/dist/@types/base/@types/models/commodities/pedidoVenda.d.ts +2 -2
- package/dist/@types/base/@types/models/commodities/pedidoVenda.d.ts.map +1 -1
- package/dist/@types/base/@types/models/racao/tabelaPreco.d.ts +1 -0
- package/dist/@types/base/@types/models/racao/tabelaPreco.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/dm/config/businessPartner.d.ts +4 -0
- package/dist/@types/base/configs/endpoints.config/dm/config/businessPartner.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/dm/dm.d.ts +4 -0
- package/dist/@types/base/configs/endpoints.config/dm/dm.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +6 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/originacao/config/pagamento.d.ts +2 -0
- package/dist/@types/base/configs/endpoints.config/originacao/config/pagamento.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/originacao/originacao.d.ts +2 -0
- package/dist/@types/base/configs/endpoints.config/originacao/originacao.d.ts.map +1 -1
- package/dist/@types/base/hooks/dm/businessPartner/useBusinessPartnerFuncoesParceirosClientesPedidoVendaList.d.ts +13 -0
- package/dist/@types/base/hooks/dm/businessPartner/useBusinessPartnerFuncoesParceirosClientesPedidoVendaList.d.ts.map +1 -0
- package/dist/@types/base/hooks/dm/produto/useFindProdutosByCanalDistribuicaoAndOrganizacaoVendaList.d.ts +1 -1
- package/dist/@types/base/hooks/dm/produto/useFindProdutosByCanalDistribuicaoAndOrganizacaoVendaList.d.ts.map +1 -1
- package/dist/@types/base/hooks/index.d.ts +1 -0
- package/dist/@types/base/hooks/index.d.ts.map +1 -1
- package/dist/@types/base/services/modules/dm/businessPartner/BusinessPartnerService.d.ts +1 -0
- package/dist/@types/base/services/modules/dm/businessPartner/BusinessPartnerService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/dm/produto/ProdutoService.d.ts +1 -1
- package/dist/@types/base/services/modules/dm/produto/ProdutoService.d.ts.map +1 -1
- package/dist/@types/base/services/modules/originacao/pagamento/pagamentoService.d.ts +2 -0
- package/dist/@types/base/services/modules/originacao/pagamento/pagamentoService.d.ts.map +1 -1
- package/dist/base/@types/models/commodities/pedidoVenda.js.map +1 -1
- package/dist/base/configs/endpoints.config/dm/config/businessPartner.js +1 -0
- package/dist/base/configs/endpoints.config/dm/config/businessPartner.js.map +1 -1
- package/dist/base/configs/endpoints.config/dm/config/produto.js +1 -1
- package/dist/base/configs/endpoints.config/dm/config/produto.js.map +1 -1
- package/dist/base/configs/endpoints.config/originacao/config/pagamento.js +3 -1
- package/dist/base/configs/endpoints.config/originacao/config/pagamento.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFuncoesParceirosClientesPedidoVendaList.js +26 -0
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFuncoesParceirosClientesPedidoVendaList.js.map +1 -0
- package/dist/base/hooks/dm/produto/useFindProdutosByCanalDistribuicaoAndOrganizacaoVendaList.js +17 -26
- package/dist/base/hooks/dm/produto/useFindProdutosByCanalDistribuicaoAndOrganizacaoVendaList.js.map +1 -1
- package/dist/base/hooks/index.js +108 -106
- package/dist/base/hooks/index.js.map +1 -1
- package/dist/base/index.js +537 -534
- package/dist/base/index.js.map +1 -1
- package/dist/base/services/index.js +393 -392
- package/dist/base/services/modules/dm/businessPartner/BusinessPartnerService.js +22 -13
- package/dist/base/services/modules/dm/businessPartner/BusinessPartnerService.js.map +1 -1
- package/dist/base/services/modules/dm/index.js +88 -87
- package/dist/base/services/modules/dm/produto/ProdutoService.js +7 -5
- package/dist/base/services/modules/dm/produto/ProdutoService.js.map +1 -1
- package/dist/base/services/modules/index.js +389 -388
- package/dist/base/services/modules/originacao/pagamento/pagamentoService.js +22 -7
- package/dist/base/services/modules/originacao/pagamento/pagamentoService.js.map +1 -1
- package/lib/base/@types/api/response/originacao/TFindAllPagamentoResponse.ts +1 -0
- package/lib/base/@types/models/commodities/pedidoVenda.ts +2 -2
- package/lib/base/@types/models/racao/tabelaPreco.ts +1 -0
- package/lib/base/configs/endpoints.config/dm/config/businessPartner.ts +1 -0
- package/lib/base/configs/endpoints.config/dm/config/produto.ts +1 -1
- package/lib/base/configs/endpoints.config/originacao/config/pagamento.ts +2 -0
- package/lib/base/hooks/dm/businessPartner/useBusinessPartnerFuncoesParceirosClientesPedidoVendaList.tsx +33 -0
- package/lib/base/hooks/dm/produto/useFindProdutosByCanalDistribuicaoAndOrganizacaoVendaList.tsx +5 -19
- package/lib/base/hooks/index.ts +1 -0
- package/lib/base/services/modules/dm/businessPartner/BusinessPartnerService.ts +11 -0
- package/lib/base/services/modules/dm/produto/ProdutoService.ts +7 -2
- package/lib/base/services/modules/originacao/pagamento/pagamentoService.ts +15 -0
- package/package.json +1 -1
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
async function
|
|
5
|
-
return
|
|
6
|
-
url:
|
|
1
|
+
import t from "../../../../../@ecme/services/ApiService.js";
|
|
2
|
+
import i from "../../../../configs/endpoints.config/endpoints.navigation.js";
|
|
3
|
+
const o = i.originacao.pagamento;
|
|
4
|
+
async function c(a) {
|
|
5
|
+
return t.fetchDataWithAxios({
|
|
6
|
+
url: o.findAll(a),
|
|
7
7
|
method: "get"
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
+
async function g(a, r) {
|
|
11
|
+
return t.fetchDataWithAxios({
|
|
12
|
+
url: o.prorrogarData(String(a)),
|
|
13
|
+
method: "patch",
|
|
14
|
+
data: { novaDataPagamento: r }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
async function m(a) {
|
|
18
|
+
return t.fetchDataWithAxios({
|
|
19
|
+
url: o.liberarPagamento(String(a)),
|
|
20
|
+
method: "post"
|
|
21
|
+
});
|
|
22
|
+
}
|
|
10
23
|
export {
|
|
11
|
-
|
|
24
|
+
c as apiFindAllPagamento,
|
|
25
|
+
m as apiLiberarPagamento,
|
|
26
|
+
g as apiProrrogarDataPagamento
|
|
12
27
|
};
|
|
13
28
|
//# sourceMappingURL=pagamentoService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagamentoService.js","sources":["../../../../../../lib/base/services/modules/originacao/pagamento/pagamentoService.ts"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { TQueryResponse } from \"@base/@types/api\";\nimport { TFindAllPagamentoResponse } from \"@base/@types/api/response/originacao/TFindAllPagamentoResponse\";\nimport endpointNavigationConfig from \"@base/configs/endpoints.config/endpoints.navigation\";\n\nconst PAGAMENTO_ORIGINACAO_ENDPOINT = endpointNavigationConfig.originacao.pagamento;\n\nexport async function apiFindAllPagamento(params?: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFindAllPagamentoResponse>>({\n url: PAGAMENTO_ORIGINACAO_ENDPOINT.findAll(params),\n method: \"get\",\n });\n}\n"],"names":["PAGAMENTO_ORIGINACAO_ENDPOINT","endpointNavigationConfig","apiFindAllPagamento","params","ApiService"],"mappings":";;AAKA,MAAMA,IAAgCC,EAAyB,WAAW;AAE1E,eAAsBC,EAAoBC,GAAiB;AACzD,SAAOC,EAAW,mBAA8D;AAAA,IAC9E,KAAKJ,EAA8B,QAAQG,CAAM;AAAA,IACjD,QAAQ;AAAA,EAAA,CACT;AACH;"}
|
|
1
|
+
{"version":3,"file":"pagamentoService.js","sources":["../../../../../../lib/base/services/modules/originacao/pagamento/pagamentoService.ts"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { TQueryResponse } from \"@base/@types/api\";\nimport { TFindAllPagamentoResponse } from \"@base/@types/api/response/originacao/TFindAllPagamentoResponse\";\nimport endpointNavigationConfig from \"@base/configs/endpoints.config/endpoints.navigation\";\n\nconst PAGAMENTO_ORIGINACAO_ENDPOINT = endpointNavigationConfig.originacao.pagamento;\n\nexport async function apiFindAllPagamento(params?: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFindAllPagamentoResponse>>({\n url: PAGAMENTO_ORIGINACAO_ENDPOINT.findAll(params),\n method: \"get\",\n });\n}\n\nexport async function apiProrrogarDataPagamento(id: number | string, novaDataPagamento: string) {\n return ApiService.fetchDataWithAxios<void>({\n url: PAGAMENTO_ORIGINACAO_ENDPOINT.prorrogarData(String(id)),\n method: \"patch\",\n data: { novaDataPagamento },\n });\n}\n\nexport async function apiLiberarPagamento(id: number | string) {\n return ApiService.fetchDataWithAxios<void>({\n url: PAGAMENTO_ORIGINACAO_ENDPOINT.liberarPagamento(String(id)),\n method: \"post\",\n });\n}\n"],"names":["PAGAMENTO_ORIGINACAO_ENDPOINT","endpointNavigationConfig","apiFindAllPagamento","params","ApiService","apiProrrogarDataPagamento","id","novaDataPagamento","apiLiberarPagamento"],"mappings":";;AAKA,MAAMA,IAAgCC,EAAyB,WAAW;AAE1E,eAAsBC,EAAoBC,GAAiB;AACzD,SAAOC,EAAW,mBAA8D;AAAA,IAC9E,KAAKJ,EAA8B,QAAQG,CAAM;AAAA,IACjD,QAAQ;AAAA,EAAA,CACT;AACH;AAEsB,eAAAE,EAA0BC,GAAqBC,GAA2B;AAC9F,SAAOH,EAAW,mBAAyB;AAAA,IACzC,KAAKJ,EAA8B,cAAc,OAAOM,CAAE,CAAC;AAAA,IAC3D,QAAQ;AAAA,IACR,MAAM,EAAE,mBAAAC,EAAkB;AAAA,EAAA,CAC3B;AACH;AAEA,eAAsBC,EAAoBF,GAAqB;AAC7D,SAAOF,EAAW,mBAAyB;AAAA,IACzC,KAAKJ,EAA8B,iBAAiB,OAAOM,CAAE,CAAC;AAAA,IAC9D,QAAQ;AAAA,EAAA,CACT;AACH;"}
|
|
@@ -17,6 +17,7 @@ export type TFindAllPagamentoResponse = {
|
|
|
17
17
|
dataPagamento: string;
|
|
18
18
|
valorBruto: number;
|
|
19
19
|
valorLiquido: number;
|
|
20
|
+
valorRetencoes: number;
|
|
20
21
|
retencoes: TRetencaoResponse[];
|
|
21
22
|
statusPagamentoLiquidacao: StatusPagamentoLiquidacao;
|
|
22
23
|
docAgrupamentoSap: string;
|
|
@@ -51,8 +51,8 @@ export type TClientePedidoVenda = {
|
|
|
51
51
|
organizacaoVendaCodigo: string
|
|
52
52
|
canalDistribuicaoCodigo: string
|
|
53
53
|
setorAtividadeCodigo: string
|
|
54
|
-
escritorioVendaCodigo?: string
|
|
55
|
-
equipeVendaCodigo?: string
|
|
54
|
+
escritorioVendaCodigo?: string | null
|
|
55
|
+
equipeVendaCodigo?: string | null
|
|
56
56
|
vendedorId: number
|
|
57
57
|
vendedorCodigo: string
|
|
58
58
|
recebedorId: number
|
|
@@ -12,6 +12,7 @@ const businessPartner = {
|
|
|
12
12
|
findBusinessPartnerMatrizes: { endpoint: `${BUSINESS_PARTNER_BASE_URL}/find-business-partner-matrizes`, method: 'post' },
|
|
13
13
|
findFornecedorNfeByCnpj: { endpoint: `${BUSINESS_PARTNER_BASE_URL}/{cnpj}/find-fornecedor-nfe`, httpMethod: 'get' },
|
|
14
14
|
findBusinessPartnerFuncoesParceirosClientes: { endpoint: `${BUSINESS_PARTNER_BASE_URL}/find-bp-vinculo-funcao-parceiros-clientes`, method: 'post' },
|
|
15
|
+
findBusinessPartnerFuncoesParceirosClientesPedidoVenda: { endpoint: `${BUSINESS_PARTNER_BASE_URL}/find-bp-vinculo-funcao-parceiros-clientes-pedido-venda`, method: 'post' },
|
|
15
16
|
findBusinessPartnerFuncoesParceirosFornecedores: { endpoint: `${BUSINESS_PARTNER_BASE_URL}/find-bp-vinculo-funcao-parceiros-fornecedores`, method: 'post' },
|
|
16
17
|
findBusinessPartnerByClientOrSupplierFunction: { endpoint: `${BUSINESS_PARTNER_BASE_URL}/find-vendedores-aka-representantes-vendas`, method: 'get' },
|
|
17
18
|
findSalesAreasByBusinessPartnerAndModulo: { endpoint: `${BUSINESS_PARTNER_BASE_URL}/find-sales-areas-client-by-business-partner-and-modulo/`, method: 'get' }
|
|
@@ -7,7 +7,7 @@ const produto = {
|
|
|
7
7
|
findProdutosByGrupoProduto: { endpoint: `${PRODUTO_BASE_URL}/find-produtos-by-grupo-produto`, method: 'post' },
|
|
8
8
|
findMonitor: { endpoint: `${PRODUTO_BASE_URL}/find-monitor`, httpMethod: 'post' },
|
|
9
9
|
validaProdutoByEmissorPedidoVenda: { endpoint: `${PRODUTO_BASE_URL}/valida-produto-by-emissor-pedido-venda/`, method: 'get' },
|
|
10
|
-
findProdutosByCanalDistribuicaoAndOrganizacaoVenda: { endpoint: `${PRODUTO_BASE_URL}/find-produtos-by-canal-distribuicao-and-organizacao-venda
|
|
10
|
+
findProdutosByCanalDistribuicaoAndOrganizacaoVenda: { endpoint: `${PRODUTO_BASE_URL}/find-produtos-by-canal-distribuicao-and-organizacao-venda`, method: 'post' },
|
|
11
11
|
findDescricaoById: { endpoint: `${PRODUTO_BASE_URL}/{id}/descricao`, method: 'get' },
|
|
12
12
|
findByIds: { endpoint: `${PRODUTO_BASE_URL}/find-by-ids`, method: 'post' },
|
|
13
13
|
findByCodigos: { endpoint: `${PRODUTO_BASE_URL}/find-by-codigos`, method: 'post' },
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const pagamento = {
|
|
2
2
|
findAll: (params?: string) => `/originacao/api/pagamentos${params ? `?${params}` : ''}`,
|
|
3
|
+
prorrogarData: (id: string) => `/originacao/api/pagamentos/${id}/prorrogar-data`,
|
|
4
|
+
liberarPagamento: (id: string) => `/originacao/api/pagamentos/${id}/liberar-pagamento`,
|
|
3
5
|
}
|
|
4
6
|
|
|
5
7
|
export default pagamento;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { apiFindDmBusinessPartnerFuncoesParceirosClientesPedidoVenda } from '@base/services/modules/dm/businessPartner/BusinessPartnerService'
|
|
2
|
+
import { useBusinessPartnerListStore } from '@base/store/dm/businesPartner/businessPartnerListStore';
|
|
3
|
+
import useSWR from 'swr'
|
|
4
|
+
|
|
5
|
+
export default function useBusinessPartnerFuncoesParceirosClientesPedidoVendaList() {
|
|
6
|
+
const { tableParams, filterParams, setTableParams, setFilterParams } =
|
|
7
|
+
useBusinessPartnerListStore((state) => state);
|
|
8
|
+
|
|
9
|
+
const swrKey = ["/api/dm/business-partner/find-bp-vinculo-funcao-parceiros-clientes-pedido-venda", filterParams];
|
|
10
|
+
|
|
11
|
+
const { data, error, isLoading, mutate } = useSWR(
|
|
12
|
+
swrKey,
|
|
13
|
+
() => apiFindDmBusinessPartnerFuncoesParceirosClientesPedidoVenda(filterParams),
|
|
14
|
+
{ revalidateOnFocus: false }
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
const businessPartnerFuncoesParceirosClientesPedidoVendaList = data || [];
|
|
18
|
+
|
|
19
|
+
const businessPartnerFuncoesParceirosClientesPedidoVendaListTotal = data?.length || 0;
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
data,
|
|
23
|
+
businessPartnerFuncoesParceirosClientesPedidoVendaList,
|
|
24
|
+
businessPartnerFuncoesParceirosClientesPedidoVendaListTotal,
|
|
25
|
+
error,
|
|
26
|
+
isLoading,
|
|
27
|
+
tableParams,
|
|
28
|
+
filterParams,
|
|
29
|
+
mutate,
|
|
30
|
+
setTableParams,
|
|
31
|
+
setFilterParams,
|
|
32
|
+
};
|
|
33
|
+
}
|
package/lib/base/hooks/dm/produto/useFindProdutosByCanalDistribuicaoAndOrganizacaoVendaList.tsx
CHANGED
|
@@ -6,27 +6,13 @@ export default function useFindProdutosByCanalDistribuicaoAndOrganizacaoVendaLis
|
|
|
6
6
|
const { tableParamsProduto, filterParamsProduto, setTableParamsProduto, setFilterParamsProduto } =
|
|
7
7
|
useProdutoListStoreUseMulti((state) => state)
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
const organizacaoVenda = filterParamsProduto?.organizacaoVenda
|
|
11
|
-
const grupoProduto = filterParamsProduto?.grupoProduto
|
|
9
|
+
const swrKey = ["/api/dm/produto/find-produtos-by-canal-distribuicao-and-organizacao-venda", filterParamsProduto];
|
|
12
10
|
|
|
13
11
|
const { data, error, isLoading, mutate } = useSWR(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
organizacaoVenda,
|
|
19
|
-
grupoProduto
|
|
20
|
-
]
|
|
21
|
-
: null,
|
|
22
|
-
([, canalDistribuicao, organizacaoVenda, grupoProduto]: [string, string, string,string]) =>
|
|
23
|
-
apiFindDmFindProdutosByCanalDistribuicaoAndOrganizacaoVenda(
|
|
24
|
-
canalDistribuicao,
|
|
25
|
-
organizacaoVenda,
|
|
26
|
-
grupoProduto
|
|
27
|
-
),
|
|
28
|
-
{ revalidateOnFocus: false },
|
|
29
|
-
)
|
|
12
|
+
swrKey,
|
|
13
|
+
() => apiFindDmFindProdutosByCanalDistribuicaoAndOrganizacaoVenda(filterParamsProduto),
|
|
14
|
+
{ revalidateOnFocus: false }
|
|
15
|
+
);
|
|
30
16
|
|
|
31
17
|
const produtosByCanalDistribuicaoAndOrganizacaoVendaList = data || []
|
|
32
18
|
|
package/lib/base/hooks/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as useBusinessPartnerClienteList } from './dm/businessPartner/u
|
|
|
6
6
|
export { default as useBusinessPartnerFiliaisList } from './dm/businessPartner/useBusinessPartnerFiliaisList';
|
|
7
7
|
export { default as useBusinessPartnerFornecedorList } from './dm/businessPartner/useBusinessPartnerFornecedorList';
|
|
8
8
|
export { default as useBusinessPartnerFuncoesParceirosClientesList } from './dm/businessPartner/useBusinessPartnerFuncoesParceirosClientesList';
|
|
9
|
+
export { default as useBusinessPartnerFuncoesParceirosClientesPedidoVendaList} from './dm/businessPartner/useBusinessPartnerFuncoesParceirosClientesPedidoVendaList'
|
|
9
10
|
export { default as useBusinessPartnerFuncoesParceirosFornecedoresList } from './dm/businessPartner/useBusinessPartnerFuncoesParceirosFornecedoresList';
|
|
10
11
|
export { default as useBusinessPartnerList } from './dm/businessPartner/useBusinessPartnerList';
|
|
11
12
|
export { default as useBusinessPartnerMatrizesList } from './dm/businessPartner/useBusinessPartnerMatrizesList';
|
|
@@ -105,6 +105,17 @@ export async function apiFindDmBusinessPartnerFuncoesParceirosClientes(body?: IF
|
|
|
105
105
|
})
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
export async function apiFindDmBusinessPartnerFuncoesParceirosClientesPedidoVenda(body?: IFilterParams) {
|
|
109
|
+
if (!body || Object.keys(body).length === 0) {
|
|
110
|
+
return undefined
|
|
111
|
+
}
|
|
112
|
+
return ApiService.fetchDataWithAxios<TBusinessPartner[]>({
|
|
113
|
+
url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientesPedidoVenda.endpoint,
|
|
114
|
+
method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientesPedidoVenda.method,
|
|
115
|
+
data: body,
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
|
|
108
119
|
export async function apiFindDmBusinessPartnerFuncoesParceirosFornecedores(body?: IFilterParams) {
|
|
109
120
|
if (!body || Object.keys(body).length === 0) {
|
|
110
121
|
return undefined
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import ApiService from "@/services/ApiService";
|
|
2
3
|
import { IFilterParams, TQueryResponse } from "@base/@types/api";
|
|
3
4
|
import { TProduto } from "@base/@types/models/dm/produto";
|
|
@@ -70,10 +71,14 @@ export async function apiFindDmValidaProdutoByEmissorPedidoVenda(organizacaoVend
|
|
|
70
71
|
})
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
export async function apiFindDmFindProdutosByCanalDistribuicaoAndOrganizacaoVenda(
|
|
74
|
+
export async function apiFindDmFindProdutosByCanalDistribuicaoAndOrganizacaoVenda(body?: IFilterParams) {
|
|
75
|
+
if (!body || Object.keys(body).length === 0) {
|
|
76
|
+
return undefined
|
|
77
|
+
}
|
|
74
78
|
return ApiService.fetchDataWithAxios<TProduto[]>({
|
|
75
|
-
url: PRODUTO_ENDPOINT.findProdutosByCanalDistribuicaoAndOrganizacaoVenda.endpoint
|
|
79
|
+
url: PRODUTO_ENDPOINT.findProdutosByCanalDistribuicaoAndOrganizacaoVenda.endpoint,
|
|
76
80
|
method: PRODUTO_ENDPOINT.findProdutosByCanalDistribuicaoAndOrganizacaoVenda.method,
|
|
81
|
+
data: body,
|
|
77
82
|
})
|
|
78
83
|
}
|
|
79
84
|
|
|
@@ -11,3 +11,18 @@ export async function apiFindAllPagamento(params?: string) {
|
|
|
11
11
|
method: "get",
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
export async function apiProrrogarDataPagamento(id: number | string, novaDataPagamento: string) {
|
|
16
|
+
return ApiService.fetchDataWithAxios<void>({
|
|
17
|
+
url: PAGAMENTO_ORIGINACAO_ENDPOINT.prorrogarData(String(id)),
|
|
18
|
+
method: "patch",
|
|
19
|
+
data: { novaDataPagamento },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function apiLiberarPagamento(id: number | string) {
|
|
24
|
+
return ApiService.fetchDataWithAxios<void>({
|
|
25
|
+
url: PAGAMENTO_ORIGINACAO_ENDPOINT.liberarPagamento(String(id)),
|
|
26
|
+
method: "post",
|
|
27
|
+
});
|
|
28
|
+
}
|
package/package.json
CHANGED