@using InventoryTraker.Web.Helpers
@model InventoryTraker.Web.Models.InventoryViewModel
@{
	var inventory = Html.Angular().ModelFor("inventory");
}

<table class="table table-striped">
    <thead>
    <tr>
        <th class="control-column"></th>
        <th>Id</th>
        <th>Program Name</th>
        <th>Description</th>
        <th>Shred Ready Date</th>
        <th>Added Date</th>
        <th>Memo</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="inventory in vm.inventories | filter:{quantity: 1}">
        <td>
            <a href="" ng-click="vm.edit(inventory)" title="Details"><i class="fa fa-edit"></i></a>
        </td>
        <td>@inventory.BindingFor(x => x.Id)</td>
        <td>@inventory.BindingFor(x => x.ProgramName)</td>
        <td>@inventory.BindingFor(x => x.Description)</td>
        <td ng-class="{ danger: vm.isShredReady(inventory) }">
            @inventory.BindingFor(x => x.ShredReadyDate, "date:'shortDate'")
        </td>
        <td>@inventory.BindingFor(x => x.AddedDate, "date:'shortDate'")</td>
        <td>@inventory.BindingFor(x => x.Memo)</td>
    </tr>
   </tbody>
</table>
