Format all blade templates to 2 spaces #530 (#531)

This commit is contained in:
Nabeel S
2020-02-01 13:05:56 -05:00
committed by GitHub
parent 06b47d97e0
commit 59d09c0cec
254 changed files with 7123 additions and 7006 deletions

View File

@@ -2,23 +2,23 @@
@section('title', 'Financial Reports')
@section('actions')
<li><a href="{{ route('admin.finances.index') }}"><i class="ti-menu-alt"></i>Overview</a></li>
<li><a href="{{ route('admin.finances.index') }}"><i class="ti-menu-alt"></i>Overview</a></li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
<div style="float:right;">
{{ Form::select(
'month_select',
$months_list,
$current_month,
['id' => 'month_select']
) }}
</div>
<div class="card border-blue-bottom">
<div class="content">
<div style="float:right;">
{{ Form::select(
'month_select',
$months_list,
$current_month,
['id' => 'month_select']
) }}
</div>
@include('admin.finances.table')
@include('admin.finances.table')
</div>
</div>
</div>
@endsection
@include('admin.finances.scripts')

View File

@@ -1,12 +1,12 @@
@section('scripts')
<script>
$(document).ready(() => {
const select_id = "select#month_select";
$(select_id).change((e) => {
<script>
$(document).ready(() => {
const select_id = "select#month_select";
$(select_id).change((e) => {
const date = $(select_id + " option:selected").val();
const location = window.location.toString().split('?')[0];
window.location = location + '?month='+date;
window.location = location + '?month=' + date;
});
});
});
</script>
</script>
@endsection

View File

@@ -1,63 +1,62 @@
@foreach($transaction_groups as $group)
<h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3>
<h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3>
<table
id="finances-table"
style="width: 95%; margin: 0px auto;"
class="table table-hover table-responsive">
<table
id="finances-table"
style="width: 95%; margin: 0px auto;"
class="table table-hover table-responsive">
<thead>
<th>Expenses</th>
<th>Credit</th>
<th>Debit</th>
</thead>
<tbody>
@foreach($group['transactions'] as $ta)
<tr>
<td>
{{ $ta->transaction_group }}
</td>
<td>
@if($ta->sum_credits)
{{ money($ta->sum_credits, $ta->currency) }}
@endif
</td>
<td>
@if($ta->sum_debits)
<i>{{ money($ta->sum_debits, $ta->currency) }}</i>
@endif
</td>
</tr>
@endforeach
<thead>
<th>Expenses</th>
<th>Credit</th>
<th>Debit</th>
</thead>
<tbody>
@foreach($group['transactions'] as $ta)
<tr>
<td>
{{ $ta->transaction_group }}
</td>
<td>
@if($ta->sum_credits)
{{ money($ta->sum_credits, $ta->currency) }}
@endif
</td>
<td>
@if($ta->sum_debits)
<i>{{ money($ta->sum_debits, $ta->currency) }}</i>
@endif
</td>
</tr>
@endforeach
{{-- show sums --}}
<tr>
<td></td>
<td>
{{ $group['credits'] }}
</td>
<td>
<i>{{ $group['debits'] }}</i>
</td>
</tr>
{{-- show sums --}}
<tr>
<td></td>
<td>
{{ $group['credits'] }}
</td>
<td>
<i>{{ $group['debits'] }}</i>
</td>
</tr>
{{-- final total --}}
<tr style="border-top: 3px; border-top-style: double;">
<td></td>
<td align="right">
<b>Total</b>
</td>
<td>
{{ $group['credits']->subtract($group['debits']) }}
</td>
</tr>
{{-- final total --}}
<tr style="border-top: 3px; border-top-style: double;">
<td></td>
<td align="right">
<b>Total</b>
</td>
<td>
{{ $group['credits']->subtract($group['debits']) }}
</td>
</tr>
</tbody>
</table>
</tbody>
</table>
@if(!$loop->last)
<hr>
@endif
@if(!$loop->last)
<hr>
@endif
@endforeach