This commit is contained in:
Andras Bacsai
2023-06-02 12:34:45 +02:00
parent ea5c1b9e12
commit 39d37010a3
62 changed files with 618 additions and 596 deletions

View File

@@ -10,19 +10,16 @@ use Livewire\Component;
class DiscordSettings extends Component
{
public Team|Server $model;
public Team $model;
protected $rules = [
'model.extra_attributes.discord_active' => 'nullable|boolean',
'model.extra_attributes.discord_webhook' => 'required|url',
];
protected $validationAttributes = [
'model.extra_attributes.discord_webhook' => 'Discord Webhook',
'model.extra_attributes.discord_webhook' => '',
];
public function mount($model)
{
//
}
public function instantSave()
{
try {

View File

@@ -2,15 +2,12 @@
namespace App\Http\Livewire\Notifications;
use App\Models\Server;
use App\Models\Team;
use App\Notifications\TestNotification;
use Illuminate\Support\Facades\Notification;
use Livewire\Component;
class EmailSettings extends Component
{
public Team|Server $model;
public Team $model;
protected $rules = [
'model.extra_attributes.smtp_active' => 'nullable|boolean',
@@ -36,10 +33,6 @@ class EmailSettings extends Component
'model.extra_attributes.smtp_password' => '',
'model.extra_attributes.test_notification_recipients' => '',
];
public function mount($model)
{
//
}
public function submit()
{
$this->resetErrorBag();

View File

@@ -10,7 +10,7 @@ use Notification;
class Test extends Component
{
public Team|Server $model;
public Team $model;
public function sendTestNotification()
{
Notification::send($this->model, new TestNotification);