grapper & statisrtik combo boxes color
This commit is contained in:
1 parent
f4f01a58fa
commit
24ecf97268
4 files changed
+39
-36
No files matched your search
@@ -42,7 +42,7 @@ class Grapper
|
|||||||
* empty grapping folder
|
* empty grapping folder
|
||||||
* empty mailing text
|
* empty mailing text
|
||||||
*/
|
*/
|
||||||
// File::cleanDirectory(Sofascore::$storage); dd('clead dir');
|
File::cleanDirectory(Sofascore::$storage);
|
||||||
|
|
||||||
SofaScoreEventGrapped::query()->update(['in_current_grapper' => false]);
|
SofaScoreEventGrapped::query()->update(['in_current_grapper' => false]);
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ class Grapper
|
|||||||
|
|
||||||
if ($now->greaterThan($starttime)) {
|
if ($now->greaterThan($starttime)) {
|
||||||
|
|
||||||
Sleeper::rand();
|
Sleeper::rand(1);
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note($day . ' - ' . $event['homeTeam']['name'] . ' vs ' . $event['awayTeam']['name'], 'bg');
|
Notice::note($day . ' - ' . $event['homeTeam']['name'] . ' vs ' . $event['awayTeam']['name'], 'bg');
|
||||||
|
|||||||
@@ -28,30 +28,30 @@ class LoadDays
|
|||||||
Notice::note('LoadDays ' . $task->mode . ' sport: ' . $task->sport_id);
|
Notice::note('LoadDays ' . $task->mode . ' sport: ' . $task->sport_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($task->mode) {
|
switch ($task->id) {
|
||||||
|
|
||||||
case 'auto_updater':
|
case 1:
|
||||||
$dates[] = [
|
$dates[] = [
|
||||||
'day' => Carbon::now()->subDay()->format('Y-m-d'),
|
'day' => Carbon::now()->subDay()->format('Y-m-d'),
|
||||||
'slug' => $task->sport->ss_slug,
|
'slug' => $task->sport->ss_slug,
|
||||||
'sport_id' => $task->sport_id,
|
'sport_id' => $task->sport_id,
|
||||||
'run_repeatedly' => $task->run_repeatedly,
|
'run_repeatedly' => $task->run_repeatedly,
|
||||||
];
|
];
|
||||||
$dates[] = [
|
// $dates[] = [
|
||||||
'day' => Carbon::now()->subDays(2)->format('Y-m-d'),
|
// 'day' => Carbon::now()->subDays(2)->format('Y-m-d'),
|
||||||
'slug' => $task->sport->ss_slug,
|
// 'slug' => $task->sport->ss_slug,
|
||||||
'sport_id' => $task->sport_id,
|
// 'sport_id' => $task->sport_id,
|
||||||
'run_repeatedly' => $task->run_repeatedly,
|
// 'run_repeatedly' => $task->run_repeatedly,
|
||||||
];
|
// ];
|
||||||
$dates[] = [
|
// $dates[] = [
|
||||||
'day' => Carbon::now()->subDays(3)->format('Y-m-d'),
|
// 'day' => Carbon::now()->subDays(3)->format('Y-m-d'),
|
||||||
'slug' => $task->sport->ss_slug,
|
// 'slug' => $task->sport->ss_slug,
|
||||||
'sport_id' => $task->sport_id,
|
// 'sport_id' => $task->sport_id,
|
||||||
'run_repeatedly' => $task->run_repeatedly,
|
// 'run_repeatedly' => $task->run_repeatedly,
|
||||||
];
|
// ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'date':
|
case 2:
|
||||||
$dates[] = [
|
$dates[] = [
|
||||||
'day' => self::validateDate($task->day_from),
|
'day' => self::validateDate($task->day_from),
|
||||||
'slug' => $task->sport->ss_slug,
|
'slug' => $task->sport->ss_slug,
|
||||||
@@ -60,7 +60,7 @@ class LoadDays
|
|||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'range':
|
case 3:
|
||||||
$from = self::validateDate($task->day_from);
|
$from = self::validateDate($task->day_from);
|
||||||
$to = self::validateDate($task->day_to);
|
$to = self::validateDate($task->day_to);
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ class Statistic extends BaseDashboard
|
|||||||
->prefix('TP')
|
->prefix('TP')
|
||||||
->prefixAction(
|
->prefixAction(
|
||||||
Action::make('iconInfo')
|
Action::make('iconInfo')
|
||||||
|
->color('success')
|
||||||
->icon('phosphor-question-fill')
|
->icon('phosphor-question-fill')
|
||||||
->tooltip(fn() => 'Team Position')
|
->tooltip(fn() => 'Team Position')
|
||||||
)
|
)
|
||||||
@@ -183,11 +184,12 @@ class Statistic extends BaseDashboard
|
|||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->prefix('SPM')
|
->prefix('SPM')
|
||||||
->placeholder('Similar Past Matches')
|
->placeholder('Similar Past Matches')
|
||||||
->prefixIconColor('primary')
|
|
||||||
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± ' . $get('accuracy') . '</div>') : '')
|
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± ' . $get('accuracy') . '</div>') : '')
|
||||||
->prefixAction(
|
->prefixAction(
|
||||||
Action::make('iconInfo')
|
Action::make('iconInfo')
|
||||||
->icon('phosphor-question-fill')
|
->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())
|
->tooltip(fn() => $this->tooltip_similar_past_matches())
|
||||||
)
|
)
|
||||||
->default('none')
|
->default('none')
|
||||||
@@ -236,7 +238,7 @@ class Statistic extends BaseDashboard
|
|||||||
->prefixIcon('phosphor-watch-fill')
|
->prefixIcon('phosphor-watch-fill')
|
||||||
->default('all')
|
->default('all')
|
||||||
->hidden(fn(Get $get) => ! $get('tm_player_id'))
|
->hidden(fn(Get $get) => ! $get('tm_player_id'))
|
||||||
->prefixIconColor('primary')
|
->prefixIconColor('success')
|
||||||
->selectablePlaceholder(false)
|
->selectablePlaceholder(false)
|
||||||
// ->afterStateUpdated(function (callable $set) {
|
// ->afterStateUpdated(function (callable $set) {
|
||||||
// // $set('team_id', null);
|
// // $set('team_id', null);
|
||||||
@@ -276,8 +278,9 @@ class Statistic extends BaseDashboard
|
|||||||
->columns(2)
|
->columns(2)
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->multiple()
|
->multiple()
|
||||||
->placeholder('Season')
|
->placeholder('All Seasons')
|
||||||
->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'danger')
|
->prefixIconColor('success')
|
||||||
|
// ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'primary')
|
||||||
->hidden(fn(Get $get) => $get('season_or_date') == 'date')
|
->hidden(fn(Get $get) => $get('season_or_date') == 'date')
|
||||||
->prefixIcon('phosphor-calendar-star-fill')
|
->prefixIcon('phosphor-calendar-star-fill')
|
||||||
->preload()
|
->preload()
|
||||||
@@ -289,8 +292,8 @@ class Statistic extends BaseDashboard
|
|||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||||
->native(false)
|
->native(false)
|
||||||
->prefixIconColor('primary')
|
->prefixIconColor(fn(Get $get): string => $get('start_date') ? 'success' : 'primary')
|
||||||
->prefixIcon('phosphor-calendar')
|
->prefixIcon('phosphor-calendar-fill')
|
||||||
->prefix('Start')
|
->prefix('Start')
|
||||||
->suffixAction(
|
->suffixAction(
|
||||||
Action::make('clear_start')
|
Action::make('clear_start')
|
||||||
@@ -303,8 +306,8 @@ class Statistic extends BaseDashboard
|
|||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||||
->native(false)
|
->native(false)
|
||||||
->prefixIconColor('primary')
|
->prefixIconColor(fn(Get $get): string => $get('end_date') ? 'success' : 'primary')
|
||||||
->prefixIcon('phosphor-calendar')
|
->prefixIcon('phosphor-calendar-fill')
|
||||||
->prefix('End')
|
->prefix('End')
|
||||||
->suffixAction(
|
->suffixAction(
|
||||||
Action::make('clear_end')
|
Action::make('clear_end')
|
||||||
|
|||||||
+10
-10
@@ -4,8 +4,8 @@ case "$1" in
|
|||||||
echo "--------------------------"
|
echo "--------------------------"
|
||||||
echo "GRAPPER SOFASCORE"
|
echo "GRAPPER SOFASCORE"
|
||||||
echo "--------------------------"
|
echo "--------------------------"
|
||||||
echo "taks one parameter"
|
echo "one parameter"
|
||||||
echo "use id sofa_score_tasks table"
|
echo "table sofa_score_tasks ID"
|
||||||
echo "--------------------------"
|
echo "--------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
exit 1
|
exit 1
|
||||||
@@ -27,8 +27,8 @@ case "$1" in
|
|||||||
echo "\n⚽ close vpn"
|
echo "\n⚽ close vpn"
|
||||||
killall ssh
|
killall ssh
|
||||||
|
|
||||||
echo "\n⚽ TaskConfig start"
|
# echo "\n⚽ TaskConfig start"
|
||||||
php artisan nuh --d --f 67 --fun=3 --task=$1
|
# php artisan nuh --d --f 67 --fun=3 --task=$1
|
||||||
|
|
||||||
echo "\n⚽ DaysTournament"
|
echo "\n⚽ DaysTournament"
|
||||||
php artisan nuh --d --f 67 --fun=4 --task=$1
|
php artisan nuh --d --f 67 --fun=4 --task=$1
|
||||||
@@ -36,14 +36,14 @@ case "$1" in
|
|||||||
echo "\n⚽ Grapper"
|
echo "\n⚽ Grapper"
|
||||||
php artisan nuh --d --f 67 --fun=5 --task=$1
|
php artisan nuh --d --f 67 --fun=5 --task=$1
|
||||||
|
|
||||||
echo "\n⚽ TaskConfig end"
|
# echo "\n⚽ TaskConfig end"
|
||||||
php artisan nuh --d --f 67 --fun=6 --task=$1
|
# php artisan nuh --d --f 67 --fun=6 --task=$1
|
||||||
|
|
||||||
echo "\n⚽ CreateZip"
|
# echo "\n⚽ CreateZip"
|
||||||
php artisan nuh --d --f 67 --fun=7 --task=$1
|
# php artisan nuh --d --f 67 --fun=7 --task=$1
|
||||||
|
|
||||||
echo "\n⚽ SendMail"
|
# echo "\n⚽ SendMail"
|
||||||
php artisan nuh --d --f 67 --fun=8 --task=$1
|
# php artisan nuh --d --f 67 --fun=8 --task=$1
|
||||||
|
|
||||||
echo "\n😎 done :)"
|
echo "\n😎 done :)"
|
||||||
;;
|
;;
|
||||||
Reference in new issue
Block a user