Last active
May 6, 2022 01:56
-
-
Save HugoRoca/3ad9e3f7e78ee9a0bb53a7be9a314c7f to your computer and use it in GitHub Desktop.
System for register postulant for a new process
This file contains 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
Algoritmo VISTONY_RECLUTER | |
// Start: Variables for simulation load of DB | |
Definir userLengthTable, roleLengthTable, postulantLengthTable, processLengthTable Como Entero; | |
Definir userTable, roleTable, postulantTable, processTable Como Caracter; | |
// Normal definitions | |
Definir username, password, role, optionMenu, screenName Como Caracter; | |
Definir existsUser Como Logico; | |
Definir postulantId, postulantNames, postulantDocumentType, postulantDocument, postulantPhone, postulantEmail Como Caracter; | |
Definir screenLogout, screenRegisterPostulant, screenSearch, screenNewIncorporationProcess, screenSearchProcess Como Caracter; | |
Definir closeAll Como Logico; | |
// Start create databases | |
userLengthTable = 3; | |
roleLengthTable = 5; | |
postulantLengthTable = 20; | |
processLengthTable = 10; | |
Dimension userTable[userLengthTable, 3]; | |
Dimension roleTable[roleLengthTable, 4]; | |
Dimension postulantTable[postulantLengthTable, 13]; | |
Dimension processTable[processLengthTable, 6]; | |
createUsers(userTable, userLengthTable); | |
createRoles(roleTable, roleLengthTable); | |
createPostulants(postulantTable, postulantLengthTable); | |
createProcess(processTable); | |
// End | |
// Start initialize definitions | |
closeAll = Falso; | |
screenLogout = "screenLogout"; | |
screenRegisterPostulant = "screenRegisterPostulant"; | |
screenSearch = "screenSearch"; | |
screenNewIncorporationProcess = "screenNewIncorporationProcess"; | |
screenSearchProcess = "screenSearchProcess"; | |
// END | |
username = login(userTable, userLengthTable); | |
role = findDataAndReturnOneValue(userTable, userLengthTable, username, 1, 3); | |
// optionMenu <- selectMenuByRole(role, rolesTable, roleLengthTable, Verdadero); | |
screenWelcome(username, role); | |
Mientras closeAll == Falso Hacer | |
optionMenu <- selectMenuByRole(role, roleTable, roleLengthTable); | |
screenName <- getScreenByRole(roleTable, roleLengthTable, optionMenu, role); | |
Segun screenName | |
screenLogout: | |
logout(); | |
username = login(userTable, userLengthTable); | |
role = findDataAndReturnOneValue(userTable, userLengthTable, username, 1, 3); | |
screenWelcome(username, role); | |
screenRegisterPostulant: | |
showScreenRegisterPostulant(postulantTable, postulantLengthTable); | |
screenWelcome(username, role); | |
screenSearch: | |
showScreenSearch(postulantTable, postulantLengthTable, Falso, "", "", processTable, processLengthTable); | |
screenWelcome(username, role); | |
screenNewIncorporationProcess: | |
showScreenNewIncorporationProcess(processTable, processLengthTable); | |
screenWelcome(username, role); | |
screenSearchProcess: | |
showScreenSearchProcess(processTable, processLengthTable, postulantTable, postulantLengthTable); | |
screenWelcome(username, role); | |
De Otro Modo: | |
Escribir "*** INGRESE UNA OPCION VALIDA ***"; | |
FinSegun | |
// closeAll = Verdadero; | |
FinMientras | |
FinAlgoritmo | |
SubProceso return<-login(usersTable, userLengthTable) | |
Definir username, password, role, return Como Caracter; | |
Definir existsUser Como Logico; | |
printTitlePage("B I E N V E N I D O S A V I S T O N Y R E C L U T E R", Falso); | |
username <- validateFieldsEmpty("- Ingrese usuario:"); | |
password <- validateFieldsEmpty("- Ingrese su contrasenia:"); | |
existsUser <- validateUser(usersTable, userLengthTable, username, password); | |
Mientras existsUser == Falso Hacer | |
printMessage("USUARIO O CONTRASENIA INCORRECTA, INTENTELO NUEVAMENTE", Verdadero); | |
username <- validateFieldsEmpty("- Ingrese usuario:"); | |
password <- validateFieldsEmpty("- Ingrese su contrasenia:"); | |
existsUser <- validateUser(usersTable, userLengthTable, username, password); | |
FinMientras | |
return = username; | |
FinSubProceso | |
// method for print in sreen | |
// return: null | |
SubProceso logout() | |
Escribir "La sesion se cerrara en..."; | |
Esperar 500 Milisegundos; | |
Escribir "3"; | |
Esperar 500 Milisegundos; | |
Escribir "2"; | |
Esperar 500 Milisegundos; | |
Escribir "1"; | |
Esperar 500 Milisegundos; | |
Limpiar Pantalla; | |
FinSubProceso | |
SubProceso printTitlePage(value Por Valor, showBack Por Valor) | |
Limpiar Pantalla; | |
Escribir "+", repitValues("-", 115), "+"; | |
Definir length, middleStart Como Entero; | |
length = 115 - Longitud(value); | |
middleStart = Trunc(length / 2); | |
Escribir "|", fillWithEspacesBlank(" ", middleStart), value, fillWithEspacesBlank(" ", length - middleStart), "|"; | |
Escribir "+", repitValues("-", 115), "+"; | |
Si showBack == Verdadero Entonces | |
Definir textBack Como Caracter; | |
textBack = "PARA REGRESAR AL MENU ANTERIOR, INGRESE [X] Y LUEGO PRESIONE ENTER"; | |
length = 115 - Longitud(textBack); | |
middleStart = Trunc(length / 2); | |
Escribir "|", fillWithEspacesBlank(" ", middleStart), textBack, fillWithEspacesBlank(" ", length - middleStart), "|"; | |
Escribir "+", repitValues("-", 115), "+"; | |
FinSi | |
FinSubProceso | |
SubProceso printMessage(value Por Valor, isError Por Valor) | |
Definir length, middleStart Como Entero; | |
Definir text Como Caracter; | |
Si isError == Verdadero Entonces | |
length = 108 - Longitud(value); | |
text = Concatenar(Concatenar(" ERROR: ", value), " "); | |
SiNo | |
length = 115 - Longitud(value); | |
text = Concatenar(Concatenar(" ", value), " "); | |
FinSi | |
middleStart = Trunc(length / 2); | |
Escribir repitValues("*", middleStart), text, repitValues("*", length - middleStart); | |
FinSubProceso | |
// method for print in screen | |
// return: null | |
SubProceso screenWelcome(username Por Valor, rol Por Valor) | |
printTitlePage("BIENVENIDO{A} AL SISTEMA VISTONY RECLUTER", Falso); | |
Escribir " HOLA ", Mayusculas(username), " - ROL: ", Mayusculas(rol); | |
Escribir ""; | |
FinSubProceso | |
SubProceso showLine() | |
Escribir "+---------------------------------------------------------------+"; | |
FinSubProceso | |
SubProceso showScreenRegisterPostulant(postulantTable Por Referencia, postulantLengthTable Por Valor) | |
Definir namesPostulant, birthDatePostulant, documentNumberPostulant, documentTypePostulant, phoneNumberPostulant, emailPostulant, covidVaccinePostulant Como Caracter; | |
Definir messages, input Como Caracter; | |
Definir i, documentLength, findPostulantId Como Entero; | |
Definir allDataIsOk, validIsNumber Como Logico; | |
printTitlePage("PANTALLA DE REGISTRO DE POSTULANTE", Verdadero); | |
allDataIsOk = Falso; | |
Dimension messages[6]; | |
messages[1] = "- Ingrese tipo de documento del postulante, indicar si es DNI o CE:"; | |
messages[2] = "- Ingrese numero de documento del postulante:"; | |
messages[3] = "- Ingrese nombres completos del postulante:"; | |
messages[4] = "- Ingrese fecha de nacimiento: (dd/mm/yyyy)"; | |
messages[5] = "- Ingrese numero de celular del postulante:"; | |
messages[6] = "- Ingrese email del postulante:"; | |
// messages[7] = "- Tienes las 3 dosis contra la COVID-19? Indicar SI o NO."; | |
i = 1; | |
Mientras Mayusculas(input) <> "X" & allDataIsOk = Falso Hacer | |
input = validateFieldsEmpty(messages[i]); | |
Si Mayusculas(input) <> "X" Entonces | |
Segun i Hacer | |
1: | |
input = Mayusculas(input); | |
Si input == "DNI" O input == "CE" Entonces | |
Si input == "DNI" Entonces | |
documentLength = 8; | |
messages[i + 1] = "- Ingrese DNI del postulante: (8 digitos)"; | |
SiNo | |
documentLength = 12; | |
messages[i + 1] = "- Ingrese CE del postulante: (12 digitos)"; | |
FinSi | |
documentTypePostulant = input; | |
SiNo | |
printMessage(Concatenar(input, " NO ES UN VALOR ADMITIDO COMO TIPO DE DOCUMENTO"), Verdadero); | |
i = i - 1; | |
FinSi | |
2: | |
Si Longitud(input) == documentLength Entonces | |
Si isNumber(input) == Verdadero Entonces | |
findPostulantId = searchPostulant(postulantTable, postulantLengthTable, input, documentTypePostulant); | |
Si findPostulantId == 0 Entonces | |
documentNumberPostulant = input; | |
SiNo | |
printMessage("EL DOCUMENTO YA SE ENCUENTRA REGISTRADO EN EL SISTEMA, POR FAVOR INTENTE CON OTRO", Verdadero); | |
printMessage("PRESIONE CUALQUIER TECLA PARA CONTINUAR CON OTRO REGISTRO", Falso); | |
i = 0; | |
Esperar Tecla; | |
printTitlePage("PANTALLA DE REGISTRO DE POSTULANTE", Verdadero); | |
FinSi | |
SiNo | |
printMessage("EL VALOR INGRESADO DEBE SER SOLO NUMEROS", Falso); | |
i = i - 1; | |
FinSi | |
SiNo | |
printMessage(Concatenar(Concatenar("EL VALOR INGRESADO DEBE DE TENER ", ConvertirATexto(documentLength)), " DIGITOS"), Verdadero); | |
i = i - 1; | |
FinSi | |
3: | |
namesPostulant = input; | |
4: | |
birthDatePostulant = input; | |
5: | |
validIsNumber = isNumber(input); | |
Si validIsNumber == Falso Entonces | |
printMessage("EL CELULAR SOLO DEBE SER NUMEROS", Verdadero); | |
i = i - 1; | |
SiNo | |
Si Longitud(input) == 9 Entonces | |
// function is number here | |
Si Subcadena(input, 1, 1) == "9" Entonces | |
phoneNumberPostulant = input; | |
SiNo | |
printMessage("EL VALOR INGRESADO DEBE DE EMPEZAR CON `9`", Verdadero); | |
i = i - 1; | |
FinSi | |
SiNo | |
printMessage("EL VALOR INGRESADO DEBE DE TENER 9 DIGITOS", Verdadero); | |
i = i - 1; | |
FinSi | |
FinSi | |
6: | |
emailPostulant = input; | |
allDataIsOk = Verdadero; | |
// 7: | |
// input = Mayusculas(input); | |
// Si input == "SI" O input == "NO" Entonces | |
// covidVaccinePostulant = input; | |
// allDataIsOk = Verdadero; | |
// SiNo | |
// Escribir "*** EL VALOR INGRESADO SOLO DEBE SER SI O NO ***"; | |
// i = i - 1; | |
// FinSi | |
FinSegun | |
i = i + 1; | |
FinSi | |
FinMientras | |
Si allDataIsOk = Verdadero Entonces | |
Definir rowToInsert Como Entero; | |
rowToInsert = getRowForInsert(postulantTable, postulantLengthTable); | |
upsertTable(postulantTable, rowToInsert, 1, Mayusculas(documentTypePostulant)); | |
upsertTable(postulantTable, rowToInsert, 2, documentNumberPostulant); | |
upsertTable(postulantTable, rowToInsert, 3, Mayusculas(namesPostulant)); | |
upsertTable(postulantTable, rowToInsert, 4, birthDatePostulant); | |
upsertTable(postulantTable, rowToInsert, 5, phoneNumberPostulant); | |
upsertTable(postulantTable, rowToInsert, 6, Mayusculas(emailPostulant)); | |
upsertTable(postulantTable, rowToInsert, 7, "SI"); | |
upsertTable(postulantTable, rowToInsert, 8, ConvertirATexto(rowToInsert)); | |
upsertTable(postulantTable, rowToInsert, 9, "REGISTRADO"); | |
// function insert here | |
Escribir "Guardando registro..."; | |
Esperar 500 Milisegundos; | |
Escribir "Guardando registro..."; | |
Esperar 500 Milisegundos; | |
Escribir "El registro fue exitoso!"; | |
Escribir "Para regresar al menu principal, presione cualquier tecla..."; | |
Esperar Tecla; | |
FinSi | |
Limpiar Pantalla; | |
FinSubProceso | |
SubProceso showScreenNewIncorporationProcess(processTable Por Referencia, processLengthTable Por Valor) | |
Definir i, lengthFile Como Entero; | |
Definir input, messages, nameProcess, descriptionProcess, areaProcess, fileProcess, extFile Como Caracter; | |
Definir allDataIsOk Como Logico; | |
printTitlePage("PANTALLA DE CREACION DE NUEVO PROCESO", Verdadero); | |
Dimension messages[5]; | |
messages[1] = "- Ingrese nombre del proceso:"; | |
messages[2] = "- Ingrese una descripcion del puesto:"; | |
messages[3] = "- Ingrese el nombre de area que solicita:"; | |
messages[4] = "- Suba el documento del area que certifica este proceso: (Solo PDF)"; | |
messages[5] = "- "; | |
i = 1; | |
Mientras allDataIsOk == Falso & Mayusculas(input )<> "X" Hacer | |
input = validateFieldsEmpty(messages[i]); | |
Si Mayusculas(input) <> "X" Entonces | |
Segun i Hacer | |
1: | |
nameProcess = input; | |
2: | |
descriptionProcess = input; | |
3: | |
areaProcess = input; | |
4: | |
lengthFile = Longitud(input); | |
extFile = Subcadena(input, lengthFile - 2, lengthFile); | |
Si Mayusculas(extFile) == "PDF" Entonces | |
fileProcess = input; | |
allDataIsOk = Verdadero; | |
SiNo | |
printMessage("ERROR EN EL NOMBRE DE ARCHIVO", Verdadero); | |
i = i - 1; | |
FinSi | |
FinSegun | |
i = i + 1; | |
FinSi | |
FinMientras | |
Si allDataIsOk == Verdadero Entonces | |
Definir idProcess Como Entero; | |
idProcess = getRowForInsert(processTable, processLengthTable); | |
upsertTable(processTable, idProcess, 1, ConvertirATexto(idProcess)); | |
upsertTable(processTable, idProcess, 2, Mayusculas(nameProcess)); | |
upsertTable(processTable, idProcess, 3, descriptionProcess); | |
upsertTable(processTable, idProcess, 4, Mayusculas(areaProcess)); | |
upsertTable(processTable, idProcess, 5, Mayusculas(fileProcess)); | |
upsertTable(processTable, idProcess, 6, "ACTIVO"); | |
Escribir "Guadando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Guardando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Datos registrados!"; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
FinSubProceso | |
SubProceso showScreenSearch(postulantTable Por Referencia, lengthPostulantTable Por Valor, allDataIsOk Por Valor, documentType Por Valor, documentNumber Por Valor, processTable Por Referencia, processLengthTable Por Valor) | |
Definir idPostulant, i, j, documentLength Como Entero; | |
Definir messages, optionsToDo, input, stateProcess, nameProcess Como Caracter; | |
Dimension messages[2]; | |
messages[1] = "- Ingrese tipo de documento del postulante, indicar si es DNI o CE:"; | |
messages[2] = "- Ingrese numero de documento del postulante:"; | |
printTitlePage("PANTALLA DE BUSQUEDA DE POSTULANTE", Verdadero); | |
i = 1; | |
Mientras Mayusculas(input) <> "X" & allDataIsOk = Falso Hacer | |
input = validateFieldsEmpty(messages[i]); | |
Si Mayusculas(input) <> "X" Entonces | |
Segun i Hacer | |
1: | |
input = Mayusculas(input); | |
Si input == "DNI" O input == "CE" Entonces | |
Si input == "DNI" Entonces | |
documentLength = 8; | |
messages[i + 1] = "- Ingrese DNI del postulante: (8 digitos)"; | |
SiNo | |
documentLength = 12; | |
messages[i + 1] = "- Ingrese CE del postulante: (12 digitos)"; | |
FinSi | |
documentType = input; | |
SiNo | |
printMessage(Concatenar(input, "NO ES UN VALOR ADMITIDO COMO TIPO DE DOCUMENTO"), Verdadero); | |
i = i - 1; | |
FinSi | |
2: | |
Si Longitud(input) == documentLength Entonces | |
documentNumber = input; | |
allDataIsOk = Verdadero; | |
SiNo | |
printMessage(Concatenar(Concatenar("EL VALOR INGRESADO DEBE DE TENER ", ConvertirATexto(documentLength)), " DIGITOS"), Verdadero); | |
i = i - 1; | |
FinSi | |
FinSegun | |
i = i + 1; | |
FinSi | |
FinMientras | |
Si allDataIsOk == Verdadero Entonces | |
Definir retry Como Caracter; | |
idPostulant = searchPostulant(postulantTable, lengthPostulantTable, documentNumber, documentType); | |
Si idPostulant == 0 Entonces | |
printMessage("INFO: EL POSTULANTE NO EXISTE", Falso); | |
Escribir("- ¿Desea realizar otra busqueda? Escriba SI para continuar.."); | |
Leer retry; | |
Si Mayusculas(retry) == "SI" Entonces | |
showScreenSearch(postulantTable, lengthPostulantTable, Falso, "", "", processTable, processLengthTable); | |
showLine(); | |
FinSi | |
SiNo | |
stateProcess = findDataAndReturnOneValue(processTable, 10, postulantTable[idPostulant, 12], 1, 6); | |
nameProcess = findDataAndReturnOneValue(processTable, 10, postulantTable[idPostulant, 12], 1, 2); | |
Escribir ""; | |
Escribir "Datos principales:"; | |
Escribir "+", repitValues("-", 6), "+", repitValues("-", 14), "+", repitValues("-", 35), "+", repitValues("-", 12), "+", repitValues("-", 11), "+", repitValues("-", 32), "+"; | |
Escribir "| Tipo | Documento ", fillWithEspacesBlank("| Nombres ", 36), "| Nacimiento |", " Celular |", fillWithEspacesBlank(" Email", 32), "|"; | |
Escribir "+", repitValues("-", 6), "+", repitValues("-", 14), "+", repitValues("-", 35), "+", repitValues("-", 12), "+", repitValues("-", 11), "+", repitValues("-", 32), "+"; | |
Escribir "| ", fillWithEspacesBlank(postulantTable[idPostulant, 1], 5), "| ", fillWithEspacesBlank(postulantTable[idPostulant, 2], 13), "| ", fillWithEspacesBlank(postulantTable[idPostulant, 3], 34), "| ", fillWithEspacesBlank(postulantTable[idPostulant, 4], 11) , "| ", fillWithEspacesBlank(postulantTable[idPostulant, 5], 10), "| ", fillWithEspacesBlank(postulantTable[idPostulant, 6], 31), "|"; | |
Escribir "+", repitValues("-", 6), "+", repitValues("-", 14), "+", repitValues("-", 35), "+", repitValues("-", 12), "+", repitValues("-", 11), "+", repitValues("-", 32), "+"; | |
Escribir ""; | |
Escribir "Datos secundarios: "; | |
Escribir "+", repitValues("-", 33), "+", repitValues("-", 40), "+", repitValues("-", 40), "+"; | |
Escribir "| ", fillWithEspacesBlank("Estado", 32), "| ", fillWithEspacesBlank("Curriculum", 39), "| ", fillWithEspacesBlank("Legajos", 39), "|"; | |
Escribir "+", repitValues("-", 33), "+", repitValues("-", 40), "+", repitValues("-", 40), "+"; | |
Escribir "| ", fillWithEspacesBlank(postulantTable[idPostulant, 9], 32), "| ", fillWithEspacesBlank(postulantTable[idPostulant, 10], 39), "| ", fillWithEspacesBlank(postulantTable[idPostulant, 11], 39), "|"; | |
Escribir "+", repitValues("-", 33), "+", repitValues("-", 40), "+", repitValues("-", 40), "+"; | |
Escribir ""; | |
Escribir "En proceso de incorporacion:"; | |
Escribir "+", repitValues("-",60), "+", repitValues("-", 54), "+"; | |
Escribir "| ", fillWithEspacesBlank("Nombre proceso", 59), "| ", fillWithEspacesBlank("Estado proceso", 53), "|"; | |
Escribir "+", repitValues("-",60), "+", repitValues("-", 54), "+"; | |
Escribir "| ", fillWithEspacesBlank(nameProcess, 59), "| ", fillWithEspacesBlank(stateProcess, 53), "|"; | |
Escribir "+", repitValues("-",60), "+", repitValues("-", 54), "+"; | |
Escribir ""; | |
Escribir "- ¿Que le gustaria realizar?"; | |
Dimension optionsToDo[7]; | |
optionsToDo[1] = "1. ¿Desea asignar/reasignar PROCESO?"; | |
optionsToDo[2] = "2. ¿Desea actualizar ESTADO?"; | |
optionsToDo[3] = "3. ¿Desea actualizar DATOS?"; | |
optionsToDo[4] = "4. ¿Desea subir CV?"; | |
optionsToDo[5] = "5. ¿Desea subir LEGAJOS?"; | |
optionsToDo[6] = "6. ¿Desea realizar otra BUSQUEDA?"; | |
optionsToDo[7] = "Si no, ingrese `X` para salir al menu principal."; | |
i = 1; | |
Mientras i = 1 Hacer | |
Para j = 1 Hasta 7 Hacer | |
Escribir optionsToDo[j]; | |
FinPara | |
Escribir ""; | |
retry = validateFieldsEmpty("- Ingrese una opcion:"); | |
Segun Mayusculas(retry) Hacer | |
"1": | |
updateProcessToPostulant(postulantTable, processTable, processLengthTable, idPostulant); | |
showScreenSearch(postulantTable, lengthPostulantTable, Verdadero, documentType, documentNumber, processTable, processLengthTable); | |
i = i + 1; | |
"2": | |
updateStatusPostulant(postulantTable, idPostulant, postulantTable[idPostulant, 9], stateProcess); | |
showScreenSearch(postulantTable, lengthPostulantTable, Verdadero, documentType, documentNumber, processTable, processLengthTable); | |
i = i + 1; | |
"3": | |
updatePostulant(postulantTable, idPostulant); | |
showScreenSearch(postulantTable, lengthPostulantTable, Verdadero, documentType, documentNumber, processTable, processLengthTable); | |
i = i + 1; | |
"4": | |
uploadCV(postulantTable, idPostulant); | |
showScreenSearch(postulantTable, lengthPostulantTable, Verdadero, documentType, documentNumber, processTable, processLengthTable); | |
i = i + 1; | |
"5": | |
uploadLegajo(postulantTable, idPostulant); | |
showScreenSearch(postulantTable, lengthPostulantTable, Verdadero, documentType, documentNumber, processTable, processLengthTable); | |
i = i + 1; | |
"6": | |
showScreenSearch(postulantTable, lengthPostulantTable, Falso, "", "", processTable, processLengthTable); | |
showLine(); | |
i = i + 1; | |
"X": | |
i = i + 1; | |
Escribir "Saliendo al menu principal..."; | |
De Otro Modo: | |
printMessage("OPCION NO VALIDA, CORREGIR", Verdadero); | |
i = 1; | |
FinSegun | |
FinMientras | |
FinSi | |
FinSi | |
FinSubProceso | |
SubProceso updateProcessToPostulant(postulantTable Por Referencia, processTable Por Referencia, processLengthTable Por Valor, idPostulant Por Valor) | |
Definir allDataIsOk Como Logico; | |
Definir i, count Como Entero; | |
Definir input, statusProcessValidate, idProcess Como Caracter; | |
printTitlePage("PANTALLA PARA ASIGNAR PROCESO A POSTULANTE", Verdadero); | |
Escribir "+", repitValues("-", 9), "+", repitValues("-", 53), "+" , repitValues("-", 25), "+", repitValues("-", 25) "+"; | |
Escribir fillWithEspacesBlank("| Codigo", 10), fillWithEspacesBlank("| Nombre Proceso", 54), fillWithEspacesBlank("| Area solicitante", 26), fillWithEspacesBlank("| Estado", 26), "|"; | |
Escribir "+", repitValues("-", 9), "+", repitValues("-", 53), "+" , repitValues("-", 25), "+", repitValues("-", 25) "+"; | |
count = 0; | |
allDataIsOk = Falso; | |
Para i = 1 Hasta processLengthTable Con Paso 1 Hacer | |
Si processTable[i, 6] == "ACTIVO" Entonces | |
count = count + 1; | |
Escribir "| ", fillWithEspacesBlank(processTable[i, 1], 8), "| ", fillWithEspacesBlank(processTable[i, 2], 52), "| ", fillWithEspacesBlank(processTable[i, 4], 24), "| ", fillWithEspacesBlank(processTable[i, 6], 24), "|"; | |
Escribir "+", repitValues("-", 9), "+", repitValues("-", 53), "+" , repitValues("-", 25), "+", repitValues("-", 25) "+"; | |
FinSi | |
FinPara | |
Si count <= 0 Entonces | |
Escribir ""; | |
printMessage("INFO: NO HAY DATOS", Falso); | |
printMessage("INFO: DEBE REGISTRAR PROCESOS PARA ASIGNAR", Falso); | |
SiNo | |
input = validateFieldsEmpty("- Ingrese codigo de proceso para asignar al postulante:"); | |
Mientras allDataIsOk == Falso & Mayusculas(input) <> "X" Hacer | |
Si isNumber(input) == Verdadero Entonces | |
statusProcessValidate = findDataAndReturnOneValue(processTable, processLengthTable, input, 1, 6); | |
Si statusProcessValidate <> "ACTIVO" Entonces | |
printMessage("EL CODIGO DE PROCESO SELECCIONADO NO SE ENCUENTRA ACTIVO, INTENTE DE NUEVO", Verdadero); | |
input = validateFieldsEmpty("- Ingrese codigo de proceso para asignar al postulante:"); | |
SiNo | |
idProcess = postulantTable[idPostulant, 12]; | |
Si idProcess == input Entonces | |
printMessage("ESTE PROCESO YA SE ENCUENTRA ENLAZADO, INTENTE CON OTRO", Falso); | |
input = validateFieldsEmpty("- Ingrese codigo de proceso para asignar al postulante:"); | |
SiNo | |
idProcess = input; | |
input = validateFieldsEmpty("- ¿Esta seguro de asignar enlazar este proceso? (SI / NO)"); | |
Si Mayusculas(input) == "SI" Entonces | |
upsertTable(postulantTable, idPostulant, 12, idProcess); | |
upsertTable(postulantTable, idPostulant, 13, processTable[ConvertirANumero(idProcess), 2]); | |
Escribir "Actualizando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Actualizando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Datos Actualizados!"; | |
allDataIsOk = Verdadero; | |
SiNo | |
input = validateFieldsEmpty("- Ingrese codigo de proceso para asignar al postulante:"); | |
FinSi | |
FinSi | |
FinSi | |
SiNo | |
printMessage("OPCION NO VALIDA", Verdadero); | |
input = validateFieldsEmpty("- Ingrese codigo de proceso para asignar al postulante:"); | |
FinSi | |
FinMientras | |
FinSi | |
Si Mayusculas(input) <> "X" Entonces | |
Escribir ""; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
FinSubProceso | |
SubProceso showScreenSearchProcess(processTable Por Referencia, processLengthTable Por Valor, postulantTable Por Referencia, postulantLengthTable Por Valor) | |
Definir allDataIsOk Como Logico; | |
Definir i, count Como Entero; | |
Definir input, statusProcessValidate, idProcess Como Caracter; | |
printTitlePage("PANTALLA DE LISTADO DE PROCESO ACTIVOS / PAUSADOS", Verdadero); | |
count = 0; | |
Escribir "+", repitValues("-", 9), "+", repitValues("-", 53), "+" , repitValues("-", 25), "+", repitValues("-", 25) "+"; | |
Escribir fillWithEspacesBlank("| Codigo", 10), fillWithEspacesBlank("| Nombre Proceso", 54), fillWithEspacesBlank("| Area solicitante", 26), fillWithEspacesBlank("| Estado", 26), "|"; | |
Escribir "+", repitValues("-", 9), "+", repitValues("-", 53), "+" , repitValues("-", 25), "+", repitValues("-", 25) "+"; | |
Para i = 1 Hasta processLengthTable Con Paso 1 Hacer | |
Si processTable[i, 6] <> "" Entonces | |
count = count + 1; | |
Escribir "| ", fillWithEspacesBlank(processTable[i, 1], 8), "| ", fillWithEspacesBlank(processTable[i, 2], 52), "| ", fillWithEspacesBlank(processTable[i, 4], 24), "| ", fillWithEspacesBlank(processTable[i, 6], 24), "|"; | |
Escribir "+", repitValues("-", 9), "+", repitValues("-", 53), "+" , repitValues("-", 25), "+", repitValues("-", 25) "+"; | |
FinSi | |
FinPara | |
Si count > 0 Entonces | |
Escribir ""; | |
input = validateFieldsEmpty('- Para realizar alguna operacion, ingrese el codigo de proceso:"); | |
Mientras allDataIsOk == Falso & Mayusculas(input) <> "X" Hacer | |
Si isNumber(input) == Verdadero Entonces | |
statusProcessValidate = findDataAndReturnOneValue(processTable, processLengthTable, input, 1, 6); | |
Si statusProcessValidate <> "" Entonces | |
idProcess = input; | |
Mientras allDataIsOk == Falso & Mayusculas(input) <> "X" Hacer | |
Escribir "1. ¿Desea actualizar de estado?"; | |
Escribir "2. ¿Desea ver los postulantes en proceso?"; | |
Escribir "3. ¿Desea seleccionar otro proceso?"; | |
Escribir "- Selecione opcion: "; | |
Leer input; | |
allDataIsOk = Verdadero; | |
Segun input Hacer | |
"1": | |
updateProcess(processTable, idProcess); | |
showScreenSearchProcess(processTable, processLengthTable, postulantTable, postulantLengthTable); | |
"2": | |
showAllPostulantsInProcess(postulantTable, postulantLengthTable, idProcess); | |
showScreenSearchProcess(processTable, processLengthTable, postulantTable, postulantLengthTable); | |
"3": | |
showScreenSearchProcess(processTable, processLengthTable, postulantTable, postulantLengthTable); | |
De Otro Modo: | |
printMessage("OPCION NO VALIDA, CORREGIR", Verdadero); | |
allDataIsOk = Falso; | |
FinSegun | |
FinMientras | |
SiNo | |
printMessage("EL CODIGO DE PROCESO ESTA EN OTRO ESTADO, INTENTE DE NUEVO", Verdadero); | |
Leer input; | |
FinSi | |
SiNo | |
printMessage("OPCION NO VALIDA", Verdadero); | |
Escribir "- Para realizar alguna operacion, ingrese el id:"; | |
Leer input; | |
FinSi | |
FinMientras | |
SiNo | |
printMessage("NO HAY DATOS", Verdadero); | |
Escribir ""; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
FinSubProceso | |
SubProceso showAllPostulantsInProcess(postulantTable Por Referencia, postulantLengthTable Por Valor, idProcess Por Valor) | |
Definir i, count Como Entero; | |
printTitlePage("VER POSTULANTES ENLAZADOS A ESTE PROCESO", Verdadero); | |
count = 0; | |
Escribir "+", repitValues("-", 6), "+", repitValues("-", 14), "+", repitValues("-", 35), "+", repitValues("-", 12), "+", repitValues("-", 11), "+", repitValues("-", 32), "+"; | |
Escribir "| Tipo | Documento ", fillWithEspacesBlank("| Nombres ", 36), "| Nacimiento |", " Celular |", fillWithEspacesBlank(" Estado", 32), "|"; | |
Escribir "+", repitValues("-", 6), "+", repitValues("-", 14), "+", repitValues("-", 35), "+", repitValues("-", 12), "+", repitValues("-", 11), "+", repitValues("-", 32), "+"; | |
Para i = 1 Hasta postulantLengthTable Con Paso 1 Hacer | |
Si postulantTable[i, 12] == idProcess Entonces | |
count = count + 1; | |
Escribir "| ", fillWithEspacesBlank(postulantTable[i, 1], 5), "| ", fillWithEspacesBlank(postulantTable[i, 2], 13), "| ", fillWithEspacesBlank(postulantTable[i, 3], 34), "| ", fillWithEspacesBlank(postulantTable[i, 4], 11) , "| ", fillWithEspacesBlank(postulantTable[i, 5], 10), "| ", fillWithEspacesBlank(postulantTable[i, 9], 31), "|"; | |
Escribir "+", repitValues("-", 6), "+", repitValues("-", 14), "+", repitValues("-", 35), "+", repitValues("-", 12), "+", repitValues("-", 11), "+", repitValues("-", 32), "+"; | |
FinSi | |
FinPara | |
Si count == 0 Entonces | |
printMessage("NO HAY DATOS", Verdadero); | |
Escribir ""; | |
FinSi | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSubProceso | |
SubProceso updateProcess(processTable, idProcess) | |
Definir allDataIsOk Como Logico; | |
Definir input, status Como Caracter; | |
printTitlePage("PANTALLA DE ACTUALIZACION DE ESTADO", Verdadero); | |
Escribir ""; | |
Escribir "- Seleccione estado:"; | |
Escribir "1. ACTIVO"; | |
Escribir "2. EN PAUSA"; | |
Escribir "3. INHABILITAR"; | |
Escribir "4. FINALIZADO"; | |
allDataIsOk = Falso; | |
Mientras allDataIsOk == Falso & Mayusculas(input) <> "X" Hacer | |
Escribir "- Ingrese una opcion:"; | |
Leer input; | |
allDataIsOk = Verdadero; | |
Si Mayusculas(input) <> "X" Entonces | |
Segun input Hacer | |
"1": | |
status = "ACTIVO"; | |
"2": | |
status = "EN PAUSA"; | |
Escribir "ALERTA! ESTE ESTADO DETENDRA TODO EL PROCESO..."; | |
"3": | |
status = "INHABILITAR"; | |
Escribir "ALERTA! ESTE ESTADO ELIMINARA TODO EL PROCESO..."; | |
"4": | |
status = "FINALIZADO"; | |
De Otro Modo: | |
printMessage("OPCION NO VALIDA", Verdadero); | |
allDataIsOk = Falso; | |
FinSegun | |
Si allDataIsOk == Verdadero Entonces | |
Escribir "¿Esta seguro que desea continuar? (SI / NO)"; | |
Leer input; | |
Si Mayusculas(input) == "SI" Entonces | |
upsertTable(processTable, idProcess, 6, status); | |
Escribir "Actualizando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Actualizando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Datos actualizado!"; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
SiNo | |
Escribir "- Seleccione estado:"; | |
Escribir "1. ACTIVO"; | |
Escribir "2. EN PAUSA"; | |
Escribir "3. INHABILITADO"; | |
allDataIsOk = Falso; | |
FinSi | |
FinSi | |
FinSi | |
FinMientras | |
FinSubProceso | |
SubProceso updatePostulant(postulantTable, id) | |
Definir column, i Como Entero; | |
Definir option, input, messages, value Como Caracter; | |
Definir allDataIsOk Como Logico; | |
printTitlePage("PANTALLA DE ACTUALIZACION DE DATOS DE POSTULANTE", Verdadero); | |
Dimension messages[6]; | |
messages[1] = "Que deseas atualizar?"; | |
messages[2] = "1. Nombre completo"; | |
messages[3] = "2. Fecha de nacimiento"; | |
messages[4] = "3. Numero de celular"; | |
messages[5] = "4. Email"; | |
messages[6] = ""; | |
allDataIsOk = Falso; | |
Para i = 1 Hasta 6 Hacer | |
Escribir messages[i]; | |
FinPara | |
Mientras Mayusculas(input) <> "X" & allDataIsOk = Falso Hacer | |
input = validateFieldsEmpty("- Seleccione un opcion:"); | |
Si Mayusculas(option) <> "x" Entonces | |
Segun input Hacer | |
"1": | |
input = validateFieldsEmpty("- Ingrese nombre completo:"); | |
column = 3; | |
"2": | |
input = validateFieldsEmpty("- Ingrese fecha de nacimiento:"); | |
column = 4; | |
"3": | |
input = validateFieldsEmpty("- Ingrese numero de celular:"); | |
column = 5; | |
"4": | |
input = validateFieldsEmpty("- Ingrese email:"); | |
column = 6; | |
De Otro Modo: | |
printMessage("OPCION NO VALIDA", Verdadero); | |
FinSegun | |
Si Mayusculas(input) <> "X" Entonces | |
allDataIsOk = Verdadero; | |
value = input; | |
FinSi | |
FinSi | |
FinMientras | |
Si allDataIsOk = Verdadero Entonces | |
upsertTable(postulantTable, id, column, Mayusculas(value)); | |
Escribir "Actualizando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Actualizando datos..."; | |
Esperar 500 Milisegundos; | |
Escribir "Datos actualizado!"; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
FinSubProceso | |
SubProceso updateStatusPostulant(postulantTable Por Referencia, idPostulant Por Valor, status Por Valor, stateProcess Por Valor) | |
Definir allDataIsOk Como Logico; | |
Definir input, documents Como Caracter; | |
printTitlePage("PANTALLA DE ACTUALIZACION DE ESTADO DE POSTULANTE", Verdadero); | |
allDataIsOk = Falso; | |
Escribir "- El ESTADO actual del postulante es: ", Mayusculas(status); | |
Escribir ""; | |
Si stateProcess <> "" & stateProcess == "ACTIVO" Entonces | |
Escribir "Seleccione un proceso para actualizar"; | |
Escribir "1. EN PROCESO"; | |
Escribir "2. EN EVALUACION PSICOTENICA"; | |
Escribir "3. EN ESTREVISTA TECNICA"; | |
Escribir "4. EN ENTREVISTA PERSONAL"; | |
Escribir "5. APTO"; | |
Escribir "6. NO APTO"; | |
Escribir "7. CONTRATADO"; | |
Escribir "8. CESADO"; | |
Escribir ""; | |
Mientras Mayusculas(input) <> "X" & allDataIsOk = Falso Hacer | |
input = validateFieldsEmpty("- Ingrese una opcion para actualizar:"); | |
Si Mayusculas(input) <> "X" Entonces | |
allDataIsOk = Verdadero; | |
Segun input Hacer | |
"1": | |
status = "EN PROCESO"; | |
"2": | |
status = "EN EVALUACION PSICOTENICA"; | |
"3": | |
status = "EN ESTREVISTA TECNICA"; | |
"4": | |
status = "EN ENTREVISTA PERSONAL"; | |
"5": | |
status = "APTO"; | |
"6": | |
status = "NO APTO"; | |
"7": | |
status = "CONTRATADO"; | |
documents = postulantTable[idPostulant, 11]; | |
Si documents == "" Entonces | |
printMessage("PARA CAMBIAR A ESTE ESTADO, PRIMERO DEBE DE TENER SUS LEGAJOS SUBIDOS.", Falso); | |
allDataIsOk = Falso; | |
FinSi | |
"8": | |
status = "CESADO"; | |
De Otro Modo: | |
printMessage("OPCION NO VALIDA", Verdadero); | |
allDataIsOk = Falso; | |
FinSegun | |
FinSi | |
FinMientras | |
Si allDataIsOk == Verdadero Entonces | |
upsertTable(postulantTable, idPostulant, 9, status); | |
Escribir "Actualizando proceso..."; | |
Esperar 500 Milisegundos; | |
Escribir "Actualizando proceso..."; | |
Esperar 500 Milisegundos; | |
Escribir "Proceso actualizado!"; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
SiNo | |
printMessage("PARA CAMBIAR DE ESTADO, PRIMERO DE ASIGNARLE UN PROCESO O ESTE DEBE ESTAR ACTIVO", Falso); | |
Escribir ""; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
FinSubProceso | |
SubProceso uploadLegajo(postulantTable Por Referencia, idPostulant Por Valor) | |
Definir input, zip, filename Como Caracter; | |
Definir length Como Entero; | |
Definir allDataIsOk Como Logico; | |
printTitlePage("PANTALLA PARA SUBIR 0 ACTUALIZAR LEGAJO DE POSTULANTE", Verdadero); | |
allDataIsOk = Falso; | |
Mientras Mayusculas(input) <> "X" & allDataIsOk = Falso Hacer | |
input = validateFieldsEmpty("- Ingrese nombre del archivo (asegurese que se un archivo ZIP o RAR):"); | |
Si Mayusculas(input) <> "X" Entonces | |
length = Longitud(input); | |
zip = Subcadena(input, length - 2, length); | |
Si Mayusculas(zip) == "ZIP" | Mayusculas(zip) == "RAR" Entonces | |
filename = input; | |
allDataIsOk = Verdadero; | |
SiNo | |
printMessage("EXTENSION DE ARCHIVO NO PERMITIDA", Verdadero); | |
FinSi | |
FinSi | |
FinMientras | |
Si allDataIsOk == Verdadero Entonces | |
upsertTable(postulantTable, idPostulant, 11, filename); | |
Escribir "Guardando Legajo..."; | |
Esperar 500 Milisegundos; | |
Escribir "Guardando Legajo..."; | |
Esperar 500 Milisegundos; | |
Escribir "Legajo guardado!"; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
FinSubProceso | |
SubProceso uploadCV(postulantTable Por Referencia, idPostulant Por Valor) | |
Definir input, pdf, filename Como Caracter; | |
Definir length Como Entero; | |
Definir allDataIsOk Como Logico; | |
printTitlePage("PANTALLA PARA SUBIR O ACTUALIZAR CURRICULUM DE POSTULANTE", Verdadero); | |
allDataIsOk = Falso; | |
Mientras Mayusculas(input) <> "X" & allDataIsOk = Falso Hacer | |
input = validateFieldsEmpty("- Ingrese nombre del archivo (asegurese que se un archivo PDF):"); | |
Si Mayusculas(input) <> "X" Entonces | |
length = Longitud(input); | |
pdf = Subcadena(input, length - 2, length); | |
Si Mayusculas(pdf) == "PDF" Entonces | |
filename = input; | |
allDataIsOk = Verdadero; | |
SiNo | |
printMessage("EXTENSION DE ARCHIVO NO PERMITIDA", Verdadero); | |
FinSi | |
FinSi | |
FinMientras | |
Si allDataIsOk == Verdadero Entonces | |
upsertTable(postulantTable, idPostulant, 10, filename); | |
Escribir "Guardando Curriculum..."; | |
Esperar 500 Milisegundos; | |
Escribir "Guardando Curriculum..."; | |
Esperar 500 Milisegundos; | |
Escribir "Curriculum guardado!"; | |
Escribir "PARA REGRESAR AL MENU ANTERIOR, PRESIONE CUALQUIER TECLA..."; | |
Esperar Tecla; | |
FinSi | |
FinSubProceso | |
SubProceso row<-searchPostulant(postulantTable Por Referencia, lengthTablePostulant Por Valor, document Por Valor, typeDocument Por Valor) | |
Definir row, i Como Entero; | |
row = 0; | |
Para i = 1 Hasta lengthTablePostulant Hacer | |
Si typeDocument == postulantTable[i, 1] & document == postulantTable[i, 2] Entonces | |
row = i; | |
i = lengthTablePostulant; | |
FinSi | |
FinPara | |
FinSubProceso | |
// for show list of menu and validate option when is empty | |
// params: | |
// role: role of user | |
// roleTable: matriz with roles by users | |
// roleLengthTable: length matriz of roles | |
SubProceso optionMenu<-selectMenuByRole(role Por Valor, roleTable Por Referencia, roleLengthTable Por Valor) | |
Definir i Como Entero; | |
Definir postulant, recluter, admin, all, optionMenu Como Caracter; | |
postulant = "postulant"; | |
recluter = "recluter"; | |
admin = "admin"; | |
all = "all"; | |
Escribir " MENU PRINCIPAL"; | |
Escribir "- ¿Que le gustaria realizar?"; | |
Si role == postulant | role == recluter | role == admin Entonces | |
Para i = 1 Hasta roleLengthTable Con Paso 1 Hacer | |
Si role == admin Entonces | |
Escribir roleTable[i, 1]; | |
SiNo | |
Si role == roleTable[i, 2] Entonces | |
Escribir roleTable[i, 1]; | |
FinSi | |
Si roleTable[i, 2] == all Entonces | |
Escribir roleTable[i, 1]; | |
FinSi | |
FinSi | |
FinPara | |
FinSi | |
Escribir "- Ingrese una opcion:"; | |
Leer optionMenu; | |
// Mientras optionMenu == "0" Hacer | |
// Escribir "- Ingrese una opcion select:"; | |
// Leer optionMenu; | |
// FinMientras | |
FinSubProceso | |
// For Validate fields empty | |
// Params: | |
// message: name to message to show | |
SubProceso result<-validateFieldsEmpty(message) | |
Definir result, arg Como Caracter; | |
arg = ""; | |
Mientras arg == "" Hacer | |
Escribir Sin Saltar message; | |
Leer arg; | |
FinMientras | |
result <- arg; | |
FinSubProceso | |
// For Find data and return 1 value | |
// Params: | |
// array: matriz with data | |
// text: text to search | |
// positionValidate: position in matriz for validate with "text" | |
// positionReturn: the position of matriz that will return | |
// lengthArray: the length of matriz | |
SubProceso return<-findDataAndReturnOneValue(table Por Referencia, lengthTable Por Valor, text Por Valor, positionToValidate Por Valor, positionToReturn Por Valor) | |
Definir i Como Entero; | |
Definir data Como Caracter; | |
Definir return Como Caracter; | |
return = ""; | |
Para i = 1 Hasta lengthTable Hacer | |
data = table[i, positionToValidate]; | |
Si data == text Entonces | |
return = table[i, positionToReturn]; | |
i = lengthTable; // TODO: for cancel | |
FinSi | |
FinPara | |
FinSubProceso | |
// For validate if exists data in matriz | |
// Params: | |
// table: matriz with data | |
// lengthTable: the length of matriz | |
// username: username | |
// password: password of user | |
// Return: | |
// A boolean | |
SubProceso return<-validateUser(table Por Referencia, lengthTable Por Valor, username Por Valor, password Por Valor) | |
Definir return Como Logico; | |
Definir data Como Caracter; | |
Definir i Como Entero; | |
return = Falso; | |
Para i = 1 Hasta lengthTable Hacer | |
Si username == table[i, 1] & password == table[i, 2] Entonces | |
return = Verdadero; | |
i = lengthTable; | |
FinSi | |
FinPara | |
FinSubProceso | |
// For get screen in table | |
// Params: | |
// roleTable: Matriz with roles | |
// roleLengthTable: length of table | |
// optionMenu: option menu that select user | |
// rol: rol of user | |
SubProceso return<-getScreenByRole(roleTable, roleLengthTable, optionMenu, rol) | |
Definir return, all Como Caracter; | |
Definir i Como Entero; | |
all = "all"; | |
return = ""; | |
Para i = 1 Hasta roleLengthTable Con Paso 1 Hacer | |
Si roleTable[i, 2] == all & roleTable[i, 3] == optionMenu Entonces | |
return = roleTable[i, 4]; | |
i = roleLengthTable; | |
FinSi | |
Si roleTable[i, 2] == rol & roleTable[i, 3] == optionMenu Entonces | |
return = roleTable[i, 4]; | |
FinSi | |
Si rol == "admin" & roleTable[i, 3] == optionMenu Entonces | |
return = roleTable[i, 4]; | |
FinSi | |
FinPara | |
FinSubProceso | |
SubProceso return<-isNumber(value Por Valor) | |
Definir i, j, length Como Entero; | |
Definir data, numbers Como Caracter; | |
Definir return, helper Como Logico; | |
Dimension numbers[10]; | |
Para i = 1 Hasta 10 Hacer | |
numbers[i] = ConvertirATexto(i); | |
Si i == 10 Entonces | |
numbers[i] = "0"; | |
FinSi | |
FinPara | |
i = 1; | |
length = Longitud(value); | |
helper = Verdadero; | |
Mientras helper = Verdadero & i <= length Hacer | |
data = Subcadena(value, i, i); | |
helper = Falso; | |
Para j = 1 Hasta 10 Con Paso 1 Hacer | |
Si data == numbers[j] Entonces | |
helper = Verdadero; | |
FinSi | |
FinPara | |
i = i + 1; | |
FinMientras | |
return = helper; | |
FinSubProceso | |
SubProceso row<-getRowForInsert(table Por Referencia, lengthTable Por Valor) | |
Definir row Como Entero; | |
Definir i Como Entero; | |
Para i = 1 Hasta lengthTable Hacer | |
Si table[i, 1] == "" Entonces | |
row = i; | |
i = lengthTable; | |
FinSi | |
FinPara | |
FinSubProceso | |
SubProceso upsertTable(table Por Referencia, rowToInsert Por Valor, columnToInsert Por Valor, value Por Valor) | |
table[rowToInsert, columnToInsert] = value; | |
FinSubProceso | |
SubProceso return<-fillWithEspacesBlank(value Por Valor, espaces Por Valor) | |
Definir i, length Como Entero; | |
Definir concat, return Como Caracter; | |
length = Longitud(value); | |
Si length < espaces Entonces | |
Definir operation Como Entero; | |
operation = espaces - length; | |
concat = value; | |
Para i = 1 Hasta operation Hacer | |
concat = Concatenar(concat, " "); | |
FinPara | |
FinSi | |
return = concat; | |
FinSubProceso | |
SubProceso return<-repitValues(value Por Valor, length Por Valor) | |
Definir concat, return Como Caracter; | |
Definir i Como Entero; | |
Para i = 1 Hasta length Hacer | |
concat = Concatenar(concat, value); | |
FinPara | |
return = concat; | |
FinSubProceso | |
// For create matriz of users | |
// Params: | |
// users: matriz by ref | |
// userLengthTable: length of matrz to fill | |
// Return: | |
// Matriz by ref | |
SubProceso createUsers(users Por Referencia, userLengthTable Por Valor) | |
// Tis table has 3 columns: username, password, role | |
Definir i Como Entero; | |
users[1, 1] = "carlos"; // usernmae | |
users[1, 3] = "recluter"; // rol | |
users[2, 1] = "oliver"; | |
users[2, 3] = "recluter"; | |
users[3, 1] = "david"; | |
users[3, 3] = "admin"; | |
Para i = 1 Hasta userLengthTable Hacer | |
users[i, 2] = "123"; | |
FinPara | |
FinSubProceso | |
// For create matriz of roles | |
// Params: | |
// roles: matric by ref | |
// roleLengthTable: length of matriz | |
SubProceso createRoles(roleTable Por Referencia, roleLengthTable Por Valor) | |
// This table has 4 columns: description, rol, id, nameScreen | |
Definir i Como Entero; | |
roleTable[1, 1] = " 1. Buscar postulante."; | |
roleTable[1, 2] = "recluter"; | |
roleTable[1, 3] = "1"; | |
roleTable[1, 4] = "screenSearch"; | |
roleTable[2, 1] = " 2. Registrar postulante."; | |
roleTable[2, 2] = "recluter"; | |
roleTable[2, 3] = "2"; | |
roleTable[2, 4] = "screenRegisterPostulant"; | |
roleTable[3, 1] = " 3. Creacion de nuevo proceso de incorporacion."; | |
roleTable[3, 2] = "admin"; | |
roleTable[3, 3] = "3"; | |
roleTable[3, 4] = "screenNewIncorporationProcess"; | |
roleTable[4, 1] = " 4. Ver procesos activos."; | |
roleTable[4, 2] = "admin"; | |
roleTable[4, 3] = "4"; | |
roleTable[4, 4] = "screenSearchProcess"; | |
roleTable[5, 1] = " 5. Cerrar sesion"; | |
roleTable[5, 2] = "all"; | |
roleTable[5, 3] = "5"; | |
roleTable[5, 4] = "screenLogout"; | |
FinSubProceso | |
// For create matriz of postulant | |
// Params: | |
// postulantTable: matriz by ref | |
// postulantLengthTable: length of matriz | |
SubProceso createPostulants(postulantTable Por Referencia, postulantLength Por Valor) | |
// This table has 7 columns: documentType, documentNumber, names, birthDate, phone, email, vaccioneCovid19, id, status | |
postulantTable[1, 1] = "DNI"; // documentType | |
postulantTable[1, 2] = "11111111"; // documentNumber | |
postulantTable[1, 3] = "Amber Gates"; // names | |
postulantTable[1, 4] = "17/02/2000"; // birthDate | |
postulantTable[1, 5] = "923948596"; // phone number | |
postulantTable[1, 6] = "ambergates@bolax.com"; // email | |
postulantTable[1, 7] = "SI"; // covid vaccine | |
postulantTable[1, 8] = "1"; // id | |
postulantTable[1, 9] = "EN EVALUACION PSICOTENICA"; // status | |
postulantTable[1, 10] = "amber_gates_cv.pdf"; // CV | |
postulantTable[1, 11] = ""; // Legajo | |
postulantTable[1, 12] = "1"; // id Proceso | |
postulantTable[1, 13] = ""; | |
postulantTable[2, 1] = "CE"; | |
postulantTable[2, 2] = "222222222222"; | |
postulantTable[2, 3] = "Rose Carr"; | |
postulantTable[2, 4] = "23/06/1990"; | |
postulantTable[2, 5] = "912912912"; | |
postulantTable[2, 6] = "rosecarr@zepitope.com"; | |
postulantTable[2, 7] = "SI"; | |
postulantTable[2, 8] = "2"; | |
postulantTable[2, 9] = "EN EVALUACION PERSONAL"; | |
postulantTable[2, 10] = "CarrRose_CV.pdf"; | |
postulantTable[2, 11] = ""; | |
postulantTable[2, 12] = "1"; | |
postulantTable[3, 1] = "DNI"; | |
postulantTable[3, 2] = "33333333"; | |
postulantTable[3, 3] = "Ashley Barnett"; | |
postulantTable[3, 4] = "27/05/1995"; | |
postulantTable[3, 5] = "945945938"; | |
postulantTable[3, 6] = "ashleybarnett@golistic.com"; | |
postulantTable[3, 7] = "SI"; | |
postulantTable[3, 8] = "3"; | |
postulantTable[3, 9] = "EN EVALUACION TECNICA"; | |
postulantTable[3, 10] = "Ashley-Barnett_CV.pdf"; | |
postulantTable[3, 11] = ""; | |
postulantTable[3, 12] = "1"; | |
postulantTable[4, 1] = "DNI"; | |
postulantTable[4, 2] = "12345678"; | |
postulantTable[4, 3] = "Fowler Solis"; | |
postulantTable[4, 4] = "30/01/1993"; | |
postulantTable[4, 5] = "900239847"; | |
postulantTable[4, 6] = "fowlersolis@netropic.com"; | |
postulantTable[4, 7] = "SI"; | |
postulantTable[4, 8] = "4"; | |
postulantTable[4, 9] = "REGISTRADO"; | |
postulantTable[4, 10] = "Fowler-solis-cv.pdf"; | |
postulantTable[4, 12] = "2"; | |
FinSubProceso | |
SubProceso createProcess(processTable Por Referencia) | |
processTable[1,1] = "1"; | |
processTable[1,2] = "SOFTWARE ENGINEER 1"; | |
processTable[1,3] = "Habilidades blandas, dominio de ingles, dominio de docker, kubernates, nodejs y devops."; | |
processTable[1,4] = "AREA DE SISTEMAS"; | |
processTable[1,5] = "SISTEMAS-NEW-SE.PDF"; | |
processTable[1,6] = "ACTIVO"; | |
processTable[2,1] = "2"; | |
processTable[2,2] = "SENIOR BACKEND"; | |
processTable[2,3] = "Experiencia de 5 anios, manejos de sqlserver, mongodb, dynamodb, nodejs, go y python."; | |
processTable[2,4] = "AREA DE SISTEMAS"; | |
processTable[2,5] = "SISTEMAS-NEW-BACKEND.PDF"; | |
processTable[2,6] = "INHABILITADO"; | |
FinSubProceso | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment