<div class="row">
    <div style="position: absolute;margin : auto; ">
        <h3>Commandes & Retours</h3></br>
    </div></br></br>

        <div class="col-md-12">
            <div class="animate-bottom">
            <div class="panel panel-default">

                <div class="panel-heading">
                    <h3 class="panel-title">Critères de recherche</h3>
                </div>
                <div class="panel-body" >
                    <div ng-include="'app/pages/commandes/widgets/search.html'" ></div>
                </div>
            </div>

            <div  class="col-md-3 col-md-offset-9 " >
                <button class="btn btn-flexo" style="float: right;bottom:   0; margin-right: 25px" ng-click="searchCommand(pagination.current)">Chercher</button>
            </div></br></br>
            </div>
        </div>
         <div class="col-md-12">
             <div class="loader" id="Loaderdiv" style=" margin:0 auto;"></div>
             <div class="alert bg-danger closeable" role="alert" id="msgError" style="margin: 80px">
                 {{error_response}}.
                 <i class="ion-close-round" style="float: right;" ng-click="hideMsgError()"></i>
             </div>
             <div  id="divEmpty" style=" margin:0 auto;"><span class="error-msg-server">Aucun élément trouvé</span></div>
             <div class="animate-bottom" id="divTable">
                 <div class="table-responsive">
                     <table class="table table-bordered" >

                         <tr class="tr-background-color">
                             <th>ID</th>
                             <th>Numéro</th>
                             <th>Date Création</th>
                             <th>Type</th>
                             <th>Canal</th>
                             <th>Nom Client</th>
                             <th>Code Client</th>
                             <th>Statut</th>
                             <th>Code ERP</th>
                             <th></th>
                         </tr>

                         <tr dir-paginate="item in commands |itemsPerPage:commandsPerPage " total-items="totalCommands" current-page="pagination.currentCommande" class="align-td-center ">
                             <td >{{item.id}}</td>
                             <td >{{item.number}}</td>
                             <!--td >{{convertDateFormat(item.created_at)}}</td-->
                             <td >{{frenchDateTimeFormat(item.created_at)}}</td>
                             <td >{{item.type.name}}</td>
                             <td >{{item.channel.name}}</td>
                             <td ng-show="item.individual != null">{{item.individual.last_name}} {{item.individual.first_name}}</td>
                             <td ng-show="item.reseller != null && item.individual == null">{{item.reseller.company.name}}</td>
                             <td ng-show="item.individual == null && item.reseller == null"></td>
                             <td >{{item.client.ERP_code}}</td>
                             <td >{{item.status.name}}</td>
                             <td >{{item.ERP_code}}</td>
                             <td class="div-centred-td">
                                 <button class="btn btn-flexo btn-sm" ui-sref="consultationCommand({id : item.id })">Consulter</button>
                                 <!--button class="btn btn-flexo btn-sm" ui-sref="updateCommand({id : item.id , statusId : item.status_id})">Modifier</button-->

                             </td>
                         </tr>
                     </table>
                     <dir-pagination-controls on-page-change="pageChanged(newPageNumber)"  style="float: right"></dir-pagination-controls>

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

</div>
