
<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>{{"Vehicle" | localize}}</span>
                            </h3>
                            <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                            <span class="badge badge-info margin-left-5">
                                {{ vehicleName }}
                            </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="routes-filter-container">
                                <div class="search-button-container">
                                    <div class="input-group">
                                        <div class="input-group-prepend">
                                            <button class="btn btn-secondary btn-controller-search-icon" type="button"><i class="fa fa-search"></i></button>
                                        </div>
                                        <input type="text" class="form-control" placeholder="Search" id="vehicleNameFilter" [(ngModel)] ="vehicleName">
                                        <div class="input-group-append">
                                            <button class="btn btn-secondary" type="button" (click)="getRouteVehicles($event)"><i class="fa fa-filter"></i> Filter</button>
                                        </div>
                                    </div>
                                </div>
                                <div class="search-button-filter">
                                    <button type="reset" class="btn btn-secondary btnToggleMore btnControllerMenu"><i class="fa fa-ellipsis-v"></i></button>
                                </div>
                            </div> -->
                            <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>{{'VehicleRouteListHistory' | localize}}</span>
                                        </h3>
                                    </div>
                                </div>
                                <div class="primeng-datatable-container" >
                                    <p-table #dataTable
                                            (onLazyLoad)="getRouteVehicles($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">
                                                    {{'Date' | localize}}
                                                    <p-sortIcon field="routeDate"></p-sortIcon>
                                                </th>
                                                <th pSortableColumn="DriverName">
                                                    {{'DriverName' | localize}}
                                                    <p-sortIcon field="driverName"></p-sortIcon>
                                                </th>
                                                <th pSortableColumn="Stops">
                                                    {{'NoStops' | localize}}
                                                    <p-sortIcon field="stops"></p-sortIcon>
                                                </th>
                                                <th pSortableColumn="Miles">
                                                    {{'Miles' | 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.routeDate | date:'longDate'}}
                                                </td>
                                                <td>
                                                    <span class="ui-column-title">{{'DriverName' | localize}}</span>
                                                    {{record.driverName}}
                                                </td>
                                                <td>
                                                    <span class="ui-column-title">{{'NoStops' | localize}}</span>
                                                    {{record.stops}}
                                                </td>
                                                <td>
                                                    <span class="ui-column-title">{{'Miles' | localize}}</span>
                                                    {{record.miles}}
                                                </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)="getRouteVehicles($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]>