@create-lft-app/nextjs 3.2.0 → 3.3.0
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/README.md +549 -549
- package/package.json +48 -48
- package/template/.claude/skills/anti-patterns.md +150 -0
- package/template/.claude/skills/drizzle-schema.md +178 -0
- package/template/.claude/skills/formatting.md +56 -0
- package/template/.claude/skills/module-architecture.md +143 -0
- package/template/.claude/skills/supabase-server-actions.md +199 -0
- package/template/.claude/skills/ui-patterns.md +161 -0
- package/template/CLAUDE.md +114 -1239
- package/template/drizzle.config.ts +12 -12
- package/template/eslint.config.mjs +16 -16
- package/template/gitignore +36 -36
- package/template/next.config.ts +7 -7
- package/template/package.json +86 -86
- package/template/postcss.config.mjs +7 -7
- package/template/proxy.ts +12 -12
- package/template/public/logolft.svg +11 -11
- package/template/src/app/(auth)/dashboard/dashboard-content.tsx +124 -124
- package/template/src/app/(auth)/dashboard/page.tsx +9 -9
- package/template/src/app/(auth)/layout.tsx +7 -7
- package/template/src/app/(auth)/users/page.tsx +9 -9
- package/template/src/app/(auth)/users/users-content.tsx +26 -26
- package/template/src/app/(public)/layout.tsx +7 -7
- package/template/src/app/(public)/login/page.tsx +17 -17
- package/template/src/app/api/webhooks/route.ts +20 -20
- package/template/src/app/globals.css +249 -249
- package/template/src/app/layout.tsx +37 -37
- package/template/src/app/page.tsx +5 -5
- package/template/src/app/providers.tsx +27 -27
- package/template/src/components/layout/main-content.tsx +28 -28
- package/template/src/components/layout/sidebar-context.tsx +33 -33
- package/template/src/components/layout/sidebar.tsx +141 -141
- package/template/src/components/tables/data-table-column-header.tsx +68 -68
- package/template/src/components/tables/data-table-date-filter.tsx +203 -203
- package/template/src/components/tables/data-table-faceted-filter.tsx +185 -185
- package/template/src/components/tables/data-table-filters-dropdown.tsx +130 -130
- package/template/src/components/tables/data-table-number-filter.tsx +295 -295
- package/template/src/components/tables/data-table-pagination.tsx +99 -99
- package/template/src/components/tables/data-table-toolbar.tsx +140 -140
- package/template/src/components/tables/data-table-view-options.tsx +63 -63
- package/template/src/components/tables/data-table.tsx +148 -148
- package/template/src/components/tables/index.ts +9 -9
- package/template/src/components/ui/accordion.tsx +58 -58
- package/template/src/components/ui/alert-dialog.tsx +165 -165
- package/template/src/components/ui/alert.tsx +66 -66
- package/template/src/components/ui/animations/index.ts +44 -44
- package/template/src/components/ui/avatar.tsx +55 -55
- package/template/src/components/ui/badge.tsx +50 -50
- package/template/src/components/ui/button.tsx +118 -118
- package/template/src/components/ui/calendar.tsx +220 -220
- package/template/src/components/ui/card.tsx +113 -113
- package/template/src/components/ui/checkbox.tsx +38 -38
- package/template/src/components/ui/collapsible.tsx +33 -33
- package/template/src/components/ui/command.tsx +196 -196
- package/template/src/components/ui/dialog.tsx +156 -156
- package/template/src/components/ui/dropdown-menu.tsx +280 -280
- package/template/src/components/ui/form.tsx +171 -171
- package/template/src/components/ui/icons.tsx +167 -167
- package/template/src/components/ui/input.tsx +28 -28
- package/template/src/components/ui/label.tsx +25 -25
- package/template/src/components/ui/motion.tsx +197 -197
- package/template/src/components/ui/page-transition.tsx +166 -166
- package/template/src/components/ui/popover.tsx +59 -59
- package/template/src/components/ui/progress.tsx +32 -32
- package/template/src/components/ui/radio-group.tsx +45 -45
- package/template/src/components/ui/scroll-area.tsx +63 -63
- package/template/src/components/ui/select.tsx +208 -208
- package/template/src/components/ui/separator.tsx +28 -28
- package/template/src/components/ui/sheet.tsx +170 -170
- package/template/src/components/ui/sidebar.tsx +726 -726
- package/template/src/components/ui/skeleton.tsx +15 -15
- package/template/src/components/ui/slider.tsx +58 -58
- package/template/src/components/ui/sonner.tsx +47 -47
- package/template/src/components/ui/spinner.tsx +27 -27
- package/template/src/components/ui/submit-button.tsx +47 -47
- package/template/src/components/ui/switch.tsx +31 -31
- package/template/src/components/ui/table.tsx +120 -120
- package/template/src/components/ui/tabs.tsx +75 -75
- package/template/src/components/ui/textarea.tsx +26 -26
- package/template/src/components/ui/tooltip.tsx +70 -70
- package/template/src/config/navigation.ts +59 -59
- package/template/src/config/roles.ts +27 -27
- package/template/src/config/site.ts +12 -12
- package/template/src/db/index.ts +12 -12
- package/template/src/db/schema/index.ts +1 -1
- package/template/src/db/schema/users.ts +16 -16
- package/template/src/db/seed.ts +39 -39
- package/template/src/hooks/index.ts +3 -3
- package/template/src/hooks/use-mobile.ts +21 -21
- package/template/src/hooks/useDataTable.ts +82 -82
- package/template/src/hooks/useDebounce.ts +49 -49
- package/template/src/hooks/useMediaQuery.ts +36 -36
- package/template/src/lib/date/config.ts +36 -36
- package/template/src/lib/date/formatters.ts +127 -127
- package/template/src/lib/date/index.ts +26 -26
- package/template/src/lib/excel/exporter.ts +89 -89
- package/template/src/lib/excel/index.ts +14 -14
- package/template/src/lib/excel/parser.ts +96 -96
- package/template/src/lib/query-client.ts +35 -35
- package/template/src/lib/supabase/admin.ts +23 -23
- package/template/src/lib/supabase/client.ts +11 -11
- package/template/src/lib/supabase/proxy.ts +67 -67
- package/template/src/lib/supabase/server.ts +38 -38
- package/template/src/lib/supabase/types.ts +53 -53
- package/template/src/lib/utils.ts +6 -6
- package/template/src/lib/validations/common.ts +75 -75
- package/template/src/lib/validations/index.ts +20 -20
- package/template/src/modules/auth/actions/auth-actions.ts +59 -59
- package/template/src/modules/auth/components/login-form.tsx +68 -68
- package/template/src/modules/auth/hooks/useAuth.ts +38 -38
- package/template/src/modules/auth/hooks/useAuthMutations.ts +43 -43
- package/template/src/modules/auth/hooks/useAuthQueries.ts +43 -43
- package/template/src/modules/auth/index.ts +12 -12
- package/template/src/modules/auth/schemas/auth.schema.ts +32 -32
- package/template/src/modules/auth/stores/useAuthStore.ts +37 -37
- package/template/src/modules/users/actions/users-actions.ts +166 -166
- package/template/src/modules/users/columns.tsx +106 -106
- package/template/src/modules/users/components/users-list.tsx +48 -48
- package/template/src/modules/users/hooks/useUsers.ts +39 -39
- package/template/src/modules/users/hooks/useUsersMutations.ts +55 -55
- package/template/src/modules/users/hooks/useUsersQueries.ts +35 -35
- package/template/src/modules/users/index.ts +30 -30
- package/template/src/modules/users/schemas/users.schema.ts +51 -51
- package/template/src/modules/users/stores/useUsersStore.ts +60 -60
- package/template/src/modules/users/types/auth-user.types.ts +42 -42
- package/template/src/modules/users/utils/user-mapper.ts +32 -32
- package/template/src/stores/index.ts +1 -1
- package/template/src/stores/useUiStore.ts +55 -55
- package/template/src/types/api.ts +28 -28
- package/template/src/types/index.ts +2 -2
- package/template/src/types/table.ts +34 -34
- package/template/supabase/config.toml +94 -94
- package/template/tsconfig.json +42 -42
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
PageTransition,
|
|
5
|
-
PageHeader,
|
|
6
|
-
PageTitle,
|
|
7
|
-
PageDescription,
|
|
8
|
-
MotionDiv,
|
|
9
|
-
staggerContainer,
|
|
10
|
-
staggerItem,
|
|
11
|
-
} from '@/components/ui/animations'
|
|
12
|
-
import {
|
|
13
|
-
Card,
|
|
14
|
-
CardHeader,
|
|
15
|
-
CardTitle,
|
|
16
|
-
CardDescription,
|
|
17
|
-
CardContent,
|
|
18
|
-
} from '@/components/ui/card'
|
|
19
|
-
import { Users, FileText, TrendingUp, DollarSign } from 'lucide-react'
|
|
20
|
-
|
|
21
|
-
interface DashboardContentProps {
|
|
22
|
-
userEmail: string
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const stats = [
|
|
26
|
-
{
|
|
27
|
-
title: 'Usuarios Totales',
|
|
28
|
-
value: '2,350',
|
|
29
|
-
description: '+180 este mes',
|
|
30
|
-
icon: Users,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: 'Documentos',
|
|
34
|
-
value: '12,234',
|
|
35
|
-
description: '+1,234 esta semana',
|
|
36
|
-
icon: FileText,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
title: 'Crecimiento',
|
|
40
|
-
value: '+23%',
|
|
41
|
-
description: 'vs mes anterior',
|
|
42
|
-
icon: TrendingUp,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
title: 'Ingresos',
|
|
46
|
-
value: '$45,231',
|
|
47
|
-
description: '+20.1% este mes',
|
|
48
|
-
icon: DollarSign,
|
|
49
|
-
},
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
export function DashboardContent({ userEmail }: DashboardContentProps) {
|
|
53
|
-
return (
|
|
54
|
-
<PageTransition className="flex flex-1 flex-col gap-6 p-6">
|
|
55
|
-
<PageHeader>
|
|
56
|
-
<PageTitle>Dashboard</PageTitle>
|
|
57
|
-
<PageDescription>Bienvenido, {userEmail}</PageDescription>
|
|
58
|
-
</PageHeader>
|
|
59
|
-
|
|
60
|
-
<MotionDiv
|
|
61
|
-
variants={staggerContainer}
|
|
62
|
-
initial="hidden"
|
|
63
|
-
animate="visible"
|
|
64
|
-
className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"
|
|
65
|
-
>
|
|
66
|
-
{stats.map((stat) => (
|
|
67
|
-
<MotionDiv key={stat.title} variants={staggerItem}>
|
|
68
|
-
<Card className="h-full">
|
|
69
|
-
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
|
70
|
-
<CardTitle className="text-sm font-medium">
|
|
71
|
-
{stat.title}
|
|
72
|
-
</CardTitle>
|
|
73
|
-
<stat.icon className="h-4 w-4 text-muted-foreground" />
|
|
74
|
-
</CardHeader>
|
|
75
|
-
<CardContent>
|
|
76
|
-
<div className="text-2xl font-bold">{stat.value}</div>
|
|
77
|
-
<CardDescription>{stat.description}</CardDescription>
|
|
78
|
-
</CardContent>
|
|
79
|
-
</Card>
|
|
80
|
-
</MotionDiv>
|
|
81
|
-
))}
|
|
82
|
-
</MotionDiv>
|
|
83
|
-
|
|
84
|
-
<MotionDiv
|
|
85
|
-
variants={staggerContainer}
|
|
86
|
-
initial="hidden"
|
|
87
|
-
animate="visible"
|
|
88
|
-
className="grid grid-cols-1 lg:grid-cols-2 gap-4"
|
|
89
|
-
>
|
|
90
|
-
<MotionDiv variants={staggerItem}>
|
|
91
|
-
<Card className="h-[400px]">
|
|
92
|
-
<CardHeader>
|
|
93
|
-
<CardTitle>Actividad Reciente</CardTitle>
|
|
94
|
-
<CardDescription>
|
|
95
|
-
Últimas acciones en el sistema
|
|
96
|
-
</CardDescription>
|
|
97
|
-
</CardHeader>
|
|
98
|
-
<CardContent>
|
|
99
|
-
<div className="flex items-center justify-center h-[280px] text-muted-foreground">
|
|
100
|
-
Gráfico de actividad
|
|
101
|
-
</div>
|
|
102
|
-
</CardContent>
|
|
103
|
-
</Card>
|
|
104
|
-
</MotionDiv>
|
|
105
|
-
|
|
106
|
-
<MotionDiv variants={staggerItem}>
|
|
107
|
-
<Card className="h-[400px]">
|
|
108
|
-
<CardHeader>
|
|
109
|
-
<CardTitle>Resumen</CardTitle>
|
|
110
|
-
<CardDescription>
|
|
111
|
-
Estadísticas generales del período
|
|
112
|
-
</CardDescription>
|
|
113
|
-
</CardHeader>
|
|
114
|
-
<CardContent>
|
|
115
|
-
<div className="flex items-center justify-center h-[280px] text-muted-foreground">
|
|
116
|
-
Gráfico de resumen
|
|
117
|
-
</div>
|
|
118
|
-
</CardContent>
|
|
119
|
-
</Card>
|
|
120
|
-
</MotionDiv>
|
|
121
|
-
</MotionDiv>
|
|
122
|
-
</PageTransition>
|
|
123
|
-
)
|
|
124
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PageTransition,
|
|
5
|
+
PageHeader,
|
|
6
|
+
PageTitle,
|
|
7
|
+
PageDescription,
|
|
8
|
+
MotionDiv,
|
|
9
|
+
staggerContainer,
|
|
10
|
+
staggerItem,
|
|
11
|
+
} from '@/components/ui/animations'
|
|
12
|
+
import {
|
|
13
|
+
Card,
|
|
14
|
+
CardHeader,
|
|
15
|
+
CardTitle,
|
|
16
|
+
CardDescription,
|
|
17
|
+
CardContent,
|
|
18
|
+
} from '@/components/ui/card'
|
|
19
|
+
import { Users, FileText, TrendingUp, DollarSign } from 'lucide-react'
|
|
20
|
+
|
|
21
|
+
interface DashboardContentProps {
|
|
22
|
+
userEmail: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const stats = [
|
|
26
|
+
{
|
|
27
|
+
title: 'Usuarios Totales',
|
|
28
|
+
value: '2,350',
|
|
29
|
+
description: '+180 este mes',
|
|
30
|
+
icon: Users,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: 'Documentos',
|
|
34
|
+
value: '12,234',
|
|
35
|
+
description: '+1,234 esta semana',
|
|
36
|
+
icon: FileText,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: 'Crecimiento',
|
|
40
|
+
value: '+23%',
|
|
41
|
+
description: 'vs mes anterior',
|
|
42
|
+
icon: TrendingUp,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
title: 'Ingresos',
|
|
46
|
+
value: '$45,231',
|
|
47
|
+
description: '+20.1% este mes',
|
|
48
|
+
icon: DollarSign,
|
|
49
|
+
},
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
export function DashboardContent({ userEmail }: DashboardContentProps) {
|
|
53
|
+
return (
|
|
54
|
+
<PageTransition className="flex flex-1 flex-col gap-6 p-6">
|
|
55
|
+
<PageHeader>
|
|
56
|
+
<PageTitle>Dashboard</PageTitle>
|
|
57
|
+
<PageDescription>Bienvenido, {userEmail}</PageDescription>
|
|
58
|
+
</PageHeader>
|
|
59
|
+
|
|
60
|
+
<MotionDiv
|
|
61
|
+
variants={staggerContainer}
|
|
62
|
+
initial="hidden"
|
|
63
|
+
animate="visible"
|
|
64
|
+
className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"
|
|
65
|
+
>
|
|
66
|
+
{stats.map((stat) => (
|
|
67
|
+
<MotionDiv key={stat.title} variants={staggerItem}>
|
|
68
|
+
<Card className="h-full">
|
|
69
|
+
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
|
70
|
+
<CardTitle className="text-sm font-medium">
|
|
71
|
+
{stat.title}
|
|
72
|
+
</CardTitle>
|
|
73
|
+
<stat.icon className="h-4 w-4 text-muted-foreground" />
|
|
74
|
+
</CardHeader>
|
|
75
|
+
<CardContent>
|
|
76
|
+
<div className="text-2xl font-bold">{stat.value}</div>
|
|
77
|
+
<CardDescription>{stat.description}</CardDescription>
|
|
78
|
+
</CardContent>
|
|
79
|
+
</Card>
|
|
80
|
+
</MotionDiv>
|
|
81
|
+
))}
|
|
82
|
+
</MotionDiv>
|
|
83
|
+
|
|
84
|
+
<MotionDiv
|
|
85
|
+
variants={staggerContainer}
|
|
86
|
+
initial="hidden"
|
|
87
|
+
animate="visible"
|
|
88
|
+
className="grid grid-cols-1 lg:grid-cols-2 gap-4"
|
|
89
|
+
>
|
|
90
|
+
<MotionDiv variants={staggerItem}>
|
|
91
|
+
<Card className="h-[400px]">
|
|
92
|
+
<CardHeader>
|
|
93
|
+
<CardTitle>Actividad Reciente</CardTitle>
|
|
94
|
+
<CardDescription>
|
|
95
|
+
Últimas acciones en el sistema
|
|
96
|
+
</CardDescription>
|
|
97
|
+
</CardHeader>
|
|
98
|
+
<CardContent>
|
|
99
|
+
<div className="flex items-center justify-center h-[280px] text-muted-foreground">
|
|
100
|
+
Gráfico de actividad
|
|
101
|
+
</div>
|
|
102
|
+
</CardContent>
|
|
103
|
+
</Card>
|
|
104
|
+
</MotionDiv>
|
|
105
|
+
|
|
106
|
+
<MotionDiv variants={staggerItem}>
|
|
107
|
+
<Card className="h-[400px]">
|
|
108
|
+
<CardHeader>
|
|
109
|
+
<CardTitle>Resumen</CardTitle>
|
|
110
|
+
<CardDescription>
|
|
111
|
+
Estadísticas generales del período
|
|
112
|
+
</CardDescription>
|
|
113
|
+
</CardHeader>
|
|
114
|
+
<CardContent>
|
|
115
|
+
<div className="flex items-center justify-center h-[280px] text-muted-foreground">
|
|
116
|
+
Gráfico de resumen
|
|
117
|
+
</div>
|
|
118
|
+
</CardContent>
|
|
119
|
+
</Card>
|
|
120
|
+
</MotionDiv>
|
|
121
|
+
</MotionDiv>
|
|
122
|
+
</PageTransition>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createClient } from '@/lib/supabase/server'
|
|
2
|
-
import { DashboardContent } from './dashboard-content'
|
|
3
|
-
|
|
4
|
-
export default async function DashboardPage() {
|
|
5
|
-
const supabase = await createClient()
|
|
6
|
-
const { data: { user } } = await supabase.auth.getUser()
|
|
7
|
-
|
|
8
|
-
return <DashboardContent userEmail={user?.email ?? ''} />
|
|
9
|
-
}
|
|
1
|
+
import { createClient } from '@/lib/supabase/server'
|
|
2
|
+
import { DashboardContent } from './dashboard-content'
|
|
3
|
+
|
|
4
|
+
export default async function DashboardPage() {
|
|
5
|
+
const supabase = await createClient()
|
|
6
|
+
const { data: { user } } = await supabase.auth.getUser()
|
|
7
|
+
|
|
8
|
+
return <DashboardContent userEmail={user?.email ?? ''} />
|
|
9
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default function AuthLayout({
|
|
2
|
-
children,
|
|
3
|
-
}: {
|
|
4
|
-
children: React.ReactNode
|
|
5
|
-
}) {
|
|
6
|
-
return <>{children}</>
|
|
7
|
-
}
|
|
1
|
+
export default function AuthLayout({
|
|
2
|
+
children,
|
|
3
|
+
}: {
|
|
4
|
+
children: React.ReactNode
|
|
5
|
+
}) {
|
|
6
|
+
return <>{children}</>
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createClient } from '@/lib/supabase/server'
|
|
2
|
-
import { UsersContent } from './users-content'
|
|
3
|
-
|
|
4
|
-
export default async function UsersPage() {
|
|
5
|
-
const supabase = await createClient()
|
|
6
|
-
const { data: { user } } = await supabase.auth.getUser()
|
|
7
|
-
|
|
8
|
-
return <UsersContent userEmail={user?.email ?? ''} />
|
|
9
|
-
}
|
|
1
|
+
import { createClient } from '@/lib/supabase/server'
|
|
2
|
+
import { UsersContent } from './users-content'
|
|
3
|
+
|
|
4
|
+
export default async function UsersPage() {
|
|
5
|
+
const supabase = await createClient()
|
|
6
|
+
const { data: { user } } = await supabase.auth.getUser()
|
|
7
|
+
|
|
8
|
+
return <UsersContent userEmail={user?.email ?? ''} />
|
|
9
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
PageTransition,
|
|
5
|
-
PageHeader,
|
|
6
|
-
PageTitle,
|
|
7
|
-
PageDescription,
|
|
8
|
-
} from '@/components/ui/animations'
|
|
9
|
-
import { UsersList } from '@/modules/users'
|
|
10
|
-
|
|
11
|
-
interface UsersContentProps {
|
|
12
|
-
userEmail: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function UsersContent({ userEmail }: UsersContentProps) {
|
|
16
|
-
return (
|
|
17
|
-
<PageTransition className="flex flex-1 flex-col gap-6 p-6">
|
|
18
|
-
<PageHeader>
|
|
19
|
-
<PageTitle>Usuarios</PageTitle>
|
|
20
|
-
<PageDescription>Gestión de usuarios del sistema</PageDescription>
|
|
21
|
-
</PageHeader>
|
|
22
|
-
|
|
23
|
-
<UsersList />
|
|
24
|
-
</PageTransition>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PageTransition,
|
|
5
|
+
PageHeader,
|
|
6
|
+
PageTitle,
|
|
7
|
+
PageDescription,
|
|
8
|
+
} from '@/components/ui/animations'
|
|
9
|
+
import { UsersList } from '@/modules/users'
|
|
10
|
+
|
|
11
|
+
interface UsersContentProps {
|
|
12
|
+
userEmail: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function UsersContent({ userEmail }: UsersContentProps) {
|
|
16
|
+
return (
|
|
17
|
+
<PageTransition className="flex flex-1 flex-col gap-6 p-6">
|
|
18
|
+
<PageHeader>
|
|
19
|
+
<PageTitle>Usuarios</PageTitle>
|
|
20
|
+
<PageDescription>Gestión de usuarios del sistema</PageDescription>
|
|
21
|
+
</PageHeader>
|
|
22
|
+
|
|
23
|
+
<UsersList />
|
|
24
|
+
</PageTransition>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default function PublicLayout({
|
|
2
|
-
children,
|
|
3
|
-
}: {
|
|
4
|
-
children: React.ReactNode
|
|
5
|
-
}) {
|
|
6
|
-
return <>{children}</>
|
|
7
|
-
}
|
|
1
|
+
export default function PublicLayout({
|
|
2
|
+
children,
|
|
3
|
+
}: {
|
|
4
|
+
children: React.ReactNode
|
|
5
|
+
}) {
|
|
6
|
+
return <>{children}</>
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { LoginForm } from '@/modules/auth/components/login-form'
|
|
2
|
-
|
|
3
|
-
export default function LoginPage() {
|
|
4
|
-
return (
|
|
5
|
-
<div className="flex min-h-screen items-center justify-center">
|
|
6
|
-
<div className="w-full max-w-md space-y-8 px-4">
|
|
7
|
-
<div className="text-center">
|
|
8
|
-
<h1 className="text-2xl font-bold">Iniciar sesión</h1>
|
|
9
|
-
<p className="mt-2 text-muted-foreground">
|
|
10
|
-
Ingresa tus credenciales para acceder
|
|
11
|
-
</p>
|
|
12
|
-
</div>
|
|
13
|
-
<LoginForm />
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
1
|
+
import { LoginForm } from '@/modules/auth/components/login-form'
|
|
2
|
+
|
|
3
|
+
export default function LoginPage() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="flex min-h-screen items-center justify-center">
|
|
6
|
+
<div className="w-full max-w-md space-y-8 px-4">
|
|
7
|
+
<div className="text-center">
|
|
8
|
+
<h1 className="text-2xl font-bold">Iniciar sesión</h1>
|
|
9
|
+
<p className="mt-2 text-muted-foreground">
|
|
10
|
+
Ingresa tus credenciales para acceder
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
<LoginForm />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from 'next/server'
|
|
2
|
-
|
|
3
|
-
export async function POST(request: NextRequest) {
|
|
4
|
-
try {
|
|
5
|
-
const body = await request.json()
|
|
6
|
-
|
|
7
|
-
// Verificar firma del webhook aquí
|
|
8
|
-
// const signature = request.headers.get('x-webhook-signature')
|
|
9
|
-
|
|
10
|
-
console.log('Webhook received:', body)
|
|
11
|
-
|
|
12
|
-
return NextResponse.json({ received: true })
|
|
13
|
-
} catch (error) {
|
|
14
|
-
console.error('Webhook error:', error)
|
|
15
|
-
return NextResponse.json(
|
|
16
|
-
{ error: 'Webhook processing failed' },
|
|
17
|
-
{ status: 500 }
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server'
|
|
2
|
+
|
|
3
|
+
export async function POST(request: NextRequest) {
|
|
4
|
+
try {
|
|
5
|
+
const body = await request.json()
|
|
6
|
+
|
|
7
|
+
// Verificar firma del webhook aquí
|
|
8
|
+
// const signature = request.headers.get('x-webhook-signature')
|
|
9
|
+
|
|
10
|
+
console.log('Webhook received:', body)
|
|
11
|
+
|
|
12
|
+
return NextResponse.json({ received: true })
|
|
13
|
+
} catch (error) {
|
|
14
|
+
console.error('Webhook error:', error)
|
|
15
|
+
return NextResponse.json(
|
|
16
|
+
{ error: 'Webhook processing failed' },
|
|
17
|
+
{ status: 500 }
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
}
|