Skip to content

Commit

Permalink
added stacks to customer/vendor show page
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Jul 15, 2020
1 parent 3e36c6c commit 8692eb0
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 126 deletions.
14 changes: 0 additions & 14 deletions public/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,6 @@ button:focus {
overflow: hidden;
}

/*--------Customer/Vendor Show--------*/
.show-transaction-card-header {
padding: 1.14rem;
}

.show-transaction-card-footer {
padding: 1.15rem;
}

.edit-sv {
margin-bottom: 30px;
}
/*--------Customer/Vendor Show Finish--------*/

/*--------Navbar Notification--------*/
.nav-link .badge-update {
position: absolute;
Expand Down
160 changes: 97 additions & 63 deletions resources/views/purchases/vendors/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,76 @@
@section('content')
<div class="row">
<div class="col-xl-3">
<div class="card">
<div class="card-header border-bottom-0 show-transaction-card-header">
<a class="text-sm">{{ trans_choice('general.bills', 2) }}</a> <a class="float-right text-xs">{{ $counts['bills'] }}</a>
</div>

<div class="card-footer show-transaction-card-footer">
<a class="text-sm">{{ trans_choice('general.transactions', 2) }}</a> <a class="float-right text-xs">{{ $counts['transactions'] }}</a>
</div>
</div>

<div class="card">
<div class="card-header">
<h4 class="mb-0">{{ trans('auth.profile') }}</h4>
</div>

<div class="card-body d-grid">
<a class="text-sm font-weight-600">{{ trans('general.email') }}</a> <a class="text-xs long-texts">{{ $vendor->email }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.phone') }}</a> <a class="text-xs long-texts">{{ $vendor->phone }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.website') }}</a> <a class="text-xs long-texts">{{ $vendor->website }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.tax_number') }}</a> <a class="text-xs long-texts">{{ $vendor->tax_number }}</a>
@if ($vendor->reference)
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.reference') }}</a> <a class="text-xs long-texts">{{ $vendor->reference }}</a>
@endif
</div>
</div>

<div class="card">
<div class="card-header">
<h4 class="mb-0">{{ trans('general.address') }}</h4>
</div>

<div class="card-body">
<a class="text-xs m-0">
{{ $vendor->address }}
</p>
</div>
</div>

<a href="{{ route('vendors.edit', $vendor->id) }}" class="btn btn-info btn-block edit-sv"><i class="fas fa-edit"></i><b>{{ trans('general.edit') }}</b></a>
<ul class="list-group mb-4">
@stack('vendor_bills_count_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0">
{{ trans_choice('general.bills', 2) }}
<span class="badge badge-primary badge-pill">{{ $counts['bills'] }}</span>
</li>
@stack('vendor_bills_count_end')

@stack('vendor_transactions_count_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0 border-top-1">
{{ trans_choice('general.transactions', 2) }}
<span class="badge badge-primary badge-pill">{{ $counts['transactions'] }}</span>
</li>
@stack('vendor_transactions_count_end')
</ul>

<ul class="list-group mb-4">
@stack('vendor_email_start')
<li class="list-group-item border-0">
<div class="font-weight-600">{{ trans('general.email') }}</div>
<div><small class="long-texts" title="{{ $vendor->email }}">{{ $vendor->email }}</small></div>
</li>
@stack('vendor_email_end')

@stack('vendor_phone_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.phone') }}</div>
<div><small class="long-texts" title="{{ $vendor->phone }}">{{ $vendor->phone }}</small></div>
</li>
@stack('vendor_phone_end')

@stack('vendor_website_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.website') }}</div>
<div><small class="long-texts" title="{{ $vendor->website }}">{{ $vendor->website }}</small></div>
</li>
@stack('vendor_website_end')

@stack('vendor_tax_number_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.tax_number') }}</div>
<div><small class="long-texts" title="{{ $vendor->tax_number }}">{{ $vendor->tax_number }}</small></div>
</li>
@stack('vendor_tax_number_end')

@stack('vendor_address_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.address') }}</div>
<div><small>{{ $vendor->address }}</small></div>
</li>
@stack('vendor_address_end')

@if ($vendor->reference)
@stack('vendor_reference_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.reference') }}</div>
<div><small class="long-texts" title="{{ $vendor->reference }}">{{ $vendor->reference }}</small></div>
</li>
@stack('vendor_reference_end')
@endif
</ul>

