Implement region capacity as test
parent
f585a7a2aa
commit
640a5b2f9e
|
@ -55,6 +55,11 @@ class Api
|
|||
return self::get("/property/{$id}/base");
|
||||
}
|
||||
|
||||
public static function regionCapacities(int $id): mixed
|
||||
{
|
||||
return self::get("/region/{$id}/capacities");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ const cHeatmapOptions = {
|
|||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: hours,
|
||||
data: {!! json_encode($heat['property_ids']) !!},
|
||||
splitArea: {
|
||||
show: false
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ const cHeatmapOptions = {
|
|||
},
|
||||
visualMap: {
|
||||
min: 0,
|
||||
max: 10,
|
||||
max: 100,
|
||||
calculable: true,
|
||||
orient: 'horizontal',
|
||||
left: 'center',
|
||||
|
@ -85,7 +85,7 @@ const cHeatmapOptions = {
|
|||
{
|
||||
name: 'Punch Card',
|
||||
type: 'heatmap',
|
||||
data: data,
|
||||
data: {!! json_encode($heat['values']) !!},
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
|
|
|
@ -5,12 +5,14 @@ use App\Api;
|
|||
|
||||
Route::get('/', function () {
|
||||
|
||||
|
||||
$regionHeat = Api::regionCapacities(1);
|
||||
$propertiesGrowth = Api::propertiesGrowth();
|
||||
$propsPerRegion = Api::propertiesPerRegion();
|
||||
$propsPerRegionName = [];
|
||||
$propsPerRegionCounts = [];
|
||||
|
||||
// dump($regionHeat);
|
||||
|
||||
foreach ($propsPerRegion as $el) {
|
||||
$propsPerRegionName[] = $el['name'];
|
||||
$propsPerRegionCounts[] = $el['count_properties'];
|
||||
|
@ -18,7 +20,7 @@ Route::get('/', function () {
|
|||
|
||||
$propertiesGeo = Api::propertiesGeo();
|
||||
|
||||
return view('overview', ["geo" => $propertiesGeo, "growth" => $propertiesGrowth, "propsPerRegion" => [json_encode($propsPerRegionName), json_encode($propsPerRegionCounts)]]);
|
||||
return view('overview', ["heat" => $regionHeat, "geo" => $propertiesGeo, "growth" => $propertiesGrowth, "propsPerRegion" => [json_encode($propsPerRegionName), json_encode($propsPerRegionCounts)]]);
|
||||
});
|
||||
|
||||
Route::get('/prop/{id}', function (int $id) {
|
||||
|
|
Loading…
Reference in New Issue