@extends('layouts.app')
@section('title', __('vrc::lang.estimates'))
@section('content')
<section class="content-header"><h1>@lang('vrc::lang.estimates')</h1></section>
<section class="content">
    @component('components.widget', ['class' => 'box-primary'])
        <table class="table table-bordered table-striped" id="vrc_est_table">
            <thead><tr><th>@lang('vrc::lang.estimate')</th><th>@lang('vrc::lang.customer')</th><th>@lang('vrc::lang.status')</th><th>@lang('vrc::lang.grand_total')</th><th>@lang('vrc::lang.valid_until')</th><th>@lang('messages.action')</th></tr></thead>
        </table>
    @endcomponent
</section>
@endsection
@section('javascript')
<script>
$(function () {
    $('#vrc_est_table').DataTable({
        processing: true, serverSide: true, ajax: '{{ route('vrc.estimates.index') }}',
        columns: [
            { data: 'number', name: 'vrc_estimates.number' },
            { data: 'customer_name', name: 'c.name' },
            { data: 'status', name: 'vrc_estimates.status' },
            { data: 'grand_total', name: 'vrc_estimates.grand_total' },
            { data: 'valid_until', name: 'vrc_estimates.valid_until' },
            { data: 'action', name: 'action', orderable: false, searchable: false },
        ],
    });
});
</script>
@endsection
