mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
remove old notify by mail from consumable notification
This commit is contained in:
parent
c681946b1d
commit
fd74c35102
|
@ -39,6 +39,7 @@ class CheckoutConsumableNotification extends Notification
|
||||||
$this->note = $note;
|
$this->note = $note;
|
||||||
$this->target = $checkedOutTo;
|
$this->target = $checkedOutTo;
|
||||||
$this->acceptance = $acceptance;
|
$this->acceptance = $acceptance;
|
||||||
|
$this->qty = $consumable->checkout_qty;
|
||||||
|
|
||||||
$this->settings = Setting::getSettings();
|
$this->settings = Setting::getSettings();
|
||||||
}
|
}
|
||||||
|
@ -65,34 +66,6 @@ class CheckoutConsumableNotification extends Notification
|
||||||
$notifyBy[] = SlackWebhookChannel::class;
|
$notifyBy[] = SlackWebhookChannel::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Only send notifications to users that have email addresses
|
|
||||||
*/
|
|
||||||
if ($this->target instanceof User && $this->target->email != '') {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send an email if the asset requires acceptance,
|
|
||||||
* so the user can accept or decline the asset
|
|
||||||
*/
|
|
||||||
if ($this->item->requireAcceptance()) {
|
|
||||||
$notifyBy[1] = 'mail';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send an email if the item has a EULA, since the user should always receive it
|
|
||||||
*/
|
|
||||||
if ($this->item->getEula()) {
|
|
||||||
$notifyBy[1] = 'mail';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send an email if an email should be sent at checkin/checkout
|
|
||||||
*/
|
|
||||||
if ((method_exists($this->item, 'checkin_email')) && ($this->item->checkin_email())) {
|
|
||||||
$notifyBy[1] = 'mail';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $notifyBy;
|
return $notifyBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue