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