70 lines
2.9 KiB
PHP
70 lines
2.9 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', __('maintenance::lang.rd_all_dispatches'))
|
|
|
|
@section('content')
|
|
@include('maintenance::layouts.nav')
|
|
|
|
<section class="content no-print mt-page">
|
|
<div class="mt-page-header">
|
|
<h1><i class="fas fa-route" style="color:#8b5cf6;margin-left:8px;"></i> @lang('maintenance::lang.rd_all_dispatches')</h1>
|
|
</div>
|
|
|
|
<div class="mt-card">
|
|
<div class="mt-card-body">
|
|
<div class="row" style="margin-bottom:15px;">
|
|
<div class="col-md-3">
|
|
{!! Form::select('filter_status', ['' => __('lang_v1.all')] + $statuses, null, ['class' => 'form-control', 'id' => 'rd_filter_status']) !!}
|
|
</div>
|
|
<div class="col-md-3">
|
|
{!! Form::select('filter_route', ['' => __('lang_v1.all')] + $route_types, null, ['class' => 'form-control', 'id' => 'rd_filter_route']) !!}
|
|
</div>
|
|
</div>
|
|
<table class="table table-bordered table-striped" id="rd_dispatches_table" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('maintenance::lang.rd_dispatch_number')</th>
|
|
<th>@lang('maintenance::lang.spare_part')</th>
|
|
<th>@lang('maintenance::lang.rd_route')</th>
|
|
<th>@lang('maintenance::lang.rd_destination')</th>
|
|
<th>@lang('maintenance::lang.status')</th>
|
|
<th>@lang('maintenance::lang.rd_sent_at')</th>
|
|
<th>@lang('maintenance::lang.rd_expected_return')</th>
|
|
<th>@lang('maintenance::lang.actions')</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script>
|
|
$(function() {
|
|
var table = $('#rd_dispatches_table').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
url: '{{ action([\Modules\Maintenance\Http\Controllers\RepairDispatchController::class, 'index']) }}',
|
|
data: function(d) {
|
|
d.status = $('#rd_filter_status').val();
|
|
d.route_type = $('#rd_filter_route').val();
|
|
}
|
|
},
|
|
columns: [
|
|
{ data: 'dispatch_number', name: 'dispatch_number' },
|
|
{ data: 'part_name', name: 'part_name', orderable: false, searchable: false },
|
|
{ data: 'route_label', name: 'route_type' },
|
|
{ data: 'destination', name: 'destination', orderable: false, searchable: false },
|
|
{ data: 'status_label', name: 'status' },
|
|
{ data: 'sent_at', name: 'sent_at' },
|
|
{ data: 'expected_return_at', name: 'expected_return_at' },
|
|
{ data: 'action', name: 'action', orderable: false, searchable: false }
|
|
]
|
|
});
|
|
$('#rd_filter_status, #rd_filter_route').on('change', function() { table.ajax.reload(); });
|
|
});
|
|
</script>
|
|
@endsection
|