Skip to content

Commit c08554b

Browse files
committed
First commit ticket-page-test ( conf. routes, SidebarItems and tickets page).
1 parent 3aec0c8 commit c08554b

File tree

5 files changed

+58
-2
lines changed

5 files changed

+58
-2
lines changed

frontend/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,12 @@
3838
"dotenv": "^16.4.5",
3939
"typescript": "^5.2.2",
4040
"vite": "^5.4.14"
41-
}
41+
},
42+
"description": "The frontend is built with [Vite](https://vitejs.dev/), [React](https://reactjs.org/), [TypeScript](https://www.typescriptlang.org/), [TanStack Query](https://tanstack.com/query), [TanStack Router](https://tanstack.com/router) and [Chakra UI](https://chakra-ui.com/).",
43+
"main": "index.js",
44+
"directories": {
45+
"test": "tests"
46+
},
47+
"author": "",
48+
"license": "ISC"
4249
}

frontend/src/components/Common/SidebarItems.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ import { FiBriefcase, FiHome, FiSettings, FiUsers } from "react-icons/fi"
55
import type { IconType } from "react-icons/lib"
66

77
import type { UserPublic } from "@/client"
8+
import { BsTicketDetailedFill } from "react-icons/bs"
89

910
const items = [
11+
//Adicionando mais menus ( ticket), e renomeando seções
1012
{ icon: FiHome, title: "Dashboard", path: "/" },
1113
{ icon: FiBriefcase, title: "Items", path: "/items" },
12-
{ icon: FiSettings, title: "User Settings", path: "/settings" },
14+
{ icon: FiSettings, title: "Configurações do Usuário", path: "/settings" },
15+
{ icon: BsTicketDetailedFill, title: "Tickets", path: "/tickets" },
1316
]
1417

1518
interface SidebarItemsProps {

frontend/src/routeTree.gen.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Route as RecoverPasswordImport } from './routes/recover-password'
1717
import { Route as LoginImport } from './routes/login'
1818
import { Route as LayoutImport } from './routes/_layout'
1919
import { Route as LayoutIndexImport } from './routes/_layout/index'
20+
import { Route as LayoutTicketsImport } from './routes/_layout/tickets'
2021
import { Route as LayoutSettingsImport } from './routes/_layout/settings'
2122
import { Route as LayoutItemsImport } from './routes/_layout/items'
2223
import { Route as LayoutAdminImport } from './routes/_layout/admin'
@@ -53,6 +54,11 @@ const LayoutIndexRoute = LayoutIndexImport.update({
5354
getParentRoute: () => LayoutRoute,
5455
} as any)
5556

57+
const LayoutTicketsRoute = LayoutTicketsImport.update({
58+
path: '/tickets',
59+
getParentRoute: () => LayoutRoute,
60+
} as any)
61+
5662
const LayoutSettingsRoute = LayoutSettingsImport.update({
5763
path: '/settings',
5864
getParentRoute: () => LayoutRoute,
@@ -104,6 +110,10 @@ declare module '@tanstack/react-router' {
104110
preLoaderRoute: typeof LayoutSettingsImport
105111
parentRoute: typeof LayoutImport
106112
}
113+
'/_layout/tickets': {
114+
preLoaderRoute: typeof LayoutTicketsImport
115+
parentRoute: typeof LayoutImport
116+
}
107117
'/_layout/': {
108118
preLoaderRoute: typeof LayoutIndexImport
109119
parentRoute: typeof LayoutImport
@@ -118,6 +128,7 @@ export const routeTree = rootRoute.addChildren([
118128
LayoutAdminRoute,
119129
LayoutItemsRoute,
120130
LayoutSettingsRoute,
131+
LayoutTicketsRoute,
121132
LayoutIndexRoute,
122133
]),
123134
LoginRoute,
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Box, Container, Text } from "@chakra-ui/react"
2+
import { createFileRoute } from "@tanstack/react-router"
3+
4+
//import useAuth from "@/hooks/useAuth"
5+
6+
export const Route = createFileRoute("/_layout/tickets")({
7+
component: Tickets,
8+
})
9+
10+
function Tickets() {
11+
//const { user: currentUser } = useAuth()
12+
13+
return (
14+
<>
15+
<Container maxW="full">
16+
<Box pt={12} m={4}>
17+
<Text>
18+
<ul>
19+
<ol><b>Página de Listagem de Tickets</b></ol>
20+
<li>- Exibição dos tickets cadastrados em formato de tabela ou lista com informações resumidas (título, status, prioridade, data de criação)</li>
21+
<li>- Campo de busca para filtrar por palavra-chave</li>
22+
<li>- Filtros para status, data, prioridade e categoria</li>
23+
<li>- Opções de ordenação e paginação para facilitar a navegação</li>
24+
</ul>
25+
</Text>
26+
27+
</Box>
28+
</Container>
29+
</>
30+
)
31+
}
32+
33+
34+

0 commit comments

Comments
 (0)