Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added myDB/seg0/c6b0.dat
Binary file not shown.
Binary file added myDB/seg0/c6c1.dat
Binary file not shown.
Binary file added myDB/seg0/c6d0.dat
Binary file not shown.
Binary file added myDB/seg0/c6e1.dat
Binary file not shown.
Binary file added myDB/seg0/d670.dat
Binary file not shown.
Binary file added myDB/seg0/d681.dat
Binary file not shown.
Binary file added myDB/seg0/d690.dat
Binary file not shown.
Binary file added myDB/seg0/d6a1.dat
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ 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;
@FXML private TextField enterStaffAssigned;
@FXML private ChoiceBox equipmentDropDown;
@FXML private ChoiceBox statusDropDown;

private ObservableList<Location> locationList;
private ObservableList<MedEquipReq> equipmentList;
Expand Down Expand Up @@ -65,8 +68,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
Expand All @@ -82,15 +87,19 @@ public void onResetButtonClicked(ActionEvent event) throws IOException {
enterRoomNumber.clear();
enterFloorNumber.clear();
enterNodeType.clear();
enterStaffAssigned.clear();
equipmentDropDown.setValue(null);
statusDropDown.setValue(null);
}

@FXML
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();
Expand All @@ -101,24 +110,39 @@ 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

// 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);

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
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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>

<?import javafx.scene.control.ListView?>
<AnchorPane fx:id="MedicalEquipmentDeliveryMedicalEquipmentDelivery" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.wpi.cs3733.D22.teamZ.controllers.MedicalEquipmentDelivery">
<children>
<ChoiceBox fx:id="statusDropDown" layoutX="402.0" layoutY="112.0" onMouseExited="#validateButton" prefHeight="25.0" prefWidth="149.0" style="-fx-background-color: &quot;FFFFFF&quot;; -fx-background-radius: 2;">
<effect>
<DropShadow />
</effect>
</ChoiceBox>
<JFXButton fx:id="backButton" layoutX="23.0" onAction="#onBackButtonClicked" style="-fx-background-color: #0075FF; -fx-background-radius: 2; -fx-translate-y: 13; -fx-translate-x: 126; -fx-pref-width: 128; -fx-pref-height: 26;" text="Back to Dashboard" textFill="WHITE">
<font>
<Font name="System Bold" size="10.0" />
Expand Down Expand Up @@ -65,21 +69,11 @@
<Font name="Segoe UI Bold" size="9.0" />
</font>
</Label>
<ChoiceBox layoutX="402.0" layoutY="112.0" prefHeight="25.0" prefWidth="149.0" style="-fx-background-color: &quot;FFFFFF&quot;; -fx-background-radius: 2;">
<effect>
<DropShadow />
</effect>
</ChoiceBox>
<Label layoutX="277.0" layoutY="137.0" prefHeight="17.0" prefWidth="158.0" style="-fx-font-family: &quot;Segoe UI&quot;; -fx-translate-x: 126; -fx-translate-y: 10;" text="Staff Assigned" textFill="#7b7b7b">
<font>
<Font name="Segoe UI Bold" size="9.0" />
</font>
</Label>
<TextField layoutX="402.0" layoutY="170.0">
<effect>
<DropShadow />
</effect>
</TextField>
<Label layoutX="24.0" layoutY="139.0" prefHeight="17.0" prefWidth="158.0" style="-fx-font-family: &quot;Segoe UI&quot;; -fx-translate-x: 126; -fx-translate-y: 10;" text="Floor Number" textFill="#7b7b7b">
<font>
<Font name="Segoe UI Bold" size="9.0" />
Expand All @@ -106,5 +100,18 @@
<Insets />
</opaqueInsets>
</TextField>
<TextField fx:id="enterStaffAssigned" layoutX="402.0" layoutY="172.0" onKeyReleased="#validateButton" promptText="Enter staff name">
<effect>
<DropShadow />
</effect>
<opaqueInsets>
<Insets />
</opaqueInsets>
</TextField>
<Label fx:id="setSubmitStatus" layoutX="20.0" layoutY="358.0" prefHeight="17.0" prefWidth="158.0" style="-fx-font-family: &quot;Segoe UI&quot;; -fx-translate-x: 126; -fx-translate-y: 10;" textFill="#7b7b7b">
<font>
<Font name="Segoe UI Bold" size="9.0" />
</font>
</Label>
</children>
</AnchorPane>