
<div [@routerTransition]>
    
    <div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor">
            <div class="kt-subheader kt-grid__item">
                <div [class]="containerClass">
                    <div class="kt-subheader__main">
                        <h3 class="kt-subheader__title">
                            <span>{{"Driver" | localize}}</span>
                        </h3>
                        <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                        <span class="badge badge-info margin-left-5">
                            {{ driverName }}
                        </span>
                    </div>
                    <div class="kt-subheader__toolbar">
                        <div class="kt-subheader__wrapper">
                            
                        </div>
                    </div>
                </div>
            </div>
            <div [class]="containerClass + ' kt-grid__item kt-grid__item--fluid'">
                        
                <div class="kt-portlet kt-portlet--mobile">
                    <div class="kt-portlet__body">
                     
                        <div class="row align-items-center">
                            <div class="kt-subheader kt-grid__item table-title">
                                <div class="kt-subheader__main">
                                    <h3 class="kt-subheader__title">
                                        <span>{{'DriverRouteListHistory' | localize}}</span>
                                    </h3>
                                </div>
                            </div>
                            <div class="primeng-datatable-container" >
                                <p-table #dataTable
                                        (onLazyLoad)="getDriverDetails($event)"
                                        [value]="primengTableHelper.records"
                                        rows="{{primengTableHelper.defaultRecordsCountPerPage}}"
                                        [paginator]="false"
                                        [lazy]="true"
                                        [responsive]="primengTableHelper.isResponsive">
                                    <ng-template pTemplate="header" >
                                        <tr>
                                            <th pSortableColumn="RouteId">
                                                {{'RouteId' | localize}}
                                                <p-sortIcon field="routeId"></p-sortIcon>
                                            </th>
                                            <th pSortableColumn="RouteDate">
                                                {{'LoadDate' | localize}}
                                                <p-sortIcon field="routeDate"></p-sortIcon>
                                            </th>
                                            <th pSortableColumn="DriverName">
                                                {{'VehicleName' | localize}}
                                                <p-sortIcon field="driverName"></p-sortIcon>
                                            </th>
                                            <th pSortableColumn="Stops">
                                                {{'TotalTime' | localize}}
                                                <p-sortIcon field="stops"></p-sortIcon>
                                            </th>
                                            <th pSortableColumn="Stops">
                                                {{'Stops' | localize}}
                                                <p-sortIcon field="stops"></p-sortIcon>
                                            </th>
                                            <th pSortableColumn="Miles">
                                                {{'Miles' | localize}}
                                                <p-sortIcon field="miles"></p-sortIcon>
                                            </th>
                                            <th pSortableColumn="Miles">
                                                {{'StopsPerHour' | localize}}
                                                <p-sortIcon field="miles"></p-sortIcon>
                                            </th>
                                            <th pSortableColumn="Miles">
                                                {{'MilesPerHour' | localize}}
                                                <p-sortIcon field="miles"></p-sortIcon>
                                            </th>
                                        </tr>   
                                    </ng-template>
                                    <ng-template pTemplate="body" let-record="$implicit">
                                        <tr class="tr-controller-routes">
                                            <td>
                                                <span class="ui-column-title">{{'RouteId' | localize}}</span>
                                                <a target="_blank" href="app/sprintship/controller-routes-details/{{record.routeId}}">{{ record.routeId }}</a>
                                            </td>
                                            <td>
                                                <span class="ui-column-title">{{'Date' | localize}}</span>
                                                {{record.loadDate | date:'longDate'}}
                                            </td>
                                            <td>
                                                <span class="ui-column-title">{{'DriverName' | localize}}</span>
                                                {{record.vehicleName}}
                                            </td>
                                            <td>
                                                <span class="" id="tt{{record.routeId}}">{{record.totalTime}}</span>
                                                
                                            </td>
                                            <td>
                                                <span class="" id="route{{record.routeId}}">0</span>
                                            </td>
                                            <td>
                                                <span class="ui-column-title">{{'Miles' | localize}}</span>
                                                {{record.miles}}
                                            </td>
                                            <td>
                                                <span class="" id="sph{{record.routeId}}">0</span>
                                            </td>
                                            <td>
                                                <span class="ui-column-title">{{'MilesPerHour' | localize}}</span>
                                                {{record.milesPerHour}}
                                            </td>
                                        </tr>
                                    </ng-template>
                                </p-table>
                                <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
                                    {{'NoData' | localize}}
                                </div>
                                <div class="primeng-paging-container">
                                    <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage"
                                                (onPageChange)="getDriverDetails($event)"
                                                #paginator
                                                [totalRecords]="primengTableHelper.totalRecordsCount"
                                                [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">
                                    </p-paginator>
                                    <span class="total-records-count">
                                        {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
                                    </span>
                                </div> 
                            </div>

                        </div>
                    </div>
                </div>
            </div>
    
       
        </div>
    </div>


<div [@routerTransition]>