Skip to content
Snippets Groups Projects
Commit 8b7178e3 authored by ArktikHunter's avatar ArktikHunter
Browse files

add/view shift position works

parent f98d01a6
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,8 @@ public class Controller {
Label addShiftError;
@FXML
ComboBox editEmployeePositions;
@FXML
ComboBox<String> addShiftPositionBox;
boolean isDaily;
......@@ -393,9 +395,10 @@ public class Controller {
String startTime = (String) addShiftStartTimeBox.getValue();
String endTime = (String) addShiftEndTimeBox.getValue();
LocalDate date = addShiftDatePicker.getValue();
String position = addShiftPositionBox.getValue();
addShiftError.setText(model.addShift(model.getIDbyIndex(index),date.toString(),Integer.parseInt(startTime),Integer.parseInt(endTime)));
//todo: show result to user?
addShiftError.setText(model.addShift(model.getIDbyIndex(index),date.toString(),Integer.parseInt(startTime),
Integer.parseInt(endTime), position));
}
public void submitNewAvailability(MouseEvent e){
......
......@@ -26,7 +26,7 @@
<HBox fx:id="addShiftEmployeeHBox1" layoutX="10.0" layoutY="110.0" prefHeight="100.0" prefWidth="200.0">
<children>
<Label prefWidth="60.0" text="Position" />
<ComboBox fx:id="addPositionBox" onMouseClicked="#populatePositionBox" prefWidth="150.0" />
<ComboBox fx:id="addShiftPositionBox" onMouseClicked="#populatePositionBox" prefWidth="150.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="200.0">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment