<div class="customers-view-layer row">
    <div class="row">
        <div class="col-md-6 title-header">
            <div class="col-md-6">
                {{ 'customers.headers.DEFAULT' | translate }}
            </div>
            <div class="col-md-6">
                {{ 'customers.headers.ORDER_TYPE' | translate }}
            </div>
        </div>
    </div>

    <div class="row customer-row">
        <div class="col-md-6 custom-border">
            <div class="col-md-6">
                {{ 'customers.headers.DEFAULT' | translate }}
            </div>
            <div class="col-md-6">
                <div ng-repeat="orderType in orderTypes">
                    <input type="radio" value="{{orderType.idOrderType}}" ng-model="$parent.defaultIdOrderType" name="defaultOrderType"/>
                    <label>{{orderType.name}}</label>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">
            <div class="btn btn-primary" ng-click="saveDefaultOrderType()">
                {{ 'customers.buttons.SAVE' | translate }}
            </div>
        </div>

    </div>

    <div class="row">
        <div class="col-md-6 title-header">
            <div class="col-md-6">
                {{ 'customers.headers.CUSTOMERS' | translate }}
            </div>
            <div class="col-md-6">
                {{ 'customers.headers.ORDER_TYPE' | translate }}
            </div>
        </div>
    </div>
    <div class="row customer-row" ng-repeat="customer in customers">
        <div class="col-md-6 custom-border">
            <div class="col-md-6">
                {{customer.customerName}}
                <span ng-if="isSameCompany(customer.isSameCompanyAsCl)">(same company)</span>
            </div>
            <div class="col-md-6">
                <div ng-repeat="orderType in orderTypes">
                    <input type="radio"
                        value="{{orderType.idOrderType}}"
                        ng-disabled="isSameCompany(customer.isSameCompanyAsCl)"
                        ng-model="customer.idOrderType"
                        name="customer-{{customer.idCustomerInstance}}"/>
                    <label>{{orderType.name}}</label>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">
            <div class="btn btn-primary" ng-click="saveCustomerOrderTypes()">
                {{ 'customers.buttons.SAVE' | translate }}
            </div>
        </div>
    </div>
</div>
