NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

=================================================================
kindly refer it(Filter) nd please must make changes from your side...no need to thank me..
==================================================================
@model IEnumerable<QGS.Entities.BusinessEntities.CarVM>

@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Vehicle Details</title>

<!-- Bootstrap CSS CDN -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- Our Custom CSS -->
<link href="~/Content/css/car/CarDetailsDesign.css" rel="stylesheet" />

<!-- Scrollbar Custom CSS -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css">

</head>

<body>

<div class="wrapper">
<!-- Sidebar -->
<nav id="sidebar">
<div class="sidebar-header">
<center>
<h5>SELECT YOUR FILTER</h5>
</center>
</div>

<ul class="list-unstyled components smooth-scroll">

<li>
<a href="#homeSubmenu" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">Brand</a>
<ul class="collapse list-unstyled" id="homeSubmenu">
<li>
<form id="brandList"></form>

</li>

</ul>
</li>

<li>
<a href="#pageSubmenu" data-toggle="collapse" aria-expanded="false"
class="dropdown-toggle">Fuel Type</a>
<ul class="collapse list-unstyled" id="pageSubmenu">
<li>
<form id="fuelList"></form>
</li>
</ul>
</li>
<li>
<a href="#pageSubmenu1" data-toggle="collapse" aria-expanded="false"
class="dropdown-toggle">Gear Box</a>
<ul class="collapse list-unstyled" id="pageSubmenu1">
<li>
<form id="transmissionList"></form>
</li>
</ul>
</li>
<li>
<a href="#pageSubmenu2" data-toggle="collapse" aria-expanded="false"
class="dropdown-toggle">Body Style</a>
<ul class="collapse list-unstyled" id="pageSubmenu2">
<li>
<form id="typeList"></form>
</li>
</ul>
</li>
<li>
<a href="#pageSubmenu3" data-toggle="collapse" aria-expanded="false"
class="dropdown-toggle">Range</a>
<ul class="collapse list-unstyled" id="pageSubmenu3">
<li>
<form id="rangeList">
</form>
</li>
</ul>
</li>

</ul>
<div class="text-center">
<button type="button" class="btn-dark" onclick="onResetFilter()">RESET FILTER</button>
</div>




</nav>

<!-- Page Content -->
<div id="content">

<nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">

<button type="button" id="sidebarCollapse" class="btn btn-info">
<i class="fas fa-chevron-right"></i>
</button>
<a class="navbar-brand" href="/Home/Index"><h2 style="margin-left:30px;">QGS<em style="font-style:normal;color:red">VL</em></h2></a>
<button class="btn btn-dark d-inline-block d-lg-none ml-auto" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-align-justify"></i>
</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">

<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#" disabled>Welcome @User.Identity.Name</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/Home/Index">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="http://localhost:50093/car/[email protected]">My Quotes</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">FAQ</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/Account/Logout"><i class="fas fa-sign-out-alt"></i>Log Out</a>
</li>
</ul>
</div>
</div>
</nav>




<div class="container">
<div class="row">
@foreach (var item in Model)
{
<div class="col-sm-12 col-md-6 col-lg-4 car-item">

<div class="card" onclick="location.href = '/Car/GetCarDetails/@item.CarId'">
<img src="@Url.Content(item.Image)" class="card-img-top" style="height:224px" />
<div class="card-body serif">

<center><h4 style="height:50px">@item.ModelName</h4></center><br>
<strong>Fuel Type: </strong> @item.FuelType<br>
<strong>Gear Box: </strong> @item.Transmission<br>
<strong>CO2: </strong>@item.Co2Emission_g_Km_ g/km<br>
<strong>Consumption: </strong>@item.Consumption_L_100Km_ L/100Km<br>
<div style="display:flex;justify-content:flex-end;width:100%;">
<span class="product-price" style="flex-wrap:wrap;display:flex;margin-right:-31px;">
<b>&euro;@item.Price </b>
</span>
</div>
</div>
</div>

</div>
}
</div>
</div>
</div>
</div>

<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/solid.js"
integrity="sha384-tzzSw1/Vo+0N5UhStP3bvwWPq+uvzCMfrN1fEFe+xBmv1C/AtVX5K0uZtmcHitFZ"
crossorigin="anonymous"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/fontawesome.js"
integrity="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY"
crossorigin="anonymous"></script>

<!-- card JS -->

<script src="~/Scripts/jquery-3.4.1.min.js"></script>
<!-- jQuery CDN - Slim version (=without AJAX) -->
<!-- <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> -->
<!-- <script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script> -->
<!-- Popper.JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"
integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ"
crossorigin="anonymous"></script>
<!-- Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
<!-- jQuery Custom Scroller CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.concat.min.js"></script>

