Changed Workorder Team Filter to select in Preorder/Index
This commit is contained in:
@@ -69,7 +69,26 @@ class RimoWorkorderModel {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static function getTeams() {
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$teams = [];
|
||||
|
||||
$sql = "SELECT rimo_team_id, MAX(rimo_team_name) as rimo_team_name FROM `RimoWorkorder`
|
||||
GROUP BY rimo_team_id
|
||||
ORDER BY rimo_team_name";
|
||||
|
||||
$res = $db->query($sql);
|
||||
if($db->num_rows($res)) {
|
||||
while($data = $db->fetch_object($res)) {
|
||||
if(!$data->rimo_team_id) continue;
|
||||
$teams[$data->rimo_team_id] = $data->rimo_team_name;
|
||||
}
|
||||
}
|
||||
|
||||
return $teams;
|
||||
}
|
||||
|
||||
public static function count($filter) {
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
Reference in New Issue
Block a user