feat(attendee-detail): enhance attendee detail view with payment and notes sections
- Added payment presentation logic to display payment status and due dates. - Introduced AttendeeNotesSection and AttendeePaymentsSection components for managing notes and payments. - Implemented forms for editing contact information and notes with validation. - Updated API to support attendee updates and added corresponding tests. - Improved attendance summary logic to reflect all visible sessions. - Enhanced UI with loading states and error handling for better user experience.
This commit is contained in:
@@ -10,6 +10,10 @@ type LargeTitleProps = {
|
||||
/** Action to the left of the bar. On desktop it's the "Volver" link that
|
||||
* used to live in the screen body; on mobile it's hidden. */
|
||||
leading?: ReactNode
|
||||
/** Context shown in the center before the large title collapses. */
|
||||
barContext?: ReactNode
|
||||
/** Visual identity beside the large title, such as an avatar. */
|
||||
titleLeading?: ReactNode
|
||||
/** Context that can't disappear on scroll (e.g. the present counter). It
|
||||
* travels to the bar and blends with the title. */
|
||||
barTrailing?: ReactNode
|
||||
@@ -32,7 +36,14 @@ type LargeTitleProps = {
|
||||
* built prop, so React reuses the elements and the subtree below doesn't
|
||||
* re-render on every scroll frame.
|
||||
*/
|
||||
export function LargeTitle({ title, leading, barTrailing, children }: LargeTitleProps) {
|
||||
export function LargeTitle({
|
||||
title,
|
||||
leading,
|
||||
barContext,
|
||||
titleLeading,
|
||||
barTrailing,
|
||||
children,
|
||||
}: LargeTitleProps) {
|
||||
const { titleRef, progress } = useLargeTitleCollapse()
|
||||
const barHost = useImmersiveBarHost()
|
||||
|
||||
@@ -49,18 +60,37 @@ export function LargeTitle({ title, leading, barTrailing, children }: LargeTitle
|
||||
style={{ opacity: progress }}
|
||||
/>
|
||||
{leading}
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="relative min-w-0 flex-1 truncate text-base font-semibold text-primary"
|
||||
style={{ opacity: progress, transform: `translateY(${(1 - progress) * 12}px)` }}
|
||||
>
|
||||
{title}
|
||||
</span>
|
||||
{barTrailing ? (
|
||||
{barContext ? (
|
||||
<div className="pointer-events-none absolute inset-y-0 left-14 right-14 flex items-center justify-center overflow-hidden text-center">
|
||||
<span
|
||||
className="truncate text-sm font-medium text-secondary"
|
||||
style={{ opacity: 1 - progress }}
|
||||
>
|
||||
{barContext}
|
||||
</span>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="absolute inset-x-0 truncate text-base font-semibold text-primary"
|
||||
style={{ opacity: progress, transform: `translateY(${(1 - progress) * 12}px)` }}
|
||||
>
|
||||
{title}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="relative min-w-0 flex-1 truncate text-base font-semibold text-primary"
|
||||
style={{ opacity: progress, transform: `translateY(${(1 - progress) * 12}px)` }}
|
||||
>
|
||||
{title}
|
||||
</span>
|
||||
)}
|
||||
{barContext ? <span className="min-w-0 flex-1" aria-hidden="true" /> : null}
|
||||
{barTrailing ? (
|
||||
<span
|
||||
aria-hidden={barContext ? undefined : true}
|
||||
className="relative flex shrink-0 items-center"
|
||||
style={{ opacity: progress }}
|
||||
style={{ opacity: barContext ? 1 : progress }}
|
||||
>
|
||||
{barTrailing}
|
||||
</span>
|
||||
@@ -70,12 +100,15 @@ export function LargeTitle({ title, leading, barTrailing, children }: LargeTitle
|
||||
)
|
||||
: null}
|
||||
|
||||
<h1
|
||||
ref={titleRef}
|
||||
className="text-balance text-[2.125rem] font-bold leading-[1.1] tracking-tight text-primary sm:text-[2.5rem]"
|
||||
>
|
||||
{title}
|
||||
</h1>
|
||||
<div className="flex items-center gap-3">
|
||||
{titleLeading}
|
||||
<h1
|
||||
ref={titleRef}
|
||||
className="min-w-0 text-balance text-[2.125rem] font-bold leading-[1.1] tracking-tight text-primary sm:text-[2.5rem]"
|
||||
>
|
||||
{title}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{children}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user