notification & notes wip

This commit is contained in:
salam committed 2026-02-01 16:36:27 +01:00
1 parent 94a3c6c472
commit 155177045b
30 files changed
+426 -320

No files matched your search

+11 -11
View File
@@ -3,7 +3,6 @@
namespace App\Actions; namespace App\Actions;
use App\Models\Event; use App\Models\Event;
use App\Models\EventBookmaker;
use App\Models\OddsTable; use App\Models\OddsTable;
class AlarmStatistic class AlarmStatistic
@@ -16,19 +15,21 @@ class AlarmStatistic
$fields[$value->name] = explode(',', $value->fieldnames); $fields[$value->name] = explode(',', $value->fieldnames);
} }
$event_ids = Event::where('sport_id', auth()->user()->sport_id)->where('starttime', '>=', now())->pluck('id')->toArray(); $events = Event::with('event_bookmaker')
->where('sport_id', auth()->user()->sport_id)
$res = EventBookmaker::select('alarm_2w_h2w', 'alarm_2w_a2w', 'alarm_2ws1_h2w', 'alarm_2ws1_a2w', 'alarm_3w_h3w', 'alarm_3w_d3w', 'alarm_3w_a3w', 'alarm_3wht_h3w', 'alarm_3wht_d3w', 'alarm_3wht_a3w', 'alarm_dc_dc1x', 'alarm_dc_dc12', 'alarm_dc_dcx2', 'alarm_dbn_dnb1', 'alarm_dbn_dnb2', 'alarm_ggng_gg', 'alarm_ggng_ng', 'alarm_po_home', 'alarm_po_away', 'alarm_poht_home', 'alarm_poht_away', 'alarm_poq1_home', 'alarm_poq1_away', 'alarm_to_over', 'alarm_to_under', 'alarm_toht_over', 'alarm_toht_under', 'alarm_toq1_over', 'alarm_toq1_under', 'alarm_tq_htq', 'alarm_tq_atq') ->where('starttime', '>=', now())
->whereIn('event_id', $event_ids) ->whereHas('event_bookmaker', function ($query) {
->where('bookmaker_id', auth()->user()->bookmaker_id) $query->where('bookmaker_id', auth()->user()->bookmaker_id);
->get() })
->toArray(); ->get();
$arr = []; $arr = [];
foreach ($res as $value) { foreach ($events as $event) {
$row = $event->event_bookmaker;
// $row = get_object_vars($event->toArray());
foreach ($fields as $table => $names) { foreach ($fields as $table => $names) {
foreach ($names as $name) { foreach ($names as $name) {
$val = (int) $value[$name]; $val = (int) $row[$name];
if ($val) { if ($val) {
if (isset($arr[$table][$val])) { if (isset($arr[$table][$val])) {
$arr[$table][$val]++; $arr[$table][$val]++;
@@ -37,7 +38,6 @@ class AlarmStatistic
} }
} }
} }
} }
} }
+55 -56
View File
@@ -3,9 +3,6 @@
namespace App\Filament\Resources\Events; namespace App\Filament\Resources\Events;
use App\Filament\Resources\Events\Pages\ListEvents; use App\Filament\Resources\Events\Pages\ListEvents;
use App\Filament\Resources\Events\RelationManagers\BettypesRelationManager;
use App\Filament\Resources\Events\RelationManagers\CountriesRelationManager;
use App\Filament\Resources\Events\RelationManagers\UserNoteRelationManager;
use App\Filament\Resources\Events\Schemas\EventForm; use App\Filament\Resources\Events\Schemas\EventForm;
use App\Filament\Resources\Events\Tables\EventsTable; use App\Filament\Resources\Events\Tables\EventsTable;
use App\Filament\Resources\Events\Tables\Tools\LoadPartnerDifferences; use App\Filament\Resources\Events\Tables\Tools\LoadPartnerDifferences;
@@ -46,15 +43,6 @@ class EventResource extends Resource
]; ];
} }
public static function getRelations(): array
{
return [
UserNoteRelationManager::class,
CountriesRelationManager::class,
BettypesRelationManager::class,
];
}
public static function getNavigationBadge(): ?string public static function getNavigationBadge(): ?string
{ {
return parent::getEloquentQuery() return parent::getEloquentQuery()
@@ -70,16 +58,25 @@ class EventResource extends Resource
->with('country') ->with('country')
->with('home') ->with('home')
->with('away') ->with('away')
->with('event_user_star')
->with('event_bookmaker') ->with('event_bookmaker')
->with('user_notes') ->with('event_user_star')
->with('event_user_note')
->with('event_user_notification')
->where('sport_id', auth()->user()->sport_id) ->where('sport_id', auth()->user()->sport_id)
->where('starttime', '>=', now()); ->where('starttime', '>=', now());
if (auth()->user()->stars) { if (auth()->user()->filter_stars) {
$query->whereHas('event_user_star'); $query->whereHas('event_user_star');
} }
if (auth()->user()->filter_notes) {
$query->whereHas('event_user_note');
}
if (auth()->user()->filter_notification) {
$query->whereHas('event_user_notification');
}
if (auth()->user()->all_only_none > 0) { if (auth()->user()->all_only_none > 0) {
switch (auth()->user()->all_only_none) { switch (auth()->user()->all_only_none) {
case 1: case 1:
@@ -96,47 +93,49 @@ class EventResource extends Resource
$query->whereIn('id', $event_ids); $query->whereIn('id', $event_ids);
} }
if (in_array('odds_2ways', EventsTable::$bettype_settings)) { if (isset((EventsTable::$bettype_settings))) {
$query->with('odds_2ways.bookmaker'); if (in_array('odds_2ways', EventsTable::$bettype_settings)) {
} $query->with('odds_2ways.bookmaker');
if (in_array('odds_2ways_s1', EventsTable::$bettype_settings)) { }
$query->with('odds_2ways_s1.bookmaker'); if (in_array('odds_2ways_s1', EventsTable::$bettype_settings)) {
} $query->with('odds_2ways_s1.bookmaker');
if (in_array('odds_3ways', EventsTable::$bettype_settings)) { }
$query->with('odds_3ways.bookmaker'); if (in_array('odds_3ways', EventsTable::$bettype_settings)) {
} $query->with('odds_3ways.bookmaker');
if (in_array('odds_3ways_ht', EventsTable::$bettype_settings)) { }
$query->with('odds_3ways_ht.bookmaker'); if (in_array('odds_3ways_ht', EventsTable::$bettype_settings)) {
} $query->with('odds_3ways_ht.bookmaker');
if (in_array('odds_dc', EventsTable::$bettype_settings)) { }
$query->with('odds_dc.bookmaker'); if (in_array('odds_dc', EventsTable::$bettype_settings)) {
} $query->with('odds_dc.bookmaker');
if (in_array('odds_dnb', EventsTable::$bettype_settings)) { }
$query->with('odds_dnb.bookmaker'); if (in_array('odds_dnb', EventsTable::$bettype_settings)) {
} $query->with('odds_dnb.bookmaker');
if (in_array('odds_ggng', EventsTable::$bettype_settings)) { }
$query->with('odds_ggng.bookmaker'); if (in_array('odds_ggng', EventsTable::$bettype_settings)) {
} $query->with('odds_ggng.bookmaker');
if (in_array('odds_points', EventsTable::$bettype_settings)) { }
$query->with('odds_points.bookmaker'); if (in_array('odds_points', EventsTable::$bettype_settings)) {
} $query->with('odds_points.bookmaker');
if (in_array('odds_points_ht', EventsTable::$bettype_settings)) { }
$query->with('odds_points_ht.bookmaker'); if (in_array('odds_points_ht', EventsTable::$bettype_settings)) {
} $query->with('odds_points_ht.bookmaker');
if (in_array('odds_points_q1', EventsTable::$bettype_settings)) { }
$query->with('odds_points_q1.bookmaker'); if (in_array('odds_points_q1', EventsTable::$bettype_settings)) {
} $query->with('odds_points_q1.bookmaker');
if (in_array('odds_totals', EventsTable::$bettype_settings)) { }
$query->with('odds_totals.bookmaker'); if (in_array('odds_totals', EventsTable::$bettype_settings)) {
} $query->with('odds_totals.bookmaker');
if (in_array('odds_totals_ht', EventsTable::$bettype_settings)) { }
$query->with('odds_totals_ht.bookmaker'); if (in_array('odds_totals_ht', EventsTable::$bettype_settings)) {
} $query->with('odds_totals_ht.bookmaker');
if (in_array('odds_totals_q1', EventsTable::$bettype_settings)) { }
$query->with('odds_totals_q1.bookmaker'); if (in_array('odds_totals_q1', EventsTable::$bettype_settings)) {
} $query->with('odds_totals_q1.bookmaker');
if (in_array('odds_tq', EventsTable::$bettype_settings)) { }
$query->with('odds_tq.bookmaker'); if (in_array('odds_tq', EventsTable::$bettype_settings)) {
$query->with('odds_tq.bookmaker');
}
} }
return $query; return $query;
@@ -1,60 +0,0 @@
<?php
namespace App\Filament\Resources\Events\RelationManagers;
use Filament\Actions\AssociateAction;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\CreateAction;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\DissociateAction;
use Filament\Actions\DissociateBulkAction;
use Filament\Actions\EditAction;
use Filament\Forms\Components\TextInput;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class BettypesRelationManager extends RelationManager
{
protected static string $relationship = 'bettypes';
public function form(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('name')
->required()
->maxLength(255),
]);
}
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('name')
->columns([
TextColumn::make('name')
->searchable(),
])
->filters([
//
])
->headerActions([
CreateAction::make(),
AssociateAction::make(),
])
->recordActions([
EditAction::make(),
DissociateAction::make(),
DeleteAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DissociateBulkAction::make(),
DeleteBulkAction::make(),
]),
]);
}
}
@@ -1,60 +0,0 @@
<?php
namespace App\Filament\Resources\Events\RelationManagers;
use Filament\Actions\AssociateAction;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\CreateAction;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\DissociateAction;
use Filament\Actions\DissociateBulkAction;
use Filament\Actions\EditAction;
use Filament\Forms\Components\TextInput;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class CountriesRelationManager extends RelationManager
{
protected static string $relationship = 'countries';
public function form(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('name')
->required()
->maxLength(255),
]);
}
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('name')
->columns([
TextColumn::make('name')
->searchable(),
])
->filters([
//
])
->headerActions([
CreateAction::make(),
AssociateAction::make(),
])
->recordActions([
EditAction::make(),
DissociateAction::make(),
DeleteAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DissociateBulkAction::make(),
DeleteBulkAction::make(),
]),
]);
}
}
@@ -1,55 +0,0 @@
<?php
namespace App\Filament\Resources\Events\RelationManagers;
use Filament\Actions\CreateAction;
use Filament\Actions\DeleteAction;
use Filament\Actions\EditAction;
use Filament\Forms\Components\TextInput;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class UserNoteRelationManager extends RelationManager
{
protected static string $relationship = 'user_notes';
protected static ?string $title = 'Allgemeinflächen';
protected static ?string $navigationLabel = 'Allgemeinflächen';
protected static ?string $modelLabel = 'Allgemeinflächen';
protected static ?string $pluralModelLabel = 'Allgemeinflächen';
public function form(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('event_id')
->required()
->maxLength(255),
]);
}
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('event_id')
->columns([
TextColumn::make('event_id')
->searchable(),
])
->filters([
//
])
->headerActions([
CreateAction::make(),
])
->recordActions([
EditAction::make(),
DeleteAction::make(),
]);
}
}
@@ -12,9 +12,9 @@ class EventForm
return $schema return $schema
->components([ ->components([
TextInput::make('provider_id') // TextInput::make('provider_id')
->numeric() // ->numeric()
->default(0), // ->default(0),
]); ]);
} }
} }
@@ -14,6 +14,8 @@ use App\Models\CompetitionGroup;
use App\Models\Country; use App\Models\Country;
use App\Models\Event; use App\Models\Event;
use App\Models\EventBookmaker; use App\Models\EventBookmaker;
use App\Models\EventUserNote;
use App\Models\EventUserNotification;
use App\Models\EventUserStar; use App\Models\EventUserStar;
use App\Models\Group; use App\Models\Group;
use App\Models\OddsTable; use App\Models\OddsTable;
@@ -23,14 +25,15 @@ use Filament\Actions\ActionGroup;
use Filament\Actions\BulkActionGroup; use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteAction; use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction; use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Actions\ViewAction;
use Filament\Forms\Components\Hidden; use Filament\Forms\Components\Hidden;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Select; use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Components\Utilities\Get; use Filament\Schemas\Components\Utilities\Get;
use Filament\Support\Enums\FontWeight; use Filament\Support\Enums\FontWeight;
use Filament\Support\Enums\VerticalAlignment; use Filament\Support\Enums\VerticalAlignment;
use Filament\Support\Enums\Width;
use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Enums\FiltersLayout; use Filament\Tables\Enums\FiltersLayout;
@@ -61,9 +64,9 @@ class EventsTable
return $table return $table
->striped() ->striped()
->poll('5s') ->poll('10s')
->deferLoading() ->deferLoading()
->defaultPaginationPageOption(50) ->defaultPaginationPageOption(5)
->paginated([5, 10, 15]) ->paginated([5, 10, 15])
->columns([ ->columns([
IconColumn::make('sport.icon') IconColumn::make('sport.icon')
@@ -168,7 +171,8 @@ class EventsTable
->visible(fn () => \in_array('odds_dnb', self::$bettype_settings)) ->visible(fn () => \in_array('odds_dnb', self::$bettype_settings))
->verticalAlignment(VerticalAlignment::Start) ->verticalAlignment(VerticalAlignment::Start)
->label('Draw No Bet'), ->label('Draw No Bet'),
])->searchable(['id', 'home.name', 'away.name', 'betsapi_id', 'betradar_id', 'bet365_id', 'bwin_id', 'event_bookmaker.event_id']) ])
->searchable(['id', 'home.name', 'away.name', 'betsapi_id', 'betradar_id', 'bet365_id', 'bwin_id', 'event_bookmaker.event_id'])
->defaultSort('starttime', 'ASC') ->defaultSort('starttime', 'ASC')
->extremePaginationLinks() ->extremePaginationLinks()
->filters([ ->filters([
@@ -479,9 +483,9 @@ class EventsTable
} }
} }
if ($data['stars_status'] ?? null) { // if ($data['stars_filter'] ?? null) {
$indicators[] = Indicator::make('Favorits')->removeField('stars_status')->color('info'); // $indicators[] = Indicator::make('Favorits')->removeField('stars_filter')->color('info');
} // }
if ($data['filter_compare_differences'] ?? null) { if ($data['filter_compare_differences'] ?? null) {
$opt = explode('-', $data['filter_compare_differences']); $opt = explode('-', $data['filter_compare_differences']);
@@ -539,8 +543,126 @@ class EventsTable
EventUserStar::insert(['event_id' => $record->id, 'user_id' => auth()->user()->id]); EventUserStar::insert(['event_id' => $record->id, 'user_id' => auth()->user()->id]);
} }
}), }),
EditAction::make()->iconButton()->color(fn ($record) => $record->user_notes->isEmpty() ? 'gray' : 'info')->icon('phosphor-note-pencil'), Action::make('event_note')
ViewAction::make()->iconButton()->color('gray')->icon('phosphor-note-pencil'), ->modalIcon('phosphor-note')
->modalWidth(Width::Large)
->modalSubmitActionLabel('Save')
->extraModalFooterActions(fn (Action $action): array => [
$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger'),
])
->fillForm(data: function ($record) {
foreach ($record->event_user_note as $value) {
if ($value->user_id == auth()->user()->id && $value->bookmaker_id == auth()->user()->bookmaker_id) {
return [
'event_user_note_id' => $value->id,
'message' => $value->message,
];
}
}
return ['event_user_note_id' => ''];
})
->schema([
Hidden::make('event_user_note_id'),
TextInput::make('message')->prefixIcon('phosphor-note-pencil')->hiddenLabel()->live()
->extraInputAttributes(['onClick' => 'this.select()']),
])
->icon('phosphor-note-pencil')
->iconButton()
->tooltip(fn ($record) => view('filament.resources.events.tooltip.event-user-note-tooltip', ['notes' => $record->event_user_note]))
->action(function ($record, array $data) {
if ($data['event_user_note_id']) {
if (! $data['message']) {
EventUserNote::where('id', $data['event_user_note_id'])->delete();
} else {
EventUserNote::where('id', $data['event_user_note_id'])->update(['message' => $data['message']]);
}
} else {
EventUserNote::updateOrCreate([
'event_id' => $record->id,
'user_id' => auth()->user()->id,
'client_id' => auth()->user()->client_id,
'bookmaker_id' => auth()->user()->bookmaker_id,
], [
'message' => $data['message'],
]);
}
})
->color(fn ($record) => $record->event_user_note->isEmpty() ? 'gray' : 'info'),
Action::make('event_notification')
->modalWidth(Width::Large)
->modalSubmitActionLabel('Save')
->extraModalFooterActions(fn (Action $action): array => [
$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger'),
])
->modalIcon('phosphor-bell')
->fillForm(data: function ($record) {
foreach ($record->event_user_notification as $value) {
if ($value->user_id == auth()->user()->id && $value->bookmaker_id == auth()->user()->bookmaker_id) {
return [
'event_user_notification_id' => $value->id,
'odds_table_id' => $value->odds_table_id,
'alarm_level_id' => $value->alarm_level_id,
'is_notified' => $value->is_notified,
'notify_by_email' => $value->notify_by_email,
];
}
}
return ['event_user_notification_id' => ''];
})
->schema([
Hidden::make('event_user_notification_id'),
Toggle::make('is_notified')->label('Monitoring')
->aboveContent('If a notification has been send "Monitoring" will be off')
->onColor('gray')
->offColor('info'),
Select::make('odds_table_id')
->label('Monitor Bettype Favorit')
->belowContent('Favorit is compared with bookmaker favorit filtert by method')
->required()
->prefixIcon('phosphor-dots-three-outline-vertical')
->native(false)
->options(fn ($record) => OddsTable::options_sport()),
Radio::make('alarm_level_id')
->label('Alarm level')
->required()
->inline()
->belowContent('If favorit enters alarm level a notification will be send.')
->options([
'1' => 'Level 1',
'2' => 'Level 2',
'3' => 'Level 3',
]),
Toggle::make('notify_by_email')->label('E-Mail')
->belowContent('Notify me also by e-mail')
->onColor('info')
->offColor('gray'),
])
->icon('phosphor-bell')
->iconButton()
->action(function ($record, array $data) {
if ($data['event_user_notification_id']) {
EventUserNotification::where('id', $data['event_user_notification_id'])->update([
'odds_table_id' => $data['odds_table_id'],
'alarm_level_id' => $data['alarm_level_id'],
'notify_by_email' => $data['notify_by_email'],
'is_notified' => $data['is_notified'],
]);
} else {
EventUserNotification::updateOrCreate([
'event_id' => $record->id,
'bookmaker_id' => auth()->user()->bookmaker_id,
'user_id' => auth()->user()->id,
], [
'odds_table_id' => $data['odds_table_id'],
'alarm_level_id' => $data['alarm_level_id'],
'notify_by_email' => $data['notify_by_email'],
'is_notified' => $data['is_notified'],
]);
}
})
->color(fn ($record) => $record->event_user_notification->isEmpty() ? 'gray' : 'info'),
ActionGroup::make([ ActionGroup::make([
DeleteAction::make()->visible(fn () => auth()->user()->hasRole('super_admin')), DeleteAction::make()->visible(fn () => auth()->user()->hasRole('super_admin')),
Action::make('txodds_odds') Action::make('txodds_odds')
@@ -15,7 +15,7 @@ class AlarmWidget extends StatsOverviewWidget
'refreshAlarmWidget' => '$refresh', 'refreshAlarmWidget' => '$refresh',
]; ];
protected ?string $pollingInterval = '10s'; protected ?string $pollingInterval = '15s';
public array $filters = []; public array $filters = [];
+17 -1
View File
@@ -49,7 +49,23 @@ class BettypeToggle extends Component
public function toggleStar() public function toggleStar()
{ {
User::where('id', auth()->user()->id)->update(['stars' => DB::raw('!stars')]); User::where('id', auth()->user()->id)->update(['filter_stars' => DB::raw('!filter_stars')]);
$this->dispatch('filterClearFilter');
$this->dispatch('refreshBettypeMenu');
}
public function toggleNote()
{
User::where('id', auth()->user()->id)->update(['filter_notes' => DB::raw('!filter_notes')]);
$this->dispatch('filterClearFilter');
$this->dispatch('refreshBettypeMenu');
}
public function toggleNotification()
{
User::where('id', auth()->user()->id)->update(['filter_notification' => DB::raw('!filter_notification')]);
$this->dispatch('filterClearFilter'); $this->dispatch('filterClearFilter');
$this->dispatch('refreshBettypeMenu'); $this->dispatch('refreshBettypeMenu');
+10 -5
View File
@@ -53,11 +53,6 @@ class Event extends Model
return $this->belongsTo(Group::class); return $this->belongsTo(Group::class);
} }
public function user_notes()
{
return $this->hasMany(UserNote::class, 'event_id', 'id');
}
public function competition_group() public function competition_group()
{ {
return $this->belongsTo(CompetitionGroup::class); return $this->belongsTo(CompetitionGroup::class);
@@ -148,6 +143,16 @@ class Event extends Model
return $this->hasOne(EventUserStar::class, 'event_id', 'id'); return $this->hasOne(EventUserStar::class, 'event_id', 'id');
} }
public function event_user_note()
{
return $this->hasMany(EventUserNote::class, 'event_id', 'id');
}
public function event_user_notification()
{
return $this->hasMany(EventUserNotification::class, 'event_id', 'id');
}
public function event_bookmaker() public function event_bookmaker()
{ {
return $this->hasOne(EventBookmaker::class, 'event_id', 'id')->where('bookmaker_id', auth()->user()->bookmaker_id); return $this->hasOne(EventBookmaker::class, 'event_id', 'id')->where('bookmaker_id', auth()->user()->bookmaker_id);
@@ -5,10 +5,9 @@ namespace App\Models;
use App\Models\Scopes\ClientScope; use App\Models\Scopes\ClientScope;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class UserNote extends Model class EventUserNote extends Model
{ {
protected $fillable = [ protected $fillable = [
'user_messageid',
'event_id', 'event_id',
'bookmaker_id', 'bookmaker_id',
'user_id', 'user_id',
@@ -4,13 +4,16 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class UserNotification extends Model class EventUserNotification extends Model
{ {
protected $fillable = [ protected $fillable = [
'event_id', 'event_id',
'bookmaker_id', 'bookmaker_id',
'user_id', 'user_id',
'message', 'odds_table_id',
'alarm_level_id',
'notify_by_email',
'is_notified',
'deleted', 'deleted',
]; ];
+17
View File
@@ -30,4 +30,21 @@ class OddsTable extends Model
return $arr; return $arr;
} }
public static function options_sport()
{
switch (auth()->user()->sport_id) {
case 1:
return OddsTable::where('soccer', 1)->pluck('fulltitle', 'id');
case 2:
return OddsTable::where('icehockey', 1)->pluck('fulltitle', 'id');
case 3:
return OddsTable::where('basketball', 1)->pluck('fulltitle', 'id');
case 5:
return OddsTable::where('tennis', 1)->pluck('fulltitle', 'id');
}
return [];
}
} }
+3 -1
View File
@@ -34,7 +34,9 @@ class User extends Authenticatable implements FilamentUser, HasAppAuthentication
'app_verified_at', 'app_verified_at',
'client_id', 'client_id',
'sport_id', 'sport_id',
'star', 'filter_stars',
'filter_notes',
'filter_notification',
'is_multiline_direct', 'is_multiline_direct',
'all_only_none', 'all_only_none',
'partner_show', 'partner_show',
+1
View File
@@ -16,6 +16,7 @@
"codeat3/blade-phosphor-icons": "^2.0", "codeat3/blade-phosphor-icons": "^2.0",
"codewithkyrian/filament-date-range": "^2.0", "codewithkyrian/filament-date-range": "^2.0",
"filament/filament": "^4.0", "filament/filament": "^4.0",
"guava/filament-modal-relation-managers": "^2.0",
"joaopaulolndev/filament-edit-profile": "^2.0", "joaopaulolndev/filament-edit-profile": "^2.0",
"laravel/framework": "^12.0", "laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1", "laravel/tinker": "^2.10.1",
Generated
+85 -4
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "0bd98d9bb528f0b49e7f2b921f2b62c9", "content-hash": "fbdcd8c04f0bcdcc155c4356c15965e6",
"packages": [ "packages": [
{ {
"name": "agencetwogether/hookshelper", "name": "agencetwogether/hookshelper",
@@ -2047,6 +2047,87 @@
], ],
"time": "2025-12-27T19:43:20+00:00" "time": "2025-12-27T19:43:20+00:00"
}, },
{
"name": "guava/filament-modal-relation-managers",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/GuavaCZ/filament-modal-relation-managers.git",
"reference": "f1e8290ede9856a7b5ab3f95db2b9cd6ef17b767"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/GuavaCZ/filament-modal-relation-managers/zipball/f1e8290ede9856a7b5ab3f95db2b9cd6ef17b767",
"reference": "f1e8290ede9856a7b5ab3f95db2b9cd6ef17b767",
"shasum": ""
},
"require": {
"filament/filament": "^4.0",
"illuminate/contracts": "^10.0|^11.0|^12.0",
"php": "^8.1",
"spatie/laravel-package-tools": "^1.14.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.8|^8.1",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^8.8|^9.0|^10.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0"
},
"type": "library",
"extra": {
"laravel": {
"aliases": {
"FilamentModalRelationManagers": "Guava\\FilamentModalRelationManagers\\Facades\\FilamentModalRelationManagers"
},
"providers": [
"Guava\\FilamentModalRelationManagers\\FilamentModalRelationManagersServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Guava\\FilamentModalRelationManagers\\": "src/",
"Guava\\FilamentModalRelationManagers\\Database\\Factories\\": "database/factories/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Lukas Frey",
"email": "lukas.frey@guava.cz",
"role": "Developer"
}
],
"description": "Allows you to embed relation managers inside filament modals.",
"homepage": "https://github.com/guavaCZ/filament-modal-relation-managers",
"keywords": [
"Guava",
"filament",
"filament-modal-relation-managers",
"filamentphp",
"laravel"
],
"support": {
"issues": "https://github.com/GuavaCZ/filament-modal-relation-managers/issues",
"source": "https://github.com/GuavaCZ/filament-modal-relation-managers/tree/2.0.0"
},
"funding": [
{
"url": "https://github.com/GuavaCZ",
"type": "github"
}
],
"time": "2025-08-20T06:55:09+00:00"
},
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.10.0", "version": "7.10.0",
@@ -12814,12 +12895,12 @@
], ],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": [], "stability-flags": {},
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^8.3" "php": "^8.3"
}, },
"platform-dev": [], "platform-dev": {},
"plugin-api-version": "2.6.0" "plugin-api-version": "2.9.0"
} }
@@ -26,7 +26,9 @@ return new class extends Migration
$table->text('app_authentication_secret')->nullable(); $table->text('app_authentication_secret')->nullable();
$table->text('app_authentication_recovery_codes')->nullable(); $table->text('app_authentication_recovery_codes')->nullable();
$table->boolean('has_email_authentication')->default(false); $table->boolean('has_email_authentication')->default(false);
$table->boolean('stars')->default(false); $table->boolean('filter_stars')->default(false);
$table->boolean('filter_notes')->default(false);
$table->boolean('filter_notification')->default(false);
$table->boolean('is_multiline_direct')->default(false); $table->boolean('is_multiline_direct')->default(false);
$table->boolean('all_only_none')->default(false); $table->boolean('all_only_none')->default(false);
$table->boolean('partner_show')->default(false); $table->boolean('partner_show')->default(false);
@@ -15,6 +15,7 @@ return new class extends Migration
$table->id(); $table->id();
$table->string('name'); $table->string('name');
$table->string('title'); $table->string('title');
$table->string('fulltitle');
$table->boolean(column: 'has_active_spread')->default(0); $table->boolean(column: 'has_active_spread')->default(0);
$table->string('oddnames'); $table->string('oddnames');
$table->string('fieldnames'); $table->string('fieldnames');
@@ -11,15 +11,16 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::create('user_notifications', function (Blueprint $table) { Schema::create('event_user_notifications', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events'); $table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
$table->integer('bookmaker_id')->default(0); $table->integer('bookmaker_id')->default(0);
$table->integer('user_id')->index()->references('id')->on('users'); $table->integer('user_id')->index()->references('id')->on('users');
$table->integer('odds_table_id')->index()->references('id')->on('odds_tables'); $table->integer('odds_table_id')->index()->references('id')->on('odds_tables');
$table->integer('alarm_level_id')->default(0); $table->integer('alarm_level_id')->default(0);
$table->string('message'); $table->boolean('notify_by_email')->default(false);
$table->integer('deleted')->default(0); $table->boolean('deleted')->default(false);
$table->boolean('is_notified')->default(false);
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -29,6 +30,6 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('user_notifications'); Schema::dropIfExists('event_user_notifications');
} }
}; };
@@ -11,9 +11,9 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::create('user_notes', function (Blueprint $table) { Schema::create('event_user_notes', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events'); $table->foreignId('event_id')->constrained()->cascadeOnDelete();
$table->integer('bookmaker_id')->default(0); $table->integer('bookmaker_id')->default(0);
$table->integer('user_id')->index()->references('id')->on('users'); $table->integer('user_id')->index()->references('id')->on('users');
$table->integer('client_id')->default(0); $table->integer('client_id')->default(0);
@@ -28,6 +28,8 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('user_notes'); Schema::dropIfExists('event_user_notes');
} }
}; };
// a make:filament-relation-manager CategoryResource posts title
+15 -15
View File
@@ -12,22 +12,22 @@ class OddsTableSeeder extends Seeder
/** /**
* Provoider * Provoider
*/ */
$sql = "INSERT INTO `odds_tables` (`id`, `name`, `title`, `oddnames`, `fieldnames`, `has_active_spread`, `soccer`, `icehockey`, `basketball`, `tennis`, `created_at`, `updated_at`) $sql = "INSERT INTO `odds_tables` (`id`, `name`, `title`, `fulltitle`, `has_active_spread`, `oddnames`, `fieldnames`, `soccer`, `icehockey`, `basketball`, `tennis`, `created_at`, `updated_at`)
VALUES VALUES
(1, 'odds_2ways', 'ML', 'h2w,a2w', 'alarm_2w_h2w,alarm_2w_a2w', 0, 0, 1, 1, 1, NULL, NULL), (1, 'odds_2ways', 'ML', 'Money Line', 0, 'h2w,a2w', 'alarm_2w_h2w,alarm_2w_a2w', 0, 1, 1, 1, NULL, NULL),
(2, 'odds_2ways_s1', 'ML S1', 'h2w,a2w', 'alarm_2ws1_h2w,alarm_2ws1_a2w', 0, 0, 0, 0, 1, NULL, NULL), (2, 'odds_2ways_s1', 'ML S1', 'Money Line Set1', 0, 'h2w,a2w', 'alarm_2ws1_h2w,alarm_2ws1_a2w', 0, 0, 0, 1, NULL, NULL),
(3, 'odds_3ways', '1X2', 'h3w,d3w,a3w', 'alarm_3w_h3w,alarm_3w_d3w,alarm_3w_a3w', 0, 1, 1, 0, 0, NULL, NULL), (3, 'odds_3ways', '1X2', '1X2', 0, 'h3w,d3w,a3w', 'alarm_3w_h3w,alarm_3w_d3w,alarm_3w_a3w', 1, 1, 0, 0, NULL, NULL),
(4, 'odds_3ways_ht', '1X2 HT', 'h3w,d3w,a3w', 'alarm_3wht_h3w,alarm_3wht_d3w,alarm_3wht_a3w', 0, 1, 0, 0, 0, NULL, NULL), (4, 'odds_3ways_ht', '1X2 HT', '1X2 Halftime', 0, 'h3w,d3w,a3w', 'alarm_3wht_h3w,alarm_3wht_d3w,alarm_3wht_a3w', 1, 0, 0, 0, NULL, NULL),
(5, 'odds_dc', 'DC', 'dc1x,dc12,dcx2', 'alarm_dc_dc1x,alarm_dc_dc12,alarm_dc_dcx2', 0, 1, 0, 0, 0, NULL, NULL), (5, 'odds_dc', 'DC', 'Double Chance', 0, 'dc1x,dc12,dcx2', 'alarm_dc_dc1x,alarm_dc_dc12,alarm_dc_dcx2', 1, 0, 0, 0, NULL, NULL),
(6, 'odds_dnb', 'DNB', 'dnb1,dnb2', 'alarm_dbn_dnb1,alarm_dbn_dnb2', 0, 1, 0, 0, 0, NULL, NULL), (6, 'odds_dnb', 'DNB', 'Draw no bet', 0, 'dnb1,dnb2', 'alarm_dbn_dnb1,alarm_dbn_dnb2', 1, 0, 0, 0, NULL, NULL),
(7, 'odds_ggng', 'GGNG', 'gg,ng', 'alarm_ggng_gg,alarm_ggng_ng', 0, 1, 0, 0, 0, NULL, NULL), (7, 'odds_ggng', 'GGNG', 'Goal No Goal', 0, 'gg,ng', 'alarm_ggng_gg,alarm_ggng_ng', 1, 0, 0, 0, NULL, NULL),
(8, 'odds_points', 'PO', 'home,away', 'alarm_po_home,alarm_po_away', 1, 0, 1, 1, 1, NULL, NULL), (8, 'odds_points', 'PO', 'Points', 1, 'home,away', 'alarm_po_home,alarm_po_away', 0, 1, 1, 1, NULL, NULL),
(9, 'odds_points_ht', 'PO HT', 'home,away', 'alarm_poht_home,alarm_poht_away', 1, 0, 0, 1, 0, NULL, NULL), (9, 'odds_points_ht', 'PO HT', 'Points Halftime', 1, 'home,away', 'alarm_poht_home,alarm_poht_away', 0, 0, 1, 0, NULL, NULL),
(10, 'odds_points_q1', 'PO Q1', 'home,away', 'alarm_poq1_home,alarm_poq1_away', 1, 0, 1, 1, 0, NULL, NULL), (10, 'odds_points_q1', 'PO Q1', 'Points First Quarter', 1, 'home,away', 'alarm_poq1_home,alarm_poq1_away', 0, 1, 1, 0, NULL, NULL),
(11, 'odds_totals', 'TO', 'over,under', 'alarm_to_over,alarm_to_under', 1, 1, 1, 1, 1, NULL, NULL), (11, 'odds_totals', 'TO', 'Totals', 1, 'over,under', 'alarm_to_over,alarm_to_under', 1, 1, 1, 1, NULL, NULL),
(12, 'odds_totals_ht', 'TO HT', 'over,under', 'alarm_toht_over,alarm_toht_under', 1, 1, 0, 1, 0, NULL, NULL), (12, 'odds_totals_ht', 'TO HT', 'Totals Halftime', 1, 'over,under', 'alarm_toht_over,alarm_toht_under', 1, 0, 1, 0, NULL, NULL),
(13, 'odds_totals_q1', 'TO Q1', 'over,under', 'alarm_toq1_over,alarm_toq1_under', 1, 0, 1, 1, 0, NULL, NULL), (13, 'odds_totals_q1', 'TO Q1', 'Totals First Quarter', 1, 'over,under', 'alarm_toq1_over,alarm_toq1_under', 0, 1, 1, 0, NULL, NULL),
(14, 'odds_tq', 'TQ', 'htq,atq', 'alarm_tq_htq,alarm_tq_atq', 1, 1, 0, 0, 0, NULL, NULL); (14, 'odds_tq', 'TQ', 'To Qualify', 1, 'htq,atq', 'alarm_tq_htq,alarm_tq_atq', 1, 0, 0, 0, NULL, NULL);
"; ";
DB::unprepared($sql); DB::unprepared($sql);
+3 -3
View File
@@ -11,11 +11,11 @@ class SportSeeder extends Seeder
{ {
$sql = "INSERT INTO `sports` (`id`, `name`, `code`, `icon`, `color`, `bapi`, `bwin`, `b365`, `logi`, `magl`, `is_active`, `created_at`, `updated_at`) $sql = "INSERT INTO `sports` (`id`, `name`, `code`, `icon`, `color`, `bapi`, `bwin`, `b365`, `logi`, `magl`, `is_active`, `created_at`, `updated_at`)
VALUES VALUES
(1, 'Soccer', 'so', 'icon-soccerball', 'primary', 1, 4, 1, 1, 1, 1, NULL, NULL), (1, 'Soccer', 'so', 'icon-soccerball', 'info', 1, 4, 1, 1, 1, 1, NULL, NULL),
(2, 'Ice Hockey', 'ic', 'icon-icehockey', 'black', 17, 12, 17, 4, 19, 1, NULL, NULL), (2, 'Ice Hockey', 'ic', 'icon-icehockey', 'black', 17, 12, 17, 4, 19, 1, NULL, NULL),
(3, 'Basketball', 'ba', 'icon-basketball', 'warning', 18, 7, 18, 2, 2, 1, NULL, NULL), (3, 'Basketball', 'ba', 'icon-basketball', 'danger', 18, 7, 18, 2, 2, 1, NULL, NULL),
(4, 'Rugby', 'rg', 'icon-rugby', NULL, 8, 32, 8, 12, 22, 0, NULL, NULL), (4, 'Rugby', 'rg', 'icon-rugby', NULL, 8, 32, 8, 12, 22, 0, NULL, NULL),
(5, 'Tennis', 'te', 'icon-tennisball', 'gray', 13, 5, 13, 5, 15, 1, NULL, NULL), (5, 'Tennis', 'te', 'icon-tennisball', 'warning', 13, 5, 13, 5, 15, 1, NULL, NULL),
(6, 'American Football', 'af', 'icon-amercanfootball', NULL, 12, 11, 12, 70, 25, 0, NULL, NULL), (6, 'American Football', 'af', 'icon-amercanfootball', NULL, 12, 11, 12, 70, 25, 0, NULL, NULL),
(7, 'Baseball', 'bs', 'icon-baseball', NULL, 16, 23, 16, 3, 3, 0, NULL, NULL), (7, 'Baseball', 'bs', 'icon-baseball', NULL, 16, 23, 16, 3, 3, 0, NULL, NULL),
(8, 'Handball', 'ha', 'icon-handball', NULL, 78, 16, 78, 6, 20, 0, NULL, NULL), (8, 'Handball', 'ha', 'icon-handball', NULL, 78, 16, 78, 6, 20, 0, NULL, NULL),
+1
View File
@@ -5,6 +5,7 @@
@source '../../../../resources/views/filament/**/*'; @source '../../../../resources/views/filament/**/*';
@source '../../../../resources/views/components/**/*'; @source '../../../../resources/views/components/**/*';
@source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php'; @source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php';
@source '../../../../vendor/guava/filament-modal-relation-managers/resources/**/*';
/* hide reset link in filters */ /* hide reset link in filters */
.fi-ta-filters-heading, .fi-ta-filters-heading,
@@ -0,0 +1,16 @@
<div>
@if (!$notes->isEmpty())
<div class="grid grid-cols-6 gap-2 m-5 max-w-120">
@foreach ($notes as $item)
@include('filament.tables.columns.multiline.bkm', [
'bookmaker_id' => $item->bookmaker_id,
'icon' => $item->bookmaker->icon ?? '',
])
<div style="font-size:10px;">{{ $item->user->name }}</div>
<div class="col-span-4">{{ $item->message }}</div>
@endforeach
</div>
@else
Add a note
@endif
</div>
@@ -1,21 +1,27 @@
<div class="grid grid-cols-2 gap-1 py-2 px-3 border rounded-xl border-zinc-200 dark:border-zinc-800 bg-gray-100 dark:bg-gray-900 text-center shadow" <div class="grid grid-cols-2 gap-1 p-1 border rounded border-zinc-200 dark:border-zinc-800 bg-gray-100 dark:bg-gray-900 text-center shadow"
style="font-size: 10.5px;"> style="font-size: 10px;">
<div class="row-span-3 text-lg text-gray-500 pt-3">{{ $title }}</div> <div class="row-span-3 text-lg text-gray-500 pt-3">{{ $title }}</div>
@if ($red) @if ($red)
<div class="cursor-pointer" wire:click="filterAlarm('{{ $filter }}', 3)"><x-alarm-red>{{ $red }}</x-alarm-red></div> <div class="cursor-pointer" wire:click="filterAlarm('{{ $filter }}', 3)">
<x-alarm-red>{{ $red }}</x-alarm-red>
</div>
@else @else
<x-alarm-neutral>0</x-alarm-neutral> <x-alarm-neutral>0</x-alarm-neutral>
@endif @endif
@if ($yellow) @if ($yellow)
<div class="cursor-pointer" wire:click="filterAlarm('{{ $filter }}', 2)"><x-alarm-yellow>{{ $yellow }}</x-alarm-yellow></div> <div class="cursor-pointer" wire:click="filterAlarm('{{ $filter }}', 2)">
<x-alarm-yellow>{{ $yellow }}</x-alarm-yellow>
</div>
@else @else
<x-alarm-neutral>0</x-alarm-neutral> <x-alarm-neutral>0</x-alarm-neutral>
@endif @endif
@if ($green) @if ($green)
<div class="cursor-pointer" wire:click="filterAlarm('{{ $filter }}', 1)"><x-alarm-green>{{ $green }}</x-alarm-green></div> <div class="cursor-pointer" wire:click="filterAlarm('{{ $filter }}', 1)">
<x-alarm-green>{{ $green }}</x-alarm-green>
</div>
@else @else
<x-alarm-neutral>0</x-alarm-neutral> <x-alarm-neutral>0</x-alarm-neutral>
@endif @endif
@@ -55,12 +55,12 @@
{{ $record->logcol_id }} {{ $record->logcol_id }}
</div> </div>
@endif @endif
@if ($record->event_bookmaker?->event_id) @if ($record?->event_bookmaker)
<div>{{ auth()->user()->bookmaker->name_short }}</div> <div>{{ auth()->user()->bookmaker->name_short }}</div>
<div> <div>
{{ $record->event_bookmaker->event_id }} {{ $record->event_bookmaker?->event_id }}
</div> </div>
@endif @endif
</div> </div>
</div> </div>
@@ -3,7 +3,7 @@
@endphp @endphp
@if (isset($icon)) @if (isset($icon))
<div class="h-4 m-0 bg-contain bg-center bg-no-repeat my-auto dark:opacity-80" title="{{ $bookmaker_id }}" <div class="h-3 m-0 bg-contain bg-center bg-no-repeat my-auto dark:opacity-80" title="{{ $bookmaker_id }}"
style="background-image: url('{{ BkmIconMap::get($icon) }}')"> style="background-image: url('{{ BkmIconMap::get($icon) }}')">
</div> </div>
@endif @endif
@@ -26,19 +26,19 @@
@switch(auth()->user()->all_only_none) @switch(auth()->user()->all_only_none)
@case(0) @case(0)
<x-filament::button size="xs" wire:click="toggelAllOnlyNone" color="gray" icon="phosphor-gps" <x-filament::button size="xs" wire:click="toggelAllOnlyNone" color="gray" icon="phosphor-gps"
tooltip="Toggle to show with or without {{ auth()->user()->bookmaker->name }}"> tooltip="Showing with or without {{ auth()->user()->bookmaker->name }}">
</x-filament::button> </x-filament::button>
@break @break
@case(1) @case(1)
<x-filament::button size="xs" wire:click="toggelAllOnlyNone" icon="phosphor-gps-fix" color="info" <x-filament::button size="xs" wire:click="toggelAllOnlyNone" icon="phosphor-gps-fix" color="info"
tooltip="Only with {{ auth()->user()->bookmaker->name }}"> tooltip="Showing all with {{ auth()->user()->bookmaker->name }}">
</x-filament::button> </x-filament::button>
@break @break
@case(2) @case(2)
<x-filament::button size="xs" wire:click="toggelAllOnlyNone" color="danger" icon="phosphor-gps-slash" <x-filament::button size="xs" wire:click="toggelAllOnlyNone" color="danger" icon="phosphor-gps-slash"
tooltip="Only without {{ auth()->user()->bookmaker->name }}"> tooltip="Showing all without {{ auth()->user()->bookmaker->name }}">
</x-filament::button> </x-filament::button>
@break @break
@@ -50,8 +50,16 @@
:icon="auth()->user()->is_multiline_direct ? 'phosphor-not-equals' : 'phosphor-equals'"> :icon="auth()->user()->is_multiline_direct ? 'phosphor-not-equals' : 'phosphor-equals'">
</x-filament::button> </x-filament::button>
<x-filament::button size="xs" tooltip="Toggle favorits" wire:click="toggleStar" :color="auth()->user()->stars ? 'info' : 'gray'" <x-filament::button size="xs" tooltip="Filter favorits" wire:click="toggleStar" :color="auth()->user()->filter_stars ? 'info' : 'gray'"
:icon="auth()->user()->stars ? 'phosphor-star-fill' : 'phosphor-star'"> :icon="auth()->user()->filter_stars ? 'phosphor-star-fill' : 'phosphor-star'">
</x-filament::button>
<x-filament::button size="xs" tooltip="Filter notes" wire:click="toggleNote" :color="auth()->user()->filter_notes ? 'info' : 'gray'"
:icon="auth()->user()->filter_notes ? 'phosphor-note-fill' : 'phosphor-note'">
</x-filament::button>
<x-filament::button size="xs" tooltip="Filter alarm notification" wire:click="toggleNotification"
:color="auth()->user()->filter_notification ? 'info' : 'gray'" :icon="auth()->user()->filter_notification ? 'phosphor-bell-fill' : 'phosphor-bell'">
</x-filament::button> </x-filament::button>
<div></div> <div></div>
@@ -1,9 +1,7 @@
<div> <x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="{{ $iconcolor }}">
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="info"> <x-filament::input.select wire:model="sport_id" wire:change="swopSport">
<x-filament::input.select wire:model="sport_id" wire:change="swopSport"> @foreach ($sports as $id => $name)
@foreach ($sports as $id => $name) <option value="{{ $id }}">{{ $name }}</option>
<option value="{{ $id }}">{{ $name }}</option> @endforeach
@endforeach </x-filament::input.select>
</x-filament::input.select> </x-filament::input.wrapper>
</x-filament::input.wrapper>
</div>
+1
View File
@@ -17,6 +17,7 @@ case "$1" in
;; ;;
"3") "3")
php artisan filament:optimize-clear php artisan filament:optimize-clear
php artisan filament:clear-cached-components
php artisan view:clear php artisan view:clear
php artisan optimize:clear php artisan optimize:clear
php artisan route:clear php artisan route:clear