Mostrar el progreso de los créditos de cada grupo en el planner#974
Open
rodrigogordienko wants to merge 3 commits intomasterfrom
Open
Mostrar el progreso de los créditos de cada grupo en el planner#974rodrigogordienko wants to merge 3 commits intomasterfrom
rodrigogordienko wants to merge 3 commits intomasterfrom
Conversation
…t plans. Added a new partial for group credits and updated the subject plans controller and views to render this information dynamically.
Collaborator
|
Está muy bien! Bien metida! ❤️ Yo en un momento había pensado en hacerlo tipo como un modal que se pueda trigerear desde un tooltip, algo tipo así: Screen.Recording.2026-01-13.at.12.33.55.movQué les parece? |
Collaborator
santiagorodriguez96
left a comment
There was a problem hiding this comment.
Habría que agregar algunos tests, no?
Comment on lines
+57
to
+70
| # Calculate credits only from planned subjects (those positioned in semesters) | ||
| planned_credits_by_group = @planned_subjects | ||
| .group_by(&:group_id) | ||
| .transform_values { |subjects| subjects.sum(&:credits) } | ||
|
|
||
| @groups_and_credits = current_degree.subject_groups.find_each.map do |subject_group| | ||
| credits = planned_credits_by_group[subject_group.id] || 0 | ||
| { | ||
| subject_group:, | ||
| credits:, | ||
| credits_needed_reached: credits >= subject_group.credits_needed, | ||
| } | ||
| end | ||
| @groups_and_credits.sort_by! { |group_and_credits| group_and_credits[:subject_group].name } |
Collaborator
There was a problem hiding this comment.
No es un blocker pero me pregunto si habrá una forma prolija de reutilizar la lógica que ya tenemos para calcular los créditos que se tienen y que se precisan de cada grupo
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Agregar nueva sección desplegable para mostrar el progreso de los créditos de cada grupo en el planner.
Cambios
Se consideran únicamente materias planificadas, que fueron colocadas en uno de los semestres por consitencia con los "Créditos planeados" que se muestran.
Otra posible opción sería agregar un modal, que podria ser a nivel de semestre.
Demo
Screen.Recording.2026-01-13.at.9.34.02.PM.mov