diff --git a/app/Livewire/MapperLeft.php b/app/Livewire/MapperLeft.php index d153a238..c82daa15 100644 --- a/app/Livewire/MapperLeft.php +++ b/app/Livewire/MapperLeft.php @@ -8,7 +8,6 @@ use Filament\Actions\Concerns\InteractsWithActions; use Filament\Actions\Contracts\HasActions; use Filament\Schemas\Concerns\InteractsWithSchemas; use Filament\Schemas\Contracts\HasSchemas; -use Filament\Tables\Columns\TextColumn; use Filament\Tables\Concerns\InteractsWithTable; use Filament\Tables\Contracts\HasTable; use Filament\Tables\Table; @@ -25,14 +24,7 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable return $table ->query(Event::query()) ->columns([ - TextColumn::make('country.name') - ->searchable() - ->wrap() - ->color('gray') - ->label('Event') - ->icon(fn ($record) => $record->country->icon) - ->description(fn ($record) => $record->competition_group->name), - MapperLeftColumn::make('left')->label('NUH Events'), + MapperLeftColumn::make('left')->label('NUH-ODDS'), ]) ->filters([ // ... diff --git a/app/Livewire/MapperRight.php b/app/Livewire/MapperRight.php index 16f81743..6d73dede 100644 --- a/app/Livewire/MapperRight.php +++ b/app/Livewire/MapperRight.php @@ -8,7 +8,6 @@ use Filament\Actions\Concerns\InteractsWithActions; use Filament\Actions\Contracts\HasActions; use Filament\Schemas\Concerns\InteractsWithSchemas; use Filament\Schemas\Contracts\HasSchemas; -use Filament\Tables\Columns\TextColumn; use Filament\Tables\Concerns\InteractsWithTable; use Filament\Tables\Contracts\HasTable; use Filament\Tables\Table; @@ -25,14 +24,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable return $table ->query(Mapper::query()) ->columns([ - MapperRightColumn::make('right'), - // TextColumn::make('country_betsapi.name') - // ->searchable() - // ->wrap() - // ->color('gray') - // ->label('Event') - // ->icon(fn ($record) => $record->country_betsapi->icon) - // ->description(fn ($record) => $record->group), + MapperRightColumn::make('right')->label('BETSAPI'), ]) ->filters([ // ... diff --git a/config/blade-flags.php b/config/blade-flags.php new file mode 100644 index 00000000..05548f1f --- /dev/null +++ b/config/blade-flags.php @@ -0,0 +1,57 @@ + 'flag', + + /* + |----------------------------------------------------------------- + | Fallback Icon + |----------------------------------------------------------------- + | + | This config option allows you to define a fallback + | icon when an icon in this set cannot be found. + | + */ + + 'fallback' => 'country-xx', + + /* + |----------------------------------------------------------------- + | Default Set Classes + |----------------------------------------------------------------- + | + | This config option allows you to define some classes which + | will be applied by default to all icons within this set. + | + */ + + 'class' => '', + + /* + |----------------------------------------------------------------- + | Default Set Attributes + |----------------------------------------------------------------- + | + | This config option allows you to define some attributes which + | will be applied by default to all icons within this set. + | + */ + + 'attributes' => [ + // 'width' => 50, + // 'height' => 50, + ], + +]; diff --git a/resources/extra-countries/caf.svg b/resources/extra-countries/caf.svg index ad8406bb..73a077e9 100644 --- a/resources/extra-countries/caf.svg +++ b/resources/extra-countries/caf.svg @@ -1,6 +1,6 @@ - + diff --git a/resources/views/filament/tables/columns/mapper-left-column.blade.php b/resources/views/filament/tables/columns/mapper-left-column.blade.php index 0235576d..77acf95b 100644 --- a/resources/views/filament/tables/columns/mapper-left-column.blade.php +++ b/resources/views/filament/tables/columns/mapper-left-column.blade.php @@ -1,8 +1,40 @@ -
-
-
{{ $record->home->name }}
-
-
-
{{ $record->away->name }}
-
+
  • id }} + x-on:dragstart.self=" + dragging = true; + event.dataTransfer.effectAllowed = 'move'; + event.dataTransfer.setData('text/plain', event.target.id); + " + x-on:drop.prevent=" + const id = event.dataTransfer.getData('text/plain'); + const target = event.target.closest('ul'); + const element = document.getElementById(id); + target.appendChild(element); + " + draggable="true"> + +
    + @if ($record->country->iso2) + + @else + + @endif
    -
  • + +
    +
    {{ $record->starttime }}
    +
    +
    {{ $record->home->name }}
    +
    -
    +
    {{ $record->away->name }}
    +
    +
    +
    {{ $record->country?->name }}
    +
    {{ $record->competition_group->name }}
    +
    +
    + +
    + +
    + diff --git a/resources/views/filament/tables/columns/mapper-right-column.blade.php b/resources/views/filament/tables/columns/mapper-right-column.blade.php index 124efbe8..461a8bcc 100644 --- a/resources/views/filament/tables/columns/mapper-right-column.blade.php +++ b/resources/views/filament/tables/columns/mapper-right-column.blade.php @@ -1,12 +1,42 @@ -
    -
    -
    -
    {{ $record->home }}
    -
    -
    -
    {{ $record->away }}
    -
    -
    {{ $record->country_betsapi?->name }} - {{ $record->group }}
    +
  • event_id }} + x-on:dragstart.self=" + dragging = true; + event.dataTransfer.effectAllowed = 'move'; + event.dataTransfer.setData('text/plain', event.target.id); + " + x-on:drop.prevent=" + const id = event.dataTransfer.getData('text/plain'); + const target = event.target.closest('ul'); + const element = document.getElementById(id); + target.appendChild(element); + " + draggable="true"> + + + +
    +
    -
  • + +
    +
    + {{ $record->starttime }} +
    +
    +
    {{ $record->home }}
    +
    -
    +
    {{ $record->away }}
    +
    +
    +
    {{ $record->country_betsapi?->name }}
    +
    {{ $record->group }}
    +
    + +
    + +
    + @if ($record->group_cc) + + @endif +
    + diff --git a/resources/views/livewire/mapper-left.blade.php b/resources/views/livewire/mapper-left.blade.php index c3fedc4a..a949eeb0 100644 --- a/resources/views/livewire/mapper-left.blade.php +++ b/resources/views/livewire/mapper-left.blade.php @@ -1,3 +1,10 @@ -
    +
      {{ $this->table }} -
    + diff --git a/resources/views/livewire/mapper-right.blade.php b/resources/views/livewire/mapper-right.blade.php index c3fedc4a..87d6a14a 100644 --- a/resources/views/livewire/mapper-right.blade.php +++ b/resources/views/livewire/mapper-right.blade.php @@ -1,3 +1,6 @@ -
    - {{ $this->table }} +
    +
    + {{ $this->table }} +
    diff --git a/resources/views/livewire/top-menu-items.blade.php b/resources/views/livewire/top-menu-items.blade.php index fd823886..af9197a1 100644 --- a/resources/views/livewire/top-menu-items.blade.php +++ b/resources/views/livewire/top-menu-items.blade.php @@ -23,7 +23,7 @@ {{-- Modal content --}} -
    +
    @livewire('mapper-left')