Filter vehicle services
This commit is contained in:
@@ -4,17 +4,15 @@
|
||||
@{
|
||||
ViewBag.Title = "Fuel Logs";
|
||||
var grid = new WebGrid(Model.FuelLogs, rowsPerPage: 45);
|
||||
var parameters = new {FiscalYear = Model.FiscalYear, Model.Month, Model.Unmatched};
|
||||
}
|
||||
@section Styles {
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
var parameters = new {FiscalYear = Model.Year, Model.Month, Model.Unmatched};
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
<script type="text/javascript">
|
||||
var availableLogYearMonths = @Html.Raw(Json.Encode(Model.AvailableYearMonths));
|
||||
@if (Model.FiscalYear != null)
|
||||
@if (Model.Year != null)
|
||||
{
|
||||
<text>var selectedYear = "@Model.FiscalYear";</text>
|
||||
<text>var selectedYear = "@Model.Year";</text>
|
||||
<text>var selectedMonth = "@Model.Month";</text>
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,13 +3,17 @@
|
||||
@model MileageTraker.Web.ViewModels.FuelLog.FuelLogResultsViewModel
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
@Html.Label("FiscalYear", "Fiscal Year")
|
||||
@Html.DropDownList("FiscalYear", new SelectList(Model.AvailableYearMonths.Keys, Model.FiscalYear), "Select Year", new { @class = "input-small" })
|
||||
</div>
|
||||
<div class="span3">
|
||||
@Html.Label("Year", "Year")
|
||||
@Html.DropDownList("Year", new SelectList(Model.AvailableYearMonths.Keys, Model.Year), "Select Year", new { @class = "input-small" })
|
||||
</div>
|
||||
<div class="span2">
|
||||
@Html.Label("Month", "Month")
|
||||
@Html.DropDownList("Month", new SelectList(Model.SelectedYearMonths, Model.Month), "All Months", new { @class = "input-small" })
|
||||
@Html.DropDownList("Month", new SelectList(Model.SelectedYearMonths, Model.Month), "All Months", new { @class = "input-mini" })
|
||||
</div>
|
||||
<div class="span2">
|
||||
@Html.Label("MonthRange", "Range")
|
||||
@Html.DropDownList("MonthRange", new SelectList(Enumerable.Range(1,12), Model.MonthRange), new { @class = "input-mini" })
|
||||
</div>
|
||||
<div class="span3" >
|
||||
@Html.Label("Unmatched", "Unmatched Only", new{style = "padding-top:22px"})
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
@using MileageTraker.Web.Models
|
||||
@using MileageTraker.Web.Utility
|
||||
@model MileageTraker.Web.ViewModels.VehicleService.VehicleServiceResultsViewModel
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
@Html.Label("Year", "Year")
|
||||
@Html.DropDownList("Year", new SelectList(Model.AvailableYearMonths.Keys, Model.Year), "Select Year", new { @class = "input-small" })
|
||||
</div>
|
||||
<div class="span3">
|
||||
@Html.Label("Month", "Month")
|
||||
@Html.DropDownList("Month", new SelectList(Model.SelectedYearMonths, Model.Month), "All Months", new { @class = "input-small" })
|
||||
</div>
|
||||
<div class="span2">
|
||||
@Html.Label("MonthRange", "Range")
|
||||
@Html.DropDownList("MonthRange", new SelectList(Enumerable.Range(1,12), Model.MonthRange), new { @class = "input-mini" })
|
||||
</div>
|
||||
<div class="span2">
|
||||
<input type="submit" value="Filter" class="btn" style="margin-top:1.75em" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,8 +5,26 @@
|
||||
var grid = new WebGrid(Model.ServiceItems, rowsPerPage: 45);
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
<script type="text/javascript">
|
||||
var availableLogYearMonths = @Html.Raw(Json.Encode(Model.AvailableYearMonths));
|
||||
@if (Model.Year != null)
|
||||
{
|
||||
<text>var selectedYear = "@Model.Year";</text>
|
||||
<text>var selectedMonth = "@Model.Month";</text>
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<div class="btn-toolbar pull-right" style="width:400px">
|
||||
@using (Html.BeginForm("Index", "VehicleService", FormMethod.Get, new { id = "filter", @class = "form" }))
|
||||
{
|
||||
@Html.EditorForModel()
|
||||
}
|
||||
</div>
|
||||
|
||||
<h2 id="vehicle-title"><i class="fa fa-wrench"></i> @ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar pull-left">
|
||||
@@ -16,7 +34,7 @@
|
||||
|
||||
@grid.GetHtml(columns:
|
||||
grid.Columns(
|
||||
grid.Column("InvoiceDate", "Invoice Date"),
|
||||
grid.Column("InvoiceDate", "Invoice Date", item => item.InvoiceDate.ToString("d")),
|
||||
grid.Column("VehicleID", "Vehicle Id"),
|
||||
grid.Column("ServiceCenterName", "Service Center Name"),
|
||||
grid.Column("Price", "Price"),
|
||||
|
||||
Reference in New Issue
Block a user