@orbe-agro/client-core 5.6.164 → 5.6.165

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 (49) hide show
  1. package/dist/@ecme/components/template/Footer.js +1 -1
  2. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +196 -0
  3. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
  4. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/agenda.d.ts +36 -0
  5. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/agenda.d.ts.map +1 -0
  6. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/contratos.d.ts +44 -0
  7. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/contratos.d.ts.map +1 -0
  8. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/dashboard.d.ts +40 -0
  9. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/dashboard.d.ts.map +1 -0
  10. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/notasFiscais.d.ts +28 -0
  11. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/notasFiscais.d.ts.map +1 -0
  12. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/pagamentos.d.ts +36 -0
  13. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/pagamentos.d.ts.map +1 -0
  14. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/planoPagamento.d.ts +24 -0
  15. package/dist/@types/base/configs/endpoints.config/gestaoServicos/config/planoPagamento.d.ts.map +1 -0
  16. package/dist/@types/base/configs/endpoints.config/gestaoServicos/gestaoServicos.d.ts +196 -0
  17. package/dist/@types/base/configs/endpoints.config/gestaoServicos/gestaoServicos.d.ts.map +1 -1
  18. package/dist/@types/base/services/modules/gestaoServicos/GestaoServicosService.d.ts +35 -0
  19. package/dist/@types/base/services/modules/gestaoServicos/GestaoServicosService.d.ts.map +1 -0
  20. package/dist/@types/base/services/modules/gestaoServicos/index.d.ts +1 -0
  21. package/dist/@types/base/services/modules/gestaoServicos/index.d.ts.map +1 -1
  22. package/dist/base/configs/endpoints.config/gestaoServicos/config/agenda.js +15 -0
  23. package/dist/base/configs/endpoints.config/gestaoServicos/config/agenda.js.map +1 -0
  24. package/dist/base/configs/endpoints.config/gestaoServicos/config/contratos.js +17 -0
  25. package/dist/base/configs/endpoints.config/gestaoServicos/config/contratos.js.map +1 -0
  26. package/dist/base/configs/endpoints.config/gestaoServicos/config/dashboard.js +16 -0
  27. package/dist/base/configs/endpoints.config/gestaoServicos/config/dashboard.js.map +1 -0
  28. package/dist/base/configs/endpoints.config/gestaoServicos/config/notasFiscais.js +13 -0
  29. package/dist/base/configs/endpoints.config/gestaoServicos/config/notasFiscais.js.map +1 -0
  30. package/dist/base/configs/endpoints.config/gestaoServicos/config/pagamentos.js +15 -0
  31. package/dist/base/configs/endpoints.config/gestaoServicos/config/pagamentos.js.map +1 -0
  32. package/dist/base/configs/endpoints.config/gestaoServicos/config/planoPagamento.js +12 -0
  33. package/dist/base/configs/endpoints.config/gestaoServicos/config/planoPagamento.js.map +1 -0
  34. package/dist/base/configs/endpoints.config/gestaoServicos/gestaoServicos.js +13 -1
  35. package/dist/base/configs/endpoints.config/gestaoServicos/gestaoServicos.js.map +1 -1
  36. package/dist/base/services/modules/gestaoServicos/GestaoServicosService.js +259 -0
  37. package/dist/base/services/modules/gestaoServicos/GestaoServicosService.js.map +1 -0
  38. package/dist/base/services/modules/gestaoServicos/index.js +35 -1
  39. package/dist/base/services/modules/gestaoServicos/index.js.map +1 -1
  40. package/lib/base/configs/endpoints.config/gestaoServicos/config/agenda.ts +14 -0
  41. package/lib/base/configs/endpoints.config/gestaoServicos/config/contratos.ts +16 -0
  42. package/lib/base/configs/endpoints.config/gestaoServicos/config/dashboard.ts +15 -0
  43. package/lib/base/configs/endpoints.config/gestaoServicos/config/notasFiscais.ts +12 -0
  44. package/lib/base/configs/endpoints.config/gestaoServicos/config/pagamentos.ts +14 -0
  45. package/lib/base/configs/endpoints.config/gestaoServicos/config/planoPagamento.ts +11 -0
  46. package/lib/base/configs/endpoints.config/gestaoServicos/gestaoServicos.ts +13 -1
  47. package/lib/base/services/modules/gestaoServicos/GestaoServicosService.ts +268 -0
  48. package/lib/base/services/modules/gestaoServicos/index.ts +1 -0
  49. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ const PAGAMENTOS_BASE_URL = '/gestao-servicos/api/gestao-servicos/pagamentos'
