80 lines
3.5 KiB
PHP
80 lines
3.5 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', __('assetexchange::lang.deals'))
|
|
|
|
@section('content')
|
|
@include('assetexchange::layouts.nav')
|
|
|
|
<section class="content no-print mt-page">
|
|
<div class="mt-page-header">
|
|
<h1><i class="fas fa-handshake" style="color:#3b82f6;margin-left:8px;"></i> @lang('assetexchange::lang.deals')</h1>
|
|
@can('aex.deals.create')
|
|
<a href="{{ action([\Modules\AssetExchange\Http\Controllers\DealController::class, 'create']) }}" class="mt-btn-primary btn">
|
|
<i class="fa fa-plus"></i> @lang('assetexchange::lang.new_deal')
|
|
</a>
|
|
@endcan
|
|
</div>
|
|
|
|
<div class="mt-card">
|
|
<div class="mt-card-header"><h3 class="mt-card-title">@lang('assetexchange::lang.all_deals')</h3></div>
|
|
<div class="mt-card-body">
|
|
<div class="row" style="margin-bottom:12px;">
|
|
<div class="col-md-3">
|
|
{!! Form::select('status', ['' => __('assetexchange::lang.all')] + $statuses, null, ['class' => 'form-control select2 aex-filter-status', 'style' => 'width:100%']) !!}
|
|
</div>
|
|
<div class="col-md-3">
|
|
{!! Form::select('deal_type', ['' => __('assetexchange::lang.all')] + $deal_types, null, ['class' => 'form-control select2 aex-filter-type', 'style' => 'width:100%']) !!}
|
|
</div>
|
|
<div class="col-md-3">
|
|
<button type="button" class="btn btn-primary aex-apply-filters"><i class="fa fa-filter"></i> @lang('assetexchange::lang.apply_filters')</button>
|
|
</div>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-striped" id="aex_deals_table" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('assetexchange::lang.deal_code')</th>
|
|
<th>@lang('assetexchange::lang.listing_title')</th>
|
|
<th>@lang('assetexchange::lang.deal_type')</th>
|
|
<th>@lang('assetexchange::lang.buyer')</th>
|
|
<th>@lang('assetexchange::lang.agreed_price')</th>
|
|
<th>@lang('assetexchange::lang.status')</th>
|
|
<th>@lang('assetexchange::lang.action')</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('.select2').select2();
|
|
var table = $('#aex_deals_table').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
url: '{{ action([\Modules\AssetExchange\Http\Controllers\DealController::class, "index"]) }}',
|
|
data: function(d) {
|
|
d.status = $('.aex-filter-status').val();
|
|
d.deal_type = $('.aex-filter-type').val();
|
|
}
|
|
},
|
|
columns: [
|
|
{ data: 'deal_code', name: 'deal_code' },
|
|
{ data: 'listing_title', name: 'listing_title', orderable: false },
|
|
{ data: 'type_label', name: 'deal_type' },
|
|
{ data: 'buyer_name', name: 'buyer_name', orderable: false },
|
|
{ data: 'agreed_price_fmt', name: 'agreed_price' },
|
|
{ data: 'status_label', name: 'status' },
|
|
{ data: 'action', name: 'action', orderable: false, searchable: false }
|
|
]
|
|
});
|
|
$('.aex-apply-filters').on('click', function() { table.ajax.reload(); });
|
|
});
|
|
</script>
|
|
@endsection
|