diff --git a/app/Livewire/UserNotifications.php b/app/Livewire/UserNotifications.php index ebcc5443..f364cb94 100644 --- a/app/Livewire/UserNotifications.php +++ b/app/Livewire/UserNotifications.php @@ -30,14 +30,12 @@ class UserNotifications extends Component implements HasActions, HasSchemas, Has public function table(Table $table): Table { return $table - ->query(User::query()) + ->query(User::query()->where('client_id', auth()->user()->client_id)->orwhereIn('id', [1, 2])) + ->description('Send a message to one of the users listed') ->columns([ TextColumn::make('name')->icon('phosphor-user-duotone')->searchable(), TextColumn::make('email')->icon('phosphor-envelope-duotone'), ]) - ->filters([ - // ... - ]) ->recordActions([ Action::make('notification') ->icon('phosphor-note-pencil-duotone') @@ -65,6 +63,11 @@ class UserNotifications extends Component implements HasActions, HasSchemas, Has ->icon('phosphor-envelope-duotone') ->body($data['message']) ->sendToDatabase($record); + + Notification::make() + ->title('Message send successfully') + ->success() + ->send(); }), ]) diff --git a/resources/views/mail/user/notified.blade.php b/resources/views/mail/user/notified.blade.php index 1f6c4b58..0d75b82d 100644 --- a/resources/views/mail/user/notified.blade.php +++ b/resources/views/mail/user/notified.blade.php @@ -1,5 +1,7 @@ +Message From: {{ $username }} +

{{ $message }} Thanks,
diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php index e37201f8..78dd2881 100644 --- a/resources/views/vendor/mail/html/header.blade.php +++ b/resources/views/vendor/mail/html/header.blade.php @@ -1,7 +1,6 @@ @props(['url']) - {!! $slot !!} -