Skip to content

feat: enhance UI and logic for Inventory, Patients, and Care Log modules - #28

Merged
iJosueeh merged 1 commit into
devfrom
feature/ui-logic-improvements
May 29, 2026
Merged

feat: enhance UI and logic for Inventory, Patients, and Care Log modules#28
iJosueeh merged 1 commit into
devfrom
feature/ui-logic-improvements

Conversation

@iJosueeh

Copy link
Copy Markdown
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
Copilot AI review requested due to automatic review settings May 29, 2026 01:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, chkActivo editing, and repository queries no longer hard-filter is_activo = 1.
  • Atencion module: redesigned layout with patient search panel, batch table with placeholder and stock total, plus a new onSearchPatient handler and txtDosis field.
  • Sidebar: added Profile and Logout actions; modal CSS consolidated into global.css, with local overrides removed from profile.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">
@iJosueeh
iJosueeh merged commit 1ea2a11 into dev May 29, 2026
2 checks passed
@iJosueeh
iJosueeh deleted the feature/ui-logic-improvements branch May 29, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants