package seedu.address.ui;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import seedu.address.model.task.ReadOnlyPerson;

public class PersonCard extends UiPart<Region> {

    private static final String FXML = "PersonListCard.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 FlowPane tags;

    public PersonCard(ReadOnlyPerson person, int displayedIndex) {
        super(FXML);
        name.setText(person.getName().fullName);
        id.setText(displayedIndex + ". ");
        phone.setText(person.getPhone().value);
        address.setText(person.getAddress().value);
        email.setText(person.getEmail().value);
        initTags(person);
    }

    private void initTags(ReadOnlyPerson person) {
        person.getTags().forEach(tag -> tags.getChildren().add(new Label(tag.tagName)));
    }
}

@@ -225,22 +225,20 @@
 ReadOnly
-Person
+Task
 ;%0A%0Apubli
@@ -476,20 +476,19 @@
 e Label 
-phon
+dat
 e;%0A    @
@@ -510,23 +510,19 @@
 e Label 
-address
+tag
 ;%0A    @F
@@ -543,21 +543,24 @@
 e Label 
-email
+priority
 ;%0A    @F
@@ -621,29 +621,25 @@
 ReadOnly
-Person person
+Task task
 , int di
@@ -692,30 +692,28 @@
 ame.setText(
-person
+task
 .getName().f
@@ -777,12 +777,11 @@
     
-phon
+dat
 e.se
@@ -790,22 +790,19 @@
 ext(
-person.getPhon
+task.getDat
 e().
@@ -817,23 +817,19 @@
         
-address
+tag
 .setText
@@ -833,33 +833,32 @@
 ext(
-person.getAddress().value
+task.getTag().toString()
 );%0A 
@@ -868,13 +868,16 @@
     
-email
+priority
 .set
@@ -885,23 +885,24 @@
 ext(
-person.getEmail
+task.getPriority
 ().v
@@ -925,22 +925,20 @@
 nitTags(
-person
+task
 );%0A    %7D
@@ -977,21 +977,17 @@
 Only
-Person person
+Task task
 ) %7B%0A
@@ -998,14 +998,12 @@
     
-person
+task
 .get

Edit PersonCard accordingly