<div class="custom_loader_wrapper" *ngIf="loader">
    <div class="custom_loader_ring"></div>
</div>
<header class="provider_header">
    <div class="row">
      <div class="col-md-6">
        <h4>{{'transaction.Forex Transaction List' | translate}}</h4>
      </div>
      <div class="col-md-6 textRight relative">
          <button class="logout" (click)="goToPage('forex/config')">
            <img src="assets/images/asset_settings.png">
          {{'transaction.Config' | translate}}</button>
          <button class="logout" (click)="goToPage('forex/currency')">
            <img src="assets/images/asset_currency.png">
          {{'transaction.Currency' | translate}}</button>
          <button class="logout" (click)="goToPage('forex/editprovider')">
            <img src="assets/images/asset_settings.png">
          {{'transaction.Settings' | translate}}</button>
          <button class="logout" (click)="logout()">
              <img src="assets/images/asset_logout.png">
            {{'transaction.Logout' | translate}}</button>
          <img src="assets/images/asset_logo1.png">
          <span (click)="goToPage('forex/changepin')">{{'transaction.Change PIN' | translate}}</span>
      </div>
    </div>
  </header>
<section>
    <div class="provider_content">
      <h3>{{'transaction.Manage Transaction' | translate}}</h3>
      <div class="provider_inner_content">
          <div class="alert alert-danger alert-dismissible" *ngIf="error">
              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <strong>{{'transaction.Warning' | translate}}!</strong> {{responseMsg}}
          </div>
          <div class="alert alert-success alert-dismissible" *ngIf="success">
              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <strong>{{'transaction.Success' | translate}}!</strong> {{'transaction.Forex provider removed successfully' | translate}}
            </div> 
          <div class="table-responsive">          
              <table class="table">
                <thead>
                  <tr>
                    <th>{{'transaction.Customer' | translate}}</th>
                    <th>{{'transaction.Date' | translate}}</th>
                    <th>{{'transaction.Phone' | translate}}</th>
                    <th>{{'transaction.Location' | translate}}</th>
                    <th>{{'transaction.Currency' | translate}}</th>
                    <th>{{'transaction.Amount' | translate}}</th>
                    <th>{{'transaction.Forex Amount' | translate}}</th>
                    <th>{{'transaction.Driver' | translate}}</th>
                    <th>{{'transaction.Status' | translate}}</th>
                  </tr>
                </thead>
                <tbody *ngIf="transactionList">
                  <tr *ngFor="let tansaction of transactionList">
                    <td>{{getCustomer(tansaction.user_info,'FirstName') | titlecase}}</td>
                    <td>{{tansaction.book_date}}</td>
                    <td>{{getCustomer(tansaction.user_info,'MobileNumber') | titlecase}}</td>
                    <td>{{getCustomer(tansaction.user_info,'City') | titlecase}}</td>
                    <td>{{tansaction.currency}}</td>
                    <td>SAR {{tansaction.amount}}</td>
                    <td>{{tansaction.symbol + tansaction.convert_price}}</td>
                    <td>{{getCustomer(tansaction.driver_info,'name') | titlecase}}</td>
                    <td>{{get_status(tansaction.status)}}</td>
                  </tr>
                </tbody>
              </table>
              <div class="forex_pagination" *ngIf="meta">
                <ul *ngIf="userDetails">
                    <li *ngFor="let i of getNumber(meta.total_pages); let j = index" [ngClass]="{'activeClass': meta.current_page == j+1}" (click)="getTransaction(userDetails.id, j+1)">{{j+1}}</li>
                </ul>
               
              </div>
          </div>
      </div>
    </div>
  </section>