Skip to content

Commit 114d1be

Browse files
authored
Merge pull request #101 from wcadena/desarrollo_1
Desarrollo 1
2 parents 0f7f489 + daa34fd commit 114d1be

4,421 files changed

Lines changed: 320133 additions & 76378 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.dusk.local

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ APP_DEBUG=true
55
APP_URL=http://inventario3.ecuatask.dev
66
APP_TITLE_PAGE="Inventario de equipos y recursos"
77

8+
ADMIN_USER=Administrador
9+
ADMIN_EMAIL=admin@admin.com
10+
ADMIN_PWD=admin
11+
812
EMP_PRINCIPAL="Ecuatask"
913

1014
LOG_CHANNEL=stack

.env.dusk.testing

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ APP_DEBUG=true
55
APP_URL=http://inventario3.ecuatask.dev
66
APP_TITLE_PAGE="Inventario de equipos y recursos"
77

8+
ADMIN_USER=Administrador
9+
ADMIN_EMAIL=admin@admin.com
10+
ADMIN_PWD=admin
11+
812
EMP_PRINCIPAL="Ecuatask"
913

1014
LOG_CHANNEL=stack

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ APP_DEBUG=true
55
APP_URL=http://inventario3.ecuatask.dev
66
APP_TITLE_PAGE="Inventario de equipos y recursos"
77

8+
ADMIN_USER=Administrador
9+
ADMIN_EMAIL=admin@admin.com
10+
ADMIN_PWD=admin
11+
812
EMP_PRINCIPAL="Ecuatask"
913
LOG_CHANNEL=stack
1014

.env.testing

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ APP_DEBUG=true
55
APP_URL=http://localhost:8000
66
APP_TITLE_PAGE="Inventario de equipos y recursos"
77

8+
9+
ADMIN_USER=Administrador
10+
ADMIN_EMAIL=admin@admin.com
11+
ADMIN_PWD=admin
12+
813
EMP_PRINCIPAL="Ecuatask"
914
LOG_CHANNEL=stack
1015

.env.travis

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ APP_DEBUG=true
55
APP_URL=http://localhost:8000
66
APP_TITLE_PAGE="Inventario de equipos y recursos"
77

8+
9+
ADMIN_USER=Administrador
10+
ADMIN_EMAIL=admin@admin.com
11+
ADMIN_PWD=admin
12+
813
EMP_PRINCIPAL="Ecuatask"
914
LOG_CHANNEL=stack
1015

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/node_modules
2-
/html/hot
3-
/html/storage
4-
/html/.well-known
2+
/node_modules_otro
3+
/public/hot
4+
/public/storage
5+
/public/.well-known
56
/storage/*.key
7+
/storage/*files
68
/vendor
79
/.idea
810
/.vagrant

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Contribuir a InventarioFinalApp
2-
Damos las gracias y bienvenidas sean todas las correcciones y mejoras en el desarrollo del código de InventarioFinalApp, pruebas y documentación.
1+
## Contribuir a gestor-inventarios-it
2+
Damos las gracias y bienvenidas sean todas las correcciones y mejoras en el desarrollo del código de gestor-inventarios-it, pruebas y documentación.
33
Esta guía detalla como contribuir en el proyecto de una manera que sea eficiente para toda la comunidad.
44

55

@@ -15,7 +15,7 @@ Esta guía detalla como contribuir en el proyecto de una manera que sea eficient
1515

1616
### 1. Prerequisitos
1717

18-
1.1 [Leer el Manual de InventarioFinalApp](/docs/InventarioFinalApp.docx)
18+
1.1 [Leer el Manual de gestor-inventarios-it](/docs/gestor-inventarios-it.docx)
1919
En costrucción
2020

2121
1.2 Tener clara la normalización de código fuente
@@ -27,15 +27,15 @@ En costrucción
2727

2828
### 2. Preparación de ambiente local
2929

30-
2.1 Realizar Fork del repositorio https://github.com/wcadena/inventarioFinalApp a tu cuenta GitHub
30+
2.1 Realizar Fork del repositorio https://github.com/wcadena/gestor-inventarios-it a tu cuenta GitHub
3131

3232
2.2 Clonar el proyecto forkeado desde tu cuenta GitHub. Ejemplo:
3333
```console
34-
https://github.com/wcadena/inventarioFinalApp.git
34+
https://github.com/wcadena/gestor-inventarios-it.git
3535
```
3636
2.3 Agregar el repositorio padre como origen remoto. Ejemplo:
3737
```console
38-
git remote add upstream https://github.com/wcadena/inventarioFinalApp.git
38+
git remote add upstream https://github.com/wcadena/gestor-inventarios-it.git
3939
```
4040
2.4 Luego de clonado el proyecto, crear la rama beta para empezar a trabajar. Ejemplo:
4141
```console
@@ -130,7 +130,7 @@ contáctese con nosotros al correo wcadena@outlook.com
130130

131131
## Traducción
132132

133-
Las traducciones se hacen a partir del [repo original](https://github.com/wcadena/inventarioFinalApp). Los aportes de traducción pueden ser de diferentes maneras:
133+
Las traducciones se hacen a partir del [repo original](https://github.com/wcadena/gestor-inventarios-it). Los aportes de traducción pueden ser de diferentes maneras:
134134

135135
1. Traducir los términos pendientes o nuevos.
136136
2. Corregir traducciones existentes.
@@ -141,7 +141,7 @@ Sin embargo, al traducir queremos utilizar un español internacional.
141141
142142
## Flujo de Trabajo
143143

144-
1. Busca una traducción pendiente en la columna TODO: [ver traducciones pendientes](https://github.com/wcadena/inventarioFinalApp/pendientes).
144+
1. Busca una traducción pendiente en la columna TODO: [ver traducciones pendientes](https://github.com/wcadena/gestor-inventarios-it/pendientes).
145145
2. Asegúrate que nadie esté trabajando en él (te puedes dar cuenta viendo que no haya nadie asignado ni nadie ha comentado que está trabajando).
146146
3. Sigue las reglas descritas abajo y crea tu PR.
147147

app/Exceptions/Handler.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Illuminate\Database\QueryException;
1212
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
1313
use Illuminate\Session\TokenMismatchException;
14+
use Illuminate\Support\Facades\Session;
1415
use Illuminate\Validation\ValidationException;
1516
use Symfony\Component\HttpKernel\Exception\HttpException;
1617
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
@@ -66,6 +67,12 @@ public function render($request, Exception $exception)
6667
public function handleException($request, Exception $exception)
6768
{
6869
if (config('app.debug') && !$request->is('api/*')) {
70+
if ($exception instanceof TokenMismatchException) {
71+
Session::flash('TokenMismatchException_ev', true);
72+
73+
return redirect('/login?TokenMismatchException_ev=true');
74+
}
75+
6976
return parent::render($request, $exception);
7077
}
7178
if ($exception instanceof ValidationException) {

app/FileEntry.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace App;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
use Illuminate\Database\Eloquent\SoftDeletes;
7+
8+
class FileEntry extends Model
9+
{
10+
use SoftDeletes;
11+
protected $dates = ['deleted_at'];
12+
protected $fillable = ['vinculo', 'vinculo_padre', 'filename', 'mime', 'path', 'size', 'user_id', 'tipo', 'imageable_type', 'imageable_id'];
13+
14+
/**
15+
* Get all of the owning imageable models or files.
16+
*/
17+
public function imageable()
18+
{
19+
return $this->morphTo();
20+
}
21+
}

