mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
43eacff265
|
@ -39,6 +39,9 @@ class SlackSettingsForm extends Component
|
||||||
if(empty($this->slack_channel || $this->slack_endpoint)){
|
if(empty($this->slack_channel || $this->slack_endpoint)){
|
||||||
$this->isDisabled= 'disabled';
|
$this->isDisabled= 'disabled';
|
||||||
}
|
}
|
||||||
|
if(empty($this->slack_endpoint && $this->slack_channel)){
|
||||||
|
$this->isDisabled= '';
|
||||||
|
}
|
||||||
return view('livewire.slack-settings-form');
|
return view('livewire.slack-settings-form');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,16 @@ class CheckoutAcceptance extends Model
|
||||||
'declined_at' => 'datetime',
|
'declined_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Get the mail recipient from the config
|
/**
|
||||||
public function routeNotificationForMail(): string
|
* Get the mail recipient from the config
|
||||||
|
*
|
||||||
|
* @return mixed|string|null
|
||||||
|
*/
|
||||||
|
public function routeNotificationForMail()
|
||||||
{
|
{
|
||||||
// At this point the endpoint is the same for everything.
|
// At this point the endpoint is the same for everything.
|
||||||
// In the future this may want to be adapted for individual notifications.
|
// In the future this may want to be adapted for individual notifications.
|
||||||
return (config('mail.reply_to.address')) ? config('mail.reply_to.address') : '' ;
|
return Setting::getSettings()->alert_email;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,6 +46,11 @@ class AcceptanceAssetAcceptedNotification extends Notification
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shouldSend($notifiable, $channel)
|
||||||
|
{
|
||||||
|
return $this->settings->alerts_enabled && ! empty($this->settings->alert_email);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
|
|
|
@ -44,6 +44,11 @@ class AcceptanceAssetDeclinedNotification extends Notification
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shouldSend($notifiable, $channel)
|
||||||
|
{
|
||||||
|
return $this->settings->alerts_enabled && ! empty($this->settings->alert_email);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue