|
|
@@ -59,15 +59,15 @@ class SegnalazioneObserver
|
|
59
|
59
|
}
|
|
60
|
60
|
|
|
61
|
61
|
if ($segnalazione->wasChanged('stato')) {
|
|
62
|
|
- $config = ConfigNotifiche::where('event', ConfigNotifiche::CAMBIO_STATO_REPARTO)->first();
|
|
63
|
|
- if ($config && $config->is_attivo && $segnalazione->reparto_id) {
|
|
64
|
|
- $email = $fresh->email ?? $fresh->reparto?->email;
|
|
65
|
|
- if ($email) {
|
|
66
|
|
- Notification::route('mail', $email)->notify(
|
|
67
|
|
- new SegnalazioneStatoCambiatoReparto($fresh, $segnalazione->getOriginal('stato'))
|
|
68
|
|
- );
|
|
69
|
|
- }
|
|
70
|
|
- }
|
|
|
62
|
+ // $config = ConfigNotifiche::where('event', ConfigNotifiche::CAMBIO_STATO_REPARTO)->first();
|
|
|
63
|
+ // if ($config && $config->is_attivo && $segnalazione->reparto_id) {
|
|
|
64
|
+ // $email = $fresh->email ?? $fresh->reparto?->email;
|
|
|
65
|
+ // if ($email) {
|
|
|
66
|
+ // Notification::route('mail', $email)->notify(
|
|
|
67
|
+ // new SegnalazioneStatoCambiatoReparto($fresh, $segnalazione->getOriginal('stato'))
|
|
|
68
|
+ // );
|
|
|
69
|
+ // }
|
|
|
70
|
+ // }
|
|
71
|
71
|
}
|
|
72
|
72
|
}
|
|
73
|
73
|
|