9 changed files with 244 additions and 2 deletions
@ -0,0 +1,25 @@ |
|||||
|
@extends('layouts.app') |
||||
|
|
||||
|
@section('content') |
||||
|
<div class="container"> |
||||
|
<h2>Detalle del Préstamo</h2> |
||||
|
<div class="card mb-4"> |
||||
|
<div class="card-body"> |
||||
|
<ul class="list-group"> |
||||
|
<li class="list-group-item"><strong>Destino:</strong> {{ $prestamo->destino }}</li> |
||||
|
<li class="list-group-item"><strong>Fecha Salida:</strong> {{ $prestamo->fecha_salida }}</li> |
||||
|
<li class="list-group-item"><strong>Fecha Llegada:</strong> {{ $prestamo->fecha_llegada }}</li> |
||||
|
<li class="list-group-item"><strong>Motivo:</strong> {{ $prestamo->motivo }}</li> |
||||
|
<li class="list-group-item"><strong>Domicilio:</strong> {{ $prestamo->domicilio }}</li> |
||||
|
<li class="list-group-item"><strong>Personas:</strong> {{ $prestamo->personas }}</li> |
||||
|
<li class="list-group-item"><strong>Chofer:</strong> {{ $prestamo->chofer }}</li> |
||||
|
<li class="list-group-item"><strong>Estado:</strong> {{ $prestamo->estado }}</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</div> |
||||
|
<a href="{{ url('/user-dashboard/cuestionario?prestamo_id=' . $prestamo->id) }}" class="btn btn-success"> |
||||
|
Continuar con el cuestionario |
||||
|
</a> |
||||
|
<a href="{{ route('user.prestamos.aceptados') }}" class="btn btn-secondary">Volver a la lista</a> |
||||
|
</div> |
||||
|
@endsection |
@ -0,0 +1,171 @@ |
|||||
|
@extends('layouts.app') |
||||
|
|
||||
|
@section('content') |
||||
|
<link rel="stylesheet" href="{{ asset('css/user-dashboard.css') }}"> |
||||
|
<style> |
||||
|
body.user-dashboard-bg { |
||||
|
background: linear-gradient(120deg, #4158D0 0%, #5068c8 46%, #70e7ff 100%) !important; |
||||
|
min-height: 100vh; |
||||
|
} |
||||
|
.prestamos-card { |
||||
|
border-radius: 24px; |
||||
|
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15); |
||||
|
background: #fff; |
||||
|
margin: 40px auto; |
||||
|
max-width: 1100px; |
||||
|
} |
||||
|
.prestamos-header { |
||||
|
border-radius: 24px 24px 0 0; |
||||
|
background: #4158D0; |
||||
|
color: #fff; |
||||
|
padding: 24px 32px; |
||||
|
font-size: 2rem; |
||||
|
font-weight: 800; |
||||
|
letter-spacing: 1px; |
||||
|
text-align: left; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
} |
||||
|
.prestamos-header .logo { |
||||
|
font-size: 2rem; |
||||
|
font-weight: 900; |
||||
|
letter-spacing: 2px; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.prestamos-header .logout-btn { |
||||
|
background: #e53e3e; |
||||
|
color: #fff; |
||||
|
border: none; |
||||
|
border-radius: 8px; |
||||
|
padding: 10px 22px; |
||||
|
font-size: 1rem; |
||||
|
font-weight: 600; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
gap: 8px; |
||||
|
box-shadow: 0 2px 8px rgba(229,62,62,0.15); |
||||
|
transition: background 0.2s; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.prestamos-header .logout-btn:hover { |
||||
|
background: #c53030; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.prestamos-table th, .prestamos-table td { |
||||
|
vertical-align: middle; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.prestamos-table th { |
||||
|
background: #f7fafc; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
.prestamos-table { |
||||
|
border-radius: 16px; |
||||
|
overflow: hidden; |
||||
|
background: #fff; |
||||
|
} |
||||
|
.prestamos-table td, .prestamos-table th { |
||||
|
font-size: 1rem; |
||||
|
} |
||||
|
.prestamos-table .badge { |
||||
|
font-size: 1rem; |
||||
|
padding: 6px 14px; |
||||
|
border-radius: 8px; |
||||
|
} |
||||
|
.prestamos-title { |
||||
|
font-size: 2.2rem; |
||||
|
font-weight: 900; |
||||
|
color: #4158D0; |
||||
|
margin-bottom: 24px; |
||||
|
text-align: center; |
||||
|
letter-spacing: 1px; |
||||
|
} |
||||
|
.btn-action { |
||||
|
border: none; |
||||
|
border-radius: 6px; |
||||
|
padding: 6px 14px; |
||||
|
font-size: 1rem; |
||||
|
font-weight: 600; |
||||
|
margin: 2px; |
||||
|
transition: background 0.2s; |
||||
|
cursor: pointer; |
||||
|
display: inline-flex; |
||||
|
align-items: center; |
||||
|
gap: 6px; |
||||
|
} |
||||
|
.btn-action.details { |
||||
|
background: #3182ce; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.btn-action.details:hover { |
||||
|
background: #225ea8; |
||||
|
} |
||||
|
.btn-action.select { |
||||
|
background: #38a169; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.btn-action.select:hover { |
||||
|
background: #276749; |
||||
|
} |
||||
|
</style> |
||||
|
<body class="user-dashboard-bg"> |
||||
|
<div class="container py-4"> |
||||
|
<div class="prestamos-card"> |
||||
|
<div class="prestamos-header"> |
||||
|
<span class="logo">PréstamosTecmm</span> |
||||
|
<form method="POST" action="{{ route('logout') }}" style="margin:0;"> |
||||
|
@csrf |
||||
|
<button type="submit" class="logout-btn"> |
||||
|
<i class="fas fa-sign-out-alt"></i> Cerrar Sesión |
||||
|
</button> |
||||
|
</form> |
||||
|
</div> |
||||
|
<div class="card-body" style="background: #fff; border-radius: 0 0 24px 24px;"> |
||||
|
<div class="prestamos-title">Préstamos Aceptados</div> |
||||
|
@if($prestamos->isEmpty()) |
||||
|
<div class="alert alert-info text-center mb-0">No tienes préstamos aceptados.</div> |
||||
|
@else |
||||
|
<div class="table-responsive"> |
||||
|
<table class="table table-hover align-middle prestamos-table"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Destino</th> |
||||
|
<th>Fecha Salida</th> |
||||
|
<th>Fecha Llegada</th> |
||||
|
<th>Motivo</th> |
||||
|
<th>Personas</th> |
||||
|
<th>Chofer</th> |
||||
|
<th>Estado</th> |
||||
|
<th>Acciones</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
@foreach($prestamos as $prestamo) |
||||
|
<tr> |
||||
|
<td>{{ $prestamo->destino }}</td> |
||||
|
<td>{{ $prestamo->fecha_hora_salida }}</td> |
||||
|
<td>{{ $prestamo->fecha_hora_llegada }}</td> |
||||
|
<td>{{ $prestamo->motivo }}</td> |
||||
|
<td>{{ $prestamo->numero_personas }}</td> |
||||
|
<td>{{ $prestamo->choferAsignado ? $prestamo->choferAsignado->nombre : 'Sin chofer' }}</td> |
||||
|
<td> |
||||
|
<span class="badge bg-success">{{ ucfirst($prestamo->estado) }}</span> |
||||
|
</td> |
||||
|
<td> |
||||
|
|
||||
|
<a href="{{ url('/user-dashboard/cuestionario?prestamo_id=' . $prestamo->id) }}" class="btn-action select"> |
||||
|
<i class="fas fa-check"></i> Seleccionar Préstamo |
||||
|
</a> |
||||
|
</td> |
||||
|
</tr> |
||||
|
@endforeach |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
@endif |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</body> |
||||
|
@endsection |
Loading…
Reference in new issue