-
Notifications
You must be signed in to change notification settings - Fork 0
Add -Create user- page #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ayudame a revisar esos comentarios porfa.
src/server/src/routes/user.php
Outdated
| $second = $request->getParam("second"); | ||
|
|
||
| $data=join('|-|', array($name, $middle, $last, $second)); | ||
| $editor = 100000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya tenemos $_SESSION['id_employee'], hay que cambiar esto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listo se ha implementado, se hizo la prueba y se ha insertado correctamente en la DB
src/server/src/routes/user.php
Outdated
| $status->code = 200; | ||
| $status->message = 'User created'; | ||
| } else { | ||
| $status->code = 404; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto no es error 404, nos deberia de regresar los siguientes errores:
- Datos proporcionados son nvalidos
- Error del servidor, usuario no creado
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
se asignaron los siguientes errores:
*500 = 'Server error, user not created';
*201 = 'User created';
- 504 = 'Gateway timeout, user not created'; -> este ultimo como error por default.
El de datos proporcionados son invalidos no lo puse ya que no busca una información y cuando esta app sea ya implmentada en el modulo completo la información no tendrá que ser ingersada por el usuario.
Están bien esos códigos ??
src/server/src/routes/user.php
Outdated
| $response_obj = new stdClass(); | ||
|
|
||
| if (count($results) > 0) { | ||
| $user->cun = $results[0]->cun; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Que es cun?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
como le llame a la variable que tiene el valor de usuario creado, no hay necesidad de cambiar el nombre ? (le dejo como user?)
| var status = response.status.code; | ||
| var message = response.status.message; | ||
|
|
||
| if (status == 404) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arreglar esto en baso a los errores que nos devuelva, seria mejor en un switch no? que opinas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sip, ya que se metieorn 3 codigos ya lo cambio por un switch de acuerdo a los códigos anteriores.
| @@ -0,0 +1,33 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto ya esta englobado en un Doctype HTML, solo hay que tenerlo en un DIV
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listo ya se hicierón las correcciones
| line-height: 1; | ||
| } | ||
|
|
||
| .contenedor-form input[type="text"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estamos duplicando CSS que no se necesita, remover el css innecesario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry hice un copy-paste y me traje css e imagenes inecesarias, ya fueron eliminados.
| position: relative; | ||
| } | ||
|
|
||
| .logo-div img{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Las imagenes no se necesitan importar aqui dentro de la app, en beliveo-files hay una carpeta de imagenes, de ahi hay que sacarlas porfa.
|
Recuerda hacer |
| case 500: | ||
| alert(message); | ||
| break; | ||
| case 504: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Porque estamos tomando este error?
| @@ -0,0 +1,28 @@ | |||
| <head> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Las paginas no deben de llevar guiones bajos por estandar, ayudame a cambiarlo a create-user porfa
| </div> | ||
| </div> | ||
| </div> | ||
| <script type="text/javascript" src="src/client/pages/create_user/js/functions.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cuando cambies el nombre de la pagina asegurate de que todo siga funcionando.
What does this PR do?
Where should the reviewer start?
How should this be manually tested? (if applies)
1️⃣ download and import 'dump'
2️⃣ download personnel repository
3️⃣ create a new user in the app
4️⃣ insert this user in -> e_employee table -> personnel squema
5️⃣ logout
6️⃣ login with the new user