From 3cd4f08cf25d9a1aa009e063a6f04daabf144515 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Mon, 1 Jul 2024 14:15:11 -0600 Subject: [PATCH 01/22] Relacion entre contactos y profesiones --- app/Models/Contacto.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Models/Contacto.php b/app/Models/Contacto.php index 459592d..808dfab 100644 --- a/app/Models/Contacto.php +++ b/app/Models/Contacto.php @@ -4,6 +4,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; class Contacto extends Model { @@ -39,4 +40,9 @@ class Contacto extends Model //'institucion_id', 'subgrupo_id', ]; + + public function profesion(): BelongsTo + { + return $this->belongsTo(Profesion::class); + } } -- GitLab From f641af0b93d711ebf1b927430fa2c33f8f4c5c42 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Mon, 1 Jul 2024 15:22:29 -0600 Subject: [PATCH 02/22] Relaciones de profesion y cargo agregadas a la vista principal --- app/Http/Controllers/ContactoController.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ContactoController.php b/app/Http/Controllers/ContactoController.php index 84544ea..3b352f2 100644 --- a/app/Http/Controllers/ContactoController.php +++ b/app/Http/Controllers/ContactoController.php @@ -22,7 +22,8 @@ class ContactoController extends Controller */ public function index() { - $contactos = Contacto::get(); + $contactos = Contacto::with('profesion', 'cargo')->get(); + //dd($contactos); return view('adminGen.contactos.index', compact('contactos')); } @@ -164,9 +165,15 @@ public function update(Request $request, Contacto $contacto) /** * Remove the specified resource from storage. */ - public function destroy(Contacto $contacto) + public function destroy(string $id) { - // + try{ + $contacto = Contacto::findOrFail($id); + $contacto->delete(); + return redirect()->route('contacto.get')->with('success', 'Contacto eliminado correctamente.'); + }catch(\Exception $e){ + return redirect()->route('contacto.get')->withErrors('Error al eliminar el contacto.'); + } } /** -- GitLab From d57925b81177758d03c14bcb51b57dcb7baea635 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Mon, 1 Jul 2024 15:22:45 -0600 Subject: [PATCH 03/22] Funcion para devolver los cargos --- app/Models/Contacto.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Models/Contacto.php b/app/Models/Contacto.php index 808dfab..2dac433 100644 --- a/app/Models/Contacto.php +++ b/app/Models/Contacto.php @@ -45,4 +45,9 @@ public function profesion(): BelongsTo { return $this->belongsTo(Profesion::class); } + + public function cargo(): BelongsTo + { + return $this->belongsTo(cargos::class); + } } -- GitLab From ebe73861f52bd1372232d93ed5a309e35cc7e57a Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Mon, 1 Jul 2024 15:23:00 -0600 Subject: [PATCH 04/22] Eliminar un contacto --- routes/web.php | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/web.php b/routes/web.php index 3c0ae91..99d008d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -85,4 +85,5 @@ Route::get('/contactos', [ContactoController::class, 'index'])->name('get')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::get('/contactos/crear', [ContactoController::class, 'create'])->name('create')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::post('/contactos/crear', [ContactoController::class, 'store'])->name('store')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); + Route::delete('/contactos/{id}', [ContactoController::class, 'destroy'])->name('destroy')->middleware(CheckRoles::class . ':admingen,admin'); }); -- GitLab From 44b2f1cf1bd34abab68aa57ea684f0e257f32a06 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Mon, 1 Jul 2024 15:23:19 -0600 Subject: [PATCH 05/22] Correcciones para mostrar los datos de los contactos --- .../views/adminGen/contactos/index.blade.php | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/resources/views/adminGen/contactos/index.blade.php b/resources/views/adminGen/contactos/index.blade.php index 8130fe6..4896d89 100644 --- a/resources/views/adminGen/contactos/index.blade.php +++ b/resources/views/adminGen/contactos/index.blade.php @@ -40,32 +40,41 @@ +
+ +
+
+
Editar contacto
+
+
+
+
+
+
+
+ +
+
+
+ @csrf + @method('PUT') + + +
+
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + + + +
+
+
+ + @if($contacto->foto_perfil) +
+ Foto de perfil +
+ @endif + +
+
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+ @foreach($contacto->telefonos as $telefono) +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+
+ @endforeach +
+ +
+
+ +
+
+ @foreach($contacto->redes as $red) +
+
+ + +
+
+ + +
+
+ +
+
+ @endforeach +
+ +
+
+ +
+
+ @foreach($contacto->correos as $correo) +
+
+ + +
+
+ + +
+
+ +
+
+ @endforeach +
+ +
+
+ +
+

Enviar formulario

+
+

Por favor, revise toda la información antes de enviar el formulario.

+

Si encuentra algún error, puede regresar y editar la información antes de enviar.

+
+
+ +
+
+
+
+ + +
+
+
+
+
+
+ + + + + + + + + + + \ No newline at end of file -- GitLab From 10579197ea3bb746a46be14cc4d9fa3b2fafb3f5 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Mon, 1 Jul 2024 22:53:42 -0600 Subject: [PATCH 09/22] Editar el nombre de una ruta --- resources/views/adminGen/contactos/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/adminGen/contactos/index.blade.php b/resources/views/adminGen/contactos/index.blade.php index 4896d89..824a1b9 100644 --- a/resources/views/adminGen/contactos/index.blade.php +++ b/resources/views/adminGen/contactos/index.blade.php @@ -59,7 +59,7 @@ function renderActions(id) { @method('DELETE') - Editar + Editar `; } -- GitLab From 68edc3c991ec34e16c95cbce0596a01ef841ddfa Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Mon, 1 Jul 2024 22:54:21 -0600 Subject: [PATCH 10/22] Rutas para editar el contacto --- routes/web.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 99d008d..c78b7fd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -14,7 +14,6 @@ use App\Http\Controllers\SubgrupoController; use App\Http\Controllers\UserController; - Route::get('/', function () { return view('welcome'); }); @@ -85,5 +84,7 @@ Route::get('/contactos', [ContactoController::class, 'index'])->name('get')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::get('/contactos/crear', [ContactoController::class, 'create'])->name('create')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::post('/contactos/crear', [ContactoController::class, 'store'])->name('store')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); + Route::get('/contactos/{id}/editar', [ContactoController::class, 'edit'])->name('edit')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); + Route::put('/contactos/{id}/editar', [ContactoController::class, 'update'])->name('update')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::delete('/contactos/{id}', [ContactoController::class, 'destroy'])->name('destroy')->middleware(CheckRoles::class . ':admingen,admin'); }); -- GitLab From 4fe939730143452d6183f7234ed002817d443291 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 18:37:35 -0600 Subject: [PATCH 11/22] Editar contacto corregido --- app/Http/Controllers/ContactoController.php | 38 +++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/ContactoController.php b/app/Http/Controllers/ContactoController.php index 8145a86..a5ad080 100644 --- a/app/Http/Controllers/ContactoController.php +++ b/app/Http/Controllers/ContactoController.php @@ -70,7 +70,7 @@ public function store(Request $request) $correosData = $request->only(['correo_electronico', 'tipo_correo_electronico']); $correosData = array_map(function ($item) { return array_map(function ($value) { - return ($value === '0' || $value === "null") ? null : $value; + return ($value === "null") ? null : $value; }, $item); }, $correosData); @@ -170,30 +170,56 @@ public function update(Request $request, string $id) // Validar los datos $validatedData = $request->validate([ 'nombre' => 'required|string|max:255', - 'foto_perfil' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', + 'foto_perfil' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048', ]); $contacto = Contacto::findOrFail($id); + $fieldsToCheck = [ + 'conyuge_id', + 'profesion_id', + 'cargo_id', + 'caracteristica_id', + 'subgrupo_id', + 'mes_cump', + 'dia_cump', + //institucion_id + ]; + $requestData = $request->all(); + foreach ($fieldsToCheck as $field) { + if (isset($requestData[$field]) && $requestData[$field] === "null") { + unset($requestData[$field]); + } + } + + $request->replace($requestData); + $contacto->conyuge_id = $request->input('conyuge_id') !== 'null' ? $request->input('conyuge_id') : null; $contacto->profesion_id = $request->input('profesion_id') !== 'null' ? $request->input('profesion_id') : null; $contacto->cargo_id = $request->input('cargo_id') !== 'null' ? $request->input('cargo_id') : null; $contacto->cargo_desc = $request->input('cargo_desc'); + $data = $request->all(); + if ($request->hasFile('foto_perfil')) { // Eliminar la foto de perfil anterior si existe if ($contacto->foto_perfil) { - Storage::delete('public/' . $contacto->foto_perfil); + Storage::delete(STR::substr($contacto->foto_perfil, 8)); } // Guardar la nueva foto de perfil $path_file = $this->storeProfilePicture($request); - $contacto->foto_perfil = $path_file; + + if ($path_file) { + $data['foto_perfil'] = 'storage/' . $path_file; + }else{ + $data['foto_perfil'] = 'assets/images/profile-icon.webp'; + } } // Actualizar los datos del usuario - $contacto->update($validatedData); + $contacto->update($data); // Guardar teléfonos @@ -235,7 +261,7 @@ public function update(Request $request, string $id) $contacto->correos()->delete(); $contacto->correos()->createMany($correos->toArray()); - return redirect()->route('contacto.index')->with('success', 'Contacto actualizado correctamente'); + return redirect()->route('contacto.get')->with('success', 'Contacto actualizado correctamente'); } /** -- GitLab From e3de20f3ace38956674470e4f7919772eff595d9 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 18:38:00 -0600 Subject: [PATCH 12/22] Salto de linea en vista --- resources/views/adminGen/contactos/edit.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/adminGen/contactos/edit.blade.php b/resources/views/adminGen/contactos/edit.blade.php index d9415c8..f9ee2a8 100644 --- a/resources/views/adminGen/contactos/edit.blade.php +++ b/resources/views/adminGen/contactos/edit.blade.php @@ -453,6 +453,7 @@
+
-- GitLab From 659a88f218367c3e049e5cbe5403d02620501201 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 21:01:27 -0600 Subject: [PATCH 13/22] Vista de ver contacto --- app/Http/Controllers/ContactoController.php | 6 +- app/Models/Contacto.php | 5 + .../views/adminGen/contactos/index.blade.php | 1 + .../views/adminGen/contactos/show.blade.php | 600 ++++++++++++++++++ routes/web.php | 1 + 5 files changed, 610 insertions(+), 3 deletions(-) create mode 100644 resources/views/adminGen/contactos/show.blade.php diff --git a/app/Http/Controllers/ContactoController.php b/app/Http/Controllers/ContactoController.php index a5ad080..c5b61b6 100644 --- a/app/Http/Controllers/ContactoController.php +++ b/app/Http/Controllers/ContactoController.php @@ -24,7 +24,6 @@ class ContactoController extends Controller public function index() { $contactos = Contacto::with('profesion', 'cargo')->get(); - //dd($contactos); return view('adminGen.contactos.index', compact('contactos')); } @@ -142,9 +141,10 @@ public function store(Request $request) /** * Display the specified resource. */ - public function show(Contacto $contacto) + public function show(string $id) { - // + $contacto = Contacto::with('profesion', 'cargo', 'pareja')->findOrFail($id); + return view('adminGen.contactos.show', compact('contacto')); } /** diff --git a/app/Models/Contacto.php b/app/Models/Contacto.php index 0fda0bc..675b3e8 100644 --- a/app/Models/Contacto.php +++ b/app/Models/Contacto.php @@ -46,6 +46,11 @@ public function profesion(): BelongsTo return $this->belongsTo(Profesion::class); } + public function pareja(): BelongsTo + { + return $this->belongsTo(Contacto::class, 'conyuge_id'); + } + public function cargo(): BelongsTo { return $this->belongsTo(cargos::class); diff --git a/resources/views/adminGen/contactos/index.blade.php b/resources/views/adminGen/contactos/index.blade.php index 824a1b9..8bbbaa6 100644 --- a/resources/views/adminGen/contactos/index.blade.php +++ b/resources/views/adminGen/contactos/index.blade.php @@ -54,6 +54,7 @@ function renderActions(id) { return `
+ Ver contacto
@csrf @method('DELETE') diff --git a/resources/views/adminGen/contactos/show.blade.php b/resources/views/adminGen/contactos/show.blade.php new file mode 100644 index 0000000..6eaf220 --- /dev/null +++ b/resources/views/adminGen/contactos/show.blade.php @@ -0,0 +1,600 @@ + + +
+
    +
  • + Dashboard +
  • +
  • + Contacto +
  • +
  • + {{ $contacto->profesion->abreviatura . ' ' . $contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno}} +
  • +
+
+
+
+
+
Contacto
+ + + + + + + +
+
+
+ image +

{{ $contacto->profesion->abreviatura . ' ' . $contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno}}

+
+
    + @if($contacto->profesion) +
  • + + + + + + + + {{$contacto->profesion->nombre}} +
  • + @endif + @if($contacto->cargo_desc) +
  • + + + + + + + + {{$contacto->cargo_desc}} +
  • + @endif +
  • + + + + + + @if($contacto->finado == true) + Finado: Si + @else + Finado: No + @endif +
  • + @if($contacto->mes_cump) +
  • + + + + + + + + {{ $contacto->dia_cump . ' de ' . Str::title(\Carbon\Carbon::create()->month($contacto->mes_cump)->monthName) }} +
  • + @endif +
+ +
+
+
+
+
Domicilio oficial
+
+
+
    + @if($contacto->domicilio_oficial) +
  • + + + + + + {{'Domicilio: ' . $contacto->domicilio_oficial}} +
  • + @endif + @if($contacto->codigo_postal) +
  • + + + + + + {{'Código postal: ' . $contacto->codigo_postal}} +
  • + @endif + @if($contacto->localidad_oficial) +
  • + + + + + + {{'Localidad: ' . $contacto->localidad_oficial}} +
  • + @endif + @if($contacto->municipio_oficial) +
  • + + + + + + {{'Municipio: ' . $contacto->municipio_oficial}} +
  • + @endif + @if($contacto->estado) +
  • + + + + + + {{'Estado: ' . $contacto->estado}} +
  • + @endif + @if($contacto->pais) +
  • + + + + + + {{'Pais: ' . $contacto->pais}} +
  • + @endif +
+
+
+
+
+
Domicilio particular
+
+
+
    + @if($contacto->domicilio_par) +
  • + + + + + + {{'Domicilio: ' . $contacto->domicilio_par}} +
  • + @endif + @if($contacto->codigo_postal_par) +
  • + + + + + + {{'Código postal: ' . $contacto->codigo_postal_par}} +
  • + @endif + @if($contacto->localidad_par) +
  • + + + + + + {{'Localidad: ' . $contacto->localidad_par}} +
  • + @endif + @if($contacto->municipio_par) +
  • + + + + + + {{'Municipio: ' . $contacto->municipio_par}} +
  • + @endif + @if($contacto->estado_par) +
  • + + + + + + {{'Estado: ' . $contacto->estado_par}} +
  • + @endif + @if($contacto->pais_par) +
  • + + + + + + {{'Pais: ' . $contacto->pais_par}} +
  • + @endif +
+
+
+ @if($contacto->pareja) +
+
+
Pareja
+
+
+
+ image +

{{ $contacto->pareja->nombre . ' ' . $contacto->pareja->ap_paterno . ' ' . $contacto->pareja->ap_materno}}

+
+
    + @if($contacto->pareja->cargo_desc) +
  • + + + + + + + + {{$contacto->pareja->cargo_desc}} +
  • + @endif + @if($contacto->pareja->mes_cump) +
  • + + + + + + + + {{ $contacto->pareja->dia_cump . ' de ' . Str::title(\Carbon\Carbon::create()->month($contacto->pareja->mes_cump)->monthName) }} +
  • + @endif +
  • + + + + + + @if($contacto->pareja->finado == true) + Finado: Si + @else + Finado: No + @endif +
  • +
+
+
+ @endif + +
+
+
Telefonos
+
+
+
+ + + + + + + + + + + + + + + @foreach($contacto->telefonos as $telefono) + + + + + + + + + + + @endforeach + +
PrefijoLadaNúmeroTipoEstatusExtID RadioObservaciones
{{$telefono->prefijo}}{{$telefono->lada}}{{$telefono->numero}}{{$telefono->tipo}}{{$telefono->estatus}}{{$telefono->ext}}{{$telefono->id_radio}}{{$telefono->observaciones}}
+
+
+
+
+
+
Correos electronicos
+
+
+
+ + + + + + + + + @foreach($contacto->correos as $correo) + + + + + @endforeach + +
Correo ElectronicoTipo
{{$correo->correo_electronico}}{{$correo->tipo_correo_electronico}}
+
+
+
+
+
+
+
diff --git a/routes/web.php b/routes/web.php index c78b7fd..37b4020 100644 --- a/routes/web.php +++ b/routes/web.php @@ -83,6 +83,7 @@ CheckBanned::class)->name('contacto.')->group(function() { Route::get('/contactos', [ContactoController::class, 'index'])->name('get')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::get('/contactos/crear', [ContactoController::class, 'create'])->name('create')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); + Route::get('/contactos/{id}/ver', [ContactoController::class, 'show'])->name('show')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::post('/contactos/crear', [ContactoController::class, 'store'])->name('store')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::get('/contactos/{id}/editar', [ContactoController::class, 'edit'])->name('edit')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); Route::put('/contactos/{id}/editar', [ContactoController::class, 'update'])->name('update')->middleware(CheckRoles::class . ':admingen,admin,capturista' ); -- GitLab From 6166bbd875600664ee436080b365a6933d0190f5 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 21:28:49 -0600 Subject: [PATCH 14/22] Agregar libreria de excel --- composer.json | 1 + composer.lock | 123 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bab7656..d60d765 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ "laravel/sanctum": "^4.0", "laravel/tinker": "^2.9", "livewire/livewire": "^3.0", + "maatwebsite/excel": "^1.1", "ramsey/uuid": "^4.7", "spatie/laravel-permission": "^6.7" }, diff --git a/composer.lock b/composer.lock index b5bb1d9..bca59f9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ad53994e33fc40bc932315ca31084ff3", + "content-hash": "7c0e87233e4ed8bfc39a14697735001e", "packages": [ { "name": "bacon/bacon-qr-code", @@ -2191,6 +2191,65 @@ ], "time": "2024-05-21T13:39:04+00:00" }, + { + "name": "maatwebsite/excel", + "version": "v1.1.5", + "source": { + "type": "git", + "url": "https://github.com/Maatwebsite/Laravel-Excel.git", + "reference": "0c67aba8387726458d42461eae91a3415593bbc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/0c67aba8387726458d42461eae91a3415593bbc4", + "reference": "0c67aba8387726458d42461eae91a3415593bbc4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "phpoffice/phpexcel": "~1.8.0" + }, + "require-dev": { + "mockery/mockery": "~0.9", + "orchestra/testbench": "~2.2.0@dev", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Maatwebsite\\Excel\\": "src/" + }, + "classmap": [ + "src/Maatwebsite/Excel", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Maatwebsite.nl", + "email": "patrick@maatwebsite.nl" + } + ], + "description": "An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel" + ], + "support": { + "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues", + "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/master" + }, + "time": "2014-07-10T09:06:07+00:00" + }, { "name": "mobiledetect/mobiledetectlib", "version": "4.8.06", @@ -2823,6 +2882,68 @@ }, "time": "2024-05-08T12:18:48+00:00" }, + { + "name": "phpoffice/phpexcel", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPExcel.git", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "ext-xmlwriter": "*", + "php": ">=5.2.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHPExcel": "Classes/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker" + }, + { + "name": "Franck Lefevre", + "homepage": "http://blog.rootslabs.net" + }, + { + "name": "Erik Tilt" + } + ], + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "http://phpexcel.codeplex.com", + "keywords": [ + "OpenXML", + "excel", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PHPExcel/issues", + "source": "https://github.com/PHPOffice/PHPExcel/tree/master" + }, + "abandoned": "phpoffice/phpspreadsheet", + "time": "2015-05-01T07:00:55+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.2", -- GitLab From ba9e97f0ec8096d5cea1406c21370ad02ad1b450 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 21:46:02 -0600 Subject: [PATCH 15/22] Pendiente subida de csv --- app/Http/Controllers/ContactoController.php | 12 ++++ app/Imports/ContactosImport.php | 74 +++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 app/Imports/ContactosImport.php diff --git a/app/Http/Controllers/ContactoController.php b/app/Http/Controllers/ContactoController.php index c5b61b6..04c6a3f 100644 --- a/app/Http/Controllers/ContactoController.php +++ b/app/Http/Controllers/ContactoController.php @@ -15,6 +15,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Str; use Illuminate\Support\Facades\Storage; +use Maatwebsite\Excel\Facades\Excel; class ContactoController extends Controller { @@ -444,4 +445,15 @@ private function correoDataPresent($correosData) return false; } + + public function upload(Request $request) + { + $request->validate([ + 'excel_file' => 'required|mimes:xlsx,xls', + ]); + + Excel::import(new ContactosImport, $request->file('excel_file')); + + return redirect()->back()->with('success', 'Archivo Excel subido y procesado correctamente.'); + } } diff --git a/app/Imports/ContactosImport.php b/app/Imports/ContactosImport.php new file mode 100644 index 0000000..ccde326 --- /dev/null +++ b/app/Imports/ContactosImport.php @@ -0,0 +1,74 @@ + $row['nombre'], + // otros campos de contacto + ]); + + // Procesar teléfonos + $prefijos = explode(';', $row['prefijo']); + $ladas = explode(';', $row['lada']); + $numeros = explode(';', $row['numero']); + $tipos = explode(';', $row['tipo']); + $estatuses = explode(';', $row['estatus']); + $exts = explode(';', $row['ext']); + $id_radios = explode(';', $row['id_radio']); + $observaciones = explode(';', $row['observaciones']); + + for ($i = 0; $i < count($prefijos); $i++) { + if ($prefijos[$i] != 'null' || $ladas[$i] != 'null' || $numeros[$i] != 'null') { + Telefono::create([ + 'contacto_id' => $contacto->id, + 'prefijo' => $prefijos[$i], + 'lada' => $ladas[$i], + 'numero' => $numeros[$i], + 'tipo' => $tipos[$i], + 'estatus' => $estatuses[$i], + 'ext' => $exts[$i], + 'id_radio' => $id_radios[$i], + 'observaciones' => $observaciones[$i], + ]); + } + } + + // Procesar redes sociales + $redes_sociales = explode(';', $row['red_social']); + $tipos_redes_sociales = explode(';', $row['tipo_red_social']); + + for ($i = 0; $i < count($redes_sociales); $i++) { + if ($redes_sociales[$i] != 'null' || $tipos_redes_sociales[$i] != 'null') { + RedesSociales::create([ + 'contacto_id' => $contacto->id, + 'red_social' => $redes_sociales[$i], + 'tipo' => $tipos_redes_sociales[$i], + ]); + } + } + + // Procesar correos electrónicos + $correos = explode(';', $row['correo_electronico']); + $tipos_correos = explode(';', $row['tipo_correo_electronico']); + + for ($i = 0; $i < count($correos); $i++) { + if ($correos[$i] != 'null' || $tipos_correos[$i] != 'null') { + CorreoContactos::create([ + 'contacto_id' => $contacto->id, + 'correo_electronico' => $correos[$i], + 'tipo' => $tipos_correos[$i], + ]); + } + } + } +} \ No newline at end of file -- GitLab From a20089f24f1df7008ec8cb0bb493ba4c16238db2 Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 22:31:19 -0600 Subject: [PATCH 16/22] Desinstalando libreria de excel no compatible --- composer.json | 1 - composer.lock | 123 +------------------------------------------------- 2 files changed, 1 insertion(+), 123 deletions(-) diff --git a/composer.json b/composer.json index d60d765..bab7656 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,6 @@ "laravel/sanctum": "^4.0", "laravel/tinker": "^2.9", "livewire/livewire": "^3.0", - "maatwebsite/excel": "^1.1", "ramsey/uuid": "^4.7", "spatie/laravel-permission": "^6.7" }, diff --git a/composer.lock b/composer.lock index bca59f9..d0ca1ab 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7c0e87233e4ed8bfc39a14697735001e", + "content-hash": "7b28faeac6b57475b878b6147632b657", "packages": [ { "name": "bacon/bacon-qr-code", @@ -2191,65 +2191,6 @@ ], "time": "2024-05-21T13:39:04+00:00" }, - { - "name": "maatwebsite/excel", - "version": "v1.1.5", - "source": { - "type": "git", - "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "0c67aba8387726458d42461eae91a3415593bbc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/0c67aba8387726458d42461eae91a3415593bbc4", - "reference": "0c67aba8387726458d42461eae91a3415593bbc4", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "phpoffice/phpexcel": "~1.8.0" - }, - "require-dev": { - "mockery/mockery": "~0.9", - "orchestra/testbench": "~2.2.0@dev", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Maatwebsite\\Excel\\": "src/" - }, - "classmap": [ - "src/Maatwebsite/Excel", - "tests/TestCase.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL" - ], - "authors": [ - { - "name": "Maatwebsite.nl", - "email": "patrick@maatwebsite.nl" - } - ], - "description": "An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel", - "keywords": [ - "PHPExcel", - "batch", - "csv", - "excel", - "export", - "import", - "laravel" - ], - "support": { - "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues", - "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/master" - }, - "time": "2014-07-10T09:06:07+00:00" - }, { "name": "mobiledetect/mobiledetectlib", "version": "4.8.06", @@ -2882,68 +2823,6 @@ }, "time": "2024-05-08T12:18:48+00:00" }, - { - "name": "phpoffice/phpexcel", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/PHPOffice/PHPExcel.git", - "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32", - "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32", - "shasum": "" - }, - "require": { - "ext-xml": "*", - "ext-xmlwriter": "*", - "php": ">=5.2.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "PHPExcel": "Classes/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL" - ], - "authors": [ - { - "name": "Maarten Balliauw", - "homepage": "http://blog.maartenballiauw.be" - }, - { - "name": "Mark Baker" - }, - { - "name": "Franck Lefevre", - "homepage": "http://blog.rootslabs.net" - }, - { - "name": "Erik Tilt" - } - ], - "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", - "homepage": "http://phpexcel.codeplex.com", - "keywords": [ - "OpenXML", - "excel", - "php", - "spreadsheet", - "xls", - "xlsx" - ], - "support": { - "issues": "https://github.com/PHPOffice/PHPExcel/issues", - "source": "https://github.com/PHPOffice/PHPExcel/tree/master" - }, - "abandoned": "phpoffice/phpspreadsheet", - "time": "2015-05-01T07:00:55+00:00" - }, { "name": "phpoption/phpoption", "version": "1.9.2", -- GitLab From f7266d129325469a0f3db67e1a8767062ca20f5a Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 22:32:06 -0600 Subject: [PATCH 17/22] Archivo no funcional --- app/Imports/ContactosImport.php | 74 --------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 app/Imports/ContactosImport.php diff --git a/app/Imports/ContactosImport.php b/app/Imports/ContactosImport.php deleted file mode 100644 index ccde326..0000000 --- a/app/Imports/ContactosImport.php +++ /dev/null @@ -1,74 +0,0 @@ - $row['nombre'], - // otros campos de contacto - ]); - - // Procesar teléfonos - $prefijos = explode(';', $row['prefijo']); - $ladas = explode(';', $row['lada']); - $numeros = explode(';', $row['numero']); - $tipos = explode(';', $row['tipo']); - $estatuses = explode(';', $row['estatus']); - $exts = explode(';', $row['ext']); - $id_radios = explode(';', $row['id_radio']); - $observaciones = explode(';', $row['observaciones']); - - for ($i = 0; $i < count($prefijos); $i++) { - if ($prefijos[$i] != 'null' || $ladas[$i] != 'null' || $numeros[$i] != 'null') { - Telefono::create([ - 'contacto_id' => $contacto->id, - 'prefijo' => $prefijos[$i], - 'lada' => $ladas[$i], - 'numero' => $numeros[$i], - 'tipo' => $tipos[$i], - 'estatus' => $estatuses[$i], - 'ext' => $exts[$i], - 'id_radio' => $id_radios[$i], - 'observaciones' => $observaciones[$i], - ]); - } - } - - // Procesar redes sociales - $redes_sociales = explode(';', $row['red_social']); - $tipos_redes_sociales = explode(';', $row['tipo_red_social']); - - for ($i = 0; $i < count($redes_sociales); $i++) { - if ($redes_sociales[$i] != 'null' || $tipos_redes_sociales[$i] != 'null') { - RedesSociales::create([ - 'contacto_id' => $contacto->id, - 'red_social' => $redes_sociales[$i], - 'tipo' => $tipos_redes_sociales[$i], - ]); - } - } - - // Procesar correos electrónicos - $correos = explode(';', $row['correo_electronico']); - $tipos_correos = explode(';', $row['tipo_correo_electronico']); - - for ($i = 0; $i < count($correos); $i++) { - if ($correos[$i] != 'null' || $tipos_correos[$i] != 'null') { - CorreoContactos::create([ - 'contacto_id' => $contacto->id, - 'correo_electronico' => $correos[$i], - 'tipo' => $tipos_correos[$i], - ]); - } - } - } -} \ No newline at end of file -- GitLab From d9cdfe57dfb409a3b0b6407a8b7026f38daf22ce Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 23:27:25 -0600 Subject: [PATCH 18/22] Correcciones --- resources/views/adminGen/contactos/show.blade.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/resources/views/adminGen/contactos/show.blade.php b/resources/views/adminGen/contactos/show.blade.php index 6eaf220..548b660 100644 --- a/resources/views/adminGen/contactos/show.blade.php +++ b/resources/views/adminGen/contactos/show.blade.php @@ -9,7 +9,11 @@ Contacto
  • - {{ $contacto->profesion->abreviatura . ' ' . $contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno}} + @if ($contacto->profesion) + {{ $contacto->profesion->abreviatura . ' ' . $contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno }} + @else + {{$contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno}} + @endif
  • @@ -36,7 +40,12 @@ class="ltr:ml-auto rtl:mr-auto btn btn-primary p-2 rounded-full">
    image -

    {{ $contacto->profesion->abreviatura . ' ' . $contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno}}

    + @if ($contacto->profesion) +

    {{ $contacto->profesion->abreviatura . ' ' . $contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno}}

    + @else +

    {{$contacto->nombre . ' ' . $contacto->ap_paterno . ' ' . $contacto->ap_materno}}

    + @endif +
      @if($contacto->profesion) -- GitLab From 1a2a09f7ffa92a57c8a74c0b443cd1532599b74f Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 23:27:50 -0600 Subject: [PATCH 19/22] Metodo de carga de contactos con csv --- app/Http/Controllers/ContactoController.php | 102 +++++++++++++++++++- 1 file changed, 98 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/ContactoController.php b/app/Http/Controllers/ContactoController.php index 04c6a3f..f148c11 100644 --- a/app/Http/Controllers/ContactoController.php +++ b/app/Http/Controllers/ContactoController.php @@ -15,7 +15,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Str; use Illuminate\Support\Facades\Storage; -use Maatwebsite\Excel\Facades\Excel; +use Illuminate\Support\Facades\Log; class ContactoController extends Controller { @@ -446,14 +446,108 @@ private function correoDataPresent($correosData) return false; } + public function viewUpload() + { + return view('adminGen.contactos.upload'); + } + public function upload(Request $request) { $request->validate([ - 'excel_file' => 'required|mimes:xlsx,xls', + 'csv_file' => 'required|mimes:csv,txt', ]); - Excel::import(new ContactosImport, $request->file('excel_file')); + $path = $request->file('csv_file')->getRealPath(); + $content = file_get_contents($path); + $content = str_replace("\xEF\xBB\xBF", '', $content); + + $data = array_map('str_getcsv', explode("\n", $content)); + $header = array_shift($data); + + foreach ($data as $row) { + if (count($header) !== count($row)) { + continue; + } + $row = array_combine($header, $row); + + $contacto = Contacto::create([ + 'nombre' => $row['nombre'], + 'ap_paterno' => $row['ap_paterno'], + 'ap_materno' => $row['ap_materno'], + 'cargo_desc' => $row['cargo_desc'], + 'mes_cump' => $row['mes_cump'], + 'dia_cump' => $row['dia_cump'], + 'domicilio_oficial' => $row['domicilio_oficial'], + 'codigo_postal' => $row['codigo_postal'], + 'localidad_oficial' => $row['localidad_oficial'], + 'municipio_oficial' => $row['municipio_oficial'], + 'estado' => $row['estado'], + 'pais' => $row['pais'], + 'domicilio_par' => $row['domicilio_par'], + 'codigo_postal_par' => $row['codigo_postal_par'], + 'localidad_par' => $row['localidad_par'], + 'municipio_par' => $row['municipio_par'], + 'estado_par' => $row['estado_par'], + 'pais_par' => $row['pais_par'], + 'finado' => $row['finado'], + 'foto_perfil' => 'assets/images/profile-icon.webp' + ]); + + // Procesar teléfonos + $prefijos = explode(';', $row['prefijo']); + $ladas = explode(';', $row['lada']); + $numeros = explode(';', $row['numero']); + $tipos = explode(';', $row['tipo']); + $estatuses = explode(';', $row['estatus']); + $exts = explode(';', $row['ext']); + $id_radios = explode(';', $row['id_radio']); + $observaciones = explode(';', $row['observaciones']); + + for ($i = 0; $i < count($prefijos); $i++) { + if ($prefijos[$i] != 'null' || $ladas[$i] != 'null' || $numeros[$i] != 'null') { + Telefono::create([ + 'contacto_id' => $contacto->id, + 'prefijo' => $prefijos[$i], + 'lada' => $ladas[$i], + 'numero' => $numeros[$i], + 'tipo' => $tipos[$i], + 'estatus' => $estatuses[$i], + 'ext' => $exts[$i], + 'id_radio' => $id_radios[$i], + 'observaciones' => $observaciones[$i], + ]); + } + } + + // Procesar redes sociales + $redes_sociales = explode(';', $row['red_social']); + $tipos_redes_sociales = explode(';', $row['tipo_red_social']); + + for ($i = 0; $i < count($redes_sociales); $i++) { + if ($redes_sociales[$i] != 'null' || $tipos_redes_sociales[$i] != 'null') { + RedesSociales::create([ + 'contacto_id' => $contacto->id, + 'red_social' => $redes_sociales[$i], + 'tipo_red_social' => $tipos_redes_sociales[$i], + ]); + } + } + + // Procesar correos electrónicos + $correos = explode(';', $row['correo_electronico']); + $tipos_correos = explode(';', $row['tipo_correo_electronico']); + + for ($i = 0; $i < count($correos); $i++) { + if ($correos[$i] != 'null' || $tipos_correos[$i] != 'null') { + CorreoContactos::create([ + 'contacto_id' => $contacto->id, + 'correo_electronico' => $correos[$i], + 'tipo_correo_electronico' => $tipos_correos[$i], + ]); + } + } + } - return redirect()->back()->with('success', 'Archivo Excel subido y procesado correctamente.'); + return redirect()->back()->with('success', 'Archivo CSV subido y procesado correctamente.'); } } -- GitLab From 212cb217bd0ec8808e58fff599ef026f76111a0d Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 23:28:11 -0600 Subject: [PATCH 20/22] Cambio por un biginteger para no tener errores al guardar numeros grandes --- .../migrations/2024_06_30_182925_create_telefonos_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2024_06_30_182925_create_telefonos_table.php b/database/migrations/2024_06_30_182925_create_telefonos_table.php index 78deb2c..ad3a1a9 100644 --- a/database/migrations/2024_06_30_182925_create_telefonos_table.php +++ b/database/migrations/2024_06_30_182925_create_telefonos_table.php @@ -15,7 +15,7 @@ public function up(): void $table->id(); $table->integer('prefijo')->nullable(); $table->integer('lada')->nullable(); - $table->integer('numero')->nullable(); + $table->bigInteger('numero')->nullable(); $table->string('tipo')->nullable(); $table->string('estatus')->nullable(); $table->integer('ext')->nullable(); -- GitLab From 8ee62ec20588cc961e1ad15886090b3b8b57a37f Mon Sep 17 00:00:00 2001 From: Alfonso Rafael Solis Rangel Date: Tue, 2 Jul 2024 23:47:16 -0600 Subject: [PATCH 21/22] Importacion de contactos funcionando --- app/Http/Controllers/ContactoController.php | 2 +- public/assets/formato/data.csv | 4 +++ .../views/adminGen/contactos/upload.blade.php | 29 +++++++++++++++++++ .../components/common/sidebaradmin.blade.php | 13 +++++++++ routes/web.php | 2 ++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 public/assets/formato/data.csv create mode 100644 resources/views/adminGen/contactos/upload.blade.php diff --git a/app/Http/Controllers/ContactoController.php b/app/Http/Controllers/ContactoController.php index f148c11..29921f7 100644 --- a/app/Http/Controllers/ContactoController.php +++ b/app/Http/Controllers/ContactoController.php @@ -548,6 +548,6 @@ public function upload(Request $request) } } - return redirect()->back()->with('success', 'Archivo CSV subido y procesado correctamente.'); + return redirect()->route('contacto.get')->with('success', 'Importación de contactos almacenada correctamente'); } } diff --git a/public/assets/formato/data.csv b/public/assets/formato/data.csv new file mode 100644 index 0000000..bb9b28b --- /dev/null +++ b/public/assets/formato/data.csv @@ -0,0 +1,4 @@ +nombre,ap_paterno,ap_materno,cargo_desc,mes_cump,dia_cump,domicilio_oficial,codigo_postal,localidad_oficial,municipio_oficial,estado,pais,domicilio_par,codigo_postal_par,localidad_par,municipio_par,estado_par,pais_par,finado,prefijo,lada,numero,tipo,estatus,ext,id_radio,observaciones,red_social,tipo_red_social,correo_electronico,tipo_correo_electronico +John,Doe,,Amigo del hijo del C. Gobernador,2,12,Conocido,98000,Zacatecas,Zacatecas,Zacatecas,México,Conocido,98000,Zacatecas,Zacatecas,Zacatecas,México,0,123;124,456;457,7890123456;1234567890,Celular;Fax,Público;Privado,123;124,123;124,Nota 1;Nota 2,http://facebook.com/johndoe;http://twitter.com/johndoe,Facebook;Twitter,johndoe@example.com;johndoe123@example.com,Oficial;Personal +Jane,Smith,,Amigo del hijo del C. Gobernador,10,10,Conocido,98612,Guadalupe,Guadalupe,Zacatecas,México,Conocido,98612,Guadalupe,Guadalupe,Zacatecas,México,1,321;322,654;655,9876543210;1122334455,Particular;Directo,Privado;Público,456;457,456;457,Otra nota 1;Otra nota 2,http://twitter.com/janesmith;http://linkedin.com/janesmith,Twitter;LinkedIn,janesmith@example.com;janesmith123@example.com,Personal;Oficial +Bob ,Johnson,,Amigo del hijo del C. Gobernador,12,2,Conocido,98640,Trancoso,Trancoso,Zacatecas,México,Conocido,98640,Trancoso,Trancoso,Zacatecas,México,0,555;556;557,123;124;125,1112223333;4445556666;7778889999,Radio;Celular;Fax,Público;Privado;Público,101;102;103,555;556;557,Observación 1;Observación 2;Observación 3,http://facebook.com/bobjohnson;http://instagram.com/bobjohnson,Facebook;Instagram,bobjohnson@example.com;bobjohnson123@example.com,Oficial;Personal diff --git a/resources/views/adminGen/contactos/upload.blade.php b/resources/views/adminGen/contactos/upload.blade.php new file mode 100644 index 0000000..af37f56 --- /dev/null +++ b/resources/views/adminGen/contactos/upload.blade.php @@ -0,0 +1,29 @@ + + +
      +
        +
      • + Dashboard +
      • +
      • + Contactos +
      • +
      • + Carga masiva de contactos +
      • +
      +
      + + @csrf +
      + + +
      + + + +
      +
      +
      \ No newline at end of file diff --git a/resources/views/components/common/sidebaradmin.blade.php b/resources/views/components/common/sidebaradmin.blade.php index e67d0ef..37d09fd 100644 --- a/resources/views/components/common/sidebaradmin.blade.php +++ b/resources/views/components/common/sidebaradmin.blade.php @@ -156,6 +156,19 @@ class="ltr:pl-3 rtl:pr-3 text-black dark:text-[#506690] dark:group-hover:text-wh
    +