adds notifications for deprecation
This commit is contained in:
@@ -81,15 +81,17 @@ class SlackSettingsForm extends Component
|
||||
$this->webhook_channel = $this->setting->webhook_channel;
|
||||
$this->webhook_botname = $this->setting->webhook_botname;
|
||||
$this->webhook_options = $this->setting->webhook_selected;
|
||||
if($this->webhook_selected == 'microsoft' || $this->webhook_selected == 'google'){
|
||||
$this->teams_webhook_deprecated = Str::contains($this->webhook_endpoint, 'workflows');
|
||||
if($this->webhook_selected === 'microsoft' || $this->webhook_selected === 'google'){
|
||||
$this->webhook_channel = '#NA';
|
||||
}
|
||||
|
||||
|
||||
if($this->setting->webhook_endpoint != null && $this->setting->webhook_channel != null){
|
||||
$this->isDisabled= '';
|
||||
}
|
||||
|
||||
if($this->webhook_selected === 'microsoft' && !$this->teams_webhook_deprecated) {
|
||||
session()->flash('warning', 'The selected Microsoft Teams webhook URL will be deprecated Jan 31st, 2025. Please use a workflow URL. Microsofts Documentation on creating a workflow can be found <a href="https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498" target="_blank"> here.</a>');
|
||||
}
|
||||
}
|
||||
public function updated($field) {
|
||||
|
||||
@@ -111,7 +113,6 @@ class SlackSettingsForm extends Component
|
||||
if($this->webhook_selected == 'microsoft' || $this->webhook_selected == 'google'){
|
||||
$this->webhook_channel = '#NA';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function isButtonDisabled() {
|
||||
@@ -128,7 +129,9 @@ class SlackSettingsForm extends Component
|
||||
public function render()
|
||||
{
|
||||
$this->isButtonDisabled();
|
||||
|
||||
return view('livewire.slack-settings-form');
|
||||
|
||||
}
|
||||
|
||||
public function testWebhook(){
|
||||
@@ -237,7 +240,7 @@ class SlackSettingsForm extends Component
|
||||
}
|
||||
}
|
||||
public function msTeamTestWebhook(){
|
||||
$this->teams_webhook_deprecated = !Str::contains($this->webhook_endpoint, 'workflows');
|
||||
|
||||
try {
|
||||
|
||||
if($this->teams_webhook_deprecated){
|
||||
|
||||
Reference in New Issue
Block a user