diff --git a/src/fc/model/Dmr.java b/src/fc/model/Dmr.java index 692d8b0ce059687267dfb7cffb578428d2d64f6d..a8aade25706e8119b548ee9ea03fb82122228094 100644 --- a/src/fc/model/Dmr.java +++ b/src/fc/model/Dmr.java @@ -54,10 +54,9 @@ public class Dmr { List<Dmr> dmrs = new ArrayList<>(); if (IPP != null && !IPP.isBlank()) { - StringBuilder requeteRecupDMR = new StringBuilder("SELECT * FROM DMR WHERE IPP = '").append(IPP).append("'"); - System.out.println(requeteRecupDMR); + String query = "SELECT * FROM DMR WHERE IPP = '" + IPP + "'"; - try (ResultSet rs = ConnexionDataBase.sqlRequete2(requeteRecupDMR.toString())) { + try (ResultSet rs = ConnexionDataBase.sqlRequete2(query)) { while (rs != null && rs.next()) { String id_dmr = rs.getString("id_dmr"); String ipp = rs.getString("IPP"); @@ -71,8 +70,7 @@ public class Dmr { System.out.println("Erreur lors de la récupération du DMR : " + e.getMessage()); } } - - return dmrs; // Retourne une liste vide si aucun résultat + return dmrs; // Retourne toujours une liste (peut être vide) } /** diff --git a/src/ui/Controller/AdministrationPageController.java b/src/ui/Controller/AdministrationPageController.java index a2fceaff3bb5f601656c72d15e7e6b2a88fc7527..58961943feb01e0a4ca1f5bc4bac1e9779db43cb 100644 --- a/src/ui/Controller/AdministrationPageController.java +++ b/src/ui/Controller/AdministrationPageController.java @@ -1,25 +1,20 @@ package ui.Controller; -/** - * FXML Controller class - * - * @author lucas - */ import fc.model.Administration; +import javafx.scene.control.cell.PropertyValueFactory; import fc.Sql.ConnexionDataBase; import fc.model.Dmr; +import fc.model.DmrPatient; import fc.model.Patient; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; -import javafx.scene.control.ListView; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; -import javafx.scene.control.TextArea; import javafx.scene.control.TextField; -import javafx.scene.control.cell.PropertyValueFactory; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; @@ -27,7 +22,6 @@ import javafx.fxml.FXMLLoader; import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; -import javafx.scene.image.ImageView; import javafx.scene.layout.VBox; import javafx.stage.Stage; import javafx.util.Pair; @@ -36,38 +30,14 @@ public class AdministrationPageController { @FXML private Label welcomeLabel; - - @FXML - private VBox vbox; - - @FXML - private TextField textFieldNumSecuVerif; - @FXML - private Button buttonVerifDMR; @FXML private TextField fieldRecherhe; - @FXML private Button buttonCreerDMR; - @FXML - private TextField textFieldIdDMR; - @FXML - private TextField textFieldNomRechercher; - @FXML - private TextField textFieldPrenomRechercher; - @FXML - private TextField textFieldDateNaissanceRechercher; - @FXML - private TextField textFieldNumSecuRechercher; - @FXML private TextField textFieldMotif; @FXML - private Button buttonRechercherDMR; - @FXML - private TextArea textAreaMessages; - - // Nouveaux éléments pour le TableView + private Label messageLabel; @FXML private TableView<Patient> tableViewPatients; @FXML @@ -78,33 +48,49 @@ public class AdministrationPageController { private TableColumn<Patient, String> columnPrenom; @FXML private TableColumn<Patient, String> columnDateNaissance; - @FXML - private ListView<String> liste_dmrs; + private TableView<DmrPatient> tableViewDmrPatient; @FXML - private Label messageLabel; - + private TableColumn<DmrPatient, String> columnNomDmr; + @FXML + private TableColumn<DmrPatient, String> columnPrenomDmr; @FXML - private ImageView image = new ImageView(); + private TableColumn<DmrPatient, String> columnDateOuverture; + @FXML + private TableColumn<DmrPatient, String> columnMotif; private Administration admin; public void setAdmin(Administration admin) { this.admin = admin; + updateWelcomeMessage(); + } + + private void updateWelcomeMessage() { + if (admin != null) { + String civilite = "M."; // Vous pourriez avoir ce champ dans votre objet Administration + welcomeLabel.setText("Bonjour " + civilite + " " + admin.getNom()); + } } @FXML private void initialize() { - // Initialisation des colonnes du TableView + // Configuration des colonnes Patients columnIPP.setCellValueFactory(new PropertyValueFactory<>("IPP")); columnNom.setCellValueFactory(new PropertyValueFactory<>("nom")); columnPrenom.setCellValueFactory(new PropertyValueFactory<>("prenom")); columnDateNaissance.setCellValueFactory(new PropertyValueFactory<>("date_de_naissance")); - // Gestion de la sélection dans le TableView - tableViewPatients.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { - if (newValue != null) { - actionSurSelection(newValue.getIPP()); + // Configuration des colonnes DMR + columnNomDmr.setCellValueFactory(new PropertyValueFactory<>("nom")); + columnPrenomDmr.setCellValueFactory(new PropertyValueFactory<>("prenom")); + columnDateOuverture.setCellValueFactory(new PropertyValueFactory<>("dateOuverture")); + columnMotif.setCellValueFactory(new PropertyValueFactory<>("motif")); + + // Gestion de la sélection + tableViewPatients.getSelectionModel().selectedItemProperty().addListener((obs, oldVal, newVal) -> { + if (newVal != null) { + actionSurSelection(newVal.getIPP()); } }); } @@ -121,18 +107,22 @@ public class AdministrationPageController { stage.show(); } catch (IOException e) { e.printStackTrace(); + messageLabel.setText("Erreur lors de la déconnexion"); } } @FXML private void recherchePatient() { String recherche = fieldRecherhe.getText().trim(); - Pair<List<Patient>, String> result = new Patient().rechercherPatients2(recherche); + if (recherche.isEmpty()) { + messageLabel.setText("Veuillez entrer un terme de recherche"); + return; + } + Pair<List<Patient>, String> result = new Patient().rechercherPatients2(recherche); messageLabel.setText(result.getValue()); if (!result.getKey().isEmpty()) { - // Mise à jour du TableView avec les patients trouvés tableViewPatients.setItems(FXCollections.observableArrayList(result.getKey())); } else { tableViewPatients.setItems(FXCollections.observableArrayList()); @@ -142,11 +132,17 @@ public class AdministrationPageController { private void actionSurSelection(String ipp) { Dmr dmr = new Dmr(); List<Dmr> dmrs = dmr.recupererDMR(ipp); - ObservableList<String> items = FXCollections.observableArrayList(); + List<DmrPatient> dmrPatients = new ArrayList<>(); + Patient pat = new Patient(); + for (Dmr d : dmrs) { - items.add(d.getId_dmr() + " Date ouverture : " + d.getDate_ouverture() + " motif : " + d.getMotif()); + List<Patient> patients = pat.rechercherPatients(d.getIPP(), null, null, null, null, null); + if (!patients.isEmpty()) { + dmrPatients.add(new DmrPatient(d, patients.get(0))); + } } - liste_dmrs.setItems(items); + + tableViewDmrPatient.setItems(FXCollections.observableArrayList(dmrPatients)); } @FXML @@ -156,27 +152,34 @@ public class AdministrationPageController { messageLabel.setText("Veuillez sélectionner un patient"); return; } - - if (this.textFieldMotif.getText().isBlank()) { + + if (textFieldMotif.getText().isBlank()) { messageLabel.setText("Veuillez entrer un motif"); - } else { - selectedPatient.creerDMR(this.textFieldMotif.getText()); + return; + } + + boolean success = selectedPatient.creerDMR(textFieldMotif.getText()); + if (success) { messageLabel.setText("DMR créé avec succès"); + textFieldMotif.clear(); + // Rafraîchir la liste des DMR + actionSurSelection(selectedPatient.getIPP()); + } else { + messageLabel.setText("Erreur lors de la création du DMR"); } } @FXML private void charger() { - String selectedDmr = liste_dmrs.getSelectionModel().getSelectedItem(); + DmrPatient selectedDmr = tableViewDmrPatient.getSelectionModel().getSelectedItem(); if (selectedDmr == null) { messageLabel.setText("Veuillez sélectionner un DMR"); return; } - - String ndmr = selectedDmr.split(" ")[0]; - String req = "UPDATE dmr SET activer = 1 WHERE ID_DMR = " + ndmr; + String req = "UPDATE dmr SET activer = 1 WHERE ID_DMR = " + selectedDmr.getId_dmr(); boolean insertionReussie = ConnexionDataBase.sqlUpdate(req); + if (insertionReussie) { messageLabel.setText("DMR chargé avec succès"); } else { diff --git a/src/ui/Controller/ManipController.java b/src/ui/Controller/ManipController.java index a07f63d76462a352bc607c4010b01b60c9dfa7ed..4a7a871b3b16f6425ee39ea9c906233abdee7abc 100644 --- a/src/ui/Controller/ManipController.java +++ b/src/ui/Controller/ManipController.java @@ -31,18 +31,30 @@ public class ManipController implements Initializable { private Manipulateur manipulateur; // Composants FXML - @FXML private ListView<String> liste_image; - @FXML private CheckBox pasDImage; - @FXML private ImageView image; - @FXML private TableView<DmrPatient> tableViewDmrPatient; - @FXML private TableView<Patient> tableViewPatient; - @FXML private TableColumn<Patient, String> columnIpp, columnNom, columnPrenom; - @FXML private TableColumn<DmrPatient, String> columnMotif, columnDateOuverture, columnNomDmr, columnPrenomDmr; - @FXML private TextField fieldRecherhe; - @FXML private Label messageLabel, welcomeLabel; - @FXML private DatePicker fieldExamen; - @FXML private ComboBox<Integer> comboBoxH, comboBoxMin; - @FXML private ComboBox<String> comboImagerie, comboAnat; + @FXML + private ListView<String> liste_image; + @FXML + private CheckBox pasDImage; + @FXML + private ImageView image; + @FXML + private TableView<DmrPatient> tableViewDmrPatient; + @FXML + private TableView<Patient> tableViewPatient; + @FXML + private TableColumn<Patient, String> columnIpp, columnNom, columnPrenom; + @FXML + private TableColumn<DmrPatient, String> columnMotif, columnDateOuverture, columnNomDmr, columnPrenomDmr; + @FXML + private TextField fieldRecherhe; + @FXML + private Label messageLabel, welcomeLabel; + @FXML + private DatePicker fieldExamen; + @FXML + private ComboBox<Integer> comboBoxH, comboBoxMin; + @FXML + private ComboBox<String> comboImagerie, comboAnat; @Override public void initialize(URL url, ResourceBundle rb) { @@ -53,8 +65,7 @@ public class ManipController implements Initializable { applyStyles(); tableViewPatient.setColumnResizePolicy(TableView.UNCONSTRAINED_RESIZE_POLICY); tableViewDmrPatient.setColumnResizePolicy(TableView.UNCONSTRAINED_RESIZE_POLICY); - - + } private void setupTableColumns() { @@ -70,11 +81,15 @@ public class ManipController implements Initializable { private void setupComboBoxes() { comboImagerie.getItems().addAll("Radio", "IRM", "Scanner"); comboAnat.getItems().addAll("abdomen", "sinus", "brain"); - + // Initialisation des heures/minutes LocalTime now = LocalTime.now(); - for (int i = 0; i < 24; i++) comboBoxH.getItems().add(i); - for (int i = 0; i < 60; i++) comboBoxMin.getItems().add(i); + for (int i = 0; i < 24; i++) { + comboBoxH.getItems().add(i); + } + for (int i = 0; i < 60; i++) { + comboBoxMin.getItems().add(i); + } comboBoxH.setValue(now.getHour()); comboBoxMin.setValue(now.getMinute()); } @@ -87,7 +102,7 @@ public class ManipController implements Initializable { private void loadActiveDmrs() { List<Dmr> dmrActif = new Dmr().dmrActiver(); List<DmrPatient> dmrPatients = new ArrayList<>(); - + for (Dmr d : dmrActif) { Patient pat = new Patient(); List<Patient> patients = pat.rechercherPatients(d.getIPP(), null, null, null, null, null); @@ -100,11 +115,15 @@ public class ManipController implements Initializable { private void setupListeners() { liste_image.getSelectionModel().selectedItemProperty().addListener((obs, oldVal, newVal) -> { - if (newVal != null) loadSelectedImage(new Pacs().pathWithNom(newVal)); + if (newVal != null) { + loadSelectedImage(new Pacs().pathWithNom(newVal)); + } }); tableViewPatient.getSelectionModel().selectedItemProperty().addListener((obs, oldVal, newVal) -> { - if (newVal != null) loadPatientDmrs(newVal); + if (newVal != null) { + loadPatientDmrs(newVal); + } }); } @@ -120,8 +139,8 @@ public class ManipController implements Initializable { private void updateWelcomeMessage() { if (welcomeLabel != null && manipulateur != null) { - - welcomeLabel.setText("Bienvenue, M./Mmme."+ manipulateur.getNom()); + + welcomeLabel.setText("Bienvenue, M./Mmme." + manipulateur.getNom()); } } @@ -140,14 +159,13 @@ public class ManipController implements Initializable { private void loadPatientDmrs(Patient patient) { List<Dmr> dmrs = patient.recupererDMR(); List<DmrPatient> dmrPatients = new ArrayList<>(); - + for (Dmr d : dmrs) { - if (d.getActiver() == 1) { - Patient pat = new Patient(); - List<Patient> patients = pat.rechercherPatients(d.getIPP(), null, null, null, null, null); - if (!patients.isEmpty()) { - dmrPatients.add(new DmrPatient(d, patients.get(0))); - } + // Retirez la condition d'activation ou adaptez-la + Patient pat = new Patient(); + List<Patient> patients = pat.rechercherPatients(d.getIPP(), null, null, null, null, null); + if (!patients.isEmpty()) { + dmrPatients.add(new DmrPatient(d, patients.get(0))); } } tableViewDmrPatient.setItems(FXCollections.observableArrayList(dmrPatients)); @@ -201,8 +219,8 @@ public class ManipController implements Initializable { String imagerie = comboImagerie.getValue(); String anatomie = comboAnat.getValue(); - if (dmrSelect == null || selectedDate == null || heure == null || - minute == null || imagerie == null || anatomie == null) { + if (dmrSelect == null || selectedDate == null || heure == null + || minute == null || imagerie == null || anatomie == null) { messageLabel.setText("Tous les champs obligatoires ne sont pas remplis"); return; } @@ -237,4 +255,4 @@ public class ManipController implements Initializable { messageLabel.setText("Échec de la création de l'examen"); } } -} \ No newline at end of file +} diff --git a/src/ui/Controller/PageExamenController.java b/src/ui/Controller/PageExamenController.java index 65280fae5a9c65a5a33fbc15733cb72a9b8742f8..2073795eeaf57134341ee540c08c8ca351180269 100644 --- a/src/ui/Controller/PageExamenController.java +++ b/src/ui/Controller/PageExamenController.java @@ -88,7 +88,7 @@ public class PageExamenController implements Initializable { private void loadExamImage() { try { - String defaultImagePath = "src/jpg/logo/Examen_sans_image_associée.jpg"; + String defaultImagePath = "src/ui.jpg.logo/Examen_sans_image_associée.jpg"; String imagePath = examen.getImage_path(); if (imagePath == null || imagePath.isBlank()) { diff --git a/src/ui/Controller/Radio_ManipController.java b/src/ui/Controller/Radio_ManipController.java index 8afd365986aa6fec6bd83f55381f5deeb4a6af42..59fc2220d3057fe784436486d50c34c42db3cd3a 100644 --- a/src/ui/Controller/Radio_ManipController.java +++ b/src/ui/Controller/Radio_ManipController.java @@ -68,8 +68,7 @@ public class Radio_ManipController implements Initializable { applyStyles(); tableViewPatient.setColumnResizePolicy(TableView.UNCONSTRAINED_RESIZE_POLICY); tableViewDmrPatient.setColumnResizePolicy(TableView.UNCONSTRAINED_RESIZE_POLICY); - - + } private void setupTableColumns() { @@ -159,12 +158,11 @@ public class Radio_ManipController implements Initializable { List<DmrPatient> dmrPatients = new ArrayList<>(); for (Dmr d : dmrs) { - if (d.getActiver() == 1) { - Patient pat = new Patient(); - List<Patient> patients = pat.rechercherPatients(d.getIPP(), null, null, null, null, null); - if (!patients.isEmpty()) { - dmrPatients.add(new DmrPatient(d, patients.get(0))); - } + // Retirez la condition d'activation ou adaptez-la + Patient pat = new Patient(); + List<Patient> patients = pat.rechercherPatients(d.getIPP(), null, null, null, null, null); + if (!patients.isEmpty()) { + dmrPatients.add(new DmrPatient(d, patients.get(0))); } } tableViewDmrPatient.setItems(FXCollections.observableArrayList(dmrPatients)); diff --git a/src/ui/fxml/AdministrationPage.fxml b/src/ui/fxml/AdministrationPage.fxml index a78e7342706bb8fb059d231d26fe572a98db6b1a..1a823872c6993a71e1408aa441dd042b40617b2d 100644 --- a/src/ui/fxml/AdministrationPage.fxml +++ b/src/ui/fxml/AdministrationPage.fxml @@ -1,52 +1,83 @@ <?xml version="1.0" encoding="UTF-8"?> -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.Label?> -<?import javafx.scene.control.TableColumn?> -<?import javafx.scene.control.TableView?> -<?import javafx.scene.control.TextField?> -<?import javafx.scene.layout.HBox?> -<?import javafx.scene.layout.VBox?> -<?import javafx.scene.text.Font?> +<?import javafx.geometry.Insets?> +<?import javafx.scene.control.*?> +<?import javafx.scene.layout.*?> +<?import javafx.scene.text.*?> -<VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="592.0" prefWidth="800.0" spacing="10" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ui.Controller.AdministrationPageController"> - <Button contentDisplay="TOP" mnemonicParsing="false" onAction="#actionDeconnexion" text="Déconnexion" translateX="320.0" translateY="10.0" /> - <Label alignment="TOP_CENTER" contentDisplay="CENTER" prefHeight="30.0" prefWidth="115.0" style="-fx-font-size: 20px; -fx-font-weight: bold;" text="Bienvenue" wrapText="true"> - <font> - <Font name="Calibri Bold Italic" size="20.0" /> - </font> - </Label> +<VBox xmlns="http://javafx.com/javafx/17.0.2" xmlns:fx="http://javafx.com/fxml/1" + fx:controller="ui.Controller.AdministrationPageController" + style="-fx-background-color: #f5f7fa; -fx-padding: 20;"> - <Label text="Vérifier l'existence d'un DMR :" /> + <!-- En-tête --> + <HBox alignment="CENTER_RIGHT" spacing="10" style="-fx-padding: 0 0 10 0;"> + <Label fx:id="welcomeLabel" style="-fx-font-size: 16px; -fx-text-fill: #2c3e50; -fx-font-weight: bold;" /> + <Button text="Déconnexion" onAction="#actionDeconnexion" + style="-fx-background-color: #e74c3c; -fx-text-fill: white; -fx-font-weight: bold; -fx-padding: 5 15;"/> + </HBox> - <Label text="Recherche Patient:" /> - <TextField fx:id="fieldRecherhe" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="-Infinity" prefHeight="26.0" prefWidth="794.0" promptText="Entrez nom, prénom ou n° sécu" /> - <HBox prefHeight="100.0" prefWidth="200.0" /> - <Button onAction="#recherchePatient" text="Rechercher" /> - <Label fx:id="messageLabel" style="-fx-text-fill: red;" /> - - <!-- Remplacement du ListView par un TableView pour les patients --> - <Label text="Liste des patients" /> - <TableView fx:id="tableViewPatients" maxWidth="1.7976931348623157E308" minHeight="-Infinity" prefHeight="200.0" prefWidth="790.0"> - <columns> - <TableColumn fx:id="columnIPP" prefWidth="100.0" text="IPP" /> - <TableColumn fx:id="columnNom" prefWidth="200.0" text="Nom" /> - <TableColumn fx:id="columnPrenom" prefWidth="200.0" text="Prénom" /> - <TableColumn fx:id="columnDateNaissance" prefWidth="299.20001220703125" text="Date de naissance" /> - </columns> - </TableView> + <!-- Titre principal --> + <Label text="Administration DMR" style="-fx-font-size: 24px; -fx-text-fill: #3498db; -fx-font-weight: bold; -fx-padding: 0 0 20 0;" /> - <Label text="DMR du patient sélectionné :" /> + <!-- Section Recherche --> + <VBox spacing="10" style="-fx-background-color: white; -fx-background-radius: 5; -fx-border-radius: 5; -fx-padding: 15; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.1), 5, 0, 0, 0);"> + <Label text="Rechercher un patient" style="-fx-font-size: 18px; -fx-text-fill: #2c3e50; -fx-font-weight: bold;" /> + + <HBox spacing="10" alignment="CENTER_LEFT"> + <TextField fx:id="fieldRecherhe" promptText="Nom, prénom ou n° sécurité sociale" + style="-fx-background-radius: 3; -fx-border-color: #bdc3c7; -fx-border-radius: 3; -fx-pref-width: 500;"/> + <Button text="Rechercher" onAction="#recherchePatient" + style="-fx-background-color: #3498db; -fx-text-fill: white; -fx-font-weight: bold; -fx-padding: 5 20;"/> + </HBox> + + <Label fx:id="messageLabel" style="-fx-text-fill: #e74c3c; -fx-font-size: 14px;" /> + </VBox> - <TableView fx:id="tableViewDmrPatient" layoutX="133.0" layoutY="228.0" maxWidth="1.7976931348623157E308" minHeight="-Infinity" prefHeight="202.0" prefWidth="790.0"> - <columns> - <TableColumn fx:id="columnPrenomDmr" prefWidth="156.0" text="Nom " /> - <TableColumn fx:id="columnNomDmr" prefWidth="148.0" text="Prénom" /> - <TableColumn fx:id="columnDateOuverture" prefWidth="142.4000244140625" text="Date d'ouverture" /> - <TableColumn fx:id="columnMotif" prefWidth="352.0" text="Motif" /> - </columns> - </TableView> - <Button onAction="#charger" text="Charger le DMR sélectionné" /> - <TextField fx:id="textFieldMotif" maxWidth="-Infinity" prefWidth="785.0" promptText="Entrez le motif du dossier médical de radiologie" /> - <Button fx:id="buttonCreerDMR" onAction="#creer" text="Créer un DMR" /> -</VBox> + <!-- Résultats Patients --> + <VBox spacing="10" style="-fx-padding: 20 0 0 0;"> + <Label text="Résultats de recherche" style="-fx-font-size: 18px; -fx-text-fill: #2c3e50; -fx-font-weight: bold;" /> + + <TableView fx:id="tableViewPatients" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.1), 5, 0, 0, 0);"> + <columns> + <TableColumn fx:id="columnIPP" text="IPP" style="-fx-font-weight: bold;" /> + <TableColumn fx:id="columnNom" text="Nom" style="-fx-font-weight: bold;" /> + <TableColumn fx:id="columnPrenom" text="Prénom" style="-fx-font-weight: bold;" /> + <TableColumn fx:id="columnDateNaissance" text="Date de naissance" style="-fx-font-weight: bold;" /> + </columns> + <columnResizePolicy> + <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> + </columnResizePolicy> + </TableView> + </VBox> + + <!-- DMR du patient sélectionné --> + <VBox spacing="10" style="-fx-padding: 20 0 0 0;"> + <Label text="DMR du patient sélectionné" style="-fx-font-size: 18px; -fx-text-fill: #2c3e50; -fx-font-weight: bold;" /> + + <TableView fx:id="tableViewDmrPatient" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.1), 5, 0, 0, 0);"> + <columns> + <TableColumn fx:id="columnNomDmr" text="Nom" style="-fx-font-weight: bold;" /> + <TableColumn fx:id="columnPrenomDmr" text="Prénom" style="-fx-font-weight: bold;" /> + <TableColumn fx:id="columnDateOuverture" text="Date d'ouverture" style="-fx-font-weight: bold;" /> + <TableColumn fx:id="columnMotif" text="Motif" style="-fx-font-weight: bold;" /> + </columns> + <columnResizePolicy> + <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> + </columnResizePolicy> + </TableView> + + <Button text="Charger le DMR sélectionné" onAction="#charger" + style="-fx-background-color: #2ecc71; -fx-text-fill: white; -fx-font-weight: bold; -fx-padding: 8 20; -fx-alignment: CENTER;"/> + </VBox> + + <!-- Création de DMR --> + <VBox spacing="10" style="-fx-padding: 20 0 0 0;"> + <Label text="Créer un nouveau DMR" style="-fx-font-size: 18px; -fx-text-fill: #2c3e50; -fx-font-weight: bold;" /> + + <TextField fx:id="textFieldMotif" promptText="Motif du nouveau DMR" + style="-fx-background-radius: 3; -fx-border-color: #bdc3c7; -fx-border-radius: 3;"/> + + <Button fx:id="buttonCreerDMR" text="Créer un DMR" onAction="#creer" + style="-fx-background-color: #9b59b6; -fx-text-fill: white; -fx-font-weight: bold; -fx-padding: 8 20;"/> + </VBox> +</VBox> \ No newline at end of file