final filters ok

This commit is contained in:
salam committed 2026-02-05 08:04:32 +01:00
1 parent b329254fc7
commit 5ec71f1a1d
4 files changed
+76 -50

No files matched your search

+11 -7
View File
@@ -106,15 +106,19 @@ class BettypeToggle extends Component
$this->dispatch('filterUpdatePeriode', json_encode($data));
}
public function toggelAllOnlyNone()
public function setOneWeek()
{
$data = [
'start' => Carbon::today()->format('Y-m-d 00:00:00'),
'end' => Carbon::today()->addDays(7)->format('Y-m-d 00:00:00'),
];
$this->dispatch('filterUpdatePeriode', json_encode($data));
}
public function setAllOnlyNone($value)
{
$user = User::where('id', auth()->user()->id)->first();
$user->all_only_none++;
if ($user->all_only_none == 3) {
$user->all_only_none = 0;
}
$user->save();
$user = User::where('id', auth()->user()->id)->update(['all_only_none' => $value]);
$this->dispatch('refreshBettypeMenu');
}