@orbe-agro/client-core 5.6.144 → 5.6.146

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 (118) hide show
  1. package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js +25 -0
  2. package/dist/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.js.map +1 -0
  3. package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js +22 -0
  4. package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.js.map +1 -0
  5. package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js +22 -0
  6. package/dist/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.js.map +1 -0
  7. package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.js +25 -0
  8. package/dist/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.js.map +1 -0
  9. package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js +25 -0
  10. package/dist/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.js.map +1 -0
  11. package/dist/@ecme/components/template/Footer.js +1 -1
  12. package/dist/@ecme/components/template/Header.stories.js +42 -0
  13. package/dist/@ecme/components/template/Header.stories.js.map +1 -0
  14. package/dist/@ecme/components/template/Search.js +32 -2
  15. package/dist/@ecme/components/template/Search.js.map +1 -1
  16. package/dist/@ecme/components/template/Search.stories.js +61 -0
  17. package/dist/@ecme/components/template/Search.stories.js.map +1 -0
  18. package/dist/@ecme/index.js +3 -0
  19. package/dist/@ecme/index.js.map +1 -1
  20. package/dist/@ecme/locales/index.js +4 -1
  21. package/dist/@ecme/locales/index.js.map +1 -1
  22. package/dist/@ecme/locales/initAll.js +26 -0
  23. package/dist/@ecme/locales/initAll.js.map +1 -0
  24. package/dist/@ecme/locales/lang/en/common.js +43 -0
  25. package/dist/@ecme/locales/lang/en/common.js.map +1 -1
  26. package/dist/@ecme/locales/lang/en/index.js +3 -1
  27. package/dist/@ecme/locales/lang/en/index.js.map +1 -1
  28. package/dist/@ecme/locales/lang/ptBR/common.js +43 -0
  29. package/dist/@ecme/locales/lang/ptBR/common.js.map +1 -1
  30. package/dist/@ecme/locales/lang/ptBR/index.js +3 -1
  31. package/dist/@ecme/locales/lang/ptBR/index.js.map +1 -1
  32. package/dist/@ecme/locales/lang/ptBR/nav.js +307 -4
  33. package/dist/@ecme/locales/lang/ptBR/nav.js.map +1 -1
  34. package/dist/@ecme/views/auth/lang/index.js +2 -2
  35. package/dist/@ecme/views/auth/lang/index.js.map +1 -1
  36. package/dist/@types/@ecme/components/template/Search.d.ts.map +1 -1
  37. package/dist/@types/@ecme/locales/index.d.ts +1 -0
  38. package/dist/@types/@ecme/locales/index.d.ts.map +1 -1
  39. package/dist/@types/@ecme/locales/initAll.d.ts +3 -0
  40. package/dist/@types/@ecme/locales/initAll.d.ts.map +1 -0
  41. package/dist/@types/@ecme/locales/lang/en/common.d.ts +43 -0
  42. package/dist/@types/@ecme/locales/lang/en/common.d.ts.map +1 -1
  43. package/dist/@types/@ecme/locales/lang/en/index.d.ts +98 -0
  44. package/dist/@types/@ecme/locales/lang/en/index.d.ts.map +1 -1
  45. package/dist/@types/@ecme/locales/lang/ptBR/common.d.ts.map +1 -1
  46. package/dist/@types/@ecme/locales/lang/ptBR/index.d.ts +98 -0
  47. package/dist/@types/@ecme/locales/lang/ptBR/index.d.ts.map +1 -1
  48. package/dist/@types/@ecme/locales/lang/ptBR/nav.d.ts.map +1 -1
  49. package/dist/@types/base/@types/models/performance/index.d.ts +1 -0
  50. package/dist/@types/base/@types/models/performance/index.d.ts.map +1 -1
  51. package/dist/@types/base/@types/models/performance/ppr.d.ts +22 -0
  52. package/dist/@types/base/@types/models/performance/ppr.d.ts.map +1 -0
  53. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +6 -0
  54. package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
  55. package/dist/@types/base/configs/endpoints.config/performance/config/ppr.d.ts +8 -0
  56. package/dist/@types/base/configs/endpoints.config/performance/config/ppr.d.ts.map +1 -0
  57. package/dist/@types/base/configs/endpoints.config/performance/performance.d.ts +6 -0
  58. package/dist/@types/base/configs/endpoints.config/performance/performance.d.ts.map +1 -1
  59. package/dist/@types/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.d.ts +4 -0
  60. package/dist/@types/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.d.ts.map +1 -0
  61. package/dist/@types/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.d.ts +4 -0
  62. package/dist/@types/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.d.ts.map +1 -0
  63. package/dist/@types/base/configs/navigation.config/submenu/performance/config/ppr.submenu.d.ts +4 -0
  64. package/dist/@types/base/configs/navigation.config/submenu/performance/config/ppr.submenu.d.ts.map +1 -0
  65. package/dist/@types/base/configs/navigation.config/submenu/performance/performance.submenu.d.ts.map +1 -1
  66. package/dist/@types/base/services/modules/performance/PerformanceService.d.ts +5 -0
  67. package/dist/@types/base/services/modules/performance/PerformanceService.d.ts.map +1 -1
  68. package/dist/base/@types/models/performance/index.js +1 -0
  69. package/dist/base/@types/models/performance/index.js.map +1 -1
  70. package/dist/base/@types/models/performance/ppr.js +2 -0
  71. package/dist/base/@types/models/performance/ppr.js.map +1 -0
  72. package/dist/base/configs/endpoints.config/performance/config/ppr.js +10 -0
  73. package/dist/base/configs/endpoints.config/performance/config/ppr.js.map +1 -0
  74. package/dist/base/configs/endpoints.config/performance/performance.js +3 -1
  75. package/dist/base/configs/endpoints.config/performance/performance.js.map +1 -1
  76. package/dist/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.js +17 -0
  77. package/dist/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.js.map +1 -0
  78. package/dist/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.js +25 -0
  79. package/dist/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.js.map +1 -0
  80. package/dist/base/configs/navigation.config/submenu/performance/config/ppr.submenu.js +19 -0
  81. package/dist/base/configs/navigation.config/submenu/performance/config/ppr.submenu.js.map +1 -0
  82. package/dist/base/configs/navigation.config/submenu/performance/performance.submenu.js +4 -8
  83. package/dist/base/configs/navigation.config/submenu/performance/performance.submenu.js.map +1 -1
  84. package/dist/base/index.js +5 -1
  85. package/dist/base/locales/index.js +2 -2
  86. package/dist/base/locales/index.js.map +1 -1
  87. package/dist/base/services/index.js +5 -1
  88. package/dist/base/services/modules/index.js +5 -1
  89. package/dist/base/services/modules/performance/PerformanceService.js +31 -0
  90. package/dist/base/services/modules/performance/PerformanceService.js.map +1 -1
  91. package/dist/base/services/modules/performance/index.js +5 -1
  92. package/lib/@ecme/components/layouts/PostLoginLayout/components/CollapsibleSide.stories.tsx +38 -0
  93. package/lib/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.stories.tsx +35 -0
  94. package/lib/@ecme/components/layouts/PostLoginLayout/components/FrameLessSide.stories.tsx +35 -0
  95. package/lib/@ecme/components/layouts/PostLoginLayout/components/StackedSide.stories.tsx +38 -0
  96. package/lib/@ecme/components/layouts/PostLoginLayout/components/TopBarClassic.stories.tsx +38 -0
  97. package/lib/@ecme/components/template/Header.stories.tsx +46 -0
  98. package/lib/@ecme/components/template/Search.stories.tsx +79 -0
  99. package/lib/@ecme/components/template/Search.tsx +41 -14
  100. package/lib/@ecme/locales/index.ts +4 -0
  101. package/lib/@ecme/locales/initAll.ts +25 -0
  102. package/lib/@ecme/locales/lang/en/common.ts +43 -0
  103. package/lib/@ecme/locales/lang/en/index.ts +2 -0
  104. package/lib/@ecme/locales/lang/ptBR/common.ts +44 -1
  105. package/lib/@ecme/locales/lang/ptBR/index.ts +2 -0
  106. package/lib/@ecme/locales/lang/ptBR/nav.ts +308 -5
  107. package/lib/@ecme/views/auth/lang/index.ts +2 -2
  108. package/lib/base/@types/models/performance/index.ts +6 -5
  109. package/lib/base/@types/models/performance/ppr.ts +24 -0
  110. package/lib/base/configs/endpoints.config/performance/config/ppr.ts +8 -0
  111. package/lib/base/configs/endpoints.config/performance/performance.ts +3 -1
  112. package/lib/base/configs/navigation.config/submenu/performance/config/aberturaAnoPpr.submenu.ts +17 -0
  113. package/lib/base/configs/navigation.config/submenu/performance/config/avaliacoes.submenu.ts +25 -0
  114. package/lib/base/configs/navigation.config/submenu/performance/config/ppr.submenu.ts +19 -0
  115. package/lib/base/configs/navigation.config/submenu/performance/performance.submenu.ts +4 -8
  116. package/lib/base/locales/index.ts +2 -2
  117. package/lib/base/services/modules/performance/PerformanceService.ts +32 -0
  118. package/package.json +1 -1
