@page "/OrdersAdmin"
@using FruitBank.Common.Dtos
@using FruitBank.Common.Models
@using FruitBankHybrid.Shared.Components
@using FruitBankHybrid.Shared.Databases
<h3>Rendelések - Adminisztrátor</h3>

<DxDialogProvider />

<div style="margin-top: 30px;">

	<DxLoadingPanel @bind-Visible="LoadingPanelVisibility.Visible"
					IsContentBlocked="true"
					ApplyBackgroundShading="true"
					IndicatorAreaVisible="false"
					Text="Adatok szinkronizálása folyamatban...">

		@* @bind-ActiveTabIndex="@ActiveTabIndex" *@ 
		<DxTabs ActiveTabIndexChanged="(i) => OnActiveTabChanged(i)" RenderMode="TabsRenderMode.OnDemand" AllowTabReorder="true">
			<DxTabPage Text="Termékek">
				<GridProductDtoTemplate ProductDtos="ProductDtos" IsMasterGrid="true"></GridProductDtoTemplate>
			</DxTabPage>
			<DxTabPage Text="Vásárlók" Visible="@(LoggedInModel.IsAdministrator)">
			</DxTabPage>
			<DxTabPage Text="Rendelések">
				<GridDetailOrderDto OrderDtos="OrderDtos" IsMasterGrid="true"></GridDetailOrderDto>
			</DxTabPage>
			<DxTabPage Text="Rendelés tételek">
				<GridDetailOrderItemDto OrderItemDtos="OrderItemDtos" ProductDtos="ProductDtos" IsMasterGrid="true"></GridDetailOrderItemDto>
			</DxTabPage>
			<DxTabPage Text="Mérések">
				<GridDetailOrderItemPallets IsMasterGrid="true"></GridDetailOrderItemPallets>
			</DxTabPage>
		</DxTabs>
	</DxLoadingPanel>
</div>