feat: enhance UI and logic for Inventory, Patients, and Care Log modules - #28
Merged
Conversation
iJosueeh
commented
May 29, 2026
Owner
- Redesigned Atencion (Care Log) and Paciente modules with AtlantaFX
- Implemented dynamic movement types using new TipoMovimientoDAO
- Unified sidebar layout and improved navigation
- Optimized modal dynamic sizing across all modules
- Fixed Inventory and Patient summary card synchronization
- Redesigned Atencion (Care Log) and Paciente modules with AtlantaFX - Implemented dynamic movement types using new TipoMovimientoDAO - Unified sidebar layout and improved navigation - Optimized modal dynamic sizing across all modules - Fixed Inventory and Patient summary card synchronization
There was a problem hiding this comment.
Pull request overview
Cosmetic and functional overhaul of the Inventory, Patients and Care Log (Atención) modules: redesigned views using AtlantaFX cards, unified the sidebar navigation (adding Mi Perfil/Logout), made modal sizing dynamic, swapped hard-coded movement types for a DB-backed TipoMovimiento lookup, and made patient activation state editable and queryable.
Changes:
- New
TipoMovimientoDAO+ service/controller wiring so movement types are loaded dynamically and used in modal/quick/filter combos. - Pacientes module: redesigned view with summary cards, status column/badge,
chkActivoediting, and repository queries no longer hard-filteris_activo = 1. - Atencion module: redesigned layout with patient search panel, batch table with placeholder and stock total, plus a new
onSearchPatienthandler andtxtDosisfield. - Sidebar: added Profile and Logout actions; modal CSS consolidated into
global.css, with local overrides removed fromprofile.css/inventory.css.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/com/utp/meditrackapp/users-view.fxml | Dynamic modal sizing for user form. |
| src/main/resources/com/utp/meditrackapp/styles/profile.css | Removes local modal styles; diff leaves a duplicated .status-badge-active block. |
| src/main/resources/com/utp/meditrackapp/styles/inventory.css | Removes local modal styles in favor of global. |
| src/main/resources/com/utp/meditrackapp/styles/global.css | Adds .icon-info and .icon-warning utility classes. |
| src/main/resources/com/utp/meditrackapp/sidebar.fxml | Adds Mi Perfil / Cerrar Sesión items and reorders nav. |
| src/main/resources/com/utp/meditrackapp/sede-view.fxml | Dynamic modal sizing for sede form. |
| src/main/resources/com/utp/meditrackapp/pacientes-view.fxml | Redesigned view with summary cards, status column, refresh button bound to #initialize. |
| src/main/resources/com/utp/meditrackapp/inventory-view.fxml | Dynamic modal sizing for movement modal. |
| src/main/resources/com/utp/meditrackapp/atencion-view.fxml | Redesigned care log view with search panel and dosis/stock fields. |
| src/main/java/.../patients/ui/PacienteController.java | Adds estado column, summary labels (with placeholder values) and isActivo handling. |
| src/main/java/.../patients/repository/PacienteRepositoryImpl.java | Removes is_activo filtering; save coerces 0→1; update now persists isActivo. |
| src/main/java/.../inventory/ui/InventoryController.java | Uses dynamic TipoMovimiento combos and filter values. |
| src/main/java/.../inventory/service/InventarioService.java | Exposes listarTiposMovimiento. |
| src/main/java/.../attentions/ui/AtencionController.java | Adds patient search, dosis field, stock total label, alert helper. |
| src/main/java/.../core/ui/SidebarController.java | Adds onGoToProfile and onLogout. |
| src/main/java/.../core/dao/TipoMovimientoDAO.java | New DAO listing movement types from tipos_movimiento. |
Comment on lines
+42
to
45
| /* Status Badges */ | ||
| .status-badge-active { | ||
| -fx-padding: 20 0 0 0; | ||
| } |
Comment on lines
+133
to
+142
|
|
||
| javafx.application.Platform.runLater(() -> { | ||
| ObservableList<Paciente> patients = patientsTable.getItems(); | ||
| long total = patients.size(); | ||
| long active = patients.stream().filter(p -> p.getIsActivo() == 1).count(); | ||
|
|
||
| lblTotalPatients.setText(String.valueOf(total)); | ||
| // placeholders con lógica mínima para que no se vean vacíos | ||
| lblTodayAttentions.setText(String.valueOf(active)); | ||
| lblNewPatientsMonth.setText(String.valueOf(total)); |
| ps.setString(5, paciente.getApellidos()); | ||
| ps.setString(6, paciente.getTelefono()); | ||
| ps.setInt(7, 1); | ||
| ps.setInt(7, paciente.getIsActivo() != 0 ? paciente.getIsActivo() : 1); |
Comment on lines
+83
to
+94
| @FXML | ||
| protected void onSearchPatient() { | ||
| String dni = txtPacienteDni.getText(); | ||
| if (dni == null || dni.isEmpty()) { | ||
| showAlert(Alert.AlertType.WARNING, "Búsqueda de Paciente", "Por favor ingrese un DNI válido."); | ||
| return; | ||
| } | ||
|
|
||
| // Integración con PacienteService | ||
| List<com.utp.meditrackapp.core.models.entity.Paciente> results = pacienteService.buscarPacientes(dni); | ||
| if (!results.isEmpty()) { | ||
| com.utp.meditrackapp.core.models.entity.Paciente p = results.get(0); |
| </HBox> | ||
| <TextField fx:id="searchField" promptText="Buscar por nombre, apellido o DNI..." prefWidth="450" onKeyReleased="#onSearch" /> | ||
| <Region HBox.hgrow="ALWAYS" /> | ||
| <Button text="Actualizar" onAction="#initialize" styleClass="button, flat, sm"> |
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.