@orbe-agro/client-core-prod 5.3.255 → 5.3.259

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/@types/base/@types/models/racao/tabelaPreco.d.ts +6 -1
  2. package/dist/@types/base/@types/models/racao/tabelaPreco.d.ts.map +1 -1
  3. package/dist/@types/base/@types/store/insumos/itemCompra/index.d.ts +12 -0
  4. package/dist/@types/base/@types/store/insumos/itemCompra/index.d.ts.map +1 -0
  5. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +4 -0
  6. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
  7. package/dist/@types/base/configs/endpoints.config/insumos/config/itemCompra.d.ts +4 -0
  8. package/dist/@types/base/configs/endpoints.config/insumos/config/itemCompra.d.ts.map +1 -1
  9. package/dist/@types/base/configs/endpoints.config/insumos/insumos.d.ts +4 -0
  10. package/dist/@types/base/configs/endpoints.config/insumos/insumos.d.ts.map +1 -1
  11. package/dist/@types/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.d.ts +3 -3
  12. package/dist/@types/base/hooks/index.d.ts +1 -0
  13. package/dist/@types/base/hooks/index.d.ts.map +1 -1
  14. package/dist/@types/base/hooks/insumos/itemCompra/useFindPrecoMedioProdutosList.d.ts +13 -0
  15. package/dist/@types/base/hooks/insumos/itemCompra/useFindPrecoMedioProdutosList.d.ts.map +1 -0
  16. package/dist/@types/base/services/modules/dm/businessPartner/BusinessPartnerService.d.ts +1 -1
  17. package/dist/@types/base/services/modules/dm/businessPartner/BusinessPartnerService.d.ts.map +1 -1
  18. package/dist/@types/base/services/modules/insumos/itemCompra/ItemCompraService.d.ts +1 -0
  19. package/dist/@types/base/services/modules/insumos/itemCompra/ItemCompraService.d.ts.map +1 -1
  20. package/dist/@types/base/store/insumos/itemCompra/itemCompraListStore.d.ts +4 -0
  21. package/dist/@types/base/store/insumos/itemCompra/itemCompraListStore.d.ts.map +1 -0
  22. package/dist/base/@types/store/insumos/itemCompra/index.js +2 -0
  23. package/dist/base/@types/store/insumos/itemCompra/index.js.map +1 -0
  24. package/dist/base/configs/endpoints.config/insumos/config/itemCompra.js +11 -10
  25. package/dist/base/configs/endpoints.config/insumos/config/itemCompra.js.map +1 -1
  26. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js +10 -10
  27. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js.map +1 -1
  28. package/dist/base/hooks/index.js +10 -8
  29. package/dist/base/hooks/index.js.map +1 -1
  30. package/dist/base/hooks/insumos/itemCompra/useFindPrecoMedioProdutosList.js +26 -0
  31. package/dist/base/hooks/insumos/itemCompra/useFindPrecoMedioProdutosList.js.map +1 -0
  32. package/dist/base/index.js +485 -483
  33. package/dist/base/index.js.map +1 -1
  34. package/dist/base/services/modules/dm/businessPartner/BusinessPartnerService.js.map +1 -1
  35. package/dist/base/services/modules/insumos/itemCompra/ItemCompraService.js +54 -45
  36. package/dist/base/services/modules/insumos/itemCompra/ItemCompraService.js.map +1 -1
  37. package/dist/base/store/insumos/itemCompra/itemCompraListStore.js +14 -0
  38. package/dist/base/store/insumos/itemCompra/itemCompraListStore.js.map +1 -0
  39. package/lib/base/@types/models/racao/tabelaPreco.ts +6 -1
  40. package/lib/base/@types/store/insumos/itemCompra/index.ts +15 -0
  41. package/lib/base/configs/endpoints.config/insumos/config/itemCompra.ts +1 -0
  42. package/lib/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.tsx +2 -2
  43. package/lib/base/hooks/index.ts +1 -0
  44. package/lib/base/hooks/insumos/itemCompra/useFindPrecoMedioProdutosList.tsx +33 -0
  45. package/lib/base/services/modules/dm/businessPartner/BusinessPartnerService.ts +2 -1
  46. package/lib/base/services/modules/insumos/itemCompra/ItemCompraService.ts +11 -0
  47. package/lib/base/store/insumos/itemCompra/itemCompraListStore.ts +19 -0
  48. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"BusinessPartnerService.js","sources":["../../../../../../lib/base/services/modules/dm/businessPartner/BusinessPartnerService.ts"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TAreaVendaCliente, TBusinessPartner } from \"@base/@types/models/dm/businessPartner\";\nimport { endpointsConfig } from \"@base/configs\";\n\nconst BUSINESS_PARTNER_ENDPOINT = endpointsConfig.dm.businessPartner;\n\nexport async function apiGetDmBusinessPartner(id: number) {\n return ApiService.fetchDataWithAxios<TBusinessPartner>({\n url: BUSINESS_PARTNER_ENDPOINT.findOne.endpoint + `${id}`,\n method: BUSINESS_PARTNER_ENDPOINT.findOne.method,\n })\n}\n\nexport async function apiFindDmBusinessPartner(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TBusinessPartner[]>>({\n url: BUSINESS_PARTNER_ENDPOINT.find.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.find.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerCliente(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFornecedor(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.method,\n data: body,\n })\n}\n\nexport async function apiFindMonitorFornecedor(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindEmpresasIdsByCnpj(cnpj: string) {\n return ApiService.fetchDataWithAxios<any>({\n url: BUSINESS_PARTNER_ENDPOINT.findEmpresasIdsByCnpj.endpoint.replace('{cnpj}', cnpj),\n method: BUSINESS_PARTNER_ENDPOINT.findEmpresasIdsByCnpj.httpMethod,\n })\n}\n\nexport async function apiFindMonitorTransportadora(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFiliais(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerMatrizes(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.method,\n data: body,\n })\n}\n\nexport async function apiFindFornecedorNfeByCnpj(cnpj: string) {\n return ApiService.fetchDataWithAxios<any>({\n url: BUSINESS_PARTNER_ENDPOINT.findFornecedorNfeByCnpj.endpoint.replace('{cnpj}', cnpj),\n method: BUSINESS_PARTNER_ENDPOINT.findFornecedorNfeByCnpj.httpMethod,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFuncoesParceirosClientes(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientes.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientes.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFuncoesParceirosClientesPedidoVenda(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientesPedidoVenda.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientesPedidoVenda.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFuncoesParceirosFornecedores(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosFornecedores.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosFornecedores.method,\n data: body,\n })\n}\n\nexport async function apiFindDmVendedoresAKARepresentantesVendas(data = {}) {\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerByClientOrSupplierFunction.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerByClientOrSupplierFunction.method,\n data,\n });\n}\n\nexport async function apiFindDmFindSalesAreasByBusinessPartnerAndModulo(businessPartner: string, modulo: string) {\n return ApiService.fetchDataWithAxios<TAreaVendaCliente[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findSalesAreasByBusinessPartnerAndModulo.endpoint + `${businessPartner}/` + `${modulo}`,\n method: BUSINESS_PARTNER_ENDPOINT.findSalesAreasByBusinessPartnerAndModulo.method,\n })\n}"],"names":["BUSINESS_PARTNER_ENDPOINT","endpointsConfig","apiGetDmBusinessPartner","id","ApiService","apiFindDmBusinessPartner","body","apiFindDmBusinessPartnerCliente","apiFindDmBusinessPartnerFornecedor","apiFindMonitorFornecedor","apiFindEmpresasIdsByCnpj","cnpj","apiFindMonitorTransportadora","apiFindDmBusinessPartnerFiliais","apiFindDmBusinessPartnerMatrizes","apiFindFornecedorNfeByCnpj","apiFindDmBusinessPartnerFuncoesParceirosClientes","apiFindDmBusinessPartnerFuncoesParceirosClientesPedidoVenda","apiFindDmBusinessPartnerFuncoesParceirosFornecedores","apiFindDmVendedoresAKARepresentantesVendas","data","apiFindDmFindSalesAreasByBusinessPartnerAndModulo","businessPartner","modulo"],"mappings":";;;AAKA,MAAMA,IAA4BC,EAAgB,GAAG;AAErD,eAAsBC,EAAwBC,GAAY;AACtD,SAAOC,EAAW,mBAAqC;AAAA,IACnD,KAAKJ,EAA0B,QAAQ,WAAW,GAAGG,CAAE;AAAA,IACvD,QAAQH,EAA0B,QAAQ;AAAA,EAAA,CAC7C;AACL;AAEA,eAAsBK,EAAyBC,GAAsB;AACjE,SAAOF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I;AACxE,SAAOhB,EAAW,mBAAuC;AAAA,IACrD,KAAKJ,EAA0B,8CAA8C;AAAA,IAC7E,QAAQA,EAA0B,8CAA8C;AAAA,IAChF,MAAAoB;AAAA,EAAA,CACH;AACL;AAEsB,eAAAC,EAAkDC,GAAyBC,GAAgB;AAC7G,SAAOnB,EAAW,mBAAwC;AAAA,IACtD,KAAKJ,EAA0B,yCAAyC,WAAW,GAAGsB,CAAe,IAASC,CAAM;AAAA,IACpH,QAAQvB,EAA0B,yCAAyC;AAAA,EAAA,CAC9E;AACL;"}