app/Http/Controllers/Auth/ForgotPasswordController.php

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use App\Http\Controllers\Controller;
66
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
7-
use Illuminate\Http\JsonResponse;
8-
use Illuminate\Http\Request;
9-
use Illuminate\Support\Facades\Password;
107

118
class ForgotPasswordController extends Controller
129
{
@@ -20,84 +17,8 @@ class ForgotPasswordController extends Controller
2017
| your application to your users. Feel free to explore this trait.
2118
|
2219
*/
23-
2420
use SendsPasswordResetEmails;
2521

26-
/**
27-
* Send a reset link to the given user.
28-
*
29-
* @param \Illuminate\Http\Request $request
30-
*
31-
* @return \Illuminate\Http\RedirectResponse
32-
*/
33-
public function sendResetLinkEmail(Request $request)
34-
{
35-
$this->validateEmail($request);
36-
37-
// We will send the password reset link to this user. Once we have attempted
38-
// to send the link, we will examine the response then see the message we
39-
// need to show to the user. Finally, we'll send out a proper response.
40-
$response = $this->broker()->sendResetLink(
41-
$request->only('email')
42-
);
43-
44-
return $response == Password::RESET_LINK_SENT
45-
? $this->sendResetLinkResponse($request, $response)
46-
: $this->sendResetLinkFailedResponse($request, $response);
47-
}
48-
49-
/**
50-
* Get the response for a successful password reset link.
51-
*
52-
* @param string $response
53-
*
54-
* @return mixed
55-
*/
56-
protected function sendResetLinkResponse(Request $request, $response)
57-
{
58-
if ($request->expectsJson()) {
59-
return response()->json([
60-
'status' => trans($response),
61-
]);
62-
}
63-
64-
return back()->with('status', trans($response));
65-
}
66-
67-
/**
68-
* Get the response for a failed password reset link.
69-
*
70-
* @param Request $request
71-
* @param $response
72-
*
73-
* @return mixed
74-
*/
75-
protected function sendResetLinkFailedResponse(Request $request, $response)
76-
{
77-
if ($request->expectsJson()) {
78-
return new JsonResponse([
79-
'message' => 'The given data was invalid.',
80-
'errors' => [
81-
'email' => trans($response),
82-
],
83-
], 422);
84-
}
85-
86-
return back()->withErrors(
87-
['email' => trans($response)]
88-
);
89-
}
90-
91-
/**
92-
* Display the form to request a password reset link.
93-
*
94-
* @return \Illuminate\Http\Response
95-
*/
96-
public function showLinkRequestForm()
97-
{
98-
return view('adminlte::auth.passwords.email');
99-
}
100-
10122
/**
10223
* Create a new controller instance.
10324
*

0 commit comments

Comments
 (0)