﻿@model IEnumerable<BatteryCommander.Common.Models.Qualification>

@using BatteryCommander.Common.Models;

@{
    ViewBag.Title = "Qualifications";
}

<h2>@ViewBag.Title</h2>

<p>
    @Html.ActionLink("Add New", "New")
</p>
<table class="table table-striped">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>GO</th>
        <th>NOGO</th>
        <th>UNKNOWN</th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>@Html.DisplayFor(modelItem => item.Name)</td>
            <td>@item.SoldierQualifications.Count(q => q.Status == QualificationStatus.Pass)</td>
            <td>@item.SoldierQualifications.Count(q => q.Status == QualificationStatus.Fail)</td>
            <td>@item.SoldierQualifications.Count(q => q.Status == QualificationStatus.Unknown)</td>
            <td>
                @Html.ActionLink("View", "View", new { qualificationId = item.Id }) |
                <a href="~/Qualification/@item.Id/Update">Bulk Update Soldiers</a>
            </td>
        </tr>
    }

</table>

﻿@model IEnumerable<BatteryCommander.Common.Models.Qualification>

@using BatteryCommander.Common.Models;

@{
    ViewBag.Title = "Qualifications";
}

<h2>@ViewBag.Title</h2>

<p>
    @Html.ActionLink("Add New", "New")
</p>
<table class="table table-striped">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>GO</th>
        <th>NOGO</th>
        <th>UNKNOWN</th>
        <th>Tasks</th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>@Html.DisplayFor(modelItem => item.Name)</td>
            <td>@item.SoldierQualifications.Count(q => q.Status == QualificationStatus.Pass)</td>
            <td>@item.SoldierQualifications.Count(q => q.Status == QualificationStatus.Fail)</td>
            <td>@item.SoldierQualifications.Count(q => q.Status == QualificationStatus.Unknown)</td>
            <td>
                @foreach (var task in item.Tasks)
                {
                    <li>@Html.DisplayFor(t => task)</li>
                }
            </td>
            <td>
                @Html.ActionLink("View", "View", new { qualificationId = item.Id }) |
                <a href="~/Qualification/@item.Id/Update">Bulk Update Soldiers</a>
            </td>
        </tr>
    }

</table>

Add subtasks to main screen on tasks
Add subtasks to main screen on tasks
