<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> {{'listdriver.Driver Management' | translate}}</h4>
      </div>
      <div class="col-md-6 textRight relative">
          <button class="logout" (click)="goToPage('delivery')">
            <img src="assets/images/asset_home.png">
           {{'listdriver.Home' | translate}}</button>
          <button class="logout" (click)="logout()">
              <img src="assets/images/asset_logout.png">
             {{'listdriver.Logout' | translate}}</button>
          <img src="assets/images/asset_logo1.png">
          <span (click)="goToPage('maker/changepin')"> {{'listdriver.Change PIN' | translate}}</span>
      </div>
    </div>
  </header>
<section>
    <div class="provider_content">
      <h3> {{'listdriver.Driver List' | translate}}</h3>
      <div class="provider_inner_content">
          <div class="table-responsive">   
              <div class="alert alert-danger alert-dismissible" *ngIf="error">
                  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                  <strong> {{'listdriver.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> {{'listdriver.Success!' | translate}}</strong>  {{'listdriver.Forex provider removed successfully' | translate}}
                </div>      
              <table class="table">
                <thead>
                  <tr>
                    <th> {{'listdriver.Provider Name' | translate}}</th>
                    <th> {{'listdriver.Location' | translate}}</th>
                    <th> {{'listdriver.Postal Code' | translate}}</th>
                    <th> {{'listdriver.Manager ID' | translate}}</th>
                    <th> {{'listdriver.National ID' | translate}}</th>
                    <th> {{'listdriver.Phone' | translate}}</th>
                    <th> {{'listdriver.Email ID' | translate}}</th>
                    <th> {{'listdriver.Max Amount' | translate}}</th>
                    <th> {{'listdriver.Max Limit' | translate}}</th>
                    <th class="textRight">
                      <button class="add" (click)="goToPage('delivery/driveradd')">+</button>
                    </th>
                  </tr>
                </thead>
                <tbody *ngIf="providerList; else noProvider">
                  <tr *ngFor="let provider of providerList;">
                    <td>{{provider.name | titlecase}}</td>
                    <td>{{provider.location | titlecase}}</td>
                    <td>{{provider.postal}}</td>
                    <td>{{provider.manager_id | titlecase}}</td>
                    <td>{{provider.national_id}}</td>
                    <td>{{provider.phone}}</td>
                    <td>{{provider.email_id}}</td>
                    <td>{{provider.max_amount}}</td>
                    <td>{{provider.max_limit}}</td>
                    <td class="textRight pl0 pr0">
                      <button class="edit_btn"(click)="editClick(provider.id)"></button>
                      <button class="delete_btn" (click)="deleteClick(provider.id)"></button>
                    </td>
                  </tr>
                </tbody>                
              </table>
              <ng-template #noProvider></ng-template>
          </div>
      </div>
    </div>
  </section>