@@ -2,22 +2,11 @@ import { NavigationTree } from '@/@types/navigation'
2
2
  import Button from '@/components/ui/Button'
3
3
  import Dialog from '@/components/ui/Dialog'
4
4
  import ScrollBar from '@/components/ui/ScrollBar'
5
- import navigationIcon from '@/configs/navigation-icon.config'
6
5
  import navigationConfig from '@/configs/navigation.config'
7
6
  import { NAV_ITEM_TYPE_ITEM } from '@/constants/navigation.constant'
8
- import {
9
- GUIDE_PREFIX_PATH,
10
- UI_COMPONENTS_PREFIX_PATH,
11
- } from '@/constants/route.constant'
7
+ import { useSessionUser } from '@/store/authStore'
12
8
  import classNames from '@/utils/classNames'
13
9
  import withHeaderItem from '@/utils/hoc/withHeaderItem'
14
- import {
15
- filterDeep,
16
- findDeep,
17
- findPathDeep,
18
- findValueDeep,
19
- } from 'deepdash-es/standalone'
20
- import { flatten, flattenDeep } from 'lodash'
21
10
  import debounce from 'lodash/debounce'
22
11
  import { useEffect, useMemo, useRef, useState } from 'react'
23
12
  import Highlighter from 'react-highlight-words'
