master
NoNameGuy 2017-09-03 21:29:02 +01:00
parent 7a16b5220d
commit e5079512a6
7 changed files with 118 additions and 30 deletions

View File

@ -78,6 +78,12 @@ class LandingController extends BaseController
return View('landing_page', ['district' => $districts, 'districtsName' => $districtsName, 'brandsName' => $brandsName, 'centerMapCoordinates' => $coordinates, 'stations' => $stations, 'fuels' => $fuels]);
}
public function combDetails()
{
# code...
return View('details');
}
private function getStations($district, $brand, $fuelType)
{
$stations=null;

View File

@ -41,3 +41,13 @@ footer {
width: 85%;
height: 650px;
}
#mapDetails{
width: 85%;
height: 650px;
}
#postosMaisBaratos{
background-color:silver;
color:black
}

View File

@ -151,6 +151,16 @@ var array2;
}
function initMapDetails() {
var map = new google.maps.Map(document.getElementById('mapDetails'), {
zoom: 7,
center: {lat: 39.7495, lng: -8.8077}
});
}
function getLocation() {
if (($('#latitude').val()==='' || $('#longitude').val()==='') && localStorage.getItem("latitude")!==null && localStorage.getItem("longitude")!==null) {
@ -381,7 +391,7 @@ var array2;
data.forEach(function(element){
console.log(element);
});
}
});
});
@ -465,5 +475,6 @@ var array2;
window.initMap = initMap;
window.initMapUP = initMapUP;
window.initMapDetails = initMapDetails;
window.updateVehiclePage = updateVehiclePage;
});

View File

@ -0,0 +1,59 @@
@include('header')
<br><br>
<div class="container-fluid" style="background-color: grey">
<h2 class="center">Detalhes:</h2>
<br><br><br>
<div class="row">
<!--DIV ESQUERDA-->
<div class="col-lg-6">
<div class="center-block" id="mapDetails"></div>
</div>
<!--Div direita-->
<div class="col-lg-6">
<div class="col-lg-12">
<h3><strong>Nome: </h3></strong><br>
<h3><strong>Marca: </h3></strong><br><br>
</div>
<div class="col-lg-6">
<h4><strong>Gasóleo - </h4></strong><br>
<h4><strong>Gasóleo Simples - </h4></strong><br>
<h4><strong>Gasóleo Colorido - </h4></strong><br>
<h4><strong>Gasóleo Especial - </h4></strong><br>
<br><br>
<h4><strong>Gasolina 95 - </h4></strong><br>
<h4><strong>Gasolina Simples 95 - </h4></strong><br>
<h4><strong>Gasolina Especial 95 - </h4></strong><br>
<br><br>
</div>
<div class="col-lg-6">
<h4><strong>GNC KG - </h4></strong><br>
<h4><strong>GNC M3 - </h4></strong><br>
<h4><strong>GNL - </h4></strong><br>
<h4><strong>GPL - </h4></strong><br>
<br><br>
<h4><strong>Gasolina 98 - </h4></strong><br>
<h4><strong>Gasolina Simples 98 - </h4></strong><br>
<h4><strong>Gasolina Especial 98 - </h4></strong><br>
<br><br>
</div>
</div>
</div>
<br><br><br><br>
</div>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsZDCiU1k6mSuywRRL88xxXY-81RMEU7s&callback=initMapDetails" ></script>
@include('footer')

View File

@ -34,11 +34,7 @@
<ul class="nav navbar-nav navbar-left">
<a class="navbar-brand" href="{{route('home')}}"><img src="../../files/gasico.png" style="heihgt: 35px; width: 35px;"></img></a>
<li><a href="{{route('home')}}"><h4>GeoComb</h4></a></li>
</ul>
<ul class="nav navbar-nav navbar-center">
<li><h2>Preço dos Combustíveis</h2></li>
<li><a href="{{route('home')}}"><h4>GeoComb - O Preço dos Combustíveis</h4></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">

View File

@ -8,6 +8,7 @@
<br><br>
<div class="container-fluid" style="background-color: grey">
<h2 class="center">Pesquisar Postos:</h2>
<a href="{{route('details')}}">DETALHES</a>
<br><br><br>
<div class="row">
@ -93,41 +94,44 @@
@else
<form method="post" action="{{route('home')}}">
{{csrf_field()}}
<input type="hidden" name="district" value="">
<input type="hidden" name="brand" value="">
<button class="btn btn-success" id="landingBack">Back</button>
</form>
<h3 class="text-center">Posto de Combustieis Mais Baratos</h3>
<h3 class="text-center">Mais baratas ()</h3>
<div class="col-lg-12">
<div class="form-group">
@foreach($stations as $key=>$station)
<div class="form-group">
@foreach($stations as $key=>$station)
<div class="well well-lg">
<div class="col-lg-6">
<label for="nome">Nome: </label>
{{$station->stationName}}<br>
<div class="well well-lg" id="postosMaisBaratos" style="background-color:silver; color:black">
<label for="nome">Marca: </label>
{{$station->stationBrand}}<br>
<label for="nome">Nome: </label>
{{$station->stationName}}<br>
<label for="nome">Preço: </label>
{{$station->fuelPrice}}
<label for="nome">Marca: </label>
{{$station->stationBrand}}<br>
<!--<button type="button" class="btn btn-link" style="float:right">Detalhes</button>-->
<img src="../../files/{{$key+1}}.jpg" style="float:right"></img>
<br>
<label for="nome">Preço: </label>
{{$station->fuelPrice}}
<label for="nome">Serviços: </label>
{{$station->services}}<br>
<!--<button type="button" class="btn btn-link" style="float:right">Detalhes</button>-->
<img src="../../files/{{$key+1}}.jpg"></img>
<br>
</div>
</div>
@endforeach
</div>
@endforeach
</div>
<form method="post" action="{{route('home')}}">
{{csrf_field()}}
<input type="hidden" name="district" value="">
<input type="hidden" name="brand" value="">
<button class="btn btn-success" id="landingBack">Nova Pesquisa</button>
</form>
</div>
@endif
</div>
</div>

View File

@ -33,6 +33,8 @@ Route::get('/', 'LandingController@index')->name('home');
Route::get('/fetchStation', 'LandingController@getJsonOpenMaps');
Route::get('/combDetails', 'LandingController@combDetails')->name('details');
/*
Route::get('/login', 'Auth\LoginController@index');
Route::post('/login', 'Auth\LoginController@login')->name('login');