<commit_before>package seedu.flexitrack.ui;

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

public class TaskCard extends UiPart{

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

    @FXML
    private HBox cardPane;
    @FXML
    private Label title;
    @FXML
    private Label id;
    @FXML
    private Label dateTime;
    @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() {
    	String dateInfo;
    	if(task.getIsTask()){
    	    dateInfo = " by " + task.getDueDate();
    	}else if(task.getIsEvent()){
    	    dateInfo =  " from " + task.getStartTime() +" to "+ task.getEndTime();
    	}else{
    	    dateInfo = "";
    	}
    	dateTime.setText(dateInfo);
        title.setText(task.getIsDone()?"(Done)":"" + task.getName().fullName );
        id.setText(displayedIndex + ". ");
        tags.setText(task.tagsString());
    }

    public HBox getLayout() {
        return cardPane;
    }

    @Override
    public void setNode(Node node) {
        cardPane = (HBox)node;
    }<commit_msg>Fix mard done display<commit_after>package seedu.flexitrack.ui;

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

public class TaskCard extends UiPart{

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

    @FXML
    private HBox cardPane;
    @FXML
    private Label title;
    @FXML
    private Label id;
    @FXML
    private Label dateTime;
    @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() {
        String isDone = task.getIsDone()?"(Done)":"";
    	String dateInfo;
    	if(task.getIsTask()){
    	    dateInfo = " by " + task.getDueDate();
    	}else if(task.getIsEvent()){
    	    dateInfo =  " from " + task.getStartTime() +" to "+ task.getEndTime();
    	}else{
    	    dateInfo = "";
    	}
    	dateTime.setText(dateInfo);
        title.setText(isDone + task.getName().fullName);
        id.setText(displayedIndex + ". ");
        tags.setText(task.tagsString());
    }

    public HBox getLayout() {
        return cardPane;
    }

    @Override
    public void setNode(Node node) {
        cardPane = (HBox)node;
    }
{'fraction_non_alphanumeric': 0.1124792013311148, 'fraction_numerical': 0.0, 'mean_word_length': 2.608643457382953, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3513429', 'n_tokens_mistral': 969, 'n_tokens_neox': 951, 'n_words': 214}