add alarm level from db
This commit is contained in:
1 parent
4e77862aa7
commit
40f40db63c
28 files changed
+248
-251
No files matched your search
@@ -21,6 +21,8 @@ class BettypeToggle extends Component
|
||||
$this->bettype_toggles = [];
|
||||
|
||||
$res = BettypeUser::with('multiline_setting')
|
||||
->where('user_id', auth()->user()->id)
|
||||
->where('sport_id', auth()->user()->sport_id)
|
||||
->orderBy('multiline_setting_id')
|
||||
->get();
|
||||
|
||||
|
||||
@@ -38,10 +38,11 @@ class ClientGroupListEditor extends Component implements HasActions, HasSchemas,
|
||||
->badge()
|
||||
->wrap()
|
||||
->color('info')
|
||||
->formatStateUsing(fn (string $state): string => CompetitionGroup::where('id', $state)->pluck('name')->first()),
|
||||
])
|
||||
->filters([
|
||||
// ...
|
||||
->formatStateUsing(function (string $state): string {
|
||||
$res = CompetitionGroup::with('country')->where('id', $state)->first();
|
||||
|
||||
return $res->country->name.' '.$res->name;
|
||||
}),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make('edit')
|
||||
@@ -57,13 +58,22 @@ class ClientGroupListEditor extends Component implements HasActions, HasSchemas,
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Select::make('client_groups')
|
||||
->searchable()
|
||||
->multiple()
|
||||
->required()
|
||||
->preload()
|
||||
->options(fn () => LoadCountryGroups::load()),
|
||||
])->action(function ($livewire) {
|
||||
$livewire->dispatch('refreshBettypeMenu');
|
||||
}),
|
||||
->searchable()
|
||||
->options(function (): array {
|
||||
$res = CompetitionGroup::with('country')->get();
|
||||
$arr = [];
|
||||
foreach ($res as $value) {
|
||||
$arr[$value->id] = $value->country?->name.' '.$value->name;
|
||||
}
|
||||
asort($arr, SORT_STRING);
|
||||
|
||||
return $arr;
|
||||
|
||||
}),
|
||||
]),
|
||||
DeleteAction::make('delete')->iconButton(),
|
||||
])
|
||||
->headerActions([
|
||||
|
||||
@@ -35,7 +35,7 @@ class UserNotifications extends Component implements HasActions, HasSchemas, Has
|
||||
{
|
||||
return $table
|
||||
->query(User::query()->where('client_id', auth()->user()->client_id)->orwhereIn('id', [1, 2]))
|
||||
->description('Send a message to one of the users listed')
|
||||
->description('Send a message to one of the user listed')
|
||||
->columns([
|
||||
TextColumn::make('name')->icon('phosphor-user-duotone')->searchable(),
|
||||
TextColumn::make('email')->icon('phosphor-envelope-duotone'),
|
||||
|
||||
Reference in new issue
Block a user