botones y color en estado

This commit is contained in:
Felipe
2023-10-25 15:50:18 -05:00
parent f7386e21a1
commit 98ee3c0696
4 changed files with 147 additions and 196 deletions
+6 -6
View File
@@ -29,18 +29,18 @@ class UsersImport implements ToModel
'vencimiento' => \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($row[4]),
'servicio_id' => $row[5],
]);
$cuenta->save();
// Aquí realizamos operaciones similares a las cuentas manuales
if ($row[2] === 'activo') {
$servicioPantallas = Servicio::find($row[5])->pantallas;
$cuentasPendientes = Pendientes::where('estado', 'pendiente')
->where('servicio_id', $row[5])
->take($servicioPantallas)
->get();
foreach ($cuentasPendientes as $i => $cuentaPendiente) {
$servicioName = $cuentaPendiente->servicio->nombre;
@@ -57,13 +57,13 @@ class UsersImport implements ToModel
$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->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();
}
}
return $cuenta;
}
public function headingRow(): int