wip
This commit is contained in:
1 parent
a05637d33d
commit
8bc59b96b3
8 files changed
+266
-236
No files matched your search
@@ -89,23 +89,23 @@ class PlayerCalculator extends Component
|
||||
|
||||
if (in_array($val['player_position'], $positions_map['MIDFIELD'])) {
|
||||
$player_position = $val['player_position'];
|
||||
$player_position_field = 'midfield';
|
||||
$position_area = 'midfield';
|
||||
$player_color = 'info';
|
||||
} elseif (in_array($val['player_position'], $positions_map['DEFENCE'])) {
|
||||
$player_position = $val['player_position'];
|
||||
$player_position_field = 'defence';
|
||||
$position_area = 'defence';
|
||||
$player_color = 'success';
|
||||
} elseif (in_array($val['player_position'], $positions_map['ATTACK'])) {
|
||||
$player_position = $val['player_position'];
|
||||
$player_position_field = 'attack';
|
||||
$position_area = 'attack';
|
||||
$player_color = 'warning';
|
||||
} elseif (in_array($val['player_position'], $positions_map['GOALKEEPER'])) {
|
||||
$player_position = $val['player_position'];
|
||||
$player_position_field = 'goalkeeper';
|
||||
$position_area = 'goalkeeper';
|
||||
$player_color = 'gray';
|
||||
} else {
|
||||
$player_position = 'NO SPECIFIC POSITION';
|
||||
$player_position_field = 'non';
|
||||
$position_area = 'non';
|
||||
$player_color = 'danger';
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ class PlayerCalculator extends Component
|
||||
'name' => $val['player_name'],
|
||||
'preferred_foot' => $val['preferred_foot'],
|
||||
'player_position' => $player_position,
|
||||
'player_position_field' => $player_position_field,
|
||||
'position_area' => $position_area,
|
||||
'player_color' => $player_color,
|
||||
'timed_color' => $timed_color,
|
||||
'events_played' => $events_played,
|
||||
@@ -144,7 +144,9 @@ class PlayerCalculator extends Component
|
||||
];
|
||||
}
|
||||
|
||||
$sort = array_column($result, 'player_position');
|
||||
$pos = array_column($result, 'player_position');
|
||||
$area = array_column($result, 'position_area');
|
||||
array_multisort($area, SORT_ASC, $pos, SORT_ASC, $result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user