update the copies
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
WalletIcon
|
||||
} from 'lucide-react'
|
||||
import { use, useEffect, useState } from 'react'
|
||||
import { Link, redirect, useFetcher } from 'react-router'
|
||||
import { Link, NavLink, redirect, useFetcher } from 'react-router'
|
||||
|
||||
import { cloudflareContext, userContext } from '@repo/auth/context'
|
||||
import { Skeleton } from '@repo/ui/components/skeleton'
|
||||
@@ -53,6 +53,7 @@ import { Bulk } from './bulk'
|
||||
import { Payment } from './payment'
|
||||
import { Review } from './review'
|
||||
import { useWizardStore } from './store'
|
||||
import { Spinner } from '@repo/ui/components/ui/spinner'
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [{ title: 'Comprar matrículas' }]
|
||||
@@ -166,7 +167,10 @@ export default function Route({
|
||||
variant="outline"
|
||||
className="bg-green-500/15 border-green-600/60 rounded-2xl"
|
||||
>
|
||||
<ItemMedia variant="icon">
|
||||
<ItemMedia
|
||||
className="bg-green-500/30 border-green-600/50"
|
||||
variant="icon"
|
||||
>
|
||||
<MegaphoneIcon />
|
||||
</ItemMedia>
|
||||
<ItemContent>
|
||||
@@ -178,9 +182,11 @@ export default function Route({
|
||||
</ItemContent>
|
||||
<ItemActions>
|
||||
<Button size="sm" variant="outline" asChild>
|
||||
<Link to="../enrollments/seats">
|
||||
<PlusIcon /> Matricular
|
||||
</Link>
|
||||
<NavLink to="../enrollments/seats">
|
||||
{({ isPending }) => (
|
||||
<>{isPending ? <Spinner /> : <PlusIcon />} Matricular</>
|
||||
)}
|
||||
</NavLink>
|
||||
</Button>
|
||||
</ItemActions>
|
||||
</Item>
|
||||
|
||||
@@ -10,8 +10,19 @@ import {
|
||||
BreadcrumbPage,
|
||||
BreadcrumbSeparator
|
||||
} from '@repo/ui/components/ui/breadcrumb'
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle
|
||||
} from '@repo/ui/components/ui/card'
|
||||
import { request as req } from '@repo/util/request'
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [{ title: 'Adicionar matrícula' }]
|
||||
}
|
||||
|
||||
export async function loader({ request, params, context }: Route.LoaderArgs) {
|
||||
const seats = await req({
|
||||
url: `/orgs/${params.orgid}/seats`,
|
||||
@@ -39,6 +50,17 @@ export default function Route({ loaderData: { seats } }: Route.ComponentProps) {
|
||||
</BreadcrumbItem>
|
||||
</BreadcrumbList>
|
||||
</Breadcrumb>
|
||||
|
||||
<Card className="lg:max-w-4xl mx-auto">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-2xl">Adicionar matrículas</CardTitle>
|
||||
<CardDescription>
|
||||
Siga os passos abaixo para adicionar colaboradores às matrículas
|
||||
abertas.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>...</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import {
|
||||
PopoverContent,
|
||||
PopoverTrigger
|
||||
} from '@repo/ui/components/ui/popover'
|
||||
import { Spinner } from '@repo/ui/components/ui/spinner'
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -43,7 +44,7 @@ import {
|
||||
TableRow
|
||||
} from '@repo/ui/components/ui/table'
|
||||
import { cn, initials } from '@repo/ui/lib/utils'
|
||||
import { Link } from 'react-router'
|
||||
import { NavLink } from 'react-router'
|
||||
import type { Enrollment, Seat } from './route'
|
||||
|
||||
const dtOptions: Intl.DateTimeFormatOptions = {
|
||||
@@ -63,8 +64,8 @@ export function Enrollments({
|
||||
<CardHeader>
|
||||
<CardTitle className="text-xl">Matrículas relacionadas</CardTitle>
|
||||
<CardDescription>
|
||||
Acompanhe os detalhes de todas as matrículas relacionadas a esta
|
||||
compra.
|
||||
Acompanhe os detalhes de todas as matrículas efetuadas relacionadas a
|
||||
esta compra.
|
||||
</CardDescription>
|
||||
|
||||
<CardAction>
|
||||
@@ -250,7 +251,8 @@ function SeatsMenu({ seats: seats_ }: { seats: Seat[] }) {
|
||||
<div className="space-y-2">
|
||||
<h4 className="leading-none font-medium">Matrículas abertas</h4>
|
||||
<p className="text-muted-foreground text-sm">
|
||||
Matrículas que estão abertas e relacionadas a esta compra.
|
||||
Matrículas permanecem abertas devido à ausência de
|
||||
colaborador.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -268,14 +270,16 @@ function SeatsMenu({ seats: seats_ }: { seats: Seat[] }) {
|
||||
</div>
|
||||
|
||||
<Button size="sm" variant="outline" asChild>
|
||||
<Link to="../enrollments/seats">
|
||||
<PlusIcon /> Matricular
|
||||
</Link>
|
||||
<NavLink to="../enrollments/seats">
|
||||
{({ isPending }) => (
|
||||
<>{isPending ? <Spinner /> : <PlusIcon />} Matricular</>
|
||||
)}
|
||||
</NavLink>
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Nenhuma matrícula aberta foi encontrada para esta compra.
|
||||
Não há matrículas abertas pertencentes a esta compra.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user