Further dashboard development.
This commit is contained in:
1 parent
1574edea88
commit
a8543d619f
10 files changed
+209
-312
No files matched your search
@@ -5,6 +5,8 @@ use App\Api;
|
||||
|
||||
Route::get('/', function () {
|
||||
|
||||
|
||||
$propertiesGrowth = Api::propertiesGrowth();
|
||||
$propsPerRegion = Api::propertiesPerRegion();
|
||||
$propsPerRegionName = [];
|
||||
$propsPerRegionCounts = [];
|
||||
@@ -14,11 +16,15 @@ Route::get('/', function () {
|
||||
$propsPerRegionCounts[] = $el['count_properties'];
|
||||
}
|
||||
|
||||
return view('overview', ["propsPerRegion" => [json_encode($propsPerRegionName), json_encode($propsPerRegionCounts)]]);
|
||||
$propertiesGeo = Api::propertiesGeo();
|
||||
//dump($propertiesGeo);
|
||||
|
||||
return view('overview', ["geo" => $propertiesGeo, "growth" => $propertiesGrowth, "propsPerRegion" => [json_encode($propsPerRegionName), json_encode($propsPerRegionCounts)]]);
|
||||
});
|
||||
|
||||
Route::get('/prop/{id}', function (int $id) {
|
||||
|
||||
$propertyBase = Api::propertyBase($id);
|
||||
$extractions = Api::propertyExtractions($id);
|
||||
$data = [];
|
||||
$dates = [];
|
||||
@@ -27,8 +33,11 @@ Route::get('/prop/{id}', function (int $id) {
|
||||
|
||||
$series = [];
|
||||
$dates[] = $ext['created_at'];
|
||||
|
||||
$extCalendar = json_decode($ext['calendar'], 1);
|
||||
|
||||
|
||||
|
||||
foreach ($extCalendar as $date => $status) {
|
||||
$series[] = [$date, $status];
|
||||
}
|
||||
@@ -37,5 +46,5 @@ Route::get('/prop/{id}', function (int $id) {
|
||||
|
||||
}
|
||||
|
||||
return view('property', ["extractiondates" => json_encode($dates), "calendar" => $data]);
|
||||
return view('property', ['base' => $propertyBase[0], "extractiondates" => json_encode($dates), "calendar" => $data]);
|
||||
});
|
||||
Reference in new issue
Block a user