@orbe-agro/client-core 5.6.327 → 5.6.329
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/components/template/Footer.js +1 -1
- package/dist/@ecme/components/template/OrbeAiWidget/OrbeAiWidget.js +7 -1
- package/dist/@ecme/components/template/OrbeAiWidget/OrbeAiWidget.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/ChatBox.js +3 -1
- package/dist/@ecme/components/view/ChatBox/ChatBox.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +2 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
- package/dist/@ecme/services/AiService.js +4 -2
- package/dist/@ecme/services/AiService.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +6 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.js +85 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useChatSend.js +15 -3
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useChatSend.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/store/esforcoStore.js +15 -0
- package/dist/@ecme/views/concepts/ai/Chat/store/esforcoStore.js.map +1 -0
- package/dist/@types/@ecme/components/template/OrbeAiWidget/OrbeAiWidget.d.ts.map +1 -1
- package/dist/@types/@ecme/components/view/ChatBox/ChatBox.d.ts.map +1 -1
- package/dist/@types/@ecme/components/view/ChatBox/components/ChatInput.d.ts +3 -1
- package/dist/@types/@ecme/components/view/ChatBox/components/ChatInput.d.ts.map +1 -1
- package/dist/@types/@ecme/services/AiService.d.ts +7 -3
- package/dist/@types/@ecme/services/AiService.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ChatView.d.ts +6 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ChatView.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.d.ts +14 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useChatSend.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/store/esforcoStore.d.ts +27 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/store/esforcoStore.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/types.d.ts +7 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/types.d.ts.map +1 -1
- package/dist/@types/base/@types/models/ativos/ativo.d.ts +84 -0
- package/dist/@types/base/@types/models/ativos/ativo.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/ativos/ativos.d.ts +18 -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 +18 -0
- package/dist/@types/base/configs/endpoints.config/ativos/config/ativo.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +18 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- 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/config/ativoInventario.submenu.d.ts +9 -0
- package/dist/@types/base/configs/navigation.config/submenu/ativos/config/ativoInventario.submenu.d.ts.map +1 -0
- package/dist/@types/base/services/modules/ativos/ativo/AtivoService.d.ts +9 -1
- package/dist/@types/base/services/modules/ativos/ativo/AtivoService.d.ts.map +1 -1
- package/dist/base/@types/models/ativos/ativo.js.map +1 -1
- package/dist/base/configs/endpoints.config/ativos/config/ativo.js +8 -1
- package/dist/base/configs/endpoints.config/ativos/config/ativo.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/ativos/ativos.submenu.js +3 -1
- package/dist/base/configs/navigation.config/submenu/ativos/ativos.submenu.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/ativos/config/ativoInventario.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/ativos/config/ativoInventario.submenu.js.map +1 -0
- package/dist/base/index.js +5 -1
- package/dist/base/services/index.js +5 -1
- package/dist/base/services/modules/ativos/ativo/AtivoService.js +31 -0
- package/dist/base/services/modules/ativos/ativo/AtivoService.js.map +1 -1
- package/dist/base/services/modules/ativos/index.js +5 -1
- package/dist/base/services/modules/index.js +5 -1
- package/lib/@ecme/components/template/OrbeAiWidget/OrbeAiWidget.tsx +4 -1
- package/lib/@ecme/components/view/ChatBox/ChatBox.tsx +2 -0
- package/lib/@ecme/components/view/ChatBox/components/ChatInput.tsx +5 -2
- package/lib/@ecme/services/AiService.ts +9 -3
- package/lib/@ecme/views/concepts/ai/Chat/components/ChatView.tsx +13 -1
- package/lib/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.tsx +115 -0
- package/lib/@ecme/views/concepts/ai/Chat/hooks/useChatSend.ts +18 -3
- package/lib/@ecme/views/concepts/ai/Chat/store/esforcoStore.ts +25 -0
- package/lib/@ecme/views/concepts/ai/Chat/types.ts +8 -0
- package/lib/base/@types/models/ativos/ativo.ts +95 -1
- package/lib/base/configs/endpoints.config/ativos/config/ativo.ts +7 -0
- package/lib/base/configs/navigation.config/submenu/ativos/ativos.submenu.ts +2 -0
- package/lib/base/configs/navigation.config/submenu/ativos/config/ativoInventario.submenu.ts +21 -0
- package/lib/base/services/modules/ativos/ativo/AtivoService.ts +37 -2
- package/package.json +1 -1
|
@@ -207,4 +207,98 @@ export type TDashboardAtivoItem = {
|
|
|
207
207
|
idadeAnos: number | null
|
|
208
208
|
faixaIdade: string
|
|
209
209
|
situacaoGarantia: string
|
|
210
|
-
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type TInventarioDimensao = 'LOCAL' | 'CENTRO_CUSTO'
|
|
213
|
+
|
|
214
|
+
export type TInventarioFiltro = {
|
|
215
|
+
/** Id da empresa (BP) ou 'NAO_INFORMADO'. */
|
|
216
|
+
local?: string | null
|
|
217
|
+
/** Id do departamento ou 'NAO_INFORMADO'. */
|
|
218
|
+
centroCusto?: string | null
|
|
219
|
+
categoriaId?: number | null
|
|
220
|
+
subcategoriaId?: number | null
|
|
221
|
+
statusAtivo?: string | null
|
|
222
|
+
responsavelId?: number | null
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type TInventarioRequest = {
|
|
226
|
+
dimensao?: TInventarioDimensao
|
|
227
|
+
pageNumber?: number
|
|
228
|
+
pageSize?: number
|
|
229
|
+
filter?: TInventarioFiltro
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export type TInventarioIndicadores = {
|
|
233
|
+
totalAtivos: number
|
|
234
|
+
locaisComAtivos: number
|
|
235
|
+
centrosCustoComAtivos: number
|
|
236
|
+
/** Nulo quando nenhum ativo possui valor cadastrado. */
|
|
237
|
+
valorTotalAquisicao: number | null
|
|
238
|
+
ativosComValor: number
|
|
239
|
+
ativosSemValor: number
|
|
240
|
+
ativosSemLocal: number
|
|
241
|
+
ativosSemCentroCusto: number
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type TInventarioGrupo = {
|
|
245
|
+
/** Id do grupo ou 'NAO_INFORMADO'. */
|
|
246
|
+
chave: string
|
|
247
|
+
codigo: string | null
|
|
248
|
+
descricao: string
|
|
249
|
+
quantidade: number
|
|
250
|
+
/** Nulo quando nenhum ativo do grupo possui valor cadastrado. */
|
|
251
|
+
valorTotalAquisicao: number | null
|
|
252
|
+
ativosComValor: number
|
|
253
|
+
ativosSemValor: number
|
|
254
|
+
porCategoria: TDashboardDistribuicao[]
|
|
255
|
+
porStatus: TDashboardDistribuicao[]
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export type TInventarioAtivo = {
|
|
259
|
+
dimensao: TInventarioDimensao
|
|
260
|
+
indicadores: TInventarioIndicadores
|
|
261
|
+
grupos: TInventarioGrupo[]
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export type TInventarioAtivoItem = {
|
|
265
|
+
id: number
|
|
266
|
+
patrimonio: string | null
|
|
267
|
+
descricao: string | null
|
|
268
|
+
categoriaId: number | null
|
|
269
|
+
categoriaNome: string | null
|
|
270
|
+
subcategoriaId: number | null
|
|
271
|
+
subcategoriaNome: string | null
|
|
272
|
+
marca: string | null
|
|
273
|
+
modelo: string | null
|
|
274
|
+
numeroSerie: string | null
|
|
275
|
+
statusAtivo: string | null
|
|
276
|
+
responsavelIds: number[]
|
|
277
|
+
responsaveis: string[]
|
|
278
|
+
localId: number | null
|
|
279
|
+
localCodigo: string | null
|
|
280
|
+
localNome: string | null
|
|
281
|
+
centroCustoId: number | null
|
|
282
|
+
centroCustoNome: string | null
|
|
283
|
+
dataAquisicao: string | null
|
|
284
|
+
/** Nulo quando não há valor cadastrado. */
|
|
285
|
+
valorAquisicao: number | null
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export type TInventarioOpcao = {
|
|
289
|
+
chave: string
|
|
290
|
+
rotulo: string
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export type TInventarioOpcoes = {
|
|
294
|
+
locais: TInventarioOpcao[]
|
|
295
|
+
centrosCusto: TInventarioOpcao[]
|
|
296
|
+
responsaveis: TInventarioOpcao[]
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export type TInventarioExportacao = {
|
|
300
|
+
nomeArquivo: string
|
|
301
|
+
contentType: string
|
|
302
|
+
conteudoBase64: string
|
|
303
|
+
totalRegistros: number
|
|
304
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const ATIVO_BASE_URL = '/ativos/api/ativos/ativo'
|
|
2
|
+
const INVENTARIO_BASE_URL = '/ativos/api/ativos/inventario'
|
|
2
3
|
|
|
3
4
|
const ativo = {
|
|
4
5
|
findOne: { endpoint: `${ATIVO_BASE_URL}/`, method: 'get' },
|
|
@@ -16,6 +17,12 @@ const ativo = {
|
|
|
16
17
|
devolverLocadora: { endpoint: `${ATIVO_BASE_URL}/devolver-locadora`, method: 'post' },
|
|
17
18
|
historico: { findByTipoAcao: { endpoint: `${ATIVO_BASE_URL}/historico/find-by-tipo-acao`, method: 'post' } },
|
|
18
19
|
substituicao: { findByAtivos: { endpoint: `${ATIVO_BASE_URL}/substituicao/find-by-ativos`, method: 'post' } },
|
|
20
|
+
inventario: {
|
|
21
|
+
resumo: { endpoint: `${INVENTARIO_BASE_URL}/resumo`, method: 'post' },
|
|
22
|
+
ativos: { endpoint: `${INVENTARIO_BASE_URL}/ativos`, method: 'post' },
|
|
23
|
+
opcoes: { endpoint: `${INVENTARIO_BASE_URL}/opcoes`, method: 'get' },
|
|
24
|
+
exportar: { endpoint: `${INVENTARIO_BASE_URL}/exportar`, method: 'post' },
|
|
25
|
+
},
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
export default ativo
|
|
@@ -3,6 +3,7 @@ import subMenuCadastros from '../../modules.submenu/ativos/cadastros/submenu.cad
|
|
|
3
3
|
import subMenuDocumentacoes from '../../modules.submenu/ativos/documentacoes/submenu.documentacoes'
|
|
4
4
|
import ativoSubmenu from './config/ativo.submenu'
|
|
5
5
|
import ativoDashboardSubmenu from './config/ativoDashboard.submenu'
|
|
6
|
+
import ativoInventarioSubmenu from './config/ativoInventario.submenu'
|
|
6
7
|
import centralAtivosUserSubmenu from './config/centralAtivosUser.submenu'
|
|
7
8
|
|
|
8
9
|
const ativosSubmenu: NavigationTree[] = [
|
|
@@ -11,6 +12,7 @@ const ativosSubmenu: NavigationTree[] = [
|
|
|
11
12
|
subMenuDocumentacoes,
|
|
12
13
|
ativoSubmenu,
|
|
13
14
|
ativoDashboardSubmenu,
|
|
15
|
+
ativoInventarioSubmenu,
|
|
14
16
|
]
|
|
15
17
|
|
|
16
18
|
export default ativosSubmenu
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NAV_ITEM_TYPE_ITEM } from '@/constants/navigation.constant'
|
|
2
|
+
import { ADMIN } from '@/constants/roles.constant'
|
|
3
|
+
import { NavigationTree } from '@/@types/navigation'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Inventário de ativos de TI por local (empresa) e centro de custo (departamento).
|
|
7
|
+
* Visível apenas para quem possui a funcionalidade com path '/ativos/ativo/inventario',
|
|
8
|
+
* conforme filtro por path do menu.
|
|
9
|
+
*/
|
|
10
|
+
const ativoInventarioSubmenu: NavigationTree = {
|
|
11
|
+
key: 'modules.ativos.ativoInventario',
|
|
12
|
+
path: '/ativos/ativo/inventario',
|
|
13
|
+
title: 'Inventário por Local',
|
|
14
|
+
translateKey: 'nav.modules.ativos.ativoInventario',
|
|
15
|
+
icon: 'uiGraphMaps',
|
|
16
|
+
type: NAV_ITEM_TYPE_ITEM,
|
|
17
|
+
authority: [ADMIN],
|
|
18
|
+
subMenu: [],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default ativoInventarioSubmenu
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ApiService from "@/services/ApiService";
|
|
2
2
|
import { IFilterParams, TQueryResponse } from "@base/@types/api";
|
|
3
|
-
import { TAtivo, TDashboardAtivo, TDashboardAtivoItem, TDevolucao, TDevolverLocadora, TDisponibilizacao, TManutencao, TTransferencia } from "@base/@types/models/ativos/ativo";
|
|
3
|
+
import { TAtivo, TDashboardAtivo, TDashboardAtivoItem, TDevolucao, TDevolverLocadora, TDisponibilizacao, TInventarioAtivo, TInventarioAtivoItem, TInventarioExportacao, TInventarioOpcoes, TInventarioRequest, TManutencao, TTransferencia } from "@base/@types/models/ativos/ativo";
|
|
4
4
|
import endpointConfig from "@base/configs/endpoints.config/endpoints.navigation";
|
|
5
5
|
|
|
6
6
|
const ATIVO_ENDPOINT = endpointConfig.ativos.ativo;
|
|
@@ -122,4 +122,39 @@ export async function apiFindSubstituicaoByAtivos(body: { ativoId: number | null
|
|
|
122
122
|
method: ATIVO_ENDPOINT.substituicao.findByAtivos.method,
|
|
123
123
|
data: body,
|
|
124
124
|
})
|
|
125
|
-
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Inventário por local/centro de custo: indicadores e agrupamentos da dimensão. */
|
|
128
|
+
export async function apiGetInventarioAtivosAtivo(body: TInventarioRequest) {
|
|
129
|
+
return ApiService.fetchDataWithAxios<TInventarioAtivo>({
|
|
130
|
+
url: ATIVO_ENDPOINT.inventario.resumo.endpoint,
|
|
131
|
+
method: ATIVO_ENDPOINT.inventario.resumo.method,
|
|
132
|
+
data: body,
|
|
133
|
+
})
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Inventário por local/centro de custo: listagem detalhada paginada. */
|
|
137
|
+
export async function apiFindInventarioAtivosAtivo(body: TInventarioRequest) {
|
|
138
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TInventarioAtivoItem>>({
|
|
139
|
+
url: ATIVO_ENDPOINT.inventario.ativos.endpoint,
|
|
140
|
+
method: ATIVO_ENDPOINT.inventario.ativos.method,
|
|
141
|
+
data: body,
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** Inventário por local/centro de custo: opções de filtro (locais, centros de custo e responsáveis). */
|
|
146
|
+
export async function apiGetInventarioOpcoesAtivo() {
|
|
147
|
+
return ApiService.fetchDataWithAxios<TInventarioOpcoes>({
|
|
148
|
+
url: ATIVO_ENDPOINT.inventario.opcoes.endpoint,
|
|
149
|
+
method: ATIVO_ENDPOINT.inventario.opcoes.method,
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Inventário por local/centro de custo: exportação CSV (Base64) respeitando os filtros. */
|
|
154
|
+
export async function apiExportarInventarioAtivo(body: TInventarioRequest) {
|
|
155
|
+
return ApiService.fetchDataWithAxios<TInventarioExportacao>({
|
|
156
|
+
url: ATIVO_ENDPOINT.inventario.exportar.endpoint,
|
|
157
|
+
method: ATIVO_ENDPOINT.inventario.exportar.method,
|
|
158
|
+
data: body,
|
|
159
|
+
})
|
|
160
|
+
}
|
package/package.json
CHANGED