new mapper new colors

This commit is contained in:
salam committed 2026-02-15 12:33:43 +01:00
1 parent d077b6a429
commit f1b0f43ded
14 files changed
+152 -143

No files matched your search

+20 -14
View File
@@ -45,6 +45,8 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
public $search_values = [];
public $search_color = 'info';
protected $listeners = [
'refreshMapperRight' => '$refresh',
];
@@ -64,15 +66,15 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
->query(LoadProvider::load($this->search_values, auth()->user()))
->striped()
->columns([
MapperRightColumn::make('right')->label(''),
MapperRightColumn::make('left')->label('Event')->alignCenter(),
TextColumn::make('starttime')
->sortable()
->time('H:i')
->alignCenter()
->description(fn ($record): string => Carbon::parse($record->starttime)->format('d. M. y')),
->time('d. M. y H:i')
->alignCenter(),
TextColumn::make('group')
->wrap()
->tooltip('Click to filter by this group')
->color('primary')
->tooltip('Filter by group')
->description(fn ($record): string => $record->country_betsapi?->name.' '.$record->country)
->action(function ($record) {
if ($record?->group_id ?? null && ! in_array($record->group_id, $this->tableFilters['events']['group_id'])) {
@@ -253,7 +255,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
$indicators = [];
if ($this->search_values) {
foreach ($this->search_values as $value) {
$indicators[] = Indicator::make($value)->removeField($value)->color('info');
$indicators[] = Indicator::make($value)->removeField($value)->color($this->search_color);
}
}
@@ -270,9 +272,15 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
->filtersFormColumns(3)
->deferFilters(false)
->toolbarActions([
Action::make('refreshMapperRight')
Action::make('refresh_right')
->hiddenLabel()
->icon('phosphor-arrows-counter-clockwise')
->size(Size::Small)
->action(function (Component $livewire) {
$this->dispatch('refreshMapperRight');
}),
Action::make('reload_right')
->hiddenLabel()
->color('gray')
->icon('phosphor-x')
->size(Size::Small)
->action(function (Component $livewire) {
@@ -281,7 +289,6 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
$livewire->fill(['tableSearch' => '']);
$livewire->resetTableFiltersForm(); // Clears all filters
$this->dispatch('refreshMapperRight');
// $this->dispatch('refreshMapperLeft');
}),
]);
}
@@ -292,13 +299,12 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
}
#[On('search_right')]
public function searchRight($str)
public function searchRight($string)
{
$this->search_values = SearchString::explode($str);
$t = explode('|', $string);
$this->search_values = SearchString::explode($t[0]);
// foreach ($this->tableFilters['events'] as $key => $value) {
// $this->tableFilters['events'][$key] = null;
// }
$this->search_color = $t[1];
$this->dispatch('refreshMapperRight');
}