<div ng-controller="gadgetOrderCentralCtrl" ng-init="getOrderCentralInfo()" class="order-central-orders">
    <h3>
        {{ 'dashboards.headers.ORDER_CENTRAL' | translate }}
        <span ng-if="filterService.isFilterSet(gadget.module)" class="is-fitlered glyphicon glyphicon-filter"></span>
    </h3>
    <dashboards-filters
        ng-if="filterService.isFilterVisible(gadget.module)"
        ng-init="setFilterParams(gadget.module)"
        ng-controller="dashboardsFiltersCtrl">
    </dashboards-filters>
    <div class="gadget-row col-md-12">
        <div class="gadget-row-column gadget-header col-md-2">
            {{ 'dashboards.headers.ORDER' | translate }}
            <span ng-click="filterService.showFilter(gadget.module, 'orderNumber', 'textFilter')"
                class="filter-value glyphicon glyphicon-filter"></span>
            <span ng-click="filterService.sortBy(gadget.module, 'orderNumber')"
                class="sort-icon sort glyphicon {{filterService.getSortIcon(gadget.module, 'orderNumber')}}"></span>
        </div>
        <div class="gadget-row-column gadget-header col-md-3">
            {{ 'dashboards.headers.ASSIGNED_TO' | translate }}
            <span ng-click="filterService.showFilter(gadget.module, 'assignedTo', 'textFilter')"
                class="filter-value glyphicon glyphicon-filter"></span>
            <span ng-click="filterService.sortBy(gadget.module, 'assignedTo')"
                class="sort-icon sort glyphicon {{filterService.getSortIcon(gadget.module, 'assignedTo')}}"></span>
        </div>
        <div class="gadget-row-column gadget-header col-md-3">
            {{ 'dashboards.headers.ORDER_DATE' | translate }}
            <span ng-click="filterService.showFilter(gadget.module, 'orderDate', 'dateFilter')" class="filter-value glyphicon glyphicon-filter"></span>

            <span ng-click="filterService.sortBy(gadget.module, 'orderDate')"
                class="sort-icon sort glyphicon {{filterService.getSortIcon(gadget.module, 'orderDate')}}"></span>
        </div>
        <div class="gadget-row-column gadget-header col-md-2">
            {{ 'dashboards.headers.TOTAL' | translate }}
            <span ng-click="filterService.sortBy(gadget.module, 'fixedPrice')"
                class="sort-icon sort glyphicon {{filterService.getSortIcon(gadget.module, 'fixedPrice')}}"></span>
        </div>
        <div class="gadget-row-column gadget-header col-md-2">
            {{ 'dashboards.headers.STATUS' | translate }}
            <span ng-click="filterService.showFilter(gadget.module, 'status', 'textFilter')" class="filter-value glyphicon glyphicon-filter"></span>
            <span ng-click="filterService.sortBy(gadget.module, 'status')"
                class="sort-icon sort glyphicon {{filterService.getSortIcon(gadget.module, 'status')}}"></span>
        </div>
    </div>
    <div class="gadget-row col-md-12" ng-repeat="order in orders">
        <div class="gadget-row-column col-md-2">
            <a href="orders?subModule=orders_steps&idOrder={{order.idOrder}}&orderNumber={{order.orderNumber}}">{{order.orderNumber}}</a>
        </div>
        <div class="gadget-row-column col-md-3">
            {{order.assignedTo}}
        </div>
        <div class="gadget-row-column col-md-3">
            {{order.orderDate}}
        </div>
        <div class="gadget-row-column col-md-2">
            {{order.fixedPrice}}
            <div ng-if="order.recurringPrice > 0">
                ({{ 'dashboards.headers.RECURRING' | translate }} {{order.recurringPrice}})
            </div>
        </div>
        <div class="order-status-{{order.status}} gadget-row-column col-md-2">
            {{order.status}} <span class="{{getStatusIcon(order.status)}}"></span>
        </div>
    </div>
</div>
