wip
This commit is contained in:
1 parent
51a195e657
commit
ff43f231f0
3 files changed
+34
-26
No files matched your search
@@ -37,10 +37,17 @@ class ListEvents extends ListRecords
|
|||||||
$this->removeTableFilters();
|
$this->removeTableFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function updateStar(): void
|
public function updateStar(): void
|
||||||
// {
|
{
|
||||||
// $this->tableFilters['events']['filter_stars'] = auth()->user()->filter_stars;
|
// $filters = $this->table->getFilters();
|
||||||
// }
|
$filters = $this->getTable()->getFilters();
|
||||||
|
|
||||||
|
dd($filters['filter_stars']->getState());
|
||||||
|
|
||||||
|
$filter_stars = $filters['filter_stars']->getState();
|
||||||
|
|
||||||
|
$this->tableFilters['events']['filter_stars'] = ! $filter_stars;
|
||||||
|
}
|
||||||
|
|
||||||
// public function updateNote(): void
|
// public function updateNote(): void
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -16,6 +16,12 @@ class BettypeToggle extends Component
|
|||||||
'refreshBettypeMenu' => '$refresh',
|
'refreshBettypeMenu' => '$refresh',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $filter_star = false;
|
||||||
|
|
||||||
|
protected $filter_note = false;
|
||||||
|
|
||||||
|
protected $filter_notify = false;
|
||||||
|
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
$this->bettype_toggles = [];
|
$this->bettype_toggles = [];
|
||||||
@@ -46,23 +52,23 @@ class BettypeToggle extends Component
|
|||||||
$this->dispatch('refreshBettypeMenu');
|
$this->dispatch('refreshBettypeMenu');
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function toggleStar()
|
public function toggleStar()
|
||||||
// {
|
{
|
||||||
// User::where('id', auth()->user()->id)->update(['filter_stars' => DB::raw('!filter_stars')]);
|
$this->filter_star = ! $this->filter_star;
|
||||||
// $this->dispatch('filterStarFilter');
|
$this->dispatch('filterStarFilter', ['filter', $this->filter_star]);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// public function toggleNote()
|
public function toggleNote()
|
||||||
// {
|
{
|
||||||
// User::where('id', auth()->user()->id)->update(['filter_notes' => DB::raw('!filter_notes')]);
|
User::where('id', auth()->user()->id)->update(['filter_notes' => DB::raw('!filter_notes')]);
|
||||||
// $this->dispatch('filterNotificationFilter');
|
$this->dispatch('filterNotificationFilter');
|
||||||
// }
|
}
|
||||||
|
|
||||||
// public function toggleNotification()
|
public function toggleNotification()
|
||||||
// {
|
{
|
||||||
// User::where('id', auth()->user()->id)->update(['filter_notification' => DB::raw('!filter_notification')]);
|
User::where('id', auth()->user()->id)->update(['filter_notification' => DB::raw('!filter_notification')]);
|
||||||
// $this->dispatch('filterStarFilter');
|
$this->dispatch('filterStarFilter');
|
||||||
// }
|
}
|
||||||
|
|
||||||
public function toggleShowPartner()
|
public function toggleShowPartner()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,19 +45,14 @@
|
|||||||
@default
|
@default
|
||||||
@endswitch
|
@endswitch
|
||||||
|
|
||||||
|
|
||||||
<x-filament::button size="xs" wire:click="toggleMultiline" :tooltip="auth()->user()->is_multiline_direct ? 'Multiline slots are disabled' : 'Multiline slots are active'" :color="auth()->user()->is_multiline_direct ? 'info' : 'gray'"
|
<x-filament::button size="xs" wire:click="toggleMultiline" :tooltip="auth()->user()->is_multiline_direct ? 'Multiline slots are disabled' : 'Multiline slots are active'" :color="auth()->user()->is_multiline_direct ? 'info' : 'gray'"
|
||||||
: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 color="gray" outlined x-on:click="$wire.set('tableFilters', {'filter_stars': {'value': '1'}})"
|
<x-filament::button size="xs" tooltip="Filter favorits" wire:click="toggleStar" :color="$this->filter_star ? 'info' : 'gray'"
|
||||||
:icon="auth()->user()->filter_stars ? 'phosphor-star-fill' : 'phosphor-star'">
|
:icon="$this->filter_star ? 'phosphor-star-fill' : 'phosphor-star'">
|
||||||
</x-filament::button>
|
</x-filament::button>
|
||||||
|
|
||||||
{{-- <x-filament::button size="xs" tooltip="Filter favorits" wire:click="toggleStar" :color="auth()->user()->filter_stars ? 'info' : 'gray'"
|
|
||||||
: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'"
|
<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'">
|
:icon="auth()->user()->filter_notes ? 'phosphor-note-fill' : 'phosphor-note'">
|
||||||
</x-filament::button>
|
</x-filament::button>
|
||||||
|
|||||||
Reference in new issue
Block a user