fixes
This commit is contained in:
		
							parent
							
								
									4a96b4b622
								
							
						
					
					
						commit
						ea5c1b9e12
					
				| @ -23,17 +23,18 @@ class EmailSettings extends Component | ||||
|         'model.extra_attributes.smtp_username' => 'nullable', | ||||
|         'model.extra_attributes.smtp_password' => 'nullable', | ||||
|         'model.extra_attributes.smtp_timeout' => 'nullable', | ||||
|         'model.extra_attributes.test_notification_email' => 'nullable|email', | ||||
|         'model.extra_attributes.test_notification_recipients' => 'nullable', | ||||
|     ]; | ||||
|     protected $validationAttributes = [ | ||||
|         'model.extra_attributes.from_address' => 'From Address', | ||||
|         'model.extra_attributes.from_name' => 'From Name', | ||||
|         'model.extra_attributes.recipients' => 'Recipients', | ||||
|         'model.extra_attributes.smtp_host' => 'Host', | ||||
|         'model.extra_attributes.smtp_port' => 'Port', | ||||
|         'model.extra_attributes.smtp_encryption' => 'Encryption', | ||||
|         'model.extra_attributes.smtp_username' => 'Username', | ||||
|         'model.extra_attributes.smtp_password' => 'Password', | ||||
|         'model.extra_attributes.from_address' => '', | ||||
|         'model.extra_attributes.from_name' => '', | ||||
|         'model.extra_attributes.recipients' => '', | ||||
|         'model.extra_attributes.smtp_host' => '', | ||||
|         'model.extra_attributes.smtp_port' => '', | ||||
|         'model.extra_attributes.smtp_encryption' => '', | ||||
|         'model.extra_attributes.smtp_username' => '', | ||||
|         'model.extra_attributes.smtp_password' => '', | ||||
|         'model.extra_attributes.test_notification_recipients' => '', | ||||
|     ]; | ||||
|     public function mount($model) | ||||
|     { | ||||
| @ -43,6 +44,8 @@ class EmailSettings extends Component | ||||
|     { | ||||
|         $this->resetErrorBag(); | ||||
|         $this->validate(); | ||||
|         $this->model->extra_attributes->recipients = str_replace(' ', '', $this->model->extra_attributes->recipients); | ||||
|         $this->model->extra_attributes->test_notification_recipients = str_replace(' ', '', $this->model->extra_attributes->test_notification_recipients); | ||||
|         $this->saveModel(); | ||||
|     } | ||||
|     private function saveModel() | ||||
|  | ||||
| @ -15,7 +15,7 @@ class EmailChannel | ||||
|     { | ||||
|         $this->bootConfigs($notifiable); | ||||
|         if ($notification instanceof \App\Notifications\TestNotification) { | ||||
|             $bcc = $notifiable->routeNotificationForEmail('test_notification_email'); | ||||
|             $bcc = $notifiable->routeNotificationForEmail('test_notification_recipients'); | ||||
|             if (count($bcc) === 0) { | ||||
|                 $bcc = $notifiable->routeNotificationForEmail(); | ||||
|             } | ||||
|  | ||||
| @ -91,7 +91,7 @@ function instant_remote_process(array $command, Server $server, $throwError = tr | ||||
|             ray('executing again'); | ||||
|             return instant_remote_process($command, $server, $throwError, $repeat - 1); | ||||
|         } | ||||
|         ray($process->errorOutput()); | ||||
|         ray('ERROR OCCURED: ' . $process->errorOutput()); | ||||
|         if (!$throwError) { | ||||
|             return null; | ||||
|         } | ||||
|  | ||||
| @ -9,11 +9,12 @@ | ||||
|         <div class="flex flex-col w-96"> | ||||
|             <x-forms.checkbox instantSave id="model.extra_attributes.smtp_active" label="Notification Enabled" /> | ||||
|         </div> | ||||
|         <x-forms.input id="model.extra_attributes.test_notification_email" label="Test Notification Email" /> | ||||
|         <x-forms.input id="model.extra_attributes.test_notification_recipients" label="Test Notification Recipient(s)" | ||||
|             helper="Emails separated by comma." /> | ||||
|         <div class="flex flex-col gap-2 xl:flex-row"> | ||||
|             <div class="flex flex-col w-96"> | ||||
|                 <x-forms.input required id="model.extra_attributes.recipients" helper="Emails separated by comma" | ||||
|                     label="Recipients" /> | ||||
|                 <x-forms.input required id="model.extra_attributes.recipients" helper="Emails separated by comma." | ||||
|                     label="Recipient(s)" /> | ||||
|             </div> | ||||
|         </div> | ||||
|         <div class="flex flex-col gap-2 xl:flex-row"> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user