@orbe-agro/client-core 5.6.350 → 5.6.352
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/assets/styles/app.css +3 -0
- package/dist/@ecme/assets/styles/tailwind/index.css +3 -0
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/components/ui/Input/Input.js +1 -3
- package/dist/@ecme/components/ui/Input/Input.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/ChatBox.js +1 -7
- package/dist/@ecme/components/view/ChatBox/ChatBox.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +30 -63
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
- package/dist/@ecme/locales/lang/en/nav.js +2 -1
- package/dist/@ecme/locales/lang/en/nav.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/AiChatBox.js +75 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/AiChatBox.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/AiChatInput.js +121 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/AiChatInput.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +2 -3
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js.map +1 -1
- package/dist/@types/@ecme/components/ui/Input/Input.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 +1 -12
- package/dist/@types/@ecme/components/view/ChatBox/components/ChatInput.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/en/index.d.ts +1 -0
- package/dist/@types/@ecme/locales/lang/en/index.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/en/nav.d.ts +1 -0
- package/dist/@types/@ecme/locales/lang/en/nav.d.ts.map +1 -1
- package/dist/@types/@ecme/locales/lang/ptBR/index.d.ts +1 -0
- package/dist/@types/@ecme/locales/lang/ptBR/index.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/AiChatBox.d.ts +25 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/AiChatBox.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/AiChatInput.d.ts +38 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/AiChatInput.d.ts.map +1 -0
- package/dist/@types/base/@types/api/request/dm/TConfiguracaoNotificacaoRequest.d.ts +12 -0
- package/dist/@types/base/@types/api/request/dm/TConfiguracaoNotificacaoRequest.d.ts.map +1 -0
- package/dist/@types/base/@types/api/response/dadosMestres/TConfiguracaoNotificacaoResponse.d.ts +18 -0
- package/dist/@types/base/@types/api/response/dadosMestres/TConfiguracaoNotificacaoResponse.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/dm/config/configuracaoNotificacao.d.ts +28 -0
- package/dist/@types/base/configs/endpoints.config/dm/config/configuracaoNotificacao.d.ts.map +1 -0
- package/dist/@types/base/configs/endpoints.config/dm/dm.d.ts +26 -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 +26 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/submenu/dadosMestres/cadastros.submenu.d.ts.map +1 -1
- package/dist/@types/base/configs/navigation.config/submenu/dadosMestres/config/configuracaoNotificacao.submenu.d.ts +4 -0
- package/dist/@types/base/configs/navigation.config/submenu/dadosMestres/config/configuracaoNotificacao.submenu.d.ts.map +1 -0
- package/dist/@types/base/locales/lang/ptBR/modules/DadosMestres/dadosMestres.nav.d.ts +1 -0
- package/dist/@types/base/locales/lang/ptBR/modules/DadosMestres/dadosMestres.nav.d.ts.map +1 -1
- package/dist/@types/base/services/modules/dm/configuracaoNotificacao/ConfiguracaoNotificacaoService.d.ts +10 -0
- package/dist/@types/base/services/modules/dm/configuracaoNotificacao/ConfiguracaoNotificacaoService.d.ts.map +1 -0
- package/dist/base/@types/api/request/dm/TConfiguracaoNotificacaoRequest.js +2 -0
- package/dist/base/@types/api/request/dm/TConfiguracaoNotificacaoRequest.js.map +1 -0
- package/dist/base/@types/api/response/dadosMestres/TConfiguracaoNotificacaoResponse.js +2 -0
- package/dist/base/@types/api/response/dadosMestres/TConfiguracaoNotificacaoResponse.js.map +1 -0
- package/dist/base/assets/styles/init.css +3 -0
- package/dist/base/configs/endpoints.config/dm/config/configuracaoNotificacao.js +13 -0
- package/dist/base/configs/endpoints.config/dm/config/configuracaoNotificacao.js.map +1 -0
- package/dist/base/configs/endpoints.config/dm/dm.js +3 -1
- package/dist/base/configs/endpoints.config/dm/dm.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/dadosMestres/cadastros.submenu.js +3 -1
- package/dist/base/configs/navigation.config/submenu/dadosMestres/cadastros.submenu.js.map +1 -1
- package/dist/base/configs/navigation.config/submenu/dadosMestres/config/configuracaoNotificacao.submenu.js +16 -0
- package/dist/base/configs/navigation.config/submenu/dadosMestres/config/configuracaoNotificacao.submenu.js.map +1 -0
- package/dist/base/locales/lang/ptBR/modules/DadosMestres/dadosMestres.nav.js +1 -0
- package/dist/base/locales/lang/ptBR/modules/DadosMestres/dadosMestres.nav.js.map +1 -1
- package/dist/base/services/modules/dm/configuracaoNotificacao/ConfiguracaoNotificacaoService.js +52 -0
- package/dist/base/services/modules/dm/configuracaoNotificacao/ConfiguracaoNotificacaoService.js.map +1 -0
- package/lib/@ecme/components/ui/Input/Input.tsx +1 -3
- package/lib/@ecme/components/view/ChatBox/ChatBox.tsx +0 -6
- package/lib/@ecme/components/view/ChatBox/components/ChatInput.tsx +35 -100
- package/lib/@ecme/locales/lang/en/nav.ts +1 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/AiChatBox.tsx +96 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/AiChatInput.tsx +173 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/ChatView.tsx +3 -3
- package/lib/@ecme/views/concepts/chat/Chat/components/ChatBody.tsx +1 -1
- package/lib/base/@types/api/request/dm/TConfiguracaoNotificacaoRequest.ts +13 -0
- package/lib/base/@types/api/response/dadosMestres/TConfiguracaoNotificacaoResponse.ts +19 -0
- package/lib/base/configs/endpoints.config/dm/config/configuracaoNotificacao.ts +12 -0
- package/lib/base/configs/endpoints.config/dm/dm.ts +3 -1
- package/lib/base/configs/navigation.config/submenu/dadosMestres/cadastros.submenu.ts +2 -0
- package/lib/base/configs/navigation.config/submenu/dadosMestres/config/configuracaoNotificacao.submenu.ts +16 -0
- package/lib/base/locales/lang/ptBR/modules/DadosMestres/dadosMestres.nav.ts +1 -0
- package/lib/base/services/modules/dm/configuracaoNotificacao/ConfiguracaoNotificacaoService.ts +58 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef, useEffect, useMemo } from 'react'
|
|
2
2
|
import Card from '@/components/ui/Card'
|
|
3
|
-
import
|
|
3
|
+
import AiChatBox from './AiChatBox'
|
|
4
4
|
import ChatLandingView from './ChatLandingView'
|
|
5
5
|
import ChatMobileNav from './ChatMobileNav'
|
|
6
6
|
import ChatCustomContent from './ChatCustomContent'
|
|
@@ -115,7 +115,7 @@ const ChatView = ({
|
|
|
115
115
|
return (
|
|
116
116
|
<Card className="flex-1 h-full" bodyClass="h-full">
|
|
117
117
|
{showMobileNav && <ChatMobileNav />}
|
|
118
|
-
<
|
|
118
|
+
<AiChatBox
|
|
119
119
|
ref={scrollRef}
|
|
120
120
|
messageList={messageList}
|
|
121
121
|
placeholder="Pergunte algo sobre o Orbe Agro…"
|
|
@@ -287,7 +287,7 @@ const ChatView = ({
|
|
|
287
287
|
<ChatLandingView />
|
|
288
288
|
</div>
|
|
289
289
|
)}
|
|
290
|
-
</
|
|
290
|
+
</AiChatBox>
|
|
291
291
|
</Card>
|
|
292
292
|
)
|
|
293
293
|
}
|
|
@@ -208,7 +208,7 @@ const ChatBody = () => {
|
|
|
208
208
|
placeholder="Enter a prompt here"
|
|
209
209
|
showAvatar={true}
|
|
210
210
|
avatarGap={true}
|
|
211
|
-
messageListClass="
|
|
211
|
+
messageListClass="h-[calc(100%-100px)]"
|
|
212
212
|
bubbleClass="max-w-[300px]"
|
|
213
213
|
onInputChange={handleInputChange}
|
|
214
214
|
/>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TTipoNotificacao = 'CONTRATO_ATIVOS' | 'GARANTIA_ATIVOS'
|
|
2
|
+
|
|
3
|
+
export type TCreateConfiguracaoNotificacaoRequest = {
|
|
4
|
+
tipo: TTipoNotificacao;
|
|
5
|
+
prazosDias: number[];
|
|
6
|
+
usuarioIds: number[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type TUpdateConfiguracaoNotificacaoRequest = {
|
|
10
|
+
tipo: TTipoNotificacao;
|
|
11
|
+
prazosDias: number[];
|
|
12
|
+
usuarioIds: number[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type TGetTipoNotificacaoResponse = {
|
|
2
|
+
codigo: string;
|
|
3
|
+
descricao: string;
|
|
4
|
+
prazosDias: number[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type TGetUsuarioNotificacaoResponse = {
|
|
8
|
+
id: number;
|
|
9
|
+
nome: string;
|
|
10
|
+
email: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type TGetConfiguracaoNotificacaoResponse = {
|
|
14
|
+
id: number;
|
|
15
|
+
tipo: TGetTipoNotificacaoResponse;
|
|
16
|
+
prazosDias: number[];
|
|
17
|
+
usuarios: TGetUsuarioNotificacaoResponse[];
|
|
18
|
+
dataCriacao: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const CONFIGURACAO_NOTIFICACAO_BASE_URL = '/dados-mestres/api/configuracao-notificacao'
|
|
2
|
+
|
|
3
|
+
const configuracaoNotificacao = {
|
|
4
|
+
create: { endpoint: `${CONFIGURACAO_NOTIFICACAO_BASE_URL}`, method: 'post' },
|
|
5
|
+
update: { endpoint: (id: number) => `${CONFIGURACAO_NOTIFICACAO_BASE_URL}/${id}`, method: 'put' },
|
|
6
|
+
delete: { endpoint: (id: number) => `${CONFIGURACAO_NOTIFICACAO_BASE_URL}/${id}`, method: 'delete' },
|
|
7
|
+
findOne: { endpoint: (id: number) => `${CONFIGURACAO_NOTIFICACAO_BASE_URL}/${id}`, method: 'get' },
|
|
8
|
+
findMonitor: { endpoint: `${CONFIGURACAO_NOTIFICACAO_BASE_URL}/find-monitor`, method: 'post' },
|
|
9
|
+
tipos: { endpoint: `${CONFIGURACAO_NOTIFICACAO_BASE_URL}/tipos`, method: 'get' },
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default configuracaoNotificacao
|
|
@@ -24,6 +24,7 @@ import municipio from "./config/municipio";
|
|
|
24
24
|
import frete from "./config/frete";
|
|
25
25
|
import safra from "./config/safra";
|
|
26
26
|
import area from "./config/area";
|
|
27
|
+
import configuracaoNotificacao from "./config/configuracaoNotificacao";
|
|
27
28
|
|
|
28
29
|
const dm = {
|
|
29
30
|
businessPartner,
|
|
@@ -51,7 +52,8 @@ const dm = {
|
|
|
51
52
|
municipio,
|
|
52
53
|
frete,
|
|
53
54
|
safra,
|
|
54
|
-
area
|
|
55
|
+
area,
|
|
56
|
+
configuracaoNotificacao
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export default dm;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { NavigationTree } from "@/@types/navigation"
|
|
2
2
|
import areaSubmenu from "./config/area.submenu"
|
|
3
|
+
import configuracaoNotificacaoSubmenu from "./config/configuracaoNotificacao.submenu"
|
|
3
4
|
|
|
4
5
|
const cadastrosSubmenu: NavigationTree[] = [
|
|
5
6
|
areaSubmenu,
|
|
7
|
+
configuracaoNotificacaoSubmenu,
|
|
6
8
|
]
|
|
7
9
|
|
|
8
10
|
export default cadastrosSubmenu
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
const configuracaoNotificacaoSubmenu: NavigationTree = {
|
|
6
|
+
key: 'dadosMestres.configuracaoNotificacao',
|
|
7
|
+
path: '/dados-mestres/configuracao-notificacao',
|
|
8
|
+
title: 'Configuração de Notificações',
|
|
9
|
+
translateKey: 'nav.modules.dadosMestres.configuracaoNotificacao',
|
|
10
|
+
icon: '',
|
|
11
|
+
type: NAV_ITEM_TYPE_ITEM,
|
|
12
|
+
authority: [ADMIN],
|
|
13
|
+
subMenu: [],
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default configuracaoNotificacaoSubmenu
|
package/lib/base/services/modules/dm/configuracaoNotificacao/ConfiguracaoNotificacaoService.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import ApiService from "@/services/ApiService";
|
|
2
|
+
import { IFilterParams, TQueryResponse } from "@base/@types/api";
|
|
3
|
+
import {
|
|
4
|
+
TCreateConfiguracaoNotificacaoRequest,
|
|
5
|
+
TUpdateConfiguracaoNotificacaoRequest,
|
|
6
|
+
} from "@base/@types/api/request/dm/TConfiguracaoNotificacaoRequest";
|
|
7
|
+
import {
|
|
8
|
+
TGetConfiguracaoNotificacaoResponse,
|
|
9
|
+
TGetTipoNotificacaoResponse,
|
|
10
|
+
} from "@base/@types/api/response/dadosMestres/TConfiguracaoNotificacaoResponse";
|
|
11
|
+
import { endpointsConfig } from "@base/configs";
|
|
12
|
+
|
|
13
|
+
const CONFIGURACAO_NOTIFICACAO_ENDPOINT = endpointsConfig.dm.configuracaoNotificacao;
|
|
14
|
+
|
|
15
|
+
export async function apiCreateConfiguracaoNotificacao(body: TCreateConfiguracaoNotificacaoRequest) {
|
|
16
|
+
return ApiService.fetchDataWithAxios<TGetConfiguracaoNotificacaoResponse>({
|
|
17
|
+
url: CONFIGURACAO_NOTIFICACAO_ENDPOINT.create.endpoint,
|
|
18
|
+
method: CONFIGURACAO_NOTIFICACAO_ENDPOINT.create.method,
|
|
19
|
+
data: body,
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function apiUpdateConfiguracaoNotificacao(id: number, body: TUpdateConfiguracaoNotificacaoRequest) {
|
|
24
|
+
return ApiService.fetchDataWithAxios<TGetConfiguracaoNotificacaoResponse>({
|
|
25
|
+
url: CONFIGURACAO_NOTIFICACAO_ENDPOINT.update.endpoint(id),
|
|
26
|
+
method: CONFIGURACAO_NOTIFICACAO_ENDPOINT.update.method,
|
|
27
|
+
data: body,
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function apiDeleteConfiguracaoNotificacao(id: number) {
|
|
32
|
+
return ApiService.fetchDataWithAxios<void>({
|
|
33
|
+
url: CONFIGURACAO_NOTIFICACAO_ENDPOINT.delete.endpoint(id),
|
|
34
|
+
method: CONFIGURACAO_NOTIFICACAO_ENDPOINT.delete.method,
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export async function apiFindConfiguracaoNotificacaoById(id: number) {
|
|
39
|
+
return ApiService.fetchDataWithAxios<TGetConfiguracaoNotificacaoResponse>({
|
|
40
|
+
url: CONFIGURACAO_NOTIFICACAO_ENDPOINT.findOne.endpoint(id),
|
|
41
|
+
method: CONFIGURACAO_NOTIFICACAO_ENDPOINT.findOne.method,
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export async function apiFindMonitorConfiguracaoNotificacao(body?: IFilterParams) {
|
|
46
|
+
return ApiService.fetchDataWithAxios<TQueryResponse<TGetConfiguracaoNotificacaoResponse>>({
|
|
47
|
+
url: CONFIGURACAO_NOTIFICACAO_ENDPOINT.findMonitor.endpoint,
|
|
48
|
+
method: CONFIGURACAO_NOTIFICACAO_ENDPOINT.findMonitor.method,
|
|
49
|
+
data: body,
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export async function apiFindTiposNotificacao() {
|
|
54
|
+
return ApiService.fetchDataWithAxios<TGetTipoNotificacaoResponse[]>({
|
|
55
|
+
url: CONFIGURACAO_NOTIFICACAO_ENDPOINT.tipos.endpoint,
|
|
56
|
+
method: CONFIGURACAO_NOTIFICACAO_ENDPOINT.tipos.method,
|
|
57
|
+
})
|
|
58
|
+
}
|
package/package.json
CHANGED