package task.timer.view;

import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import task.timer.ViewLoader;
import task.timer.helper.Helper;
import task.timer.model.User;

public class MainManagerController {
/*	public static boolean changedUsersData;
	public static boolean changedProjectsData;*/
	
	
	@FXML private Label loggedUserName;
	
	@FXML private ManagerTabAddProjectController projectController;
	@FXML private ManagerTabAddEmployeerController employeerController;
	@FXML private ManagerTabSearchController searchController;
	
	@FXML private void initialize(){
		loggedUserName.setText(
				LoginWindowController.loggedUser.getFirstName() 
				+ " " 
				+ LoginWindowController.loggedUser.getLastName());
	}
	
	@FXML private void clearTabProjects(){
		projectController.clearFields();
	}
	
	@FXML private void clearTabEmployeer(){
		employeerController.clearFields();
		employeerController.hidePassword();
	}
	
	@FXML private void readUsersAndProjects(){
		searchController.refreshChooseUser();
		searchController.refreshChooseProject();	
		searchController.clearFields();
	}
	
	@FXML private void logout(MouseEvent event){
		
		ViewLoader<AnchorPane, Object> viewLoader = new ViewLoader<AnchorPane, Object>("view/LoginWindow.fxml");
		Helper.changeStage(viewLoader, event);
		
	}

	
	
	
}

@@ -23,89 +23,8 @@
 w;%0A%0A
-import javafx.scene.Node;%0Aimport javafx.scene.Parent;%0Aimport javafx.scene.Scene;%0A
 impo
@@ -135,68 +135,8 @@
 ne;%0A
-import javafx.stage.Stage;%0Aimport javafx.event.ActionEvent;%0A
 impo
@@ -222,38 +222,8 @@
 per;
-%0Aimport task.timer.model.User;
 %0A%0Apu
@@ -261,99 +261,8 @@
 r %7B%0A
-/*%09public static boolean changedUsersData;%0A%09public static boolean changedProjectsData;*/%0A%09%0A
 %09%0A%09@
@@ -836,16 +836,58 @@
 elds();%0A
+%09%09employeerController.hideLackMessages();%0A
 %09%09employ

delete unnecessary imports