subscribe to events
This commit is contained in:
@@ -15,11 +15,16 @@ class DiscordSettings extends Component
|
||||
protected $rules = [
|
||||
'model.extra_attributes.discord_active' => 'nullable|boolean',
|
||||
'model.extra_attributes.discord_webhook' => 'required|url',
|
||||
'model.extra_attributes.notifications_test' => 'nullable|boolean',
|
||||
'model.extra_attributes.notifications_deployments' => 'nullable|boolean',
|
||||
];
|
||||
protected $validationAttributes = [
|
||||
'model.extra_attributes.discord_webhook' => 'Discord Webhook',
|
||||
];
|
||||
|
||||
public function instantSaveEvents()
|
||||
{
|
||||
$this->saveModel();
|
||||
}
|
||||
public function instantSave()
|
||||
{
|
||||
try {
|
||||
@@ -35,6 +40,7 @@ class DiscordSettings extends Component
|
||||
if (is_a($this->model, Team::class)) {
|
||||
session(['currentTeam' => $this->model]);
|
||||
}
|
||||
$this->emit('success', 'Settings saved.');
|
||||
}
|
||||
public function submit()
|
||||
{
|
||||
|
||||
@@ -24,6 +24,8 @@ class EmailSettings extends Component
|
||||
'model.extra_attributes.smtp_password' => 'nullable',
|
||||
'model.extra_attributes.smtp_timeout' => 'nullable',
|
||||
'model.extra_attributes.smtp_test_recipients' => 'nullable',
|
||||
'model.extra_attributes.notifications_deployments' => 'nullable|boolean',
|
||||
'model.extra_attributes.notifications_test' => 'nullable|boolean',
|
||||
];
|
||||
protected $validationAttributes = [
|
||||
'model.extra_attributes.smtp_from_address' => 'From Address',
|
||||
@@ -66,11 +68,16 @@ class EmailSettings extends Component
|
||||
if (is_a($this->model, Team::class)) {
|
||||
session(['currentTeam' => $this->model]);
|
||||
}
|
||||
$this->emit('success', 'Settings saved.');
|
||||
}
|
||||
public function sendTestNotification()
|
||||
{
|
||||
Notification::send($this->model, new TestNotification);
|
||||
}
|
||||
public function instantSaveEvents()
|
||||
{
|
||||
$this->saveModel();
|
||||
}
|
||||
public function instantSave()
|
||||
{
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user