Skip to content

Conversation

@PaolaMartinezBeliveo
Copy link
Contributor

What does this PR do?

  • Add 'create new user' page-app

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

Copy link

@ghost ghost left a 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.

$second = $request->getParam("second");

$data=join('|-|', array($name, $middle, $last, $second));
$editor = 100000;
Copy link

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

Copy link
Contributor Author

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

$status->code = 200;
$status->message = 'User created';
} else {
$status->code = 404;
Copy link

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:

  1. Datos proporcionados son nvalidos
  2. Error del servidor, usuario no creado

Copy link
Contributor Author

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 ??

$response_obj = new stdClass();

if (count($results) > 0) {
$user->cun = $results[0]->cun;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Que es cun?

Copy link
Contributor Author

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) {
Copy link

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?

Copy link
Contributor Author

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>
Copy link

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

Copy link
Contributor Author

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"],
Copy link

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.

Copy link
Contributor Author

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{
Copy link

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.

@ghost
Copy link

ghost commented Feb 13, 2018

Recuerda hacer git pull para arreglar los conflictos

case 500:
alert(message);
break;
case 504:
Copy link
Owner

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>
Copy link
Owner

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>
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants