diff --git a/app/Console/Commands/Grapper/Sofascore/Grapper.php b/app/Console/Commands/Grapper/Sofascore/Grapper.php
index 6cad57eb..230c991e 100644
--- a/app/Console/Commands/Grapper/Sofascore/Grapper.php
+++ b/app/Console/Commands/Grapper/Sofascore/Grapper.php
@@ -42,7 +42,7 @@ class Grapper
* empty grapping folder
* empty mailing text
*/
- // File::cleanDirectory(Sofascore::$storage); dd('clead dir');
+ File::cleanDirectory(Sofascore::$storage);
SofaScoreEventGrapped::query()->update(['in_current_grapper' => false]);
@@ -82,7 +82,7 @@ class Grapper
if ($now->greaterThan($starttime)) {
- Sleeper::rand();
+ Sleeper::rand(1);
if ($debug) {
Notice::note($day . ' - ' . $event['homeTeam']['name'] . ' vs ' . $event['awayTeam']['name'], 'bg');
diff --git a/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php b/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php
index 03881786..5249a516 100644
--- a/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php
+++ b/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php
@@ -28,30 +28,30 @@ class LoadDays
Notice::note('LoadDays ' . $task->mode . ' sport: ' . $task->sport_id);
}
- switch ($task->mode) {
+ switch ($task->id) {
- case 'auto_updater':
+ case 1:
$dates[] = [
'day' => Carbon::now()->subDay()->format('Y-m-d'),
'slug' => $task->sport->ss_slug,
'sport_id' => $task->sport_id,
'run_repeatedly' => $task->run_repeatedly,
];
- $dates[] = [
- 'day' => Carbon::now()->subDays(2)->format('Y-m-d'),
- 'slug' => $task->sport->ss_slug,
- 'sport_id' => $task->sport_id,
- 'run_repeatedly' => $task->run_repeatedly,
- ];
- $dates[] = [
- 'day' => Carbon::now()->subDays(3)->format('Y-m-d'),
- 'slug' => $task->sport->ss_slug,
- 'sport_id' => $task->sport_id,
- 'run_repeatedly' => $task->run_repeatedly,
- ];
+ // $dates[] = [
+ // 'day' => Carbon::now()->subDays(2)->format('Y-m-d'),
+ // 'slug' => $task->sport->ss_slug,
+ // 'sport_id' => $task->sport_id,
+ // 'run_repeatedly' => $task->run_repeatedly,
+ // ];
+ // $dates[] = [
+ // 'day' => Carbon::now()->subDays(3)->format('Y-m-d'),
+ // 'slug' => $task->sport->ss_slug,
+ // 'sport_id' => $task->sport_id,
+ // 'run_repeatedly' => $task->run_repeatedly,
+ // ];
break;
- case 'date':
+ case 2:
$dates[] = [
'day' => self::validateDate($task->day_from),
'slug' => $task->sport->ss_slug,
@@ -60,7 +60,7 @@ class LoadDays
];
break;
- case 'range':
+ case 3:
$from = self::validateDate($task->day_from);
$to = self::validateDate($task->day_to);
diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php
index 4f70ce57..9b2a87e7 100644
--- a/app/Filament/Pages/Statistic.php
+++ b/app/Filament/Pages/Statistic.php
@@ -127,6 +127,7 @@ class Statistic extends BaseDashboard
->prefix('TP')
->prefixAction(
Action::make('iconInfo')
+ ->color('success')
->icon('phosphor-question-fill')
->tooltip(fn() => 'Team Position')
)
@@ -183,11 +184,12 @@ class Statistic extends BaseDashboard
->hiddenLabel()
->prefix('SPM')
->placeholder('Similar Past Matches')
- ->prefixIconColor('primary')
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('
± ' . $get('accuracy') . '
') : '')
->prefixAction(
Action::make('iconInfo')
->icon('phosphor-question-fill')
+ // ->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'success' : 'primary')
+ ->color('success')
->tooltip(fn() => $this->tooltip_similar_past_matches())
)
->default('none')
@@ -236,7 +238,7 @@ class Statistic extends BaseDashboard
->prefixIcon('phosphor-watch-fill')
->default('all')
->hidden(fn(Get $get) => ! $get('tm_player_id'))
- ->prefixIconColor('primary')
+ ->prefixIconColor('success')
->selectablePlaceholder(false)
// ->afterStateUpdated(function (callable $set) {
// // $set('team_id', null);
@@ -276,8 +278,9 @@ class Statistic extends BaseDashboard
->columns(2)
->hiddenLabel()
->multiple()
- ->placeholder('Season')
- ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'danger')
+ ->placeholder('All Seasons')
+ ->prefixIconColor('success')
+ // ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'primary')
->hidden(fn(Get $get) => $get('season_or_date') == 'date')
->prefixIcon('phosphor-calendar-star-fill')
->preload()
@@ -289,8 +292,8 @@ class Statistic extends BaseDashboard
->hiddenLabel()
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
->native(false)
- ->prefixIconColor('primary')
- ->prefixIcon('phosphor-calendar')
+ ->prefixIconColor(fn(Get $get): string => $get('start_date') ? 'success' : 'primary')
+ ->prefixIcon('phosphor-calendar-fill')
->prefix('Start')
->suffixAction(
Action::make('clear_start')
@@ -303,8 +306,8 @@ class Statistic extends BaseDashboard
->hiddenLabel()
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
->native(false)
- ->prefixIconColor('primary')
- ->prefixIcon('phosphor-calendar')
+ ->prefixIconColor(fn(Get $get): string => $get('end_date') ? 'success' : 'primary')
+ ->prefixIcon('phosphor-calendar-fill')
->prefix('End')
->suffixAction(
Action::make('clear_end')
diff --git a/apple_damon.sh b/grapper.sh
similarity index 66%
rename from apple_damon.sh
rename to grapper.sh
index d44dffbb..29186a88 100755
--- a/apple_damon.sh
+++ b/grapper.sh
@@ -4,8 +4,8 @@ case "$1" in
echo "--------------------------"
echo "GRAPPER SOFASCORE"
echo "--------------------------"
- echo "taks one parameter"
- echo "use id sofa_score_tasks table"
+ echo "one parameter"
+ echo "table sofa_score_tasks ID"
echo "--------------------------"
echo ""
exit 1
@@ -27,8 +27,8 @@ case "$1" in
echo "\n⚽ close vpn"
killall ssh
- echo "\n⚽ TaskConfig start"
- php artisan nuh --d --f 67 --fun=3 --task=$1
+ # echo "\n⚽ TaskConfig start"
+ # php artisan nuh --d --f 67 --fun=3 --task=$1
echo "\n⚽ DaysTournament"
php artisan nuh --d --f 67 --fun=4 --task=$1
@@ -36,14 +36,14 @@ case "$1" in
echo "\n⚽ Grapper"
php artisan nuh --d --f 67 --fun=5 --task=$1
- echo "\n⚽ TaskConfig end"
- php artisan nuh --d --f 67 --fun=6 --task=$1
+ # echo "\n⚽ TaskConfig end"
+ # php artisan nuh --d --f 67 --fun=6 --task=$1
- echo "\n⚽ CreateZip"
- php artisan nuh --d --f 67 --fun=7 --task=$1
+ # echo "\n⚽ CreateZip"
+ # php artisan nuh --d --f 67 --fun=7 --task=$1
- echo "\n⚽ SendMail"
- php artisan nuh --d --f 67 --fun=8 --task=$1
+ # echo "\n⚽ SendMail"
+ # php artisan nuh --d --f 67 --fun=8 --task=$1
echo "\n😎 done :)"
;;