Se agrego tipo a log_general.

This commit is contained in:
lizandrogd
2025-02-27 10:55:12 -05:00
parent 33859c8777
commit 76bd9df10e
10 changed files with 54 additions and 3 deletions
+4
View File
@@ -405,6 +405,7 @@ class ShowServicios extends Component
$logsGeneral = new Log_general();
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' Tuvo error de "No hay cuentas disponibles" Comprando el servicio ' . $servicioNombre . ' - ' . $cuentasMostar . ' cantidad de ' . $this->cantidad_tarjetaPlan . ' por un valor de $' . $total_valor . ' Se desligaron todas las cuentas.';
$logsGeneral->tipo = 'compra_error';
$logsGeneral->save();
$this->alert('warning', 'No hay cuentas disponibles!', [
'position' => 'top'
@@ -425,6 +426,7 @@ class ShowServicios extends Component
$logsGeneral = new Log_general();
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha comprado el servicio ' . $servicioNombre . ' - ' . $cuentasMostar . ' cantidad de ' . $this->cantidad_tarjetaPlan . ' por un valor de $' . $total_valor . ', Saldo anterior: $' . $saldo_anterior . ', Nuevo saldo disponible: $' . $nuevo_saldo;
$logsGeneral->tipo = 'compra';
$logsGeneral->save();
@@ -435,6 +437,7 @@ class ShowServicios extends Component
$logsGeneral = new Log_general();
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' Tuvo un error con el cobro del servicio ' . $servicioNombre . ' - ' . $cuentasMostar . ' cantidad de ' . $this->cantidad_tarjetaPlan . ' por un valor de $' . $total_valor;
$logsGeneral->tipo = 'compra_error';
$logsGeneral->save();
$eliminar = Historial_cuenta::where('historial_id', $historial->id)->delete();
$this->alert('warning', 'Error en el cobro, comuniquese con soporte!', [
@@ -448,6 +451,7 @@ class ShowServicios extends Component
$logsGeneral = new Log_general();
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' Tuvo error de "No hay cuentas disponibles" Comprando el servicio ' . $servicioNombre . ' - ' . $cuentasMostar . ' cantidad de ' . $this->cantidad_tarjetaPlan . ' por un valor de $' . $total_valor . ' No se desconto el saldo, ni se asignaron cuentas.';
$logsGeneral->tipo = 'compra_error';
$logsGeneral->save();
$this->alert('warning', 'No hay cuentas disponibles!', [
'position' => 'top'