fix colors
This commit is contained in:
1 parent
97f4dc0514
commit
5615c59044
7 files changed
+299
-16
No files matched your search
@@ -28,7 +28,7 @@ class Grap extends Command
|
||||
|
||||
public static string $useragent = '4';
|
||||
|
||||
protected $signature = 'grp {id=0} {day=0} {--date=} {--folder=} {--d} {--r} {--f} {--R} {--S}';
|
||||
protected $signature = 'grp {id=0} {day=0} {--date=} {--folder=} {--d} {--r} {--m} {--f} {--R} {--S}';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
@@ -42,6 +42,7 @@ class Grap extends Command
|
||||
$txt .= '--d debug' . PHP_EOL;
|
||||
$txt .= '--r restart range' . PHP_EOL;
|
||||
$txt .= '--f force' . PHP_EOL;
|
||||
$txt .= '--m mail only' . PHP_EOL;
|
||||
$txt .= '--R read file' . PHP_EOL;
|
||||
$txt .= '--S save to file' . PHP_EOL;
|
||||
$txt .= '--folder' . PHP_EOL;
|
||||
@@ -66,12 +67,13 @@ class Grap extends Command
|
||||
case 1:
|
||||
// DAILY
|
||||
SetStorage::set(1);
|
||||
|
||||
// MoveToArchive::move(1);
|
||||
|
||||
Grapper::load(1);
|
||||
|
||||
MakeExcel::create();
|
||||
// with m just resend
|
||||
if (!self::$options['m']) {
|
||||
Grapper::load(1);
|
||||
MakeExcel::create();
|
||||
}
|
||||
|
||||
SendMail::run(1);
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ class PlayerCalculator extends Component
|
||||
$everage_minutes = 0;
|
||||
$ecolor = '';
|
||||
if ($events_played) {
|
||||
$everage_minutes = round($minues_played / $events_played) . ' min';
|
||||
$everage_minutes = round($minues_played / $events_played);
|
||||
if ($colorlevel > 1 && $events_played < $colorlevel) {
|
||||
$ecolor = 'danger';
|
||||
} elseif ($events_played < $colorlevel * 2) {
|
||||
@@ -119,13 +119,28 @@ class PlayerCalculator extends Component
|
||||
}
|
||||
}
|
||||
|
||||
$info = [];
|
||||
if ($events_played == 1) {
|
||||
$info[] = '1 Event';
|
||||
} else if ($events_played > 1) {
|
||||
$info[] = $events_played . ' Events';
|
||||
} else {
|
||||
$info[] = 'None';
|
||||
}
|
||||
if ($preferred_foot) {
|
||||
$info[] = $preferred_foot . ' Foot';
|
||||
}
|
||||
if ($everage_minutes) {
|
||||
$info[] = ' Ø ' . $everage_minutes . 'min';
|
||||
}
|
||||
|
||||
$result[$origin][] = [
|
||||
'id' => $player_id,
|
||||
'name' => $name,
|
||||
'origin' => $origin,
|
||||
'pcolor' => $pcolor,
|
||||
'ecolor' => $ecolor,
|
||||
'info' => 'Ev ' . $events_played . ', ' . $preferred_foot . ', ' . $everage_minutes,
|
||||
'info' => implode(', ', $info),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user