This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .main-container { | |
| background: #ddddd; | |
| height: 100vh; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| &__box { | |
| background: white; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS | |
| /** | |
| * Autor - Romario Augusto Estrada Fl贸rez -romarioestrada.ff@hotmail.com | |
| * [generaConsecutivo Genera el consecutivo de cualquier cifra con ceros antes del valor o no. | |
| * Ejemplo: 002, genera el string 003, si viene 999, genera el 1000, si viene 099, genera el 100.] | |
| * @param {[String]} ultimoConsecutivo [el consecutivo en string.] | |
| * @return {[String]} [el consecutivo sumado en uno.] | |
| */ | |
| function generaNuevoConsecutivo(ultimoConsecutivo) { | |
| var cantidadCaracteresConsecutivo = ultimoConsecutivo.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Autor - Romario Augusto Estrada Fl贸rez -romarioestrada.ff@hotmail.com | |
| * [existTheValue reviza que una variable no est茅 vac铆a.] | |
| * @param {[Array, String, Integer, Float...]} value [El valor de la variable] | |
| * @return {[Boolean]} [Returna true si existe, false si no] | |
| */ | |
| var existTheValue = function(value) { | |
| if ((value == '') || (value == null) || (value == undefined) || (value == [])) { | |
| return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var empleadosByUser = []; | |
| var termino = false; | |
| /** | |
| * Autor - Romario Augusto Estrada Fl贸rez -romarioestrada.ff@hotmail.com | |
| * [recursividad Esta funci贸n hace que se vayan agregando empleados a un usuario, cada vez que en cuentre uno dentro de otro. | |
| Ejemplo JSON = { | |
| "Usuario": "Moni", | |
| "Area": "Sistemas", | |
| "Jefe": "Sopo", | |
| "IdUsuario": "8", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * [uniquesArraySimply Duvelve un arreglo sencillo sin items repetidos: | |
| example : arreglo ENVIADO = ['1',0,1,'2'] | |
| arreglo RETURN = [0,1,'2']] | |
| * @param {[Array]} arr [El areglo normalito.] | |
| * @return {[Array]} [El arreglo sin indices repetidos] | |
| */ | |
| var function = uniquesArraySimply(arr) { | |
| var a = []; | |
| for (var i = 0, l = arr.length; i < l; i++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Autor - Romario Augusto Estrada Fl贸rez - romarioestrada.ff@hotmail.com | |
| * [quitarItemsRepetidos quita los items repetidos de un array con indice de tipo JSON seg煤n | |
| el campo que tu digas que debe ser 煤nico. | |
| * var data = [{ "name": "Lenovo Thinkpad 41A4298", "website": "google" }, | |
| { "name": "Lenovo Thinkpad 41A2222", "website": "google" }, | |
| { "name": "Lenovo Thinkpad 41Awww33", "website": "yahoo" }, | |
| { "name": "Lenovo Thinkpad 41A424448", "website": "google" }, | |
| { "name": "Lenovo Thinkpad 41A429rr8", "website": "ebay" }, | |
| { "name": "Lenovo Thinkpad 41A429ff8", "website": "ebay" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Autor - Romario Augusto Estrada Fl贸rez -romarioestrada.ff@hotmail.com | |
| * [generaCodigo genera c贸digo aleatorio alfanum茅rico.] | |
| * @param {[int]} longitud [Se dice de que longitud quiere el c贸digo] | |
| * @return {[string]} [el codigo generado] | |
| */ | |
| function generaCodigo(longitud) { | |
| var caracteres = "abcdefghijkmnpqrtuvwxyzABCDEFGHIJKLMNPQRTUVWXYZ2346789"; | |
| var contrasena = ""; | |
| for (i = 0; i < longitud; i++) contrasena += caracteres.charAt(Math.floor(Math.random() * caracteres.length)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Romario Augusto Estrada Fl贸rez - romarioestrada.ff@hotmail.com | |
| * [quitSpacesOfAstring Convierte una linea de string a una cadena sin espacios.] | |
| * @param {[String]} str [la cadena de texto a la que se quiere quitar los espacios] | |
| * @return {[String]} [retrna cadena de string sin espacios] | |
| */ | |
| var quitSpacesOfAstring = function(str) { | |
| var cadena = ''; | |
| var arrayString = str.split(' '); | |
| for (var i = 0; i < arrayString.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Romario Augusto Estrada Fl贸rez - romarioestrada.ff@hotmail.com | |
| * [ArrayMakeStringCSV esta funci贸n recibe un arreglo y el nombre de la propiedad, | |
| * de la cual quiere armar un string separado por comas. | |
| * example : recibe -> [{id: 2, nombre:'algo'}, {id: 1, nombre:'algo 2'}]] | |
| * si envian ese arreglo y le dicen el nombre del campo 'id' (arrerglo, 'id'), | |
| * devolver谩: '2,1'; | |
| * @param {[Array]} arreglo [El arreglo de items tipo Object] | |
| * @param {[String]} nombreCampo [el nombre de la propiedad] | |
| * @return {[String]} [Una cadena separada por comas] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Autor - Romario Estrada - romarioestrada.ff@hotmail.com | |
| * [desbarataFecha recibe fecha en formato mes / dia / a帽o -> 3/12/2017] | |
| * @param {[String]} fecha [fecha] | |
| * @return {[JSON]} [fecha partida en un JSON] | |
| */ | |
| var desbarataFecha = function(fecha) { | |
| var respuesta = { day: null, month: null, year: null }; | |
| arrayFecha = fecha.split("/"); | |
| respuesta.day = parseInt(arrayFecha[1]); |
NewerOlder