Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/Inspect.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,16 +7,19 @@ import apiClient from '@/utils/apiClient';
import QrScanner from './QrScanner';

interface InspectGuest {
id: string;
firstName: string;
lastName: string;
created: string;
createdReason: string;
createdReason?: string;
status: string;
orderId: string;
meta: { comment?: string };
admissionTier: string;
checkInTime: string;
checkInTime: string | null;
eventId: string;
eventName: string;
eventDate: string;
eventStatus: string;
}

const CheckIn = () => {
Expand DownExpand Up@@ -46,7 +49,7 @@ const CheckIn = () => {
});
}, []);

const { firstName, lastName, created, createdReason, status, orderId, meta, admissionTier, checkInTime, eventName } = guest || ({} as InspectGuest);
const { firstName, lastName, created, createdReason, status, orderId, admissionTier, checkInTime, eventName } = guest || ({} as InspectGuest);

return (
<div className={styles.inspect}>
Expand DownExpand Up@@ -80,10 +83,7 @@ const CheckIn = () => {
<span>Event:</span> {eventName}
</h3>
<h3>
<span>Status:</span> {status === 'checked_in' ? <>Checked In {format(new Date(checkInTime), 'M/dd/yy - HH:mm')}</> : status}
</h3>
<h3>
<span>Notes:</span> {meta?.comment || ' n/a '}
<span>Status:</span> {status === 'checked_in' && checkInTime ? <>Checked In {format(new Date(checkInTime), 'M/dd/yy - HH:mm')}</> : status}
</h3>

<h3>
Expand Down
Loading