update layout
This commit is contained in:
@@ -79,14 +79,13 @@ const data = {
|
|||||||
export function AppSidebar() {
|
export function AppSidebar() {
|
||||||
return (
|
return (
|
||||||
<Sidebar collapsible="icon">
|
<Sidebar collapsible="icon">
|
||||||
|
<SidebarRail title="Mostrar/ocultar barra lateral" />
|
||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
<WorkspaceSwitcher />
|
<WorkspaceSwitcher />
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
<SidebarRail />
|
|
||||||
<NavMain data={data} />
|
<NavMain data={data} />
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
<SidebarFooter />
|
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export default function Route({ loaderData }: Route.ComponentProps) {
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main className="p-4">
|
<div className="p-4">
|
||||||
<div className="container mx-auto relative">
|
<div className="container mx-auto relative">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
<Toaster
|
<Toaster
|
||||||
@@ -91,7 +91,7 @@ export default function Route({ loaderData }: Route.ComponentProps) {
|
|||||||
closeButton={true}
|
closeButton={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</div>
|
||||||
</SidebarInset>
|
</SidebarInset>
|
||||||
</SidebarProvider>
|
</SidebarProvider>
|
||||||
</WorkspaceProvider>
|
</WorkspaceProvider>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
"flat": "^6.0.1",
|
"flat": "^6.0.1",
|
||||||
"fuse.js": "^7.1.0",
|
"fuse.js": "^7.1.0",
|
||||||
"http-status-codes": "^2.3.0",
|
|
||||||
"isbot": "^5.1.31",
|
"isbot": "^5.1.31",
|
||||||
"luxon": "^3.7.2",
|
"luxon": "^3.7.2",
|
||||||
"meilisearch": "^0.54.0",
|
"meilisearch": "^0.54.0",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { NavMain } from '@/components/nav-main'
|
|||||||
import {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
SidebarFooter,
|
|
||||||
SidebarRail
|
SidebarRail
|
||||||
} from '@repo/ui/components/ui/sidebar'
|
} from '@repo/ui/components/ui/sidebar'
|
||||||
|
|
||||||
@@ -52,12 +51,11 @@ const navMain = [
|
|||||||
|
|
||||||
export function AppSidebar() {
|
export function AppSidebar() {
|
||||||
return (
|
return (
|
||||||
<Sidebar collapsible="icon">
|
<Sidebar variant="inset" className="p-4">
|
||||||
|
<SidebarRail title="Mostrar/ocultar barra lateral" />
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
<SidebarRail />
|
|
||||||
<NavMain navMain={navMain} />
|
<NavMain navMain={navMain} />
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
<SidebarFooter />
|
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
import type { Route } from './+types/home'
|
import type { Route } from './+types/home'
|
||||||
|
|
||||||
import { Button } from '@repo/ui/components/ui/button'
|
|
||||||
|
|
||||||
export function meta({}: Route.MetaArgs) {
|
export function meta({}: Route.MetaArgs) {
|
||||||
return [
|
return [{ title: 'Visão geral' }]
|
||||||
{ title: 'New React Router App' },
|
|
||||||
{ name: 'description', content: 'Welcome to React Router!' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loader({ context }: Route.LoaderArgs) {
|
export function loader({ context }: Route.LoaderArgs) {
|
||||||
@@ -14,9 +9,5 @@ export function loader({ context }: Route.LoaderArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Route({}: Route.ComponentProps) {
|
export default function Route({}: Route.ComponentProps) {
|
||||||
return (
|
return <></>
|
||||||
<>
|
|
||||||
<Button>a</Button>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,11 @@ import {
|
|||||||
DownloadIcon,
|
DownloadIcon,
|
||||||
FileSpreadsheetIcon,
|
FileSpreadsheetIcon,
|
||||||
FileTextIcon,
|
FileTextIcon,
|
||||||
PlusCircleIcon,
|
PlusCircleIcon
|
||||||
PlusIcon
|
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import { MeiliSearchFilterBuilder } from 'meilisearch-helper'
|
import { MeiliSearchFilterBuilder } from 'meilisearch-helper'
|
||||||
import { Suspense, useState } from 'react'
|
import { Suspense, useState } from 'react'
|
||||||
import { Await, Link, Outlet, useParams, useSearchParams } from 'react-router'
|
import { Await, Outlet, useSearchParams } from 'react-router'
|
||||||
import type { BookType } from 'xlsx'
|
import type { BookType } from 'xlsx'
|
||||||
import * as XLSX from 'xlsx'
|
import * as XLSX from 'xlsx'
|
||||||
|
|
||||||
@@ -39,9 +38,8 @@ export function meta({}: Route.MetaArgs) {
|
|||||||
return [{ title: 'Matrículas' }]
|
return [{ title: 'Matrículas' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loader({ params, context, request }: Route.LoaderArgs) {
|
export async function loader({ context, request }: Route.LoaderArgs) {
|
||||||
const { searchParams } = new URL(request.url)
|
const { searchParams } = new URL(request.url)
|
||||||
const { orgid } = params
|
|
||||||
const query = searchParams.get('q') || ''
|
const query = searchParams.get('q') || ''
|
||||||
const from = searchParams.get('from')
|
const from = searchParams.get('from')
|
||||||
const to = searchParams.get('to')
|
const to = searchParams.get('to')
|
||||||
@@ -89,12 +87,7 @@ export default function Route({ loaderData: { data } }) {
|
|||||||
return (
|
return (
|
||||||
<Suspense fallback={<Skeleton />}>
|
<Suspense fallback={<Skeleton />}>
|
||||||
<div className="space-y-0.5 mb-8">
|
<div className="space-y-0.5 mb-8">
|
||||||
<h1 className="text-2xl font-bold tracking-tight">
|
<h1 className="text-2xl font-bold tracking-tight">Matrículas</h1>
|
||||||
Gerenciar matrículas
|
|
||||||
</h1>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Matricule colaboradores de forma rápida e acompanhe seu progresso.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Await resolve={data}>
|
<Await resolve={data}>
|
||||||
@@ -248,8 +241,6 @@ export function ExportMenu({
|
|||||||
headers: Record<string, string>
|
headers: Record<string, string>
|
||||||
selectedRows: object[]
|
selectedRows: object[]
|
||||||
}) {
|
}) {
|
||||||
const { orgid } = useParams()
|
|
||||||
|
|
||||||
const exportFile = (bookType: BookType) => () => {
|
const exportFile = (bookType: BookType) => () => {
|
||||||
if (!selectedRows.length) {
|
if (!selectedRows.length) {
|
||||||
return
|
return
|
||||||
@@ -267,7 +258,7 @@ export function ExportMenu({
|
|||||||
origin: 'A1'
|
origin: 'A1'
|
||||||
})
|
})
|
||||||
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1')
|
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1')
|
||||||
XLSX.writeFile(workbook, `${orgid}_users_${+now}.${bookType}`, {
|
XLSX.writeFile(workbook, `users_${+now}.${bookType}`, {
|
||||||
bookType,
|
bookType,
|
||||||
compression: true
|
compression: true
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import { Skeleton } from '@repo/ui/components/skeleton'
|
|||||||
import { Kbd } from '@repo/ui/components/ui/kbd'
|
import { Kbd } from '@repo/ui/components/ui/kbd'
|
||||||
import { createSearch } from '@repo/util/meili'
|
import { createSearch } from '@repo/util/meili'
|
||||||
|
|
||||||
import { columns, type c } from './columns'
|
import { columns, type Org } from './columns'
|
||||||
|
|
||||||
export function meta({}: Route.MetaArgs) {
|
export function meta({}: Route.MetaArgs) {
|
||||||
return [{ title: 'Colaboradores' }]
|
return [{ title: 'Empresas' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loader({ context, request }: Route.LoaderArgs) {
|
export async function loader({ context, request }: Route.LoaderArgs) {
|
||||||
@@ -40,12 +40,7 @@ export default function Route({ loaderData: { data } }) {
|
|||||||
return (
|
return (
|
||||||
<Suspense fallback={<Skeleton />}>
|
<Suspense fallback={<Skeleton />}>
|
||||||
<div className="space-y-0.5 mb-8">
|
<div className="space-y-0.5 mb-8">
|
||||||
<h1 className="text-2xl font-bold tracking-tight">
|
<h1 className="text-2xl font-bold tracking-tight">Empresas</h1>
|
||||||
Gerenciar empresas
|
|
||||||
</h1>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Adicione colaboradores e organize sua equipe de forma prática.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Await resolve={data}>
|
<Await resolve={data}>
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
import type { Route } from './+types'
|
import type { Route } from './+types'
|
||||||
|
|
||||||
import { Button } from '@repo/ui/components/ui/button'
|
|
||||||
|
|
||||||
export function meta({}: Route.MetaArgs) {
|
export function meta({}: Route.MetaArgs) {
|
||||||
return [
|
return [{ title: 'Pagamentos' }]
|
||||||
{ title: 'Histórico de pagamentos' },
|
|
||||||
{ name: 'description', content: 'Welcome to React Router!' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loader({ context }: Route.LoaderArgs) {
|
export function loader({ context }: Route.LoaderArgs) {
|
||||||
@@ -16,7 +11,9 @@ export function loader({ context }: Route.LoaderArgs) {
|
|||||||
export default function Route({}: Route.ComponentProps) {
|
export default function Route({}: Route.ComponentProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button>a</Button>
|
<div className="space-y-0.5 mb-8">
|
||||||
|
<h1 className="text-2xl font-bold tracking-tight">Pagamentos</h1>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { createSearch } from '@repo/util/meili'
|
|||||||
import { columns, type User } from './columns'
|
import { columns, type User } from './columns'
|
||||||
|
|
||||||
export function meta({}: Route.MetaArgs) {
|
export function meta({}: Route.MetaArgs) {
|
||||||
return [{ title: 'Colaboradores' }]
|
return [{ title: 'Usuários' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loader({ context, request }: Route.LoaderArgs) {
|
export async function loader({ context, request }: Route.LoaderArgs) {
|
||||||
@@ -40,12 +40,7 @@ export default function Route({ loaderData: { data } }) {
|
|||||||
return (
|
return (
|
||||||
<Suspense fallback={<Skeleton />}>
|
<Suspense fallback={<Skeleton />}>
|
||||||
<div className="space-y-0.5 mb-8">
|
<div className="space-y-0.5 mb-8">
|
||||||
<h1 className="text-2xl font-bold tracking-tight">
|
<h1 className="text-2xl font-bold tracking-tight">Usuários</h1>
|
||||||
Gerenciar colaboradores
|
|
||||||
</h1>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Adicione colaboradores e organize sua equipe de forma prática.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Await resolve={data}>
|
<Await resolve={data}>
|
||||||
|
|||||||
@@ -1,22 +1,19 @@
|
|||||||
import type { Route } from './+types'
|
import type { Route } from './+types'
|
||||||
|
|
||||||
import { Button } from '@repo/ui/components/ui/button'
|
|
||||||
|
|
||||||
export function meta({}: Route.MetaArgs) {
|
export function meta({}: Route.MetaArgs) {
|
||||||
return [
|
return [{ title: 'Webhooks' }]
|
||||||
{ title: 'Histórico de pagamentos' },
|
|
||||||
{ name: 'description', content: 'Welcome to React Router!' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loader({ context }: Route.LoaderArgs) {
|
export function loader({}: Route.LoaderArgs) {
|
||||||
return { message: context.cloudflare.env.VALUE_FROM_CLOUDFLARE }
|
return {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Route({}: Route.ComponentProps) {
|
export default function Route({}: Route.ComponentProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button>a</Button>
|
<div className="space-y-0.5 mb-8">
|
||||||
|
<h1 className="text-2xl font-bold tracking-tight">Webhooks</h1>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,11 +37,14 @@ export default function Route({ loaderData }: Route.ComponentProps) {
|
|||||||
<SidebarInset className="relative flex flex-col flex-1 min-w-0">
|
<SidebarInset className="relative flex flex-col flex-1 min-w-0">
|
||||||
<header
|
<header
|
||||||
className="bg-background/15 backdrop-blur-sm
|
className="bg-background/15 backdrop-blur-sm
|
||||||
px-4 py-2 lg:py-4 sticky top-0 z-5"
|
px-4 py-2 lg:py-4 sticky top-0 z-5
|
||||||
|
md:rounded-t-2xl"
|
||||||
>
|
>
|
||||||
<div className="container mx-auto flex items-center">
|
<div className="container mx-auto flex items-center">
|
||||||
<SidebarTrigger className="md:hidden" />
|
<SidebarTrigger className="md:hidden" />
|
||||||
<ThemedImage className="max-md:hidden" />
|
<ThemedImage className="max-md:hidden flex gap-1">
|
||||||
|
<span className="text-muted-foreground text-xs">Insights</span>
|
||||||
|
</ThemedImage>
|
||||||
|
|
||||||
<div className="ml-auto flex gap-2.5 items-center">
|
<div className="ml-auto flex gap-2.5 items-center">
|
||||||
<ModeToggle />
|
<ModeToggle />
|
||||||
@@ -50,7 +53,7 @@ export default function Route({ loaderData }: Route.ComponentProps) {
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main className="p-4">
|
<div className="p-4">
|
||||||
<div className="container mx-auto relative">
|
<div className="container mx-auto relative">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
<Toaster
|
<Toaster
|
||||||
@@ -60,7 +63,7 @@ export default function Route({ loaderData }: Route.ComponentProps) {
|
|||||||
closeButton={true}
|
closeButton={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</div>
|
||||||
</SidebarInset>
|
</SidebarInset>
|
||||||
</SidebarProvider>
|
</SidebarProvider>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ def _get_idp_user(
|
|||||||
'id': user_id,
|
'id': user_id,
|
||||||
'sk': 'PASSWORD',
|
'sk': 'PASSWORD',
|
||||||
'hash': pbkdf2_sha256.hash(password),
|
'hash': pbkdf2_sha256.hash(password),
|
||||||
|
'created_at': now(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
7
package-lock.json
generated
7
package-lock.json
generated
@@ -34,7 +34,6 @@
|
|||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
"flat": "^6.0.1",
|
"flat": "^6.0.1",
|
||||||
"fuse.js": "^7.1.0",
|
"fuse.js": "^7.1.0",
|
||||||
"http-status-codes": "^2.3.0",
|
|
||||||
"isbot": "^5.1.31",
|
"isbot": "^5.1.31",
|
||||||
"luxon": "^3.7.2",
|
"luxon": "^3.7.2",
|
||||||
"meilisearch": "^0.54.0",
|
"meilisearch": "^0.54.0",
|
||||||
@@ -4861,12 +4860,6 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/http-status-codes": {
|
|
||||||
"version": "2.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz",
|
|
||||||
"integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/id.saladeaula.digital": {
|
"node_modules/id.saladeaula.digital": {
|
||||||
"resolved": "apps/id.saladeaula.digital",
|
"resolved": "apps/id.saladeaula.digital",
|
||||||
"link": true
|
"link": true
|
||||||
|
|||||||
Reference in New Issue
Block a user