@stack('vendor_edit_button_start')
<a href="{{ route('vendors.edit', $vendor->id) }}" class="btn btn-info btn-block"><i class="fas fa-edit"></i><b>{{ trans('general.edit') }}</b></a>
@stack('vendor_edit_button_end')
</div>

<div class="col-xl-9">
<div class="row mb--3">
@stack('vendor_paid_card_start')
<div class="col-md-4">
<div class="card bg-gradient-success border-0">
<div class="card-body">
Expand All @@ -65,7 +88,9 @@
</div>
</div>
</div>
@stack('vendor_paid_card_end')

@stack('vendor_open_card_start')
<div class="col-md-4">
<div class="card bg-gradient-warning border-0">
<div class="card-body">
Expand All @@ -79,7 +104,9 @@
</div>
</div>
</div>
@stack('vendor_open_card_end')

@stack('vendor_overdue_card_start')
<div class="col-md-4">
<div class="card bg-gradient-danger border-0">
<div class="card-body">
Expand All @@ -93,57 +120,64 @@
</div>
</div>
</div>
@stack('vendor_overdue_card_end')
</div>

<div class="row">
<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('vendor_transactions_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0 active" id="tabs-icons-text-1-tab" data-toggle="tab" href="#tabs-icons-text-1" role="tab" aria-controls="tabs-icons-text-1" aria-selected="true"><i class="fas fa-hand-holding-usd mr-2"></i>{{ trans_choice('general.transactions', 2) }}</a>
<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"><i class="fas fa-hand-holding-usd mr-2"></i>{{ trans_choice('general.transactions', 2) }}</a>
</li>
@stack('vendor_transactions_tab_end')

@stack('vendor_bills_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0" id="tabs-icons-text-2-tab" data-toggle="tab" href="#tabs-icons-text-2" role="tab" aria-controls="tabs-icons-text-2" aria-selected="false"><i class="fa fa-shopping-cart mr-2"></i>{{ trans_choice('general.bills', 2) }}</a>
<a class="nav-link mb-sm-3 mb-md-0" id="bills-tab" data-toggle="tab" href="#bills-content" role="tab" aria-controls="bills-content" aria-selected="false"><i class="fa fa-money-bill mr-2"></i>{{ trans_choice('general.bills', 2) }}</a>
</li>
@stack('vendor_bills_tab_end')
</ul>
</div>

<div class="card shadow">
<div class="card">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="tabs-icons-text-1" role="tabpanel" aria-labelledby="tabs-icons-text-1-tab">
@stack('vendor_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" id="tbl-transactions">
<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-3">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-3 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
<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-3">@date($item->paid_at)</td>
<td class="col-xs-6 col-sm-3 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-3 d-none d-sm-block">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="col-sm-3 d-none d-sm-block">{{ $item->account->name }}</td>
<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 ? $item->category->name : trans('general.na') }}</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('vendor_transactions_content_end')

<div class="tab-pane fade" id="tabs-icons-text-2" role="tabpanel" aria-labelledby="tabs-icons-text-2-tab">
@stack('vendor_bills_content_start')
<div class="tab-pane fade" id="bills-content" role="tabpanel" aria-labelledby="bills-tab">
<div class="table-responsive">
<table class="table table-flush" id="tbl-bills">
<table class="table table-flush table-hover" id="tbl-bills">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-4 col-sm-1">{{ trans_choice('general.numbers', 1) }}</th>
Expand All @@ -158,21 +192,21 @@
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-4 col-sm-1"><a href="{{ route('bills.show', $item->id) }}">{{ $item->bill_number }}</a></td>
<td class="col-xs-4 col-sm-3 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-3 d-none d-sm-block text-left">@date($item->billed_at)</td>
<td class="col-sm-3 d-none d-sm-block text-left">@date($item->billd_at)</td>
<td class="col-sm-3 d-none d-sm-block text-left">@date($item->due_at)</td>
<td class="col-xs-4 col-sm-2"><span class="badge badge-pill badge-{{ $item->status_label }} my--2">{{ trans('bills.statuses.' . $item->status) }}</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>

<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $bills, 'type' => 'bills'])
</div>
</div>
</div>
@stack('vendor_bills_content_end')
</div>
</div>
</div>
Expand All @@ -182,5 +216,5 @@
@endsection

@push('scripts_start')
<script src="{{ asset('public/js/purchases/vendors.js?v=' . version('short')) }}"></script>
<script src="{{ asset('public/js/sales/vendors.js?v=' . version('short')) }}"></script>
@endpush

0 comments on commit 8692eb0

Please sign in to comment.