Views, saved views and column choice

Views above the list are filters, queries and columns under a name. Members save their own views and pick their columns under "Columns".

The code

app/src/Controllers/ProjectController.php – defineListViews() whole file
protected function defineListViews(): array
{
$me = (int) Security::getCurrentUser()?->ID;
return [
ListView::create('active', 'Active')
->filters(['Status' => 'active']),
ListView::create('mine', 'My projects')
->query(fn (DataList $list) => $list->filter('ManagerID', $me)),
ListView::create('ending', 'Ending within 30 days')
->query(fn (DataList $list) => $list->filter([
'Status' => 'active',
'EndDate:GreaterThanOrEqual' => date('Y-m-d'),
'EndDate:LessThanOrEqual' => date('Y-m-d', strtotime('+30 days')),
]))
->sort('EndDate ASC')
->columns(['Title', 'Client.Name', 'Manager.Name', 'Progress']),
];
}