# Table View Builder (Deprecated)

Table views have been removed from the application. Listing logic now resides in
each model and tables are rendered via `DataLoader`. Existing references to
`table_views` remain for legacy modules only.

## Columns

Each column entry may be a simple field name or an object with extra properties:

- `field` – database column name
- `label` – header text
- `default` – value used when the record lacks this field
- `formula` – JavaScript expression evaluated for every row

Formulas are compiled when the view loads using `new Function('row', `with(row){ return ${formula}; }`)` and added to `DataLoader`'s `calculatedColumns`.

Example configuration:

```
[
  "employee",
  "hours",
  { "field": "total", "formula": "hours * rate" }
]
```

When passed to `DataLoader`:

```javascript
new DataLoader({
  selector: '#timesheets',
  tableName: 'timesheets',
  columns: [
    'employee',
    'hours',
    { field: 'total', formula: 'hours * rate' }
  ]
});
```

The `total` column will display the result of `hours * rate` for each record.
