downgraded csv writer ver
This commit is contained in:
parent
79ce648211
commit
77971a4eb5
1 changed files with 13 additions and 1 deletions
|
@ -19,6 +19,8 @@ class CalcUsersStats extends Action
|
|||
private array $columns = [
|
||||
'Project ID',
|
||||
'Project Name',
|
||||
'Team ID',
|
||||
'Team name',
|
||||
'Users'
|
||||
];
|
||||
|
||||
|
@ -100,6 +102,16 @@ class CalcUsersStats extends Action
|
|||
/** Get Project Name */
|
||||
$stats['Project Name'] = $project->getAttribute('name');
|
||||
|
||||
|
||||
/** Get Team Name and Id */
|
||||
$teamId = $project->getAttribute('teamId', null);
|
||||
if ($teamId) {
|
||||
$team = $dbForConsole->getDocument('teams', $teamId);
|
||||
}
|
||||
|
||||
$stats['Team ID'] = $team->getId() ?? 'N/A';
|
||||
$stats['Team name'] = $team->getAttribute('name', 'N/A');
|
||||
|
||||
/** Get Total Users */
|
||||
$stats['users'] = $dbForProject->count('users', [], APP_LIMIT_COUNT);
|
||||
|
||||
|
|
Loading…
Reference in a new issue