@extends('layout')
@section('title', 'ٹرپ رپورٹس')
@section('page_title', 'ٹرپ رپورٹس')
{{-- @section('page_sub_title', '') --}}
@section('content')
    <div class="row">
        <div class="col-md-3"></div>
        <div class="col-md-6">
            <div class="panel panel-card">
                <div class="panel-body">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="input-group">
                                <span class="input-group-addon">تاریخ ابتدا</span>
                                <input type="date" id="starting_date" name="starting_date" value="2022-05-01"
                                       class="form-control">
                            </div>
                            <span class="text-danger error" id="starting_date_error"></span>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <span class="input-group-addon">تاریخ انتہا</span>
                                <input type="date" id="ending_date" name="ending_date" class="form-control"
                                       value="{{ date('Y-m-d') }}">
                            </div>
                            <span class="text-danger error" id="ending_date_error"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3"></div>
    </div>
    <div class="row mt-2">
        <div class="col-md-4">
            <div class="panel panel-card">
                <div class="panel-body">
                    <div class="row">
                        <div class="col-md-12">
                            <label for="">ٹرپ:</label>
                            <select name="trip" id="trip" class="form-control">
                                <option value="">----------------------------Select Trip----------------------------
                                </option>
                                @forelse ($trips as $trip)
                                    <option value="{{ $trip->id }}"> {{ $trip->id }} &nbsp;
                                        {{ $trip->vehicle->vehicle_no }}</option>
                                @empty
                                @endforelse
                            </select>
                            <span class="text-danger error" id="trip_error"></span>
                        </div>
                    </div>
                    <div class="row mt-3">
                        <div class="col-md-12">
                            <button onclick="trip_report()" class="btn btn-primary">Trip Report</button>
                            <button onclick="all_trip_report()" class="btn btn-success pull-right"> All Trip Report
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>

@endsection
@section('javascript')
    @include('reports.js')
@endsection
