Viewing file: index.blade.php (7.28 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('master.front') @section('title') {{__('Orders')}} @endsection
@section('content')
<div class="container mt-5 mb-5"> <div class="row"> <div class="col-12"> <!-- Page Title--> <div class="page-title"> <div class="container"> <div class="row"> <div class="col-lg-12"> <ul class="breadcrumbs"> <li><a href="{{route('front.index')}}">{{__('Home')}}</a></li> <li class="separator"></li> <li>{{__('Orders')}}</li> </ul> </div> </div> </div> </div> <!-- Page Content--> <div class="container-fluid padding-bottom-3x mb-1"> <div class="row"> @include('includes.user_sitebar') <div class="col-lg-9 col-12 new_user_profile mt-3"> <div class="card"> <div class="card-body"> <div class="u-table-res"> <table class="table table-bordered mb-0"> <thead> <tr> <th>{{__('Total Price')}}</th> <th>{{__('Order Status')}}</th> <th>{{__('Payment Status')}}</th> <th>{{__('Payment Method')}}</th> <th>{{__('Date Purchased')}}</th> <th>{{__('Transactions ID')}}</th> <th>{{__('Action')}}</th> </tr> </thead> <tbody> @if($orders->isNotEmpty()) @foreach ($orders as $order) <tr> <td>{{PriceHelper::grandCurrencyPrice($order->total_price)}}</td> <td> {{$order->order_status}} </td> <td>{{$order->payment_status}}</td> <td>{{$order->payment_method}}</td> <td>{{$order->created_at->format('D/M/Y')}}</td> <td>{{$order->txn_id}}</td> <td> <div class="btn-group"> <button type="button" class="btn btn-info btn-sm" data-bs-toggle="dropdown" aria-expanded="false"> <i class="fa fa-ellipsis-v"></i> </button> <ul class="dropdown-menu" style=""> <li> <a class="dropdown-item" href="{{route('user.order.detail',[$order->id])}}">Details</a> </li> @if($order->order_status=='SELLING') <li><a class="dropdown-item disabled" disabled="disabled" href="#">Selling</a></li> @elseif($order->order_status=='SOLD') <li><a class="dropdown-item disabled" disabled="disabled" href="#">Sold</a></li> @else <li><a class="dropdown-item resellOrder" data-id="{{$order->id}}" href="#">Sell</a></li> @endif </ul> </div> </td> </tr> @endforeach @else <tr class="text-center"> <td colspan="7" class="p-4">No Data Available</td> </tr> @endif </tbody> </table> </div> </div> </div>
</div> </div> </div> </div> </div> </div>
<!-- Modal --> <div class="modal fade" id="resellModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <form action="{{route('user.sell.order')}}" method="post"> @csrf
<div class="modal-header"> <h5 class="modal-title" id="exampleModalLongTitle">Confirm</h5> <button type="button" class="close btn" data-bs-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <input type="hidden" name="order_id" class="order_id">
<h5>Are you sure you want to sell this order?</h5> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary close" data-bs-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary">Confirm</button> </div>
</form> </div> </div> </div>
@endsection
@section('js')
<script> $(document).on('click', '.resellOrder', function (e){ e.preventDefault(); const order_id=$(this).attr('data-id');
$('.order_id').val(order_id)
$('#resellModal').modal('show');
}) </script>
@endsection
|