<link href="templates/couriers/style.css" rel="stylesheet">
<div class="content" ng-init="rowsCount = customRowsCount || 10">
	<div class="content image" ng-if="!fullscreenImage" ng-style="{'background-image': 'url(' + backgroundImage + ')'}">
		<div class="table">
			<div class="column">
				<div class="header">
					<span>Готовятся</span>
				</div>
					<div class="orders-body">
						<div class="header-props">
							<div class="order-prop order-number">Заказ</div>
							<div class="order-prop order-time">Осталось</div>
							<div class="order-prop order-courier">Курьер</div>
						</div>
						<div class="order" ng-repeat="order in orders | filter: {completed: false, sended: false} | limitToRange: rowsCount track by $index" ng-class="{completed: order.completed}" ng-class-even="'even'">
							<div class="order-prop order-number" ng-if="order">{{order.number}}</div>
							<div class="order-prop order-time" ng-if="order" ng-class="{expired: order.remainingIsExpired}">
								<span ng-if="order.remainingIsExpired">-</span> {{order.remainingTime | date: 'HH:mm'}}
							</div>
							<div class="order-prop order-courier" ng-if="order">{{order.courierName}}</div>
							<div class="order-prop order-empty" ng-if="!order">.</div>
						</div>
					</div>
			</div>
			<div class="column">
				<div class="header completed">
					<span>Готовы</span>
				</div>
					<div class="orders-body">
						<div class="header-props">
							<div class="order-prop order-number">Заказ</div>
							<div class="order-prop order-time">Доставить к</div>
							<div class="order-prop order-courier">Курьер</div>
						</div>
						<div class="order" ng-repeat="order in orders | filter: {completed: true, sended: false} | limitToRange: rowsCount track by $index" ng-class="{completed: order.completed}" ng-class-even="'even'">
							<div class="order-prop order-number" ng-if="order">{{order.number}}</div>
							<div class="order-prop order-time" ng-if="order">{{order.deliverTime | date: 'HH:mm'}}</div>
							<div class="order-prop order-courier" ng-if="order">{{order.courierName}}</div>
							<div class="order-prop order-empty" ng-if="!order">.</div>
						</div>
					</div>
			</div>
			<div class="column">
				<div class="header sended">
					<span>Отправлены</span>
				</div>
					<div class="orders-body">
						<div class="header-props">
							<div class="order-prop order-number">Заказ</div>
							<div class="order-prop order-time">В пути</div>
							<div class="order-prop order-courier">Курьер</div>
						</div>
						<div class="order" ng-repeat="order in orders | filter: {sended: true} | limitToRange: rowsCount track by $index" ng-class="{completed: order.completed}" ng-class-even="'even'">
							<div class="order-prop order-number" ng-if="order">{{order.number}}</div>
							<div class="order-prop order-time" ng-if="order" ng-class="{expired: time > order.deliverTime}">{{order.onWayTime | date: 'HH:mm'}}</div>
							<div class="order-prop order-courier" ng-if="order">{{order.courierName}}</div>
							<div class="order-prop order-empty" ng-if="!order">.</div>
						</div>
					</div>
			</div>
		</div>
	</div>
	<div class="image fullheight" ng-if="fullscreenImage && !isVideo(fullscreenImage)" ng-style="{'background-image': 'url(' + fullscreenImage + ')'}"></div>
	<video class="video fullheight" ng-if="fullscreenImage && isVideo(fullscreenImage)">
		<source src="{{fullscreenImage}}" type="video/mp4" ng-if="fullscreenImage && isVideo(fullscreenImage)">
		Your browser does not support the video tag.
	</video>
	<div class="title-bar" ng-click="showOrder()">
		<div class="logo" ng-style="{'background-image': 'url(' + logoImage + ')'}"></div>
		<div class="time">{{time | date: 'HH:mm'}}</div>
	</div>
</div>