2
+
3
+ const pagamentos = {
4
+ findMonitor: { endpoint: `${PAGAMENTOS_BASE_URL}/find-monitor`, httpMethod: 'post' },
5
+ findOne: { endpoint: PAGAMENTOS_BASE_URL, httpMethod: 'get' },
6
+ create: { endpoint: PAGAMENTOS_BASE_URL, httpMethod: 'post' },
7
+ aprovar: { endpoint: `${PAGAMENTOS_BASE_URL}/{id}/aprovar`, httpMethod: 'put' },
8
+ reprovar: { endpoint: `${PAGAMENTOS_BASE_URL}/{id}/reprovar`, httpMethod: 'put' },
9
+ marcarPago: { endpoint: `${PAGAMENTOS_BASE_URL}/{id}/pagar`, httpMethod: 'put' },
10
+ delete: { endpoint: PAGAMENTOS_BASE_URL, httpMethod: 'delete' },
11
+ totais: { endpoint: `${PAGAMENTOS_BASE_URL}/totais/{nfId}`, httpMethod: 'get' },
12
+ }
13
+
14
+ export default pagamentos
@@ -0,0 +1,11 @@
1
+ const PLANO_PAGAMENTO_BASE_URL = '/gestao-servicos/api/gestao-servicos/contratos/{contratoId}/plano-pagamento'
2
+
3
+ const planoPagamento = {
4
+ listar: { endpoint: PLANO_PAGAMENTO_BASE_URL, httpMethod: 'get' },
5
+ adicionar: { endpoint: PLANO_PAGAMENTO_BASE_URL, httpMethod: 'post' },
6
+ excluir: { endpoint: `${PLANO_PAGAMENTO_BASE_URL}/{planoId}`, httpMethod: 'delete' },
7
+ limpar: { endpoint: PLANO_PAGAMENTO_BASE_URL, httpMethod: 'delete' },
8
+ atualizarCondicao: { endpoint: `${PLANO_PAGAMENTO_BASE_URL}/condicao`, httpMethod: 'put' },
9
+ }
10
+
11
+ export default planoPagamento
@@ -1,7 +1,19 @@
1
- import contratoServico from "./config/contratoServico"
1
+ import contratoServico from './config/contratoServico'
2
+ import contratos from './config/contratos'
3
+ import agenda from './config/agenda'
4
+ import notasFiscais from './config/notasFiscais'
5
+ import pagamentos from './config/pagamentos'
6
+ import planoPagamento from './config/planoPagamento'
7
+ import dashboard from './config/dashboard'
2
8
 
3
9
  const gestaoServicos = {
4
10
  contratoServico: contratoServico,
11
+ contratos: contratos,
12
+ agenda: agenda,
13
+ notasFiscais: notasFiscais,
14
+ pagamentos: pagamentos,
15
+ planoPagamento: planoPagamento,
16
+ dashboard: dashboard,
5
17
  }
6
18
 
7
19
  export default gestaoServicos
