* [perf story #59018] Build userlist for gantt wg.

This commit is contained in:
wangyidong
2024-07-15 10:04:18 +08:00
committed by 谢杞钰
parent 9969d4d70b
commit f035ff2230
+16
View File
@@ -35,4 +35,20 @@ class gantt extends wg
if($currentLang != 'en' && file_exists($langJSFile)) $js .= "\nwaitGantt(function(){\n" . file_get_contents($langJSFile) . "\n});\n";
return $js;
}
public function getUserList(): array
{
$users = data('users');
if(empty($users)) return array();
$userList = array();
foreach($users as $account => $realname)
{
$user = array();
$user['key'] = $account;
$user['label'] = $realname;
$userList[] = $user;
}
return $userList;
}
}