Passenger Table

Pre-configured table component for displaying passengers

Live Example

Passengers Table

Browse passengers with names, contact info, and organization. Click a row to see the data.

Loading...

PassengerTable

A ready-to-use table component for displaying passenger information including contact details and organization.

Usage

Display passengers in a table with filtering and sorting capabilities.

import { useSGERP } from 'sgerp-frontend-lib';
import { PassengerTable } from '@/components/sgerp/tables/passenger-table';

function MyComponent() {
  const api = useSGERP();
  
  return (
    <PassengerTable 
      collection={api?.collections.passenger ?? null}
      onRowClick={(row) => console.log('Clicked:', row)}
    />
  );
}

Features

  • Columns: ID (UUID), Name, Username, Email, Phone, Active status, Organization, Created date
  • Filters: Name (text), Email (text), Username (text)
  • Sorting: ID, Name, Username, Active status, Organization, Created date
  • Default Sort: -created_at (newest first)
  • Page Size: 20 items per page

Props

PropTypeRequiredDescription
collectionPassengerCollection | nullYesThe passenger collection to display
onRowClick(row: Passenger) => voidNoCallback when a row is clicked

Column Details

ID

UUID string identifier (displayed in full, 280px width).

Active Status

Displays ✓ for active passengers, ✗ for inactive.

Filtering

  • Name: Case-insensitive text search (name__icontains)
  • Email: Case-insensitive text search (email__icontains)
  • Username: Case-insensitive text search (username__icontains)