package seedu.gtd.ui;

import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import seedu.gtd.model.task.ReadOnlyTask;

public class TaskCard extends UiPart{

    private static final String FXML = "TaskListCard.fxml";

    @FXML
    private HBox cardPane;
    @FXML
    private Label name;
    @FXML
    private Label id;
    @FXML
    private Label phone;
    @FXML
    private Label address;
    @FXML
    private Label email;
    @FXML
    private Label tags;

    private ReadOnlyTask task;
    private int displayedIndex;

    public TaskCard(){

    }

    public static TaskCard load(ReadOnlyTask task, int displayedIndex){
        TaskCard card = new TaskCard();
        card.task = task;
        card.displayedIndex = displayedIndex;
        return UiPartLoader.loadUiPart(card);
    }

    @FXML
    public void initialize() {
        name.setText(task.getName().fullName);
        id.setText(displayedIndex + ". ");
        phone.setText(task.getDueDate().value);
        address.setText(task.getPriority().value);
        email.setText(task.getAddress().value);
        tags.setText(task.tagsString());
    }

    public HBox getLayout() {
        return cardPane;
    }

    @Override
    public void setNode(Node node) {
        cardPane = (HBox)node;
    }

    @Override
    public String getFxmlPath() {
        return FXML;
    }
}
@@ -409,20 +409,22 @@
 e Label 
-phon
+dueDat
 e;%0A    @
@@ -483,21 +483,24 @@
 e Label 
-email
+priority
 ;%0A    @F
@@ -1003,12 +1003,14 @@
     
-phon
+dueDat
 e.se
@@ -1077,16 +1077,15 @@
 .get
-Priority
+Address
 ().v
@@ -1103,13 +1103,16 @@
     
-email
+priority
 .set
@@ -1116,39 +1116,40 @@
 setText(task.get
-Address
+Priority
 ().value);%0A     

Fix JUnit errors - 11E, 2F