@extends('admin.layout.main')
@section('content')
<div class="row">
    <div class="col-lg-12" style="padding-left: 4px;padding-right: 4px;">
        <div class="card m-b-30" style="border-radius: 5px;">
            <div class="card-header">
                <h5 class="card-title" style="font-weight: bold; padding-top: 15px; font-size: 20px;">Order Manage</h5>
            </div>
            <div class="card-body" style="padding-bottom: 50px;">

                <div class="col-md-4">
                    <p>
                        <a style="color: #fff;padding-right: 7px;">Issue Date:</a> {{$ord_data->created_at}}<br>
                        <a style="color: #fff;padding-right: 7px;">Username:</a> {{$ord_data->username}}<br>

                        <a style="color: #fff;padding-right: 7px;">Name:</a> {{$ord_data->name}}<br>
                        <a style="color: #fff;padding-right: 7px;">Mobile:</a> {{$ord_data->mobile}}<br>
                        <a style="color: #fff;padding-right: 7px;">Order Type:</a> {{$ord_data->type}}<br>
                        @if($ord_data->type == 'Pack')
                        <a style="color: #fff;padding-right: 7px;">Pack Name:</a> {{$pack_data->title}}<br>
                        <a style="color: #fff;padding-right: 7px;">Pack Details:</a> {{$pack_data->details}}<br>
                        @endif
                        <a style="color: #fff;padding-right: 7px;">Order Amount:</a> {{$ord_data->sub_total}}<br>
                        <a style="color: #fff;padding-right: 7px;">Payment Method:</a> {{$ord_data->payment_method}}<br>
                        <a style="color: #fff;padding-right: 7px;">Payment Status:</a> {{$ord_data->payment_status}}<br>
                        <a style="color: #fff;padding-right: 7px;">Order Status:</a> @if($ord_data->status == 0) Pending @else Complete @endif<br>
                    </p>
                </div> 

                @if($ord_data->status == 0)
                <form method="post" action="{{url('admin/ordprocess')}}">@csrf
                    <input type="hidden" name="ord_id" value="{{$ord_data->id}}">

                    <div class="col-md-4" style="padding-top: 20px">
                        <label class="form-label">Select Status*</label>
                        <select style="background: transparent;color: #c3c3c3;width: 100%;" class="form-control" id="status" name="status" required>
                            <option value="">Choose...</option>
                            <option value="1">Complete</option>
                        </select>
                    </div>

                    <div class="col-md-4" style="padding-top: 20px">
                        <label class="form-label">Admin PIN*</label>
                        <input style="margin-bottom: 10px;height: 38px;" style="background: transparent;color: #c3c3c3;" type="password" class="form-control" id="pin" name="pin" required>
                    </div>

                    <div class="col-md-4" style="padding-top: 20px">
                        <button style="height: 38px;background: #ec1666;color: #fff;" type="submit" class="btn">Confirm Now</button>
                    </div>

                </form>
                @endif
               
            </div>
        </div>
    </div>   
</div>
@endsection