1
+ {"version":3,"file":"BusinessPartnerService.js","sources":["../../../../../../lib/base/services/modules/dm/businessPartner/BusinessPartnerService.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TAreaVendaCliente, TBusinessPartner } from \"@base/@types/models/dm/businessPartner\";\nimport { endpointsConfig } from \"@base/configs\";\n\nconst BUSINESS_PARTNER_ENDPOINT = endpointsConfig.dm.businessPartner;\n\nexport async function apiGetDmBusinessPartner(id: number) {\n return ApiService.fetchDataWithAxios<TBusinessPartner>({\n url: BUSINESS_PARTNER_ENDPOINT.findOne.endpoint + `${id}`,\n method: BUSINESS_PARTNER_ENDPOINT.findOne.method,\n })\n}\n\nexport async function apiFindDmBusinessPartner(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TBusinessPartner[]>>({\n url: BUSINESS_PARTNER_ENDPOINT.find.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.find.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerCliente(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFornecedor(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TQueryResponse<TBusinessPartner[]>>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.method,\n data: body,\n })\n}\n\nexport async function apiFindMonitorFornecedor(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindEmpresasIdsByCnpj(cnpj: string) {\n return ApiService.fetchDataWithAxios<any>({\n url: BUSINESS_PARTNER_ENDPOINT.findEmpresasIdsByCnpj.endpoint.replace('{cnpj}', cnpj),\n method: BUSINESS_PARTNER_ENDPOINT.findEmpresasIdsByCnpj.httpMethod,\n })\n}\n\nexport async function apiFindMonitorTransportadora(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFiliais(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerMatrizes(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.method,\n data: body,\n })\n}\n\nexport async function apiFindFornecedorNfeByCnpj(cnpj: string) {\n return ApiService.fetchDataWithAxios<any>({\n url: BUSINESS_PARTNER_ENDPOINT.findFornecedorNfeByCnpj.endpoint.replace('{cnpj}', cnpj),\n method: BUSINESS_PARTNER_ENDPOINT.findFornecedorNfeByCnpj.httpMethod,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFuncoesParceirosClientes(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientes.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientes.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFuncoesParceirosClientesPedidoVenda(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientesPedidoVenda.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosClientesPedidoVenda.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFuncoesParceirosFornecedores(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosFornecedores.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFuncoesParceirosFornecedores.method,\n data: body,\n })\n}\n\nexport async function apiFindDmVendedoresAKARepresentantesVendas(data = {}) {\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerByClientOrSupplierFunction.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerByClientOrSupplierFunction.method,\n data,\n });\n}\n\nexport async function apiFindDmFindSalesAreasByBusinessPartnerAndModulo(businessPartner: string, modulo: string) {\n return ApiService.fetchDataWithAxios<TAreaVendaCliente[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findSalesAreasByBusinessPartnerAndModulo.endpoint + `${businessPartner}/` + `${modulo}`,\n method: BUSINESS_PARTNER_ENDPOINT.findSalesAreasByBusinessPartnerAndModulo.method,\n })\n}"],"names":["BUSINESS_PARTNER_ENDPOINT","endpointsConfig","apiGetDmBusinessPartner","id","ApiService","apiFindDmBusinessPartner","body","apiFindDmBusinessPartnerCliente","apiFindDmBusinessPartnerFornecedor","apiFindMonitorFornecedor","apiFindEmpresasIdsByCnpj","cnpj","apiFindMonitorTransportadora","apiFindDmBusinessPartnerFiliais","apiFindDmBusinessPartnerMatrizes","apiFindFornecedorNfeByCnpj","apiFindDmBusinessPartnerFuncoesParceirosClientes","apiFindDmBusinessPartnerFuncoesParceirosClientesPedidoVenda","apiFindDmBusinessPartnerFuncoesParceirosFornecedores","apiFindDmVendedoresAKARepresentantesVendas","data","apiFindDmFindSalesAreasByBusinessPartnerAndModulo","businessPartner","modulo"],"mappings":";;;AAMA,MAAMA,IAA4BC,EAAgB,GAAG;AAErD,eAAsBC,EAAwBC,GAAY;AACtD,SAAOC,EAAW,mBAAqC;AAAA,IACnD,KAAKJ,EAA0B,QAAQ,WAAW,GAAGG,CAAE;AAAA,IACvD,QAAQH,EAA0B,QAAQ;AAAA,EAAA,CAC7C;AACL;AAEA,eAAsBK,EAAyBC,GAAsB;AACjE,SAAOF,EAAW,mBAAuD;AAAA,IACrE,KAAKJ,EAA0B,KAAK;AAAA,IACpC,QAAQA,EAA0B,KAAK;AAAA,IACvC,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBC,EAAgCD,GAAsB;AACxE,MAAI,GAACA,KAAQ,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AAgB;AAC7G,SAAOnB,EAAW,mBAAwC;AAAA,IACtD,KAAKJ,EAA0B,yCAAyC,WAAW,GAAGsB,CAAe,IAASC,CAAM;AAAA,IACpH,QAAQvB,EAA0B,yCAAyC;AAAA,EAAA,CAC9E;AACL;"}
@@ -1,68 +1,77 @@
1
- import n from "../../../../../@ecme/services/ApiService.js";
2
- import a from "../../../../configs/endpoints.config/endpoints.navigation.js";
3
- const t = a.insumos.itemCompra;
4
- async function r(i) {
5
- return n.fetchDataWithAxios({
6
- url: t.findOne.endpoint + `${i}`,
7
- method: t.findOne.method
1
+ import o from "../../../../../@ecme/services/ApiService.js";
2
+ import e from "../../../../configs/endpoints.config/endpoints.navigation.js";
3
+ const i = e.insumos.itemCompra;
4
+ async function r(t) {
5
+ return o.fetchDataWithAxios({
6
+ url: i.findOne.endpoint + `${t}`,
7
+ method: i.findOne.method
8
8
  });
9
9
  }
10
- async function m(i) {
11
- return n.fetchDataWithAxios({
12
- url: t.add.endpoint,
13
- method: t.add.method,
14
- data: i
10
+ async function m(t) {
11
+ return o.fetchDataWithAxios({
12
+ url: i.add.endpoint,
13
+ method: i.add.method,
14
+ data: t
15
15
  });
16
16
  }
17
- async function s(i) {
18
- return n.fetchDataWithAxios({
19
- url: t.update.endpoint,
20
- method: t.update.method,
21
- data: i
17
+ async function s(t) {
18
+ return o.fetchDataWithAxios({
19
+ url: i.update.endpoint,
20
+ method: i.update.method,
21
+ data: t
22
22
  });
23
23
  }
24
- async function p(i) {
25
- return n.fetchDataWithAxios({
26
- url: t.delete.endpoint + `${i}`,
27
- method: t.delete.method
24
+ async function u(t) {
25
+ return o.fetchDataWithAxios({
26
+ url: i.delete.endpoint + `${t}`,
27
+ method: i.delete.method
28
28
  });
29
29
  }
30
- async function u(i, o) {
31
- return n.fetchDataWithAxios({
32
- url: t.disponibilizar.endpoint + `${i}`,
33
- method: t.disponibilizar.method,
34
- data: { motivo: o }
30
+ async function p(t, n) {
31
+ return o.fetchDataWithAxios({
32
+ url: i.disponibilizar.endpoint + `${t}`,
33
+ method: i.disponibilizar.method,
34
+ data: { motivo: n }
35
35
  });
36
36
  }
37
- async function h(i, o) {
38
- return n.fetchDataWithAxios({
39
- url: t.indisponibilizar.endpoint + `${i}`,
40
- method: t.indisponibilizar.method,
41
- data: { motivo: o }
37
+ async function c(t, n) {
38
+ return o.fetchDataWithAxios({
39
+ url: i.indisponibilizar.endpoint + `${t}`,
40
+ method: i.indisponibilizar.method,
41
+ data: { motivo: n }
42
42
  });
43
43
  }
44
- async function c(i, o) {
45
- return n.fetchDataWithAxios({
46
- url: t.cancelar.endpoint + `${i}`,
47
- method: t.cancelar.method,
48
- data: { motivo: o }
44
+ async function h(t, n) {
45
+ return o.fetchDataWithAxios({
46
+ url: i.cancelar.endpoint + `${t}`,
47
+ method: i.cancelar.method,
48
+ data: { motivo: n }
49
49
  });
50
50
  }
51
- async function f(i) {
52
- return n.fetchDataWithAxios({
53
- url: t.findMonitor.endpoint,
54
- method: t.findMonitor.method,
55
- data: i
51
+ async function f(t) {
52
+ return o.fetchDataWithAxios({
53
+ url: i.findMonitor.endpoint,
54
+ method: i.findMonitor.method,
55
+ data: t
56
56
  });
57
57
  }
58
+ async function l(t) {
59
+ if (!(!t || Object.keys(t).length === 0))
60
+ return o.fetchDataWithAxios({
61
+ url: i.findPrecoMedioProdutos.endpoint,
62
+ method: i.findPrecoMedioProdutos.method,
63
+ data: t
64
+ });
65
+ }
58
66
  export {
59
67
  m as apiAddInsumosItemCompra,
60
- c as apiCancelarInsumosItemCompra,
61
- p as apiDeleteInsumosItemCompra,
62
- u as apiDisponibilizarInsumosItemCompra,
68
+ h as apiCancelarInsumosItemCompra,
69
+ u as apiDeleteInsumosItemCompra,
70
+ p as apiDisponibilizarInsumosItemCompra,
63
71
  f as apiFindMonitorInsumosItemCompra,
72
+ l as apiFindPrecoMedioProdutosInsumosItemCompra,
64
73
  r as apiGetInsumosItemCompra,
65
- h as apiIndisponibilizarInsumosItemCompra,
74
+ c as apiIndisponibilizarInsumosItemCompra,
66
75
  s as apiUpdateInsumosItemCompra
67
76
  };
68
77
  //# sourceMappingURL=ItemCompraService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ItemCompraService.js","sources":["../../../../../../lib/base/services/modules/insumos/itemCompra/ItemCompraService.ts"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TItemCompra } from \"@base/@types/models/insumos/itemCompra\";\nimport endpointConfig from \"@base/configs/endpoints.config/endpoints.navigation\";\n\nconst ITEM_COMPRA_ENDPOINT = endpointConfig.insumos.itemCompra;\n\nexport async function apiGetInsumosItemCompra(id: number) {\n return ApiService.fetchDataWithAxios<TItemCompra>({\n url: ITEM_COMPRA_ENDPOINT.findOne.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.findOne.method,\n })\n}\n\nexport async function apiAddInsumosItemCompra(body: TItemCompra) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.add.endpoint,\n method: ITEM_COMPRA_ENDPOINT.add.method,\n data: body,\n })\n}\n\nexport async function apiUpdateInsumosItemCompra(body: TItemCompra) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.update.endpoint,\n method: ITEM_COMPRA_ENDPOINT.update.method,\n data: body,\n })\n}\n\nexport async function apiDeleteInsumosItemCompra(id: number) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.delete.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.delete.method,\n })\n}\n\nexport async function apiDisponibilizarInsumosItemCompra(id: number, motivo: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.disponibilizar.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.disponibilizar.method,\n data: { motivo: motivo }\n })\n}\n\nexport async function apiIndisponibilizarInsumosItemCompra(id: number, motivo: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.indisponibilizar.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.indisponibilizar.method,\n data: { motivo: motivo }\n })\n}\n\nexport async function apiCancelarInsumosItemCompra(id: number, motivo: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.cancelar.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.cancelar.method,\n data: { motivo: motivo }\n })\n}\n\nexport async function apiFindMonitorInsumosItemCompra(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.findMonitor.endpoint,\n method: ITEM_COMPRA_ENDPOINT.findMonitor.method,\n data: body,\n })\n}\n"],"names":["ITEM_COMPRA_ENDPOINT","endpointConfig","apiGetInsumosItemCompra","id","ApiService","apiAddInsumosItemCompra","body","apiUpdateInsumosItemCompra","apiDeleteInsumosItemCompra","apiDisponibilizarInsumosItemCompra","motivo","apiIndisponibilizarInsumosItemCompra","apiCancelarInsumosItemCompra","apiFindMonitorInsumosItemCompra"],"mappings":";;AAKA,MAAMA,IAAuBC,EAAe,QAAQ;AAEpD,eAAsBC,EAAwBC,GAAY;AACtD,SAAOC,EAAW,mBAAgC;AAAA,IAC9C,KAAKJ,EAAqB,QAAQ,WAAW,GAAGG,CAAE;AAAA,IAClD,QAAQH,EAAqB,QAAQ;AAAA,EAAA,CACxC;AACL;AAEA,eAAsBK,EAAwBC,GAAmB;AAC7D,SAAOF,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,IAAI;AAAA,IAC9B,QAAQA,EAAqB,IAAI;AAAA,IACjC,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBC,EAA2BD,GAAmB;AAChE,SAAOF,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,OAAO;AAAA,IACjC,QAAQA,EAAqB,OAAO;AAAA,IACpC,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBE,EAA2BL,GAAY;AACzD,SAAOC,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,OAAO,WAAW,GAAGG,CAAE;AAAA,IACjD,QAAQH,EAAqB,OAAO;AAAA,EAAA,CACvC;AACL;AAEsB,eAAAS,EAAmCN,GAAYO,GAAgB;AACjF,SAAON,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,eAAe,WAAW,GAAGG,CAAE;AAAA,IACzD,QAAQH,EAAqB,eAAe;AAAA,IAC5C,MAAM,EAAE,QAAAU,EAAe;AAAA,EAAA,CAC1B;AACL;AAEsB,eAAAC,EAAqCR,GAAYO,GAAgB;AACnF,SAAON,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,iBAAiB,WAAW,GAAGG,CAAE;AAAA,IAC3D,QAAQH,EAAqB,iBAAiB;AAAA,IAC9C,MAAM,EAAE,QAAAU,EAAe;AAAA,EAAA,CAC1B;AACL;AAEsB,eAAAE,EAA6BT,GAAYO,GAAgB;AAC3E,SAAON,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,SAAS,WAAW,GAAGG,CAAE;AAAA,IACnD,QAAQH,EAAqB,SAAS;AAAA,IACtC,MAAM,EAAE,QAAAU,EAAe;AAAA,EAAA,CAC1B;AACL;AAEA,eAAsBG,EAAgCP,GAAsB;AACxE,SAAOF,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,YAAY;AAAA,IACtC,QAAQA,EAAqB,YAAY;AAAA,IACzC,MAAMM;AAAA,EAAA,CACT;AACL;"}
1
+ {"version":3,"file":"ItemCompraService.js","sources":["../../../../../../lib/base/services/modules/insumos/itemCompra/ItemCompraService.ts"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TItemCompra } from \"@base/@types/models/insumos/itemCompra\";\nimport endpointConfig from \"@base/configs/endpoints.config/endpoints.navigation\";\n\nconst ITEM_COMPRA_ENDPOINT = endpointConfig.insumos.itemCompra;\n\nexport async function apiGetInsumosItemCompra(id: number) {\n return ApiService.fetchDataWithAxios<TItemCompra>({\n url: ITEM_COMPRA_ENDPOINT.findOne.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.findOne.method,\n })\n}\n\nexport async function apiAddInsumosItemCompra(body: TItemCompra) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.add.endpoint,\n method: ITEM_COMPRA_ENDPOINT.add.method,\n data: body,\n })\n}\n\nexport async function apiUpdateInsumosItemCompra(body: TItemCompra) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.update.endpoint,\n method: ITEM_COMPRA_ENDPOINT.update.method,\n data: body,\n })\n}\n\nexport async function apiDeleteInsumosItemCompra(id: number) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.delete.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.delete.method,\n })\n}\n\nexport async function apiDisponibilizarInsumosItemCompra(id: number, motivo: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.disponibilizar.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.disponibilizar.method,\n data: { motivo: motivo }\n })\n}\n\nexport async function apiIndisponibilizarInsumosItemCompra(id: number, motivo: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.indisponibilizar.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.indisponibilizar.method,\n data: { motivo: motivo }\n })\n}\n\nexport async function apiCancelarInsumosItemCompra(id: number, motivo: string) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.cancelar.endpoint + `${id}`,\n method: ITEM_COMPRA_ENDPOINT.cancelar.method,\n data: { motivo: motivo }\n })\n}\n\nexport async function apiFindMonitorInsumosItemCompra(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TItemCompra>>({\n url: ITEM_COMPRA_ENDPOINT.findMonitor.endpoint,\n method: ITEM_COMPRA_ENDPOINT.findMonitor.method,\n data: body,\n })\n}\n\nexport async function apiFindPrecoMedioProdutosInsumosItemCompra(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TItemCompra[]>({\n url: ITEM_COMPRA_ENDPOINT.findPrecoMedioProdutos.endpoint,\n method: ITEM_COMPRA_ENDPOINT.findPrecoMedioProdutos.method,\n data: body,\n })\n}\n"],"names":["ITEM_COMPRA_ENDPOINT","endpointConfig","apiGetInsumosItemCompra","id","ApiService","apiAddInsumosItemCompra","body","apiUpdateInsumosItemCompra","apiDeleteInsumosItemCompra","apiDisponibilizarInsumosItemCompra","motivo","apiIndisponibilizarInsumosItemCompra","apiCancelarInsumosItemCompra","apiFindMonitorInsumosItemCompra","apiFindPrecoMedioProdutosInsumosItemCompra"],"mappings":";;AAKA,MAAMA,IAAuBC,EAAe,QAAQ;AAEpD,eAAsBC,EAAwBC,GAAY;AACtD,SAAOC,EAAW,mBAAgC;AAAA,IAC9C,KAAKJ,EAAqB,QAAQ,WAAW,GAAGG,CAAE;AAAA,IAClD,QAAQH,EAAqB,QAAQ;AAAA,EAAA,CACxC;AACL;AAEA,eAAsBK,EAAwBC,GAAmB;AAC7D,SAAOF,EAAW,mBAAgD;AAAA,IAC9D,KAAKJ,EAAqB,IAAI;AAAA,IAC9B,QAAQA,EAAqB,IAAI;AAAA,IACjC,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBC,EAA2BD,GAAmB;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AA,MAChD,KAAKJ,EAAqB,uBAAuB;AAAA,MACjD,QAAQA,EAAqB,uBAAuB;AAAA,MACpD,MAAMM;AAAA,IAAA,CACT;AACL;"}
@@ -0,0 +1,14 @@
1
+ import { getBaseTableParams as e } from "../../../services/query.js";
2
+ import { create as r } from "zustand";
3
+ const s = e(), m = {
4
+ filterParams: {},
5
+ tableParams: s
6
+ }, l = r((t) => ({
7
+ ...m,
8
+ setFilterParams: (a) => t(() => ({ filterParams: a })),
9
+ setTableParams: (a) => t(() => ({ tableParams: a }))
10
+ }));
11
+ export {
12
+ l as useItemCompraListStore
13
+ };
14
+ //# sourceMappingURL=itemCompraListStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itemCompraListStore.js","sources":["../../../../../lib/base/store/insumos/itemCompra/itemCompraListStore.ts"],"sourcesContent":["import { TItemCompra } from '@base/@types/models/insumos/itemCompra'\nimport { IListStoreAction, IListStoreState } from '@base/@types/store'\nimport { getBaseTableParams } from '@base/services/query'\nimport { create } from 'zustand'\n\nconst baseTableParams = getBaseTableParams()\n\nconst initialState: IListStoreState<TItemCompra> = {\n filterParams: {},\n tableParams: baseTableParams,\n}\n\nexport const useItemCompraListStore = create<\n IListStoreState<TItemCompra> & IListStoreAction<TItemCompra>\n>((set) => ({\n ...initialState,\n setFilterParams: (payload) => set(() => ({ filterParams: payload })),\n setTableParams: (payload) => set(() => ({ tableParams: payload })),\n}))"],"names":["baseTableParams","getBaseTableParams","initialState","useItemCompraListStore","create","set","payload"],"mappings":";;AAKA,MAAMA,IAAkBC,EAAmB,GAErCC,IAA6C;AAAA,EAC/C,cAAc,CAAC;AAAA,EACf,aAAaF;AACjB,GAEaG,IAAyBC,EAEpC,CAACC,OAAS;AAAA,EACR,GAAGH;AAAA,EACH,iBAAiB,CAACI,MAAYD,EAAI,OAAO,EAAE,cAAcC,IAAU;AAAA,EACnE,gBAAgB,CAACA,MAAYD,EAAI,OAAO,EAAE,aAAaC,IAAU;AACrE,EAAE;"}
@@ -18,10 +18,13 @@ export type TTabelaPreco = {
18
18
 
19
19
  export type TParametrosPreco = {
20
20
  id?: number
21
+ custoTransformacao: number
22
+ comissaoInterna: number
23
+ indiceFiscal: number
21
24
  imposto: number
25
+ inadimplencia: number
22
26
  comissao: number
23
27
  margem: number
24
- custoTipo: number
25
28
  }
26
29
 
27
30
  export type TTabelaPrecoProduto = {
@@ -33,7 +36,9 @@ export type TTabelaPrecoProduto = {
33
36
  descricao: string
34
37
  unidadeBase: string
35
38
  precoStandard: number
39
+ precoMedio: number
36
40
  margem: number
41
+ custoProducao: number
37
42
  precoCalculado: number
38
43
  }
39
44
 
@@ -0,0 +1,15 @@
1
+ import { IFilterParams, ITableParams, TQueryState } from '../../../api'
2
+
3
+ export interface IListStoreState<T> {
4
+ tableParams: ITableParams
5
+ filterParams: IFilterParams
6
+ }
7
+
8
+ export interface IListStoreAction<T> {
9
+ setFilterParams: (payload?: IFilterParams) => void
10
+ setTableParams: (payload: ITableParams) => void
11
+ }
12
+
13
+ export interface IListStore<T>
14
+ extends IListStoreState<T>,
15
+ IListStoreAction<T> { }
@@ -6,6 +6,7 @@ const itemCompra = {
6
6
  update: { endpoint: `${ITEM_COMPRA_BASE_URL}`, method: 'put' },
7
7
  delete: { endpoint: `${ITEM_COMPRA_BASE_URL}/`, method: 'delete' },
8
8
  findMonitor: { endpoint: `${ITEM_COMPRA_BASE_URL}/find-monitor`, method: 'post' },
9
+ findPrecoMedioProdutos: { endpoint: `${ITEM_COMPRA_BASE_URL}/find-preco-medio-produtos`, method: 'post' },
9
10
  disponibilizar: { endpoint: `${ITEM_COMPRA_BASE_URL}/disponibilizar/`, method: 'post' },
10
11
  indisponibilizar: { endpoint: `${ITEM_COMPRA_BASE_URL}/indisponibilizar/`, method: 'post' },
11
12
  cancelar: { endpoint: `${ITEM_COMPRA_BASE_URL}/cancelar/`, method: 'post' },
@@ -14,9 +14,9 @@ export default function useBusinessPartnerFornecedorList() {
14
14
  { revalidateOnFocus: false }
15
15
  );
16
16
 
17
- const businessPartnerFornecedorList = data || [];
17
+ const businessPartnerFornecedorList = data?.content || [];
18
18
 
19
- const businessPartnerFornecedorListTotal = data?.length || 0;
19
+ const businessPartnerFornecedorListTotal = data?.content?.length || 0;
20
20
 
21
21
  return {
22
22
  data,
@@ -60,4 +60,5 @@ export { default as useSapCountPartidasVencidasByBusinessPartnerUseMulti } from
60
60
  export { default as useList } from './useList';
61
61
  export { default as useSafraList } from './dm/safra/useSafraList';
62
62
  export { default as useFindProdutosByDepositoList } from './dm/produto/useFindProdutosByDepositoList';
63
+ export { default as useFindPrecoMedioProdutosList } from './insumos/itemCompra/useFindPrecoMedioProdutosList';
63
64
 
@@ -0,0 +1,33 @@
1
+ import { apiFindPrecoMedioProdutosInsumosItemCompra } from '@base/services/modules/insumos/itemCompra/ItemCompraService';
2
+ import { useItemCompraListStore } from '@base/store/insumos/itemCompra/itemCompraListStore';
3
+ import useSWR from 'swr';
4
+
5
+ export default function useFindPrecoMedioProdutosList() {
6
+ const { tableParams, filterParams, setTableParams, setFilterParams } =
7
+ useItemCompraListStore((state) => state);
8
+
9
+ const swrKey = ['/api/insumos/item-compra/find-preco-medio-produtos', filterParams];
10
+
11
+ const { data, error, isLoading, mutate } = useSWR(
12
+ swrKey,
13
+ () => apiFindPrecoMedioProdutosInsumosItemCompra(filterParams),
14
+ { revalidateOnFocus: false }
15
+ );
16
+
17
+ const precoMedioProdutosList = data || []
18
+
19
+ const precoMedioProdutosListTotal = data?.length || 0
20
+
21
+ return {
22
+ data,
23
+ precoMedioProdutosList,
24
+ precoMedioProdutosListTotal,
25
+ error,
26
+ isLoading,
27
+ tableParams,
28
+ filterParams,
29
+ mutate,
30
+ setTableParams,
31
+ setFilterParams,
32
+ };
33
+ }
@@ -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 { TAreaVendaCliente, TBusinessPartner } from "@base/@types/models/dm/businessPartner";
@@ -35,7 +36,7 @@ export async function apiFindDmBusinessPartnerFornecedor(body?: IFilterParams) {
35
36
  if (!body || Object.keys(body).length === 0) {
36
37
  return undefined
37
38
  }
38
- return ApiService.fetchDataWithAxios<TBusinessPartner[]>({
39
+ return ApiService.fetchDataWithAxios<TQueryResponse<TBusinessPartner[]>>({
39
40
  url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.endpoint,
40
41
  method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.method,
41
42
  data: body,
@@ -66,3 +66,14 @@ export async function apiFindMonitorInsumosItemCompra(body?: IFilterParams) {
66
66
  data: body,
67
67
  })
68
68
  }
69
+
70
+ export async function apiFindPrecoMedioProdutosInsumosItemCompra(body?: IFilterParams) {
71
+ if (!body || Object.keys(body).length === 0) {
72
+ return undefined
73
+ }
74
+ return ApiService.fetchDataWithAxios<TItemCompra[]>({
75
+ url: ITEM_COMPRA_ENDPOINT.findPrecoMedioProdutos.endpoint,
76
+ method: ITEM_COMPRA_ENDPOINT.findPrecoMedioProdutos.method,
77
+ data: body,
78
+ })
79
+ }
@@ -0,0 +1,19 @@
1
+ import { TItemCompra } from '@base/@types/models/insumos/itemCompra'
2
+ import { IListStoreAction, IListStoreState } from '@base/@types/store'
3
+ import { getBaseTableParams } from '@base/services/query'
4
+ import { create } from 'zustand'
5
+
6
+ const baseTableParams = getBaseTableParams()
7
+
8
+ const initialState: IListStoreState<TItemCompra> = {
9
+ filterParams: {},
10
+ tableParams: baseTableParams,
11
+ }
12
+
13
+ export const useItemCompraListStore = create<
14
+ IListStoreState<TItemCompra> & IListStoreAction<TItemCompra>
15
+ >((set) => ({
16
+ ...initialState,
17
+ setFilterParams: (payload) => set(() => ({ filterParams: payload })),
18
+ setTableParams: (payload) => set(() => ({ tableParams: payload })),
19
+ }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbe-agro/client-core-prod",
3
- "version": "5.3.255",
3
+ "version": "5.3.259",
4
4
  "description": "Biblioteca principal de componentes e utilidades para os microfrontends do Orbe Agro.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",