Viewing file: details.blade.php (8.85 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.admin')
@section('title') {{trans('admin.became_seller_details')}} @endsection
@section('extra-css') <style> .document-download-section{ position: absolute; bottom: 0px; width: 95%; padding: 10px 10px; z-index: 9; cursor: pointer; right: 4%; } .document-download-section:hover{ background: #d3c7df3d; } .preview-document-image{ height: 100%; width: 100%; } </style> @endsection
@section('content') <!-- Main content --> <section class="content"> <div class="row"> <div class="col-10 mx-auto mt-3"> <div class="card p-4"> <div class="card-header"> <h2 class="card-title">{{trans('admin.became_seller_details')}}</h2> </div> <!-- /.card-header --> <div class="card-body"> <div class="row mb-4"> <div class="col-md-6"> <h5><strong>{{trans('customer.name')}} :</strong> {{isset($becameSeller->customer)?$becameSeller->customer->fullname:''}}</h5> <h6> <strong>{{trans('customer.email')}} :</strong> {{isset($becameSeller->customer)?$becameSeller->customer->email:''}}</h6> <h6><strong>{{trans('customer.address')}} :</strong> {{$becameSeller->address}}</h6> <h6><strong>{{trans('customer.country')}} :</strong> {{$becameSeller->country}}</h6> <h6><strong>{{trans('customer.city')}} :</strong> {{$becameSeller->city}}</h6> <h6><strong>{{trans('customer.zip_code')}} :</strong> {{$becameSeller->zip_code}}</h6> </div> <div class="col-md-6 justify-content-end"> <div class="float-right text-right"> @if($becameSeller->status=='pending') <button class="mr-1 btn btn-sm btn-success" data-message="Are you sure you want to <b>Approved</b> this request?" data-action="{{route('admin.became.seller.status')}}" data-input={"id":{{$becameSeller->id}},"status":"approved"} data-toggle="modal" data-target="#modal-confirm" title="Approved"><i class="fa fa-check"></i> </button>
<button class="mr-1 btn btn-sm btn-danger" data-message="Are you sure you want to <b>Reject</b> this request? <input type='text' class='form-control mt-4' placeholder='Enter rejected reason' name='reason'>" data-action="{{route('admin.became.seller.status')}}" data-input={"id":{{$becameSeller->id}},"status":"rejected"} data-toggle="modal" data-target="#modal-confirm" title="Rejected"><i class="fa fa-times"></i> </button> @elseif($becameSeller->status=='approved') <button class="mr-1 btn btn-sm btn-danger" data-message="Are you sure you want to <b>Reject</b> this request? <input type='text' class='form-control mt-4' placeholder='Enter rejected reason' name='reason'>" data-action="{{route('admin.became.seller.status')}}" data-input={"id":{{$becameSeller->id}},"status":"rejected"} data-toggle="modal" data-target="#modal-confirm" title="Rejected"><i class="fa fa-times"></i> </button> @else <button class="btn d-block mt-3 btn-sm btn-{{$becameSeller->status=='approved'?'success':'danger'}}" disabled type="button" title="Rejected"><i class="fa fa-times"></i></button> @endif </div> </div> </div> <hr> <div class="row mt-3"> <div class="col-md-4"> <div class="text-center"> <h6 class="mb-2 text-danger font-weight-bold"><u>NID Card</u></h6> <a href="#"> <div> @if(isset($becameSeller->documents) && isset(json_decode($becameSeller->documents)->nid_card)) <img src="{{asset('uploads/reseller/'.json_decode($becameSeller->documents)->nid_card)}}" class="img-fluid preview-img" data-title="NID Card" alt=""> @endif <a href="{{route('admin.download.seller.document',['id'=>$becameSeller->id,'type'=>'nid_card'])}}"><i class="fa fa-download float-right"></i></a> </div> </a> </div> </div>
<div class="col-md-4"> <div class="text-center"> <h6 class="mb-2 text-danger font-weight-bold"><u>TD License Card</u></h6> <a href="#"> <div> @if(isset($becameSeller->documents) && isset(json_decode($becameSeller->documents)->td_license)) <img src="{{asset('uploads/reseller/'.json_decode($becameSeller->documents)->td_license)}}" class="img-fluid preview-img" data-title="TD License" alt=""> @endif <a href="{{route('admin.download.seller.document',['id'=>$becameSeller->id,'type'=>'td_license'])}}"><i class="fa fa-download float-right"></i></a> </div> </a> </div> </div>
<div class="col-md-4"> <div class="text-center"> <h6 class="mb-2 text-danger font-weight-bold"><u>Picture</u></h6> <a href="#"> <div> @if(isset($becameSeller->documents) && isset(json_decode($becameSeller->documents)->picture)) <img src="{{asset('uploads/reseller/'.json_decode($becameSeller->documents)->picture)}}" data-title="Picture" class="img-fluid preview-img" alt=""> @endif <a href="{{route('admin.download.seller.document',['id'=>$becameSeller->id,'type'=>'picture'])}}"><i class="fa fa-download float-right"></i></a> </div> </a> </div> </div> </div> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content -->
<!-- Modal --> <div class="modal fade" id="previewModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-lg modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="previewModalTitle"> </h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="showPreviewImage">
</div> </div>
</div> </div> </div>
@endsection
@section('extra-scripts') <script> $(document).on('click', '.preview-img', function(e){ const src = $(this).attr('src'); const title = $(this).attr('data-title'); console.log(src)
$('.showPreviewImage').html(`<img src=${src} class="preview-document-image">`); $('#previewModalTitle').text(title); $('#previewModal').modal('show'); }) </script> @endsection
|