update
This commit is contained in:
@@ -331,7 +331,7 @@ class ShowPlanes extends Component
|
||||
$historial_cuenta->save();
|
||||
$cuentaPendiente->update(['estado' => 'cerrado']);
|
||||
|
||||
if ($cuentaPendiente->historial->vendedor !== null) {
|
||||
if ($cuentaPendiente->historial?->vendedor !== null) {
|
||||
$cuentaPendiente->historial->vendedor->notify(new NotificacionPendiente($servicioName));
|
||||
}
|
||||
|
||||
@@ -476,23 +476,26 @@ class ShowPlanes extends Component
|
||||
$historial_cuenta->save();
|
||||
$cuentaPendiente->update(['estado' => 'cerrado']);
|
||||
|
||||
if ($cuentaPendiente->historial->vendedor !== null) {
|
||||
if ($cuentaPendiente->historial?->vendedor !== null) {
|
||||
$cuentaPendiente->historial->vendedor->notify(new NotificacionPendiente($servicioName));
|
||||
}
|
||||
|
||||
$consulta = new Notificacion();
|
||||
$consulta->remitente_id = Auth::user()->id;
|
||||
$consulta->destinatario_id = $historial_cuenta->historial->vendedor_id;
|
||||
$consulta->titulo = "Licencia asignada para $servicioName";
|
||||
$consulta->descripcion = 'La licencia de ' . $servicioName . ' ha sido activada y ahora puedes utilizar tu cuenta sin problemas. Tus credenciales son: correo: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password;
|
||||
$consulta->estado = true;
|
||||
$consulta->todos = false;
|
||||
$consulta = new Notificacion();
|
||||
$consulta->remitente_id = Auth::user()->id;
|
||||
$consulta->destinatario_id = $historial_cuenta->historial?->vendedor_id ?? null;
|
||||
$consulta->titulo = "Licencia asignada para $servicioName";
|
||||
$consulta->descripcion = 'La licencia de ' . $servicioName . ' ha sido activada y ahora puedes utilizar tu cuenta sin problemas. Tus credenciales son: correo: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password;
|
||||
$consulta->estado = true;
|
||||
$consulta->todos = false;
|
||||
$consulta->save();
|
||||
|
||||
$logsGeneral = new Log_general();
|
||||
$logsGeneral->user_id = $historial_cuenta->historial->vendedor_id;
|
||||
$logsGeneral->detalle = 'Se asigno una cuenta ' . $servicioName . ', con credenciales: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password . ' Que se encontraba en estado pendiente';
|
||||
$logsGeneral->save();
|
||||
if ($cuentaPendiente->historial?->vendedor !== null) {
|
||||
$logsGeneral = new Log_general();
|
||||
$logsGeneral->user_id = $historial_cuenta->historial->vendedor_id;
|
||||
$logsGeneral->detalle = 'Se asigno una cuenta ' . $servicioName . ', con credenciales: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password . ' Que se encontraba en estado pendiente';
|
||||
$logsGeneral->save();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user