<button type="button"
        id="ongoing-orders-btn"
        subModule="ongoing_orders"
        class="btn btn-default"
        ng-click="setSubModule($event)">{{ 'orders.buttons.SHOW_ONGOING_ORDERS' | translate }}</button>
<button type="button"
        id="orders-history-btn"
        subModule="orders_history"
        class="btn btn-default"
        ng-click="setSubModule($event)">{{ 'orders.buttons.SHOW_ORDERS_HISTORY' | translate }}</button>
<button type="button"
        id="order-projects-btn"
        subModule="orderProjects"
        class="btn btn-default"
        ng-click="setSubModule($event)">{{ 'orders.buttons.ORDER_PROJECTS' | translate }}</button>

<div class="row">
    <div class="col-sm-12"
        id="orders-layer"
        ng-if="isSubmoduleVisible('ongoing_orders')"
        ng-init="getOngoingOrders()">
    <h3>{{ 'orders.headers.SHOW_ONGOING_ORDERS' | translate }}</h3>
    <table class="table table-bordered table-striped table-hover" id="ongoing-orders"></table>
    </div>
</div>

<div class="row">
    <div class="col-sm-12"
        id="orders-hostory-layer"
        ng-if="isSubmoduleVisible('orders_history')"
        ng-init="getOrdersHistory()">
    <h3>{{ 'orders.headers.SHOW_ORDERS_HISTORY' | translate }}</h3>
    <table class="table table-bordered table-striped table-hover" id="orders-history"></table>
    </div>
</div>

<div class="row">
    <div class="col-sm-12"
        id="order-projects-layer"
        ng-if="isSubmoduleVisible('orderProjects')"
        ng-init="getOrderProjects()">
    <h3>{{ 'orders.headers.SHOW_ORDER_PROJECTS' | translate }}</h3>
    <order-projects ng-controller="orderProjectsController" ng-init="getOrderProjectsHeaders()"></order-projects>
    </div>
</div>

<div class="row">
    <div class="col-sm-12"
        id="change-orders-steps-module"
        ng-if="isSubmoduleVisible('orders_steps')">
        <?php
            if(in_array($user->getUserType(), [USER_TYPES['BROKER'], USER_TYPES['CUSTOMER'], USER_TYPES['COMMERCIAL_LEAD']]) ){
                echo '<change-orders-steps ng-controller="changeOrdersStepsCtrl" ng-init="startOrdersStepsModule()"></change-orders-steps>';
            }else{
                echo '<suppliers-procurement-view ng-controller="suppliersProcurementViewCtrl" ng-init="getOrderSteps()"></suppliers-procurement-view>';
            }
        ?>

    </div>
</div>
