diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index ca4d6d39b6..f3ccf57610 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -263,12 +263,7 @@ class CheckoutableListener private function shouldNotSendAnyNotifications($checkoutable): bool { return in_array(get_class($checkoutable), $this->skipNotificationsFor); - //checkoutabale is a HUGE json array - //$this->>skipNotificationsFor = App/Model/Component | from the top of this Listener - //private array $skipNotificationsFor = [ - // Component::class, - // ]; - + //$checkoutabale is a HUGE json array } private function shouldSendWebhookNotification(): bool diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 39d8ffe98f..9a06ecb64a 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -82,8 +82,7 @@ class CheckoutAssetNotification extends Notification /** * Only send notifications to users that have email addresses */ - if ($this->target instanceof User && (($this->target->email != '') || $this->settings->admin_cc_email != '')) { - + if ($this->target instanceof User && ($this->target->email != '') || ($this->settings->admin_cc_email != '')) { /** * Send an email if the asset requires acceptance, * so the user can accept or decline the asset diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php index 1d0df08524..34d4e7bc71 100644 --- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckoutTest.php @@ -26,7 +26,7 @@ class EmailNotificationsUponCheckoutTest extends TestCase $user = User::factory()->create(); $asset = Asset::factory()->assignedToUser($user)->create(); - $asset->model->category->update(['checkout_email' => true]); + $asset->model->category->update(['checkin_email' => true]); $this->fireCheckOutEvent($asset, $user); @@ -43,7 +43,7 @@ class EmailNotificationsUponCheckoutTest extends TestCase $user = User::factory()->create(); $asset = Asset::factory()->assignedToUser($user)->create(); - $asset->model->category->update(['checkout_email' => false]); + $asset->model->category->update(['checkin_email' => false]); //this is a 0 so the setting IS disabled $this->fireCheckOutEvent($asset, $user);