rename stopped to status_changes
This commit is contained in:
parent
8d8dcb1a3e
commit
e7d019028a
@ -14,7 +14,7 @@ class DiscordSettings extends Component
|
||||
'model.discord.webhook_url' => 'required|url',
|
||||
'model.discord_notifications.test' => 'nullable|boolean',
|
||||
'model.discord_notifications.deployments' => 'nullable|boolean',
|
||||
'model.discord_notifications.stopped' => 'nullable|boolean',
|
||||
'model.discord_notifications.status_changes' => 'nullable|boolean',
|
||||
];
|
||||
protected $validationAttributes = [
|
||||
'model.discord.webhook_url' => 'Discord Webhook',
|
||||
|
@ -25,7 +25,7 @@ class EmailSettings extends Component
|
||||
'model.smtp.test_recipients' => 'nullable',
|
||||
'model.smtp_notifications.test' => 'nullable|boolean',
|
||||
'model.smtp_notifications.deployments' => 'nullable|boolean',
|
||||
'model.smtp_notifications.stopped' => 'nullable|boolean',
|
||||
'model.smtp_notifications.status_changes' => 'nullable|boolean',
|
||||
];
|
||||
protected $validationAttributes = [
|
||||
'model.smtp.from_address' => 'From Address',
|
||||
|
@ -40,8 +40,8 @@ public function via(object $notifiable): array
|
||||
$channels = [];
|
||||
$isEmailEnabled = data_get($notifiable, 'smtp.enabled');
|
||||
$isDiscordEnabled = data_get($notifiable, 'discord.enabled');
|
||||
$isSubscribedToEmailEvent = data_get($notifiable, 'smtp_notifications.stopped');
|
||||
$isSubscribedToDiscordEvent = data_get($notifiable, 'discord_notifications.stopped');
|
||||
$isSubscribedToEmailEvent = data_get($notifiable, 'smtp_notifications.status_changes');
|
||||
$isSubscribedToDiscordEvent = data_get($notifiable, 'discord_notifications.status_changes');
|
||||
|
||||
if ($isEmailEnabled && $isSubscribedToEmailEvent) {
|
||||
$channels[] = EmailChannel::class;
|
||||
|
@ -29,7 +29,8 @@
|
||||
<h5 class="mt-4">Applications</h5>
|
||||
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications.deployments"
|
||||
label="New Deployment" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications.stopped" label="Stopped" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications.status_changes"
|
||||
label="Status Changes" />
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
@ -56,7 +56,8 @@
|
||||
<h5 class="mt-4">Applications</h5>
|
||||
<x-forms.checkbox instantSave="saveModel" id="model.smtp_notifications.deployments"
|
||||
label="New Deployment" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="model.smtp_notifications.stopped" label="Stopped" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="model.smtp_notifications.status_changes"
|
||||
label="Status Changes" />
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user