Merge branch 'main' of https://gitea.fhgr.ch/stoffelmauro/ConsultancyProject_2_ETL
commit
5b97c7ead2
|
@ -300,21 +300,25 @@ const cExtractionsOptions = {
|
|||
data: {!! json_encode($growth['total_all']) !!},
|
||||
},
|
||||
{
|
||||
connectNulls: true,
|
||||
name: 'Davos',
|
||||
type: 'line',
|
||||
data: {!! json_encode($growth['total_davos']) !!}
|
||||
},
|
||||
{
|
||||
connectNulls: true,
|
||||
name: 'Engadin',
|
||||
type: 'line',
|
||||
data: {!! json_encode($growth['total_engadin']) !!}
|
||||
},
|
||||
{
|
||||
connectNulls: true,
|
||||
name: 'Heidiland',
|
||||
type: 'line',
|
||||
data: {!! json_encode($growth['total_heidiland']) !!}
|
||||
},
|
||||
{
|
||||
connectNulls: true,
|
||||
name: 'St. Moritz',
|
||||
type: 'line',
|
||||
data: {!! json_encode($growth['total_stmoritz']) !!}
|
||||
|
|
|
@ -24,13 +24,18 @@
|
|||
@endsection
|
||||
|
||||
@section('main')
|
||||
@if(!isset($propertyCapacities['capacities']))
|
||||
<div style="position: absolute;">
|
||||
Für dieses Mietobjekt sind keine Daten vorhanden.
|
||||
</div>
|
||||
@else
|
||||
<article style="grid-area: timeline;">
|
||||
<div id="timeline"></div>
|
||||
</article>
|
||||
<article class="header" style="grid-area: chart1;">
|
||||
<header>
|
||||
<h2 id="belegung-title">
|
||||
Kalenderansicht der Belegung am <span class="date">{{ $startDate }}</span>
|
||||
Kalenderansicht der Verfügbarkeit am <span class="date">{{ $startDate }}</span>
|
||||
</h2><button popovertarget="popup-cal"></button>
|
||||
<div popover id="popup-cal">
|
||||
<p>
|
||||
|
@ -51,7 +56,7 @@
|
|||
<article class="header" style="grid-area: chart3;">
|
||||
<header>
|
||||
<h2>
|
||||
Belegung Mietobjekt Monate am <span class="date">{{ $startDate }}</span>
|
||||
Verfügbarkeit Mietobjekt Monate am <span class="date">{{ $startDate }}</span>
|
||||
</h2>
|
||||
</header>
|
||||
<div id="chart-capacity-monthly">
|
||||
|
@ -73,7 +78,7 @@
|
|||
<article class="header" style="grid-area: chart4;">
|
||||
<header>
|
||||
<h2>
|
||||
Belegung Mietobjekt Tage am <span class="date">{{ $startDate }}</span>
|
||||
Verfügbarkeit Mietobjekt Tage am <span class="date">{{ $startDate }}</span>
|
||||
</h2>
|
||||
</header>
|
||||
<div id="chart-capacity-daily">
|
||||
|
@ -460,4 +465,5 @@ cCapacity.on('click', 'series', (e) => {
|
|||
|
||||
|
||||
</script>
|
||||
@endif
|
||||
@endsection
|
||||
|
|
|
@ -99,6 +99,7 @@ Route::get('/property/{id}', function (int $id) {
|
|||
$propertyCapacitiesMonthly = [];
|
||||
$propertyCapacitiesDaily = [];
|
||||
|
||||
if($propertyCapacities){
|
||||
foreach ($propertyCapacities['dates'] as $date) {
|
||||
$propertyCapacitiesMonthly[] = Api::propertyCapacitiesMonthly($id, $date);
|
||||
$propertyCapacitiesDaily[] = Api::propertyCapacitiesDaily($id, $date);
|
||||
|
@ -116,6 +117,9 @@ Route::get('/property/{id}', function (int $id) {
|
|||
$regionCapacities[1][] = $regionCapacitiesRegion['capacities'][$index];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$propertyCapacities = ['dates' => [null]];
|
||||
}
|
||||
|
||||
// prepare data for calendar chart
|
||||
$data = [];
|
||||
|
|
Loading…
Reference in New Issue