diff --git a/src/main/java/com/CreateAssignmentsScreen.java b/src/main/java/com/CreateAssignmentsScreen.java index e66a874..19732bd 100644 --- a/src/main/java/com/CreateAssignmentsScreen.java +++ b/src/main/java/com/CreateAssignmentsScreen.java @@ -4,6 +4,7 @@ import com.carops.Job; import com.carops.Repairfile; import com.catalogs.EngineerCatalog; +import com.catalogs.RepairfileCatalog; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; @@ -56,6 +57,8 @@ else if (event.getSource() == setAssignment) { jobs.put(job, true); StartScreenController.supervisorEngineer.createAssignment(engineer,job,rp); messageBoxText.setText("Successfully added."); + RepairfileCatalog.save(); + }else{ messageBoxText.setText("Assignment has been already created."); } diff --git a/src/main/java/com/SupervisorScreenController.java b/src/main/java/com/SupervisorScreenController.java index 2dd3e04..137f263 100644 --- a/src/main/java/com/SupervisorScreenController.java +++ b/src/main/java/com/SupervisorScreenController.java @@ -41,9 +41,9 @@ void mouseClicked(MouseEvent event) throws IOException { else if (event.getSource() == searchBtn){ if (!checkVehicle()){ - plateNumberErr.setText("* Vehicle does not exist."); + plateNumberErr.setText("* Repairfile does not exist."); }else{ - plateNumberErr.setText("* Vehicle exist!"); + plateNumberErr.setText("* Repairfile exist!"); loadAppointmentToTable(); } @@ -56,7 +56,7 @@ else if (event.getSource() == searchBtn){ } r.setJobs(checkJobs); - + RepairfileCatalog.save(); StartScreenController.sceneGenerator("CreateAssignmentsScreen-view.fxml", event, "Supervisor Screen"); }