Services Table
Pre-configured table for real operation simulations with Activity filter
Live Example
Services Table (Real Operations Only)
Displays only real operation simulations (simulation_mode=real_operations) with Activity filter and Project filter
This table automatically filters to show only real operation services. The simulation_mode filter is hidden and set to "real_operations".
ServicesTable
A specialized table component for displaying real operation simulations (simulation_mode=real_operations). This table extends SimulationTable with a pre-applied filter for real operations and hides the simulation mode selector.
Usage
Basic Table
Display real operation simulations with automatic filtering.
import { useSGERP } from 'sgerp-frontend-lib';
import { ServicesTable } from '@/components/sgerp/tables/services-table';
function MyComponent() {
const api = useSGERP();
return (
<ServicesTable
collection={api?.collections.simulation ?? null}
onRowClick={(row) => console.log('Clicked:', row)}
/>
);
}
Features
- Pre-filtered: Automatically shows only
simulation_mode=real_operations - Activity Filter: Quick presets for Active Now, Ended, Future, Booking Started
- Project Filter: Autocomplete dropdown for filtering by project
- Status Columns: Visual indicators for operational time and booking status
- All SimulationTable columns: Includes all time-related columns and status indicators
Props
Same as SimulationTable. The simulation_mode filter is automatically applied via defaultFilters.
| Prop | Type | Required | Description |
|---|---|---|---|
collection | SimulationCollection | null | Yes | The simulation collection to display |
columns | ColumnDef<Simulation>[] | No | Custom column definitions |
hideColumns | string[] | No | Array of column keys to hide |
filters | FilterDef[] | No | Custom filter definitions |
defaultFilters | Record<string, any> | No | Additional filters (merged with simulation_mode) |
initialOrderBy | string | No | Initial sort order (default: -id) |
pageSize | number | No | Items per page (default: 20) |
onRowClick | (row: Simulation) => void | No | Callback when a row is clicked |
Differences from SimulationTable
- Pre-filtered to real operations:
simulation_mode=real_operationsis automatically applied - No mode filter: The simulation_mode filter is hidden from the UI
- Focused on active services: Perfect for monitoring live operations
Examples
Active Services Only
Combine with project filter and hide less relevant columns.
<ServicesTable
collection={api?.collections.simulation ?? null}
defaultFilters={{ project_id: 123 }}
hideColumns={['created_at', 'booking_start_time', 'booking_end_time']}
/>
This shows only active services for project 123, hiding less relevant columns.
Related Components
- SimulationTable - Base table with all simulations
- TemplatesTable - Table for template simulations only
- SGERPTable - Base table component