

    
     @extends('layouts.app1')
@section('content')





   





    <br><br>

<title>{{$settings->site_name}} | Transactions</title>

<h2 style="text-align:center">Transactions  < slide ></h2>
<br>



<span>
    <div class="scrollmenu">
        <table cellspacing="400" class="table" table-bordered="">
            <tbody>
                <tr>
                    <th>TYPE</th>
                    <th>STATUS</th>
                    <th>AMOUNT</th>
                    <th>DATE</th>
                </tr>



                @foreach($deposits as $deposit)
                <tr>
                  <td>{{$deposit->type}}</td>
                 <th style="text-align:center"><input type="button" class="btn btn-secondary btn-sm"  value="{{$deposit->status}}"></th>
                @if($deposit->type = 'Deposit')
                  <td>{{Auth::user()->currency}}{{$deposit->amount}} </td>
                  
                   @elseif($deposit->type ='Withdrawal')
                    <td>{{Auth::user()->currency}}{{$deposit->amount}}</td>
                     @elseif($deposit->type ='signal')
                    <td>{{Auth::user()->currency}} {{$deposit->amount}} {{$deposit->dsignal}} </td>
                    @else
                     <td>{{Auth::user()->currency}} {{$deposit->amount}} {{$deposit->upgrade}} </td>
                  @endif
                  <td>{{\Carbon\Carbon::parse($deposit->created_at)->toDayDateTimeString()}}</td>
              </tr>
              @endforeach 

                                            
            </tbody>
        </table>
    </div>
            </span>
<hr>
<a href="{{ url('/dashboard') }}"><button class="btn btn-dark" style="color:white"><i class="fa fa-undo"></i> Back to Account</button></a><br><br>



<div class="row">
  <div class="col-md-12">
    <div class="form-group row">
      <div class="col-6">
        <button type="button" onclick="referralFunction()" class="btn btn-success">Copy Referral Link</button>
      </div>
      <div class="col-10">
        <input type="text" style="color:black" class="form-control" id="referral_link" value="{{Auth::user()->ref_link}}" readonly="">
      </div>
    </div>
  </div>



  <script>
    function referralFunction() {
      var copyReferral = document.getElementById("referral_link");
      copyReferral.select();
      copyReferral.setSelectionRange(0, 99999);
      document.execCommand("copy");
      Swal.fire('', '<b>Referral Link Copied :</b> ' + copyReferral.value + '', '', '');
    }
  </script>






   


 @endsection  