<script type="text/javascript">
var selectedCarList = [];
var selectedFuelList = [];
var selectedTransmissionList = [];
var selectedTypesList = [];
var selectedRange = [];
function onResetFilter() {
$.each($('input[type=checkbox]'), function (index, obj) {
obj.checked = false;
});
selectedCarList = [];
selectedFuelList = [];
selectedRange = [];
selectedTransmissionList = [];
selectedTypesList = [];

$('.car-item').filter(function (index) {
$(this).removeClass('d-none');
});
}
$(document).ready(function () {
//for filter
var cars = @Html.Raw(Json.Encode(Model));
console.log(cars);


var brands = [];
var fuelTypes = [];
var transmissions = [];
var types = [];
var range = {
0: {
min: 0,
max: 349
},
1: {
min: 350,
max: 599
},
2: {
min: 600,
max: 849
},
3: {
min: 850,
max: 1087
},
4: {
min: 1088,
max: 2000
}
}
$.each(cars, function (index, car) {


if (!brands.includes(car.Brand)) {
brands.push(car.Brand);
}
if (!fuelTypes.includes(car.FuelType)) {
fuelTypes.push(car.FuelType);
}
if (!transmissions.includes(car.Transmission)) {
transmissions.push(car.Transmission);
}
if (!types.includes(car.Type)) {
types.push(car.Type);
}
});

$.each(brands, function (index, brand) {
str = '<input type="checkbox" value="' + brand + '">' + brand + '<br>';
$('#brandList').append(str);
});

$.each(fuelTypes, function (index, fuelType) {
str = '<input type="checkbox" value="' + fuelType + '">' + fuelType + '<br>';
$('#fuelList').append(str);
});
$.each(transmissions, function (index, transmission) {
str = '<input type="checkbox" value="' + transmission + '">' + transmission + '<br>';
$('#transmissionList').append(str);
});

$.each(types, function (index, type) {
str = '<input type="checkbox" value="' + type + '">' + type + '<br>';
$('#typeList').append(str);
});

$.each(range, function (index, obj) {
str = '<input type="checkbox" value="' + index + '">' + obj.min + '-' + obj.max + '<br>';
$('#rangeList').append(str);
});



$("input[type=checkbox]").change(function (e) {
//console.log(selectedCarList);
var value = e.target.value;
if (e.target.checked) {
//console.log($(this).val());

if (brands.includes(value)) {
selectedCarList.push(value);
}
else if (fuelTypes.includes(value)) {
selectedFuelList.push(value);
}
else if (transmissions.includes(value)) {
selectedTransmissionList.push(value);
}
else if (types.includes(value)) {
selectedTypesList.push(value);
}
else if (Object.keys(range).includes(value)) {
selectedRange.push(value);
}
}
else {
if (!e.target.checked) {
if (selectedCarList.includes(value)) {
var index = selectedCarList.indexOf(value);
selectedCarList.splice(index, 1);
}
else if (selectedFuelList.includes(value)) {
var index = selectedFuelList.indexOf(value);
selectedFuelList.splice(index, 1);
}
else if (selectedTransmissionList.includes(value)) {
var index = selectedTransmissionList.indexOf(value);
selectedTransmissionList.splice(index, 1);
}
else if (selectedTypesList.includes(value)) {
var index = selectedTypesList.indexOf(value);
selectedTypesList.splice(index, 1);
}
else if (selectedRange.includes(value)) {
var index = selectedRange.indexOf(value);
selectedRange.splice(index, 1);
}
}
}

//console.log(selectedCarList);
//console.log(selectedFuelList);
$('.car-item').filter(function (index) {
var brand = cars[index].Brand;
var brand = cars[index].Brand;
var fuel = cars[index].FuelType;
var trans = cars[index].Transmission;
var type = cars[index].Type;
var brandCheck = selectedCarList.length > 0 ? selectedCarList.includes(brand) : true;
var fuelCheck = selectedFuelList.length > 0 ? selectedFuelList.includes(fuel) : true;
var transmissionCheck = selectedTransmissionList.length > 0 ? selectedTransmissionList.includes(trans) : true;
var typeCheck = selectedTypesList.length > 0 ? selectedTypesList.includes(type) : true;


var rangeCheck = false;
if (selectedRange.length > 0) {
var price = cars[index].Price;
for (var index of selectedRange) {

var min = range[index].min;
var max = range[index].max;
if (price >= min && price <= max) rangeCheck = true;
}
} else {
rangeCheck = true;
}
var r = brandCheck && fuelCheck && transmissionCheck && typeCheck && rangeCheck;
if (r) {
$(this).removeClass('d-none');
}
else {
$(this).addClass('d-none');
}
if (selectedCarList.length == 0 && selectedFuelList.length == 0 && selectedTransmissionList.length == 0 && selectedTypesList.length == 0 && selectedRange.length==0) {
$(this).removeClass('d-none');
}
});
});

//for card
$(".card").hover(
function () {

$(this).animate({
marginTop: "-1%",
}, 400);

},

function () {
$(this).animate({
marginTop: "0",
}, 400);
}

);
$("#sidebar").mCustomScrollbar({
theme: "minimal"
});

$('#sidebarCollapse').on('click', function () {
$('#sidebar, #content').toggleClass('active');
$('.collapse.in').toggleClass('in');

$('a[aria-expanded=true]').attr('aria-expanded', 'false');
});



});
</script>

</body>

</html>
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.