update ui to seats
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
|||||||
HelpCircleIcon,
|
HelpCircleIcon,
|
||||||
type LucideIcon
|
type LucideIcon
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
|
import { Fragment } from 'react'
|
||||||
|
|
||||||
import { Abbr } from '@repo/ui/components/abbr'
|
import { Abbr } from '@repo/ui/components/abbr'
|
||||||
import { DateTime } from '@repo/ui/components/datetime'
|
import { DateTime } from '@repo/ui/components/datetime'
|
||||||
@@ -26,6 +27,7 @@ import {
|
|||||||
HoverCardContent,
|
HoverCardContent,
|
||||||
HoverCardTrigger
|
HoverCardTrigger
|
||||||
} from '@repo/ui/components/ui/hover-card'
|
} from '@repo/ui/components/ui/hover-card'
|
||||||
|
import { Kbd } from '@repo/ui/components/ui/kbd'
|
||||||
import {
|
import {
|
||||||
Popover,
|
Popover,
|
||||||
PopoverContent,
|
PopoverContent,
|
||||||
@@ -160,7 +162,7 @@ const reasons: Record<string, string> = {
|
|||||||
DEDUPLICATION: 'Matrícula ou agendamento já existentes.',
|
DEDUPLICATION: 'Matrícula ou agendamento já existentes.',
|
||||||
CANCELLATION: 'Cancelamento da matrícula.',
|
CANCELLATION: 'Cancelamento da matrícula.',
|
||||||
UNSCHEDULED: 'Cancelamento do agendamento da matrícula.',
|
UNSCHEDULED: 'Cancelamento do agendamento da matrícula.',
|
||||||
DEADLINE: 'Data do agendamento é anterior ao dia atual.'
|
DEADLINE: 'Data do agendamento é anterior ao dia do pagamento.'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
const reason = (reason_: string): string | null => {
|
const reason = (reason_: string): string | null => {
|
||||||
@@ -232,15 +234,18 @@ function SeatsMenu({ seats: seats_ }: { seats: Seat[] }) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul className="text-sm space-y-1.5">
|
<div className="text-sm grid grid-cols-[1fr_15%] gap-1">
|
||||||
{seats.map(({ course, quantity }, idx) => {
|
{seats.map(({ course, quantity }, idx) => {
|
||||||
return (
|
return (
|
||||||
<li key={idx}>
|
<Fragment key={idx}>
|
||||||
{quantity}x {course.name}
|
<Abbr>{course.name}</Abbr>
|
||||||
</li>
|
<div className="flex justify-end">
|
||||||
|
<Kbd>{quantity}x</Kbd>
|
||||||
|
</div>
|
||||||
|
</Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</ul>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">
|
||||||
|
|||||||
Reference in New Issue
Block a user