@@ -0,0 +1,268 @@
1
+ import ApiService from '@/services/ApiService'
2
+ import { IFilterParams, TQueryResponse } from '@base/@types/api'
3
+ import endpointConfig from '@base/configs/endpoints.config/endpoints.navigation'
4
+
5
+ const GS_ENDPOINT = endpointConfig.gestaoServicos
6
+
7
+ // ───────────────────────────── CONTRATOS ─────────────────────────────
8
+
9
+ export async function apiFindAllContratos(body?: IFilterParams) {
10
+ return ApiService.fetchDataWithAxios<TQueryResponse<any>>({
11
+ url: GS_ENDPOINT.contratos.findMonitor.endpoint,
12
+ method: GS_ENDPOINT.contratos.findMonitor.httpMethod,
13
+ data: body,
14
+ })
15
+ }
16
+
17
+ export async function apiFindOneContrato(id: number) {
18
+ return ApiService.fetchDataWithAxios<any>({
19
+ url: `${GS_ENDPOINT.contratos.findOne.endpoint}/${id}`,
20
+ method: GS_ENDPOINT.contratos.findOne.httpMethod,
21
+ })
22
+ }
23
+
24
+ export async function apiCreateContrato(values: any) {
25
+ return ApiService.fetchDataWithAxios<any>({
26
+ url: GS_ENDPOINT.contratos.create.endpoint,
27
+ method: GS_ENDPOINT.contratos.create.httpMethod,
28
+ data: values,
29
+ })
30
+ }
31
+
32
+ export async function apiUpdateContrato(id: number, values: any) {
33
+ return ApiService.fetchDataWithAxios<any>({
34
+ url: `${GS_ENDPOINT.contratos.update.endpoint}/${id}`,
35
+ method: GS_ENDPOINT.contratos.update.httpMethod,
36
+ data: values,
37
+ })
38
+ }
39
+
40
+ export async function apiSubmeterContrato(id: number, comentario?: string) {
41
+ return ApiService.fetchDataWithAxios<any>({
42
+ url: `${GS_ENDPOINT.contratos.submeter.endpoint.replace('{id}', String(id))}`,
43
+ method: GS_ENDPOINT.contratos.submeter.httpMethod,
44
+ data: { comentario },
45
+ })
46
+ }
47
+
48
+ export async function apiAprovarContrato(id: number) {
49
+ return ApiService.fetchDataWithAxios<any>({
50
+ url: `${GS_ENDPOINT.contratos.aprovar.endpoint.replace('{id}', String(id))}`,
51
+ method: GS_ENDPOINT.contratos.aprovar.httpMethod,
52
+ })
53
+ }
54
+
55
+ export async function apiReprovarContrato(id: number, justificativa: string) {
56
+ return ApiService.fetchDataWithAxios<any>({
57
+ url: `${GS_ENDPOINT.contratos.reprovar.endpoint.replace('{id}', String(id))}`,
58
+ method: GS_ENDPOINT.contratos.reprovar.httpMethod,
59
+ data: { justificativa },
60
+ })
61
+ }
62
+
63
+ export async function apiEncerrarContrato(id: number) {
64
+ return ApiService.fetchDataWithAxios<any>({
65
+ url: `${GS_ENDPOINT.contratos.encerrar.endpoint.replace('{id}', String(id))}`,
66
+ method: GS_ENDPOINT.contratos.encerrar.httpMethod,
67
+ })
68
+ }
69
+
70
+ export async function apiContratosVencendo() {
71
+ return ApiService.fetchDataWithAxios<any>({
72
+ url: GS_ENDPOINT.contratos.vencendo.endpoint,
73
+ method: GS_ENDPOINT.contratos.vencendo.httpMethod,
74
+ })
75
+ }
76
+
77
+ // ───────────────────────────── AGENDA ─────────────────────────────
78
+
79
+ export async function apiFindAllAgenda(body?: IFilterParams) {
80
+ return ApiService.fetchDataWithAxios<TQueryResponse<any>>({
81
+ url: GS_ENDPOINT.agenda.findMonitor.endpoint,
82
+ method: GS_ENDPOINT.agenda.findMonitor.httpMethod,
83
+ data: body,
84
+ })
85
+ }
86
+
87
+ export async function apiGerarAgenda(contratoId: number) {
88
+ return ApiService.fetchDataWithAxios<any>({
89
+ url: GS_ENDPOINT.agenda.gerar.endpoint.replace('{contratoId}', String(contratoId)),
90
+ method: GS_ENDPOINT.agenda.gerar.httpMethod,
91
+ })
92
+ }
93
+
94
+ export async function apiMarcarExecucaoRealizada(id: number, dataRealizada: string) {
95
+ return ApiService.fetchDataWithAxios<any>({
96
+ url: GS_ENDPOINT.agenda.marcarRealizada.endpoint.replace('{id}', String(id)),
97
+ method: GS_ENDPOINT.agenda.marcarRealizada.httpMethod,
98
+ data: { dataRealizada },
99
+ })
100
+ }
101
+
102
+ export async function apiAprovarExecucao(id: number) {
103
+ return ApiService.fetchDataWithAxios<any>({
104
+ url: GS_ENDPOINT.agenda.aprovar.endpoint.replace('{id}', String(id)),
105
+ method: GS_ENDPOINT.agenda.aprovar.httpMethod,
106
+ })
107
+ }
108
+
109
+ export async function apiReprovarExecucao(id: number, observacao: string) {
110
+ return ApiService.fetchDataWithAxios<any>({
111
+ url: GS_ENDPOINT.agenda.reprovar.endpoint.replace('{id}', String(id)),
112
+ method: GS_ENDPOINT.agenda.reprovar.httpMethod,
113
+ data: { observacao },
114
+ })
115
+ }
116
+
117
+ // ───────────────────────────── NOTAS FISCAIS ─────────────────────────────
118
+
119
+ export async function apiFindAllNotasFiscais(body?: IFilterParams) {
120
+ return ApiService.fetchDataWithAxios<TQueryResponse<any>>({
121
+ url: GS_ENDPOINT.notasFiscais.findMonitor.endpoint,
122
+ method: GS_ENDPOINT.notasFiscais.findMonitor.httpMethod,
123
+ data: body,
124
+ })
125
+ }
126
+
127
+ export async function apiCreateNotaFiscal(values: any) {
128
+ return ApiService.fetchDataWithAxios<any>({
129
+ url: GS_ENDPOINT.notasFiscais.create.endpoint,
130
+ method: GS_ENDPOINT.notasFiscais.create.httpMethod,
131
+ data: values,
132
+ })
133
+ }
134
+
135
+ export async function apiValidarNotaFiscal(id: number) {
136
+ return ApiService.fetchDataWithAxios<any>({
137
+ url: GS_ENDPOINT.notasFiscais.validar.endpoint.replace('{id}', String(id)),
138
+ method: GS_ENDPOINT.notasFiscais.validar.httpMethod,
139
+ })
140
+ }
141
+
142
+ export async function apiReprovarNotaFiscal(id: number, motivo: string) {
143
+ return ApiService.fetchDataWithAxios<any>({
144
+ url: GS_ENDPOINT.notasFiscais.reprovar.endpoint.replace('{id}', String(id)),
145
+ method: GS_ENDPOINT.notasFiscais.reprovar.httpMethod,
146
+ data: { motivo },
147
+ })
148
+ }
149
+
150
+ // ───────────────────────────── PAGAMENTOS ─────────────────────────────
151
+
152
+ export async function apiFindAllPagamentos(nfId: number) {
153
+ return ApiService.fetchDataWithAxios<any>({
154
+ url: `${GS_ENDPOINT.pagamentos.findOne.endpoint}?nfId=${nfId}`,
155
+ method: GS_ENDPOINT.pagamentos.findOne.httpMethod,
156
+ })
157
+ }
158
+
159
+ export async function apiCreatePagamento(values: any) {
160
+ return ApiService.fetchDataWithAxios<any>({
161
+ url: GS_ENDPOINT.pagamentos.create.endpoint,
162
+ method: GS_ENDPOINT.pagamentos.create.httpMethod,
163
+ data: values,
164
+ })
165
+ }
166
+
167
+ export async function apiAprovarPagamento(id: number) {
168
+ return ApiService.fetchDataWithAxios<any>({
169
+ url: GS_ENDPOINT.pagamentos.aprovar.endpoint.replace('{id}', String(id)),
170
+ method: GS_ENDPOINT.pagamentos.aprovar.httpMethod,
171
+ })
172
+ }
173
+
174
+ export async function apiMarcarPagamentoPago(id: number, dataPagamento: string) {
175
+ return ApiService.fetchDataWithAxios<any>({
176
+ url: GS_ENDPOINT.pagamentos.marcarPago.endpoint.replace('{id}', String(id)),
177
+ method: GS_ENDPOINT.pagamentos.marcarPago.httpMethod,
178
+ data: { dataPagamento },
179
+ })
180
+ }
181
+
182
+ export async function apiDeletePagamento(id: number) {
183
+ return ApiService.fetchDataWithAxios<any>({
184
+ url: `${GS_ENDPOINT.pagamentos.delete.endpoint}/${id}`,
185
+ method: GS_ENDPOINT.pagamentos.delete.httpMethod,
186
+ })
187
+ }
188
+
189
+ export async function apiTotaisPagamentos(nfId: number) {
190
+ return ApiService.fetchDataWithAxios<any>({
191
+ url: GS_ENDPOINT.pagamentos.totais.endpoint.replace('{nfId}', String(nfId)),
192
+ method: GS_ENDPOINT.pagamentos.totais.httpMethod,
193
+ })
194
+ }
195
+
196
+ // ───────────────────────────── DASHBOARD ─────────────────────────────
197
+
198
+ export async function apiDashboardKpis(params?: any) {
199
+ return ApiService.fetchDataWithAxios<any>({
200
+ url: GS_ENDPOINT.dashboard.kpis.endpoint,
201
+ method: GS_ENDPOINT.dashboard.kpis.httpMethod,
202
+ params,
203
+ })
204
+ }
205
+
206
+ export async function apiDashboardContratosPorStatus(params?: any) {
207
+ return ApiService.fetchDataWithAxios<any>({
208
+ url: GS_ENDPOINT.dashboard.contratosPorStatus.endpoint,
209
+ method: GS_ENDPOINT.dashboard.contratosPorStatus.httpMethod,
210
+ params,
211
+ })
212
+ }
213
+
214
+ export async function apiDashboardValorPorFornecedor(params?: any) {
215
+ return ApiService.fetchDataWithAxios<any>({
216
+ url: GS_ENDPOINT.dashboard.valorPorFornecedor.endpoint,
217
+ method: GS_ENDPOINT.dashboard.valorPorFornecedor.httpMethod,
218
+ params,
219
+ })
220
+ }
221
+
222
+ export async function apiDashboardExecucoesPorStatus(params?: any) {
223
+ return ApiService.fetchDataWithAxios<any>({
224
+ url: GS_ENDPOINT.dashboard.execucoesPorStatus.endpoint,
225
+ method: GS_ENDPOINT.dashboard.execucoesPorStatus.httpMethod,
226
+ params,
227
+ })
228
+ }
229
+
230
+ export async function apiDashboardVencimentosPorMes(params?: any) {
231
+ return ApiService.fetchDataWithAxios<any>({
232
+ url: GS_ENDPOINT.dashboard.vencimentosPorMes.endpoint,
233
+ method: GS_ENDPOINT.dashboard.vencimentosPorMes.httpMethod,
234
+ params,
235
+ })
236
+ }
237
+
238
+ export async function apiDashboardPipelineOperacional(params?: any) {
239
+ return ApiService.fetchDataWithAxios<any>({
240
+ url: GS_ENDPOINT.dashboard.pipelineOperacional.endpoint,
241
+ method: GS_ENDPOINT.dashboard.pipelineOperacional.httpMethod,
242
+ params,
243
+ })
244
+ }
245
+
246
+ export async function apiDashboardKpisFinanceiro(params?: any) {
247
+ return ApiService.fetchDataWithAxios<any>({
248
+ url: GS_ENDPOINT.dashboard.kpisFinanceiro.endpoint,
249
+ method: GS_ENDPOINT.dashboard.kpisFinanceiro.httpMethod,
250
+ params,
251
+ })
252
+ }
253
+
254
+ export async function apiDashboardPagamentosPorMes(params?: any) {
255
+ return ApiService.fetchDataWithAxios<any>({
256
+ url: GS_ENDPOINT.dashboard.pagamentosPorMes.endpoint,
257
+ method: GS_ENDPOINT.dashboard.pagamentosPorMes.httpMethod,
258
+ params,
259
+ })
260
+ }
261
+
262
+ export async function apiDashboardValorPorCentroCusto(params?: any) {
263
+ return ApiService.fetchDataWithAxios<any>({
264
+ url: GS_ENDPOINT.dashboard.valorPorCentroCusto.endpoint,
265
+ method: GS_ENDPOINT.dashboard.valorPorCentroCusto.httpMethod,
266
+ params,
267
+ })
268
+ }
@@ -1 +1,2 @@
1
+ export * from './GestaoServicosService'
1
2
  export * from './contratoServico/ContratoServicoService'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbe-agro/client-core",
3
- "version": "5.6.164",
3
+ "version": "5.6.165",
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",