Skip to content

Commit

Permalink
Save GUI changes to ser files.
Browse files Browse the repository at this point in the history
  • Loading branch information
billtsol committed Jun 29, 2023
1 parent 9c18e6c commit 6ad9807
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/CreateAssignmentsScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.");
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/SupervisorScreenController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -56,7 +56,7 @@ else if (event.getSource() == searchBtn){
}

r.setJobs(checkJobs);

RepairfileCatalog.save();
StartScreenController.sceneGenerator("CreateAssignmentsScreen-view.fxml", event, "Supervisor Screen");
}

Expand Down

0 comments on commit 6ad9807

Please sign in to comment.