@@ -42,6 +31,38 @@ type SearchResult = {
42
31
  data: SearchData[]
43
32
  }
44
33
 
34
+ const filterNavigationByAuthority = (
35
+ navTree: NavigationTree[],
36
+ userAuthority: string[],
37
+ ): NavigationTree[] => {
38
+ return navTree.reduce((acc: NavigationTree[], nav) => {
39
+ if (nav.excludeWhenHasPaths && nav.excludeWhenHasPaths.length > 0) {
40
+ const shouldExclude = nav.excludeWhenHasPaths.some((path) =>
41
+ userAuthority.includes(path),
42
+ )
43
+
44
+ if (shouldExclude) {
45
+ return acc
46
+ }
47
+ }
48
+
49
+ if (nav.subMenu && nav.subMenu.length > 0) {
50
+ const filteredSubMenu = filterNavigationByAuthority(
51
+ nav.subMenu,
52
+ userAuthority,
53
+ )
54
+
55
+ if (filteredSubMenu.length > 0) {
56
+ acc.push({ ...nav, subMenu: filteredSubMenu })
57
+ }
58
+ } else if ((nav.path && userAuthority.includes(nav.path)) || !nav.path) {
59
+ acc.push(nav)
60
+ }
61
+
62
+ return acc
63
+ }, [])
64
+ }
65
+
45
66
  const ListItem = (props: {
46
67
  icon: string
47
68
  label: string
@@ -98,6 +119,7 @@ const _Search = ({ className }: { className?: string }) => {
98
119
  const [searchDialogOpen, setSearchDialogOpen] = useState(false)
99
120
  const [searchResult, setSearchResult] = useState<SearchResult[]>([])
100
121
  const [noResult, setNoResult] = useState(false)
122
+ const userAuthority = useSessionUser((state) => state.user.authority)
101
123
 
102
124
  const inputRef = useRef<HTMLInputElement>(null)
103
125
 
@@ -121,6 +143,10 @@ const _Search = ({ className }: { className?: string }) => {
121
143
 
122
144
  const flatNavTree = useMemo(() => {
123
145
  const arr: NavigationTreeFlat[] = []
146
+ const filteredNavigationTree = filterNavigationByAuthority(
147
+ navigationConfig,
148
+ userAuthority || [],
149
+ )
124
150
 
125
151
  const makeflat = (item: NavigationTree, parents: string[]) => {
126
152
  if (Array.isArray(item.subMenu) && item.subMenu.length > 0) {
@@ -131,11 +157,12 @@ const _Search = ({ className }: { className?: string }) => {
131
157
  arr.push({ ...item, parents })
132
158
  }
133
159
 
134
- navigationConfig.forEach(function f(item) {
160
+ filteredNavigationTree.forEach(function f(item) {
135
161
  makeflat(item, [t(item.translateKey)])
136
162
  })
163
+
137
164
  return arr
138
- }, [navigationConfig, t])
165
+ }, [userAuthority, t])
139
166
 
140
167
  const filterNavigationTreeFlat = (
141
168
  text: string,
@@ -1,4 +1,8 @@
1
1
  import i18n from './locales'
2
2
 
3
3
  export { dateLocales } from './locales'
4
+ export {
5
+ ensureAppLocaleResourcesLoaded,
6
+ initAllAppLocaleResources,
7
+ } from './initAll'
4
8
  export default i18n
@@ -0,0 +1,25 @@
1
+ import i18n from './locales'
2
+ import { addBaseLocaleResources } from '@base/locales'
3
+ import { addPageLocaleResources } from '@/views/auth/lang'
4
+
5
+ export function initAllAppLocaleResources() {
6
+ addBaseLocaleResources()
7
+ addPageLocaleResources()
8
+ }
9
+
10
+ export async function ensureAppLocaleResourcesLoaded() {
11
+ initAllAppLocaleResources()
12
+
13
+ if (i18n.isInitialized) {
14
+ return
15
+ }
16
+
17
+ await new Promise<void>((resolve) => {
18
+ const handleInitialized = () => {
19
+ i18n.off('initialized', handleInitialized)
20
+ resolve()
21
+ }
22
+
23
+ i18n.on('initialized', handleInitialized)
24
+ })
25
+ }
@@ -88,6 +88,49 @@ export default {
88
88
  of: 'of',
89
89
  all: 'All',
90
90
  },
91
+ layout: {
92
+ search: {
93
+ results: {
94
+ navTree: 'Navigation',
95
+ },
96
+ },
97
+ profile: {
98
+ dropdown: {
99
+ options: {
100
+ profile: 'Profile',
101
+ settings: 'Settings',
102
+ activity: 'Activity',
103
+ signOut: 'Sign Out',
104
+ },
105
+ },
106
+ },
107
+ themeConfig: {
108
+ title: 'Theme Configuration',
109
+ options: {
110
+ darkMode: 'Dark mode',
111
+ darkModeDesc: 'Toggle between light and dark theme',
112
+ direction: 'Direction',
113
+ directionDesc: 'User interface direction',
114
+ theme: 'Theme',
115
+ layout: 'Layout',
116
+ layoutCollapsible: 'Collapsible',
117
+ layoutStacked: 'Stacked',
118
+ layoutTopbar: 'Topbar',
119
+ layoutFrameless: 'Frameless',
120
+ layoutOverlay: 'Overlay',
121
+ layoutBlank: 'Blank',
122
+ },
123
+ buttons: {
124
+ copyConfig: 'Copy config',
125
+ },
126
+ },
127
+ notifications: {
128
+ title: 'Notifications',
129
+ actions: {
130
+ readAll: 'Mark all as read',
131
+ },
132
+ },
133
+ },
91
134
  ...EnModulesCommon,
92
135
  },
93
136
  }
@@ -1,9 +1,11 @@
1
1
  import common from './common'
2
2
  import nav from './nav'
3
3
  import pages from './pages'
4
+ import base from '@base/locales/lang/en'
4
5
 
5
6
  export default {
6
7
  ...nav,
7
8
  ...common,
8
9
  ...pages,
10
+ ...base,
9
11
  }
@@ -42,7 +42,7 @@ export default {
42
42
  deselect: 'Desmarcar',
43
43
  download: 'Baixar',
44
44
  upload: 'Enviar',
45
- finish: 'Finalizar'
45
+ finish: 'Finalizar',
46
46
  },
47
47
  validation: {
48
48
  required: 'Este campo é obrigatório',
@@ -89,6 +89,49 @@ export default {
89
89
  of: 'de',
90
90
  all: 'Todos',
91
91
  },
92
+ layout: {
93
+ search: {
94
+ results: {
95
+ navTree: 'Navegação',
96
+ },
97
+ },
98
+ profile: {
99
+ dropdown: {
100
+ options: {
101
+ profile: 'Perfil',
102
+ settings: 'Configurações',
103
+ activity: 'Atividade',
104
+ signOut: 'Sair',
105
+ },
106
+ },
107
+ },
108
+ themeConfig: {
109
+ title: 'Configuração de Tema',
110
+ options: {
111
+ darkMode: 'Modo escuro',
112
+ darkModeDesc: 'Alternar entre tema claro e escuro',
113
+ direction: 'Direção',
114
+ directionDesc: 'Direção da interface do usuário',
115
+ theme: 'Tema',
116
+ layout: 'Layout',
117
+ layoutCollapsible: 'Colapsável',
118
+ layoutStacked: 'Empilhado',
119
+ layoutTopbar: 'Barra superior',
120
+ layoutFrameless: 'Sem moldura',
121
+ layoutOverlay: 'Sobreposto',
122
+ layoutBlank: 'Em branco',
123
+ },
124
+ buttons: {
125
+ copyConfig: 'Copiar configuração',
126
+ },
127
+ },
128
+ notifications: {
129
+ title: 'Notificações',
130
+ actions: {
131
+ readAll: 'Marcar tudo como lido',
132
+ },
133
+ },
134
+ },
92
135
  ...ModulesCommon,
93
136
  },
94
137
  } as typeof EnCommon
@@ -1,9 +1,11 @@
1
1
  import common from './common'
2
2
  import nav from './nav'
3
3
  import pages from './pages'
4
+ import base from '@base/locales/lang/ptBR'
4
5
 
5
6
  export default {
6
7
  ...nav,
7
8
  ...common,
8
9
  ...pages,
10
+ ...base,
9
11
  }
@@ -12,21 +12,324 @@ export default {
12
12
  title: 'Módulos',
13
13
  adm: {
14
14
  title: 'Administração',
15
+ 'vinculo-funcionalidade-role': 'Vínculo - Funcionalidade/Role',
16
+ 'user-restrito-agendamento': 'Usuário - Restrição Agendamento',
15
17
  users: 'Usuários',
18
+ infoProdutor: 'Registro Info',
16
19
  roles: 'Roles',
17
- tarefasAgendadas: 'Tarefas Agendadas'
20
+ tarefasAgendadas: 'Tarefas Agendadas',
21
+ },
22
+ agendamento: {
23
+ title: 'Agendamento de Carga/Descarga',
24
+ vendas: {
25
+ title: 'Vendas',
26
+ },
27
+ agendamento: {
28
+ title: 'Agendamento',
29
+ },
30
+ },
31
+ ...almoxarifado,
32
+ ativos: {
33
+ title: 'Ativos',
34
+ documentacoes: {
35
+ title: 'Documentações',
36
+ },
37
+ cadastros: {
38
+ title: 'Cadastros',
39
+ },
40
+ componentes: {
41
+ title: 'Componentes',
42
+ },
43
+ },
44
+ bayer: {
45
+ title: 'Bayer',
46
+ retencao: {
47
+ title: 'Retenção',
48
+ },
49
+ pendencia: {
50
+ title: 'Pendência',
51
+ },
52
+ entrega: {
53
+ title: 'Entrega',
54
+ },
55
+ consumoPendencia: {
56
+ title: 'Consumo Pendência',
57
+ },
58
+ },
59
+ centralNfe: {
60
+ title: 'Central NFe',
61
+ cadastros: 'Cadastros',
62
+ vinculoUnidadeMedida: 'Vínculo de Unidade de Medida',
63
+ vinculoOperacao: 'Vínculo de Operação',
64
+ vinculoIva: 'Vínculo de IVA',
65
+ notificacaoCentralNfe: 'Notificação Central NFe',
66
+ nfe: 'NFe',
67
+ intervaloPrecoXml: 'Intervalo Preço XML',
68
+ cnpjLiberadoNota: 'CNPJ Liberado Nota',
69
+ },
70
+ commodities: {
71
+ title: 'Commodities',
72
+ pedidoVenda: 'Pedido de Venda',
73
+ contratoBiodiesel: 'Contrato Biodiesel',
74
+ },
75
+ compras: {
76
+ title: 'Compras',
77
+ cadastros: 'Cadastros',
78
+ requisicaoCompra: 'Requisição de Compra',
79
+ requisicaoAgrupada: 'Requisição Agrupada',
80
+ ordemCompra: 'Ordem de Compra',
81
+ localRecepcao: 'Local Recepção',
82
+ cotacao: 'Cotação',
83
+ cadastroEstrategiaLiberacaoValor: 'Cadastro Estratégia Liberação Valor',
84
+ },
85
+ controleAcesso: {
86
+ title: 'Controle de Acesso',
87
+ acessoPatio: {
88
+ title: 'Acesso Pátio',
89
+ },
90
+ },
91
+ crm: {
92
+ title: 'CRM',
93
+ relatorios: 'Relatórios',
94
+ aniversariantes: 'Aniversariantes',
95
+ },
96
+ ...dadosMestres,
97
+ dadosunificados: {
98
+ title: 'Dados Unificados',
99
+ },
100
+ ...docusign,
101
+ flux: {
102
+ cadastros: {
103
+ title: 'Cadastros',
104
+ baseDeConhecimento: {
105
+ title: 'Base de Conhecimento',
106
+ },
107
+ formularioBase: {
108
+ title: 'Formulário Base',
109
+ },
110
+ categoria: {
111
+ title: 'Categoria',
112
+ },
113
+ processo: {
114
+ title: 'Processo',
115
+ },
116
+ grupoAtendimento: {
117
+ title: 'Grupo de Atendimento',
118
+ },
119
+ subcategoria: {
120
+ title: 'Subcategoria',
121
+ },
122
+ },
123
+ monitor: {
124
+ title: 'Monitor',
125
+ },
126
+ relatorioGeral: {
127
+ title: 'Relatório Geral',
128
+ },
129
+ },
130
+ ...hubFiscal,
131
+ insumos: {
132
+ title: 'Insumos',
133
+ vendas: {
134
+ title: 'Vendas',
135
+ },
136
+ compras: {
137
+ title: 'Compras',
138
+ },
139
+ cadastros: {
140
+ title: 'Cadastros',
141
+ },
142
+ faturamentoVsDespesa: {
143
+ title: 'Faturamento vs Despesa',
144
+ },
145
+ estoque: {
146
+ title: 'Estoque',
147
+ },
148
+ compra: {
149
+ title: 'Compra',
150
+ },
151
+ venda: {
152
+ title: 'Venda',
153
+ },
154
+ comissaoVenda: {
155
+ title: 'Comissão Venda',
156
+ },
157
+ seguradoraAgricola: {
158
+ title: 'Seguradora Agrícola',
159
+ },
160
+ principiosAtivo: {
161
+ title: 'Princípios Ativos',
162
+ },
163
+ coberturaSeguroAgricola: {
164
+ title: 'Cobertura Seguro Agrícola',
165
+ },
166
+ percentualPagamento: {
167
+ title: 'Percentual Pagamento',
168
+ },
169
+ liberacaoCompra: {
170
+ title: 'Liberação Compra',
171
+ },
172
+ parametrosJuros: {
173
+ title: 'Parâmetros Juros',
174
+ },
175
+ itemCompra: {
176
+ title: 'Item Compra',
177
+ },
178
+ freteMaterial: {
179
+ title: 'Frete Material',
180
+ },
181
+ margemVenda: {
182
+ title: 'Margem Venda',
183
+ },
184
+ limiteAdiantamento: {
185
+ title: 'Limite Adiantamento',
186
+ },
187
+ },
188
+ juridico: {
189
+ title: 'Jurídico',
190
+ cadastros: {
191
+ title: 'Cadastros',
192
+ },
193
+ termoConfidencialidadeResponsabilidade: 'Termo de Confidencialidade e Responsabilidade',
194
+ },
195
+ mdfe: {
196
+ title: 'MDFe',
197
+ emissaoMdfe: {
198
+ title: 'Emissão MDFe',
199
+ },
18
200
  },
19
201
  mock: {
20
202
  title: 'Módulo Mock',
21
203
  dashboard: 'Dashboard',
22
204
  reports: 'Relatórios',
23
205
  },
24
- ...dadosMestres,
206
+ orcamento: {
207
+ cadastros: {
208
+ title: 'Cadastros',
209
+ variavelDeContaContabil: {
210
+ title: 'Variável de Conta Contábil',
211
+ },
212
+ metricas: {
213
+ title: 'Métricas',
214
+ },
215
+ grupoContaContabil: {
216
+ title: 'Grupo Conta Contábil',
217
+ },
218
+ contaContabilAdicionalSubstituicao: {
219
+ title: 'Conta Contábil Adicional/Substituição',
220
+ },
221
+ },
222
+ relatorios: {
223
+ title: 'Relatórios',
224
+ analiseDepartamento: {
225
+ title: 'Análise Departamento',
226
+ },
227
+ analiseContaContabil: {
228
+ title: 'Análise Conta Contábil',
229
+ },
230
+ analiseCentroDeCustos: {
231
+ title: 'Análise Centro de Custos',
232
+ },
233
+ },
234
+ metricasDeOrcamento: {
235
+ title: 'Métricas de Orçamento',
236
+ },
237
+ auditoriaRealizado: {
238
+ title: 'Auditoria Realizado',
239
+ },
240
+ mestreOrcamento: {
241
+ title: 'Mestre Orçamento',
242
+ },
243
+ },
244
+ originacao: {
245
+ title: 'Originação',
246
+ 'termo-funrural': {
247
+ title: 'Termo FUNRURAL',
248
+ },
249
+ 'termo-fundeinfra': {
250
+ title: 'Termo FUNDEINFRA',
251
+ },
252
+ saldo: {
253
+ title: 'Saldo',
254
+ },
255
+ pagamento: {
256
+ title: 'Pagamento',
257
+ },
258
+ adm: {
259
+ title: 'Administração',
260
+ parametros: {
261
+ title: 'Parâmetros',
262
+ },
263
+ cadastros: {
264
+ title: 'Cadastros',
265
+ },
266
+ },
267
+ lancamentoJuridicoBloqueioCpf: {
268
+ title: 'Lançamento Jurídico Bloqueio CPF',
269
+ },
270
+ compraGraos: {
271
+ title: 'Compra de Grãos',
272
+ },
273
+ certidaoPenhor: {
274
+ title: 'Certidão Penhor',
275
+ },
276
+ liquidacao: {
277
+ title: 'Liquidação',
278
+ },
279
+ },
280
+ performance: {
281
+ title: 'Performance',
282
+ cadastros: {
283
+ title: 'Cadastros',
284
+ modeloNota: {
285
+ title: 'Modelo Nota',
286
+ },
287
+ modeloAvaliacao: {
288
+ title: 'Modelo Avaliação',
289
+ },
290
+ categoria: {
291
+ title: 'Categoria',
292
+ },
293
+ },
294
+ comparativo: {
295
+ title: 'Comparativo',
296
+ },
297
+ avaliacaoColaborador: {
298
+ title: 'Avaliação Colaborador',
299
+ },
300
+ },
301
+ qualidade: {
302
+ title: 'Qualidade',
303
+ inspecaoDeVeiculo: 'Inspeção de Veículo',
304
+ niveisGarantia: 'Níveis Garantia',
305
+ },
306
+ racao: {
307
+ title: 'Ração',
308
+ vinculoMaterialCentro: {
309
+ title: 'Vínculo Material Centro',
310
+ },
311
+ tabelaPreco: {
312
+ title: 'Tabela de Preço',
313
+ },
314
+ segmentoProduto: {
315
+ title: 'Segmento Produto',
316
+ },
317
+ precificacaoFarelo: 'Precificação Farelo',
318
+ },
25
319
  ...ticket,
26
320
  ...transportadora,
27
- ...almoxarifado,
28
- ...docusign,
29
- ...hubFiscal,
321
+ template: {
322
+ title: 'Template',
323
+ cadastros: {
324
+ title: 'Cadastros',
325
+ exampleObject: {
326
+ title: 'Example Object',
327
+ },
328
+ example: {
329
+ title: 'Example',
330
+ },
331
+ },
332
+ },
30
333
  },
31
334
  },
32
335
  } as typeof EnNav
@@ -3,8 +3,8 @@ import en from './en'
3
3
  import ptBR from './ptBR'
4
4
 
5
5
  export function addPageLocaleResources() {
6
- i18n.addResourceBundle('en', 'translation', en)
7
- i18n.addResourceBundle('ptBR', 'translation', ptBR)
6
+ i18n.addResourceBundle('en', 'translation', en, true, true)
7
+ i18n.addResourceBundle('ptBR', 'translation', ptBR, true, true)
8
8
  }
9
9
 
10
10
  addPageLocaleResources()
@@ -1,5 +1,6 @@
1
- export * from './modeloNota'
2
- export * from './categoria'
3
- export * from './areaAtuacao'
4
- export * from './modeloAvaliacao'
5
- export * from './avaliacao'
1
+ export * from './modeloNota'
2
+ export * from './categoria'
3
+ export * from './areaAtuacao'
4
+ export * from './modeloAvaliacao'
5
+ export * from './avaliacao'
6
+ export * from './ppr'
@@ -0,0 +1,24 @@
1
+ export type TParametroCcPpr = {
2
+ id: number
3
+ ano: number
4
+ centroCustoId: number
5
+ codigoCentroCusto: string
6
+ nomeCentroCusto: string
7
+ habilitado: boolean
8
+ dataCriacao: string
9
+ dataAtualizacao?: string | null
10
+ usuarioCriacaoId: number
11
+ usuarioAtualizacaoId?: number | null
12
+ }
13
+
14
+ export type TAnoPpr = {
15
+ ano: number
16
+ }
17
+
18
+ export type TAbrirAnoPpr = {
19
+ ano: number
20
+ }
21
+
22
+ export type TUpdateParametroCcStatusPpr = {
23
+ habilitado: boolean
24
+ }
@@ -0,0 +1,8 @@
1
+ const ppr = {
2
+ centrosCustos: '/performance/api/ppr/centros-custos',
3
+ aberturaAno: '/performance/api/ppr/centros-custos/abertura-ano',
4
+ anos: '/performance/api/ppr/centros-custos/anos',
5
+ updateStatus: '/performance/api/ppr/centros-custos',
6
+ };
7
+
8
+ export default ppr;
@@ -3,13 +3,15 @@ import categoria from './config/categoria';
3
3
  import areaAtuacao from './config/areaAtuacao';
4
4
  import modeloAvaliacao from './config/modeloAvaliacao';
5
5
  import avaliacao from './config/avaliacao';
6
+ import ppr from './config/ppr';
6
7
 
7
8
  const performance = {
8
9
  modeloNota,
9
10
  categoria,
10
11
  areaAtuacao,
11
12
  modeloAvaliacao,
12
- avaliacao
13
+ avaliacao,
14
+ ppr
13
15
  };
14
16
 
15
17
  export default performance;
@@ -0,0 +1,17 @@
1
+ import { NavigationTree } from '@/@types/navigation'
2
+ import { NAV_ITEM_TYPE_ITEM } from '@/constants/navigation.constant'
3
+ import { ADMIN } from '@/constants/roles.constant'
4
+
5
+ const aberturaAnoPprSubmenu: NavigationTree = {
6
+ key: 'modules.performance.ppr.aberturaAno',
7
+ path: '/performance/ppr/abertura-ano',
8
+ title: 'Abertura de ano',
9
+ translateKey: 'nav.modules.performance.ppr.aberturaAno.title',
10
+ icon: '',
11
+ type: NAV_ITEM_TYPE_ITEM,
12
+ forceShowTitle: true,
13
+ authority: [ADMIN],
14
+ subMenu: [],
15
+ }
16
+
17
+ export default aberturaAnoPprSubmenu