Customer show page styling..

This commit is contained in:
Cüneyt Şentürk
2021-06-29 20:05:11 +03:00
parent 43e3a0a08a
commit 6b6bfcbc99
6 changed files with 137 additions and 50 deletions

View File

@@ -2,6 +2,62 @@
@section('title', $customer->name)
@section('new_button')
<div class="dropup header-drop-top">
<button type="button" class="btn btn-white btn-sm" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-chevron-down"></i>&nbsp; {{ trans('general.more_actions') }}
</button>
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@stack('duplicate_button_start')
@can('create-sales-customers')
<a class="dropdown-item" href="{{ route('customers.duplicate', $customer->id) }}">
{{ trans('general.duplicate') }}
</a>
@endcan
@stack('duplicate_button_end')
<div class="dropdown-divider"></div>
@stack('invoice_button_start')
@can('create-sales-invoices')
<a class="dropdown-item" href="{{ route('customers.create-invoice', $customer->id) }}">
{{ trans('invoices.create_invoice') }}
</a>
@endcan
@stack('invoice_button_end')
@stack('revenue_button_start')
@can('create-sales-revenues')
<a class="dropdown-item" href="{{ route('customers.create-revenue', $customer->id) }}">
{{ trans('revenues.create_revenue') }}
</a>
@endcan
@stack('revenue_button_end')
<div class="dropdown-divider"></div>
@stack('delete_button_start')
@can('delete-sales-customers')
{!! Form::deleteLink($customer, 'customers.destroy') !!}
@endcan
@stack('delete_button_end')
@stack('button_dropdown_end')
</div>
</div>
@stack('edit_button_start')
@can('update-sales-customers')
<a href="{{ route('customers.edit', $customer->id) }}" class="btn btn-white btn-sm">
{{ trans('general.edit') }}
</a>
@endcan
@stack('edit_button_end')
@endsection
@section('content')
<div class="row">
<div class="col-xl-3">
@@ -68,12 +124,7 @@
</ul>
@stack('customer_edit_button_start')
<a href="{{ route('customers.edit', $customer->id) }}" class="btn btn-info btn-block"><b>{{ trans('general.edit') }}</b></a>
@stack('customer_edit_button_end')
@stack('customer_create_invoice_button_start')
<a href="{{ route('customers.create-invoice', $customer->id) }}" class="btn btn-white btn-block"><b>{{ trans('invoices.create_invoice') }}</b></a>
@stack('customer_create_invoice_button_end')
</div>
<div class="col-xl-9">
@@ -131,55 +182,28 @@
<div class="col-md-12">
<div class="nav-wrapper">
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-icons-text" role="tablist">
@stack('customer_transactions_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0 active" id="transactions-tab" data-toggle="tab" href="#transactions-content" role="tab" aria-controls="transactions-content" aria-selected="true">{{ trans_choice('general.transactions', 2) }}</a>
</li>
@stack('customer_transactions_tab_end')
@stack('customer_invoices_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0" id="invoices-tab" data-toggle="tab" href="#invoices-content" role="tab" aria-controls="invoices-content" aria-selected="false">{{ trans_choice('general.invoices', 2) }}</a>
<a class="nav-link mb-sm-3 mb-md-0 active" id="invoices-tab" data-toggle="tab" href="#invoices-content" role="tab" aria-controls="invoices-content" aria-selected="true">
{{ trans_choice('general.invoices', 2) }}
</a>
</li>
@stack('customer_invoices_tab_end')
@stack('customer_transactions_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0" id="transactions-tab" data-toggle="tab" href="#transactions-content" role="tab" aria-controls="transactions-content" aria-selected="false">
{{ trans_choice('general.transactions', 2) }}
</a>
</li>
@stack('customer_transactions_tab_end')
</ul>
</div>
<div class="card">
<div class="tab-content" id="myTabContent">
@stack('customer_transactions_content_start')
<div class="tab-pane fade show active" id="transactions-content" role="tabpanel" aria-labelledby="transactions-tab">
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-transactions">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-6 col-sm-2">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-2 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
</tr>
</thead>
<tbody>
@foreach($transactions as $item)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-6 col-sm-2">@date($item->paid_at)</td>
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $transactions, 'type' => 'transactions'])
</div>
</div>
</div>
@stack('customer_transactions_content_end')
<div class="card">
<div class="tab-content" id="cutomer-tab-content">
@stack('customer_invoices_content_start')
<div class="tab-pane fade" id="invoices-content" role="tabpanel" aria-labelledby="invoices-tab">
<div class="tab-pane fade show active" id="invoices-content" role="tabpanel" aria-labelledby="invoices-tab">
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-invoices">
<thead class="thead-light">
@@ -191,6 +215,7 @@
<th class="col-xs-4 col-sm-2">{{ trans_choice('general.statuses', 1) }}</th>
</tr>
</thead>
<tbody>
@foreach($invoices as $item)
<tr class="row align-items-center border-top-1 tr-py">
@@ -204,6 +229,7 @@
</tbody>
</table>
</div>
<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $invoices, 'type' => 'invoices'])
@@ -211,6 +237,40 @@
</div>
</div>
@stack('customer_invoices_content_end')
@stack('customer_transactions_content_start')
<div class="tab-pane fade" id="transactions-content" role="tabpanel" aria-labelledby="transactions-tab">
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-transactions">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-6 col-sm-2">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-2 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
</tr>
</thead>
<tbody>
@foreach($transactions as $item)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-6 col-sm-2">@date($item->paid_at)</td>
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $transactions, 'type' => 'transactions'])
</div>
</div>
</div>
@stack('customer_transactions_content_end')
</div>
</div>
</div>