mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Sort storage by machines admin view.
This commit is contained in:
@@ -55,7 +55,8 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
{
|
{
|
||||||
IIncludableQueryable<StorageByMachine, Machine> cicmContext =
|
IIncludableQueryable<StorageByMachine, Machine> cicmContext =
|
||||||
_context.StorageByMachine.Include(s => s.Machine);
|
_context.StorageByMachine.Include(s => s.Machine);
|
||||||
return View(await cicmContext.ToListAsync());
|
return View(await cicmContext.OrderBy(s => s.Machine.Company.Name).ThenBy(s => s.Machine.Name)
|
||||||
|
.ToListAsync());
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/StorageByMachines/Details/5
|
// GET: Admin/StorageByMachines/Details/5
|
||||||
|
|||||||
@@ -47,6 +47,12 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Machine.Company)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Machine)
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Type)
|
@Html.DisplayNameFor(model => model.Type)
|
||||||
</th>
|
</th>
|
||||||
@@ -56,9 +62,6 @@
|
|||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Capacity)
|
@Html.DisplayNameFor(model => model.Capacity)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.Machine)
|
|
||||||
</th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -66,6 +69,12 @@
|
|||||||
@foreach(StorageByMachine item in Model)
|
@foreach(StorageByMachine item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Machine.Company.Name)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Machine.Name)
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Type)
|
@Html.DisplayFor(modelItem => item.Type)
|
||||||
</td>
|
</td>
|
||||||
@@ -75,9 +84,6 @@
|
|||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Capacity)
|
@Html.DisplayFor(modelItem => item.Capacity)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Machine.Name)
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<a asp-action="Details"
|
<a asp-action="Details"
|
||||||
asp-route-id="@item.Id"
|
asp-route-id="@item.Id"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||||
<Version>3.0.99.394</Version>
|
<Version>3.0.99.395</Version>
|
||||||
<Company>Canary Islands Computer Museum</Company>
|
<Company>Canary Islands Computer Museum</Company>
|
||||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||||
<Product>Canary Islands Computer Museum Website</Product>
|
<Product>Canary Islands Computer Museum Website</Product>
|
||||||
|
|||||||
Reference in New Issue
Block a user