68 lines
2.7 KiB
PHP
68 lines
2.7 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', __('maintenance::lang.fm_all_missions'))
|
|
|
|
@section('content')
|
|
@include('maintenance::layouts.nav')
|
|
|
|
<section class="content no-print mt-page">
|
|
<div class="mt-page-header">
|
|
<h1><i class="fas fa-users-cog" style="color:#0ea5e9;margin-left:8px;"></i> @lang('maintenance::lang.fm_all_missions')</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' => 'fm_filter_status']) !!}
|
|
</div>
|
|
</div>
|
|
<table class="table table-bordered table-striped" id="fm_missions_table" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('maintenance::lang.fm_mission_number')</th>
|
|
<th>@lang('maintenance::lang.title')</th>
|
|
<th>@lang('maintenance::lang.fm_mission_type')</th>
|
|
<th>@lang('maintenance::lang.fm_lead')</th>
|
|
<th>@lang('maintenance::lang.equipment')</th>
|
|
<th>@lang('maintenance::lang.status')</th>
|
|
<th>@lang('maintenance::lang.fm_planned_departure')</th>
|
|
<th>@lang('maintenance::lang.fm_total_cost')</th>
|
|
<th>@lang('maintenance::lang.actions')</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script>
|
|
$(function() {
|
|
var table = $('#fm_missions_table').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
url: '{{ action([\Modules\Maintenance\Http\Controllers\FieldMissionController::class, 'index']) }}',
|
|
data: function(d) {
|
|
d.status = $('#fm_filter_status').val();
|
|
}
|
|
},
|
|
columns: [
|
|
{ data: 'mission_number', name: 'mission_number' },
|
|
{ data: 'title', name: 'title' },
|
|
{ data: 'type_label', name: 'mission_type' },
|
|
{ data: 'lead_name', name: 'lead_name', orderable: false, searchable: false },
|
|
{ data: 'equipment_name', name: 'equipment_name', orderable: false, searchable: false },
|
|
{ data: 'status_label', name: 'status' },
|
|
{ data: 'planned_departure_at', name: 'planned_departure_at' },
|
|
{ data: 'total_cost', name: 'total_cost' },
|
|
{ data: 'action', name: 'action', orderable: false, searchable: false }
|
|
]
|
|
});
|
|
$('#fm_filter_status').on('change', function() { table.ajax.reload(); });
|
|
});
|
|
</script>
|
|
@endsection
|