From f28d98720a0e51105418fd76890f3831d4b756a9 Mon Sep 17 00:00:00 2001 From: Alex Brattstrom Date: Wed, 30 Mar 2022 20:25:55 -0400 Subject: [PATCH 1/4] Local Save --- .../D22/teamZ/controllers/MedicalEquipmentDelivery.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java b/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java index 132bc03..a98225d 100644 --- a/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java +++ b/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java @@ -104,7 +104,13 @@ public void onSubmitButtonClicked(ActionEvent actionEvent) { temp.setIssuer("Pat"); // temp temp.setCurrentLoc("FDEPT00101"); // temp - // FDEPT00102 + /** + * Example: zDEPT00101 + * z as lowercase team letter + * DEPT as nodeType + * 001 as Room Number + * 01 as floor number (L2, L1, 01, 02, 03) + */ String target = "z" + enterNodeType.getText() + enterRoomNumber.getText() + enterFloorNumber.getText(); temp.setTargetLoc(target); From 3f8dfb5d93fcda07d188151c58a98b5a12ba0c3f Mon Sep 17 00:00:00 2001 From: Alex Brattstrom Date: Wed, 30 Mar 2022 21:48:31 -0400 Subject: [PATCH 2/4] Why pull fail --- .../controllers/MedicalEquipmentDelivery.java | 27 ++++++++++++------- .../teamZ/views/MedicalEquipmentDelivery.fxml | 24 +++++++++-------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java b/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java index a98225d..9e4c1d4 100644 --- a/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java +++ b/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java @@ -31,7 +31,9 @@ public class MedicalEquipmentDelivery { @FXML private TextField enterRoomNumber; @FXML private TextField enterFloorNumber; @FXML private TextField enterNodeType; + @FXML private TextField enterStaffAssigned; @FXML private ChoiceBox equipmentDropDown; + @FXML private ChoiceBox statusDropDown; private ObservableList locationList; private ObservableList equipmentList; @@ -65,8 +67,10 @@ public void initialize() { System.out.println(model.getNodeID()); } + // examples equipmentDropDown.setItems(FXCollections.observableArrayList("Bed", "IV", "Pillow")); - // //example + statusDropDown.setItems(FXCollections.observableArrayList("Pending", "Approved", "Denied")); + statusDropDown.setValue("Pending"); } @FXML @@ -82,7 +86,9 @@ public void onResetButtonClicked(ActionEvent event) throws IOException { enterRoomNumber.clear(); enterFloorNumber.clear(); enterNodeType.clear(); + enterStaffAssigned.clear(); equipmentDropDown.setValue(null); + statusDropDown.setValue(null); } @FXML @@ -90,7 +96,9 @@ public void onSubmitButtonClicked(ActionEvent actionEvent) { System.out.println("Room Number: " + enterRoomNumber.getText()); System.out.println("Floor Number: " + enterFloorNumber.getText()); System.out.println("nodeType: " + enterNodeType.getText()); + System.out.println("staff assigned: " + enterStaffAssigned.getText()); System.out.println("Equipment Selected: " + equipmentDropDown.getValue()); + System.out.println("Status Selected: " + statusDropDown.getValue()); MedEquipReq lastestReq = equipmentList.get(equipmentList.size() - 1); String id = lastestReq.getRequestID(); @@ -101,15 +109,12 @@ public void onSubmitButtonClicked(ActionEvent actionEvent) { temp.setStatus("Processing"); // default temp.setEquipment(equipmentDropDown.getValue().toString()); temp.setHandler("Jake"); // temp - temp.setIssuer("Pat"); // temp - temp.setCurrentLoc("FDEPT00101"); // temp + temp.setIssuer(enterStaffAssigned.getText()); + temp.setCurrentLoc("zDEPT00101"); // temp /** - * Example: zDEPT00101 - * z as lowercase team letter - * DEPT as nodeType - * 001 as Room Number - * 01 as floor number (L2, L1, 01, 02, 03) + * Example: zDEPT00101 z as lowercase team letter DEPT as nodeType 001 as Room Number 01 as + * floor number (L2, L1, 01, 02, 03) */ String target = "z" + enterNodeType.getText() + enterRoomNumber.getText() + enterFloorNumber.getText(); @@ -123,8 +128,12 @@ private void validateButton() { if (!enterRoomNumber.getText().trim().isEmpty() && !enterFloorNumber.getText().trim().isEmpty() && !enterNodeType.getText().trim().isEmpty() - && !equipmentDropDown.getSelectionModel().isEmpty()) { + && !enterStaffAssigned.getText().trim().isEmpty() + && !equipmentDropDown.getSelectionModel().isEmpty() + && !statusDropDown.getSelectionModel().isEmpty()) { submitButton.setDisable(false); + } else { + submitButton.setDisable(true); } } } diff --git a/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml b/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml index ba0feda..954a363 100644 --- a/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml +++ b/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml @@ -9,9 +9,13 @@ - + + + + + @@ -65,21 +69,11 @@ - - - - - - - - - - From f6917ba6069921d773c2177d41f9878b8b68425a Mon Sep 17 00:00:00 2001 From: Alex Brattstrom Date: Wed, 30 Mar 2022 21:49:59 -0400 Subject: [PATCH 3/4] MedicalEquipmentDelivery. Reset fix/additions --- myDB/seg0/c6b0.dat | Bin 0 -> 24576 bytes myDB/seg0/c6c1.dat | Bin 0 -> 16384 bytes myDB/seg0/c6d0.dat | Bin 0 -> 8192 bytes myDB/seg0/c6e1.dat | Bin 0 -> 8192 bytes myDB/seg0/d670.dat | Bin 0 -> 4096 bytes myDB/seg0/d681.dat | Bin 0 -> 4096 bytes myDB/seg0/d690.dat | Bin 0 -> 4096 bytes myDB/seg0/d6a1.dat | Bin 0 -> 4096 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 myDB/seg0/c6b0.dat create mode 100644 myDB/seg0/c6c1.dat create mode 100644 myDB/seg0/c6d0.dat create mode 100644 myDB/seg0/c6e1.dat create mode 100644 myDB/seg0/d670.dat create mode 100644 myDB/seg0/d681.dat create mode 100644 myDB/seg0/d690.dat create mode 100644 myDB/seg0/d6a1.dat diff --git a/myDB/seg0/c6b0.dat b/myDB/seg0/c6b0.dat new file mode 100644 index 0000000000000000000000000000000000000000..52cc5de284c83089fd815f2ebcf4d6fb1f1fccfc GIT binary patch literal 24576 zcmeI#yA8rH6aYX|fG8*^XqbRDqc9B6Qm_UqFatd^P*5SZ0GmXKtSI7BMbTMuV*4fj zoU0dhA%sz^O_?;!s+Gs<@UtrQz=y^<#y90R^YmK8I*W@>%dy{{*L`s*|9H=pn$!M2oNAZ zfB*pk1PBml3&{W5CPoMlAV7cs0RjXF5FkK+z|aKb|3kY`=OI9V009C72oNAZfB*pk JZGn{kzW@OD94P<* literal 0 HcmV?d00001 diff --git a/myDB/seg0/c6c1.dat b/myDB/seg0/c6c1.dat new file mode 100644 index 0000000000000000000000000000000000000000..0909f54abbae9919e534f9eaef184401edec2ef3 GIT binary patch literal 16384 zcmeI%F$%&k6oBCuhqj}uo13FfPL3YH#l<5yTft2cM^E4l1i>4qm+%Y<-a%iJMp~_6 z7X|qPO_TT1KKgA*Wh^2_ucTFMAJ{(I`Fu8}<7?U;!Y`*i&5ZPlM5=y~(c(IP+X~CC z+vmD_D)TNIXq@zBTA3nlU9Pt^qiHV21OWsPKmY**5I_I{1Q0*~fqxWOt|mre{W8D7 zuGmrd^sPSsm#qvrBIO@4_Gd|1VLKr3fH^00IagfB*srAbmne99t#00IagfB*srAbl;%Tv@-0lP1dZlfx8`CWSM6slesXjB#?N5h?u%tF8~S73M*Cvy zkZ()PzY6E~B!d6~2q1s}0tg_000IagfIx`?kKgetot`Yc-*3MEm-tVd2>}EUKmY** T5I_I{1Q0*~0R&Qk`gwoNK%x>A literal 0 HcmV?d00001 diff --git a/myDB/seg0/c6e1.dat b/myDB/seg0/c6e1.dat new file mode 100644 index 0000000000000000000000000000000000000000..45a74df7b67037115a377e9dc510cb5387a38597 GIT binary patch literal 8192 zcmeI$Ar8VY6oBE^iEff3;4mbhP#l7g%y0xWkl-*#PQVRN9DyUC=5cTecx%_C8-oN( z{w8~C-|N=wb9=H85u;Z*5*MwDaR~J|r}JkuTIr9=nO0VMWg@+>$>`y_{yI93KTRHe z|5WrYml)jjX2#JWeqSTHGqYVI#{vNa5I_I{1Q0*~0R#|00D*rLI2^Y|*7{}P2Rm`I z^zB1U&!% literal 0 HcmV?d00001 diff --git a/myDB/seg0/d690.dat b/myDB/seg0/d690.dat new file mode 100644 index 0000000000000000000000000000000000000000..39ba0e29efdc455ed343760ca2b979d5056b4d7f GIT binary patch literal 4096 zcmZQzpdSbTT2%tX%nS?yAX`O%n1_Lpfdj0HW~t>Aut*O iqaiRF0;3@?8UmvsFd71*Aut*OqaiRF0;3^-5dr{ivjWoq literal 0 HcmV?d00001 diff --git a/myDB/seg0/d6a1.dat b/myDB/seg0/d6a1.dat new file mode 100644 index 0000000000000000000000000000000000000000..e1a1ccff8fb200c1f843e7fcc152650e1a9b3958 GIT binary patch literal 4096 zcmZQzpdSbTT2%tX+zbo?Fk2ZJ7#TQV95k8{%4bCr2Xobat?$AnJ}NdE0;3@?8Umvs gFd71*Aut*OqaiRF0;3@?8UmvsFd71*A%GDA0CLF#NdN!< literal 0 HcmV?d00001 From a6a30a2e98d222a33928f6d7c3a0316f2eccb1e6 Mon Sep 17 00:00:00 2001 From: Alex Brattstrom Date: Wed, 30 Mar 2022 22:57:45 -0400 Subject: [PATCH 4/4] MedicalEquipmentDelivery. Request Submission confirmation --- .../teamZ/controllers/MedicalEquipmentDelivery.java | 11 ++++++++++- .../D22/teamZ/views/MedicalEquipmentDelivery.fxml | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java b/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java index 9e4c1d4..7ebc255 100644 --- a/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java +++ b/src/main/java/edu/wpi/cs3733/D22/teamZ/controllers/MedicalEquipmentDelivery.java @@ -28,6 +28,7 @@ public class MedicalEquipmentDelivery { @FXML private Label objectBodyText; @FXML private Label roomNumberLabel; @FXML private Label equipmentLabel; + @FXML private Label setSubmitStatus; @FXML private TextField enterRoomNumber; @FXML private TextField enterFloorNumber; @FXML private TextField enterNodeType; @@ -120,7 +121,15 @@ public void onSubmitButtonClicked(ActionEvent actionEvent) { "z" + enterNodeType.getText() + enterRoomNumber.getText() + enterFloorNumber.getText(); temp.setTargetLoc(target); - im1.addMedEquipReq(temp); + try { + im1.addMedEquipReq(temp); + setSubmitStatus.setText("Request Sent"); + System.out.println("Submitted Medical Equipment Delivery Request"); + } catch (Exception e) { + System.out.println("Submission Failed"); + setSubmitStatus.setText("Submission Failed"); + e.printStackTrace(); + } } @FXML diff --git a/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml b/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml index 954a363..4a25d23 100644 --- a/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml +++ b/src/main/resources/edu/wpi/cs3733/D22/teamZ/views/MedicalEquipmentDelivery.fxml @@ -108,5 +108,10 @@ +