From 7e7e85f591129e4ff603a2b926a0b47002171033 Mon Sep 17 00:00:00 2001 From: TheSilva7 Date: Thu, 8 May 2025 11:46:24 -0600 Subject: [PATCH] arreglo de migraciones si --- -i | 0 ...183714_add_columneliminado_toprestamos.php | 28 ------------ ...8_175646_add_estado_to_prestamos_table.php | 28 ------------ ...8_182126_add_estado_to_prestamos_table.php | 28 ------------ ...8_183038_add_estado_to_prestamos_table.php | 28 ------------ ...1_191325_add_estado_to_prestamos_table.php | 28 ------------ ...dd_fecha_aceptacion_to_prestamos_table.php | 28 ------------ ...5_05_08_174026_create_prestamos_table.php} | 5 ++- ...dd_fecha_aceptacion_to_prestamos_table.php | 20 --------- resources/views/layouts/dashboard.blade.php | 43 +++++-------------- routes/web.php | 1 + 11 files changed, 15 insertions(+), 222 deletions(-) delete mode 100644 -i delete mode 100644 database/migrations/2025_03_27_183714_add_columneliminado_toprestamos.php delete mode 100644 database/migrations/2025_03_28_175646_add_estado_to_prestamos_table.php delete mode 100644 database/migrations/2025_03_28_182126_add_estado_to_prestamos_table.php delete mode 100644 database/migrations/2025_03_28_183038_add_estado_to_prestamos_table.php delete mode 100644 database/migrations/2025_04_01_191325_add_estado_to_prestamos_table.php delete mode 100644 database/migrations/2025_04_01_192918_add_fecha_aceptacion_to_prestamos_table.php rename database/migrations/{2025_03_27_174121_create_prestamos_table.php => 2025_05_08_174026_create_prestamos_table.php} (75%) delete mode 100644 database/migrations/[timestamp]_add_fecha_aceptacion_to_prestamos_table.php diff --git a/ -i b/ -i deleted file mode 100644 index e69de29..0000000 diff --git a/database/migrations/2025_03_27_183714_add_columneliminado_toprestamos.php b/database/migrations/2025_03_27_183714_add_columneliminado_toprestamos.php deleted file mode 100644 index 239f581..0000000 --- a/database/migrations/2025_03_27_183714_add_columneliminado_toprestamos.php +++ /dev/null @@ -1,28 +0,0 @@ -boolean('eliminado')->default(false); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('prestamos', function (Blueprint $table) { - $table->dropColumn('eliminado'); - }); - } -}; diff --git a/database/migrations/2025_03_28_175646_add_estado_to_prestamos_table.php b/database/migrations/2025_03_28_175646_add_estado_to_prestamos_table.php deleted file mode 100644 index af9986e..0000000 --- a/database/migrations/2025_03_28_175646_add_estado_to_prestamos_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('estado')->default('pendiente'); // pendiente, aceptado, rechazado - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('prestamos', function (Blueprint $table) { - $table->dropColumn('estado'); - }); - } -}; diff --git a/database/migrations/2025_04_01_191325_add_estado_to_prestamos_table.php b/database/migrations/2025_04_01_191325_add_estado_to_prestamos_table.php deleted file mode 100644 index c47e8b3..0000000 --- a/database/migrations/2025_04_01_191325_add_estado_to_prestamos_table.php +++ /dev/null @@ -1,28 +0,0 @@ -enum('estado', ['pendiente', 'aceptado', 'rechazado'])->default('pendiente')->after('chofer'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('prestamos', function (Blueprint $table) { - $table->dropColumn('estado'); - }); - } -}; diff --git a/database/migrations/2025_04_01_192918_add_fecha_aceptacion_to_prestamos_table.php b/database/migrations/2025_04_01_192918_add_fecha_aceptacion_to_prestamos_table.php deleted file mode 100644 index af9986e..0000000 --- a/database/migrations/2025_04_01_192918_add_fecha_aceptacion_to_prestamos_table.php +++ /dev/null @@ -1,28 +0,0 @@ -text('motivo'); $table->string('domicilio'); $table->integer('numero_personas'); - $table->boolean('chofer')->default(false); // Opción de sí (true) o no (false) + $table->boolean('chofer')->default(false); + $table->enum('estado', ['pendiente', 'aceptado', 'rechazado'])->default('pendiente'); + $table->timestamp('fecha_aceptacion')->nullable(); + $table->boolean('eliminado')->default(false); $table->timestamps(); }); } diff --git a/database/migrations/[timestamp]_add_fecha_aceptacion_to_prestamos_table.php b/database/migrations/[timestamp]_add_fecha_aceptacion_to_prestamos_table.php deleted file mode 100644 index b67a566..0000000 --- a/database/migrations/[timestamp]_add_fecha_aceptacion_to_prestamos_table.php +++ /dev/null @@ -1,20 +0,0 @@ -use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Schema; - -class AddFechaAceptacionToPrestamosTable extends Migration -{ - public function up() - { - Schema::table('prestamos', function (Blueprint $table) { - $table->timestamp('fecha_aceptacion')->nullable()->after('estado'); - }); - } - - public function down() - { - Schema::table('prestamos', function (Blueprint $table) { - $table->dropColumn('fecha_aceptacion'); - }); - } -} \ No newline at end of file diff --git a/resources/views/layouts/dashboard.blade.php b/resources/views/layouts/dashboard.blade.php index c9c4ead..3cdd5df 100644 --- a/resources/views/layouts/dashboard.blade.php +++ b/resources/views/layouts/dashboard.blade.php @@ -234,41 +234,18 @@
- - -
-
- - - -
-
- @csrf - -
-
+
+
+ {{ strtoupper(substr(Auth::user()->name ?? 'U', 0, 1)) }}{{ strtoupper(substr(Auth::user()->name ?? 'U', 1, 1)) }}
+ {{ Auth::user()->name ?? 'Usuario' }}
+
+ @csrf + +
diff --git a/routes/web.php b/routes/web.php index c18966c..7279bdb 100644 --- a/routes/web.php +++ b/routes/web.php @@ -73,6 +73,7 @@ use App\Http\Controllers\DespartamentoController; // Rutas protegidas que requieren autenticación + // Rutas protegidas que requieren autenticación Route::middleware(['auth'])->group(function () {