@extends('layouts.dmapp')

@section('content')

{{-- Reports --}}

<div class="card mb-4">
    <div class="card-header">
        <div class="d-flex">
            <div class="mr-auto p-2 align-self-center"><h4>Search Results</h4></div>
        </div>    
    <div class="card-body">
        <div class="table-responsive" >
            <table class="table table-hover" id="search_tbl">
                <thead>
                    <tr>
                        <th>SLNO.</th>
                        <th>Order No.</th>
                        <th>Customer</th>
                        <th>Status</th>
                        <th>Duration</th>                    
                        <th colspan="">Actions</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @php $si=0; @endphp
                    @foreach($Results as $Result)
                    <tr>
                        <td>{{++$si}}</td>
                        <td>{{$Result->id}}</td>
                        <td>{{$Result->user->name}}</td>
                        <td>{{$Result->status->title}}</td>
                        <td>{{$Result->duration->title}}</td>
                        <td style="width: 150px;"><a href="{{route('DmDetailsView',$Result->id)}}" class="btn btn-info"><i class="fa fa-edit"></i> View</a></td>   
                                             
                    </tr>
                    @endforeach
                </tbody>
            </table>
        </div>
    </div>
    <div class="card-footer">
        <div class="row">
            <div class="col-lg-6">
                <div class="d-flex justify-content-start font-weight-bold">
                <a href=""><button class="btn btn-danger">Save Pdf</button></a>     
                </div>
            </div> 
            <div class="col-lg-6">
                <form method="post" action="{{route('DmSearchResults')}}">
                @csrf
                <div class="d-flex justify-content-end font-weight-bold">
                    <input type="hidden" value="1" name="print">
                    <input type="hidden" value="{{$status_id}}" name="status_id">
                    <input type="hidden" value="{{$datesort}}" name="datesort">
                    <input type="hidden" value="{{$txtSDate}}" name="txtSDate">
                    <input type="hidden" value="{{$txtSDate1}}" name="txtSDate1">
                    <input type="hidden" value="{{$nmbYear}}" name="nmbYear">
                    <a href=""><button class="btn btn-primary">Print</button></a>    
                </div>
                </form>
            </div>
        </div>            
    </div>
</div>

@endsection








