Skip to content
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

Convertir materias optativas en nodos #206

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add small sugestions
lopezac committed Mar 26, 2024
commit dfd6e792c7899f8749a1876258f98cc5c89e0fe5
1 change: 1 addition & 0 deletions src/Graph.js
Original file line number Diff line number Diff line change
@@ -631,6 +631,7 @@ const Graph = (userContext) => {

// Despues, las obligatorias
const allObligatorias = getters.Obligatorias();
// aca cambiar obligatorias a obligatoriasAprobadas mepa que quedaria mejor, mas sencillo de entender, que opinas?
const obligatorias = getters.ObligatoriasAprobadas();
creditos.push({
...CREDITOS["Obligatorias"],
1 change: 1 addition & 0 deletions src/MapContext.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ export const GraphContext = React.createContext();
export const MapProvider = ({ children }) => {
const user = User();
const graph = Graph(user);

return (
<UserContext.Provider value={user}>
<GraphContext.Provider value={graph}>{children}</GraphContext.Provider>
2 changes: 1 addition & 1 deletion src/User.js
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ const Login = () => {
!!window.localStorage.getItem("padron"),
);

// Loggin in es para cuando la pagina entera esta cargando todos los datos del usuario
// Logging in es para cuando la pagina entera esta cargando todos los datos del usuario
const [loggingIn, setLoggingIn] = React.useState(false);

// On boot nos fijamos si hay un padron inicial del storage
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ export const promediar = (materias) => {
return sum ? (sum / materias.length).toFixed(2) : 0;
};

// quiza cambiar estas funciones de accNombre a acreditarNombre o sumNombre?, me parece que serian mas informativos
export const accCreditos = (acc, node) => {
acc += node.creditos;
return acc;