@page "/ShippingsAdmin"
@using FruitBank.Common.Dtos
@using FruitBank.Common.Entities
@using FruitBankHybrid.Shared.Components
@using FruitBankHybrid.Shared.Components.Grids.Cargos
@using FruitBankHybrid.Shared.Components.Grids.Partners
@using FruitBankHybrid.Shared.Components.Grids.Shippings
@using FruitBankHybrid.Shared.Databases
<h3>Szállítmányok - 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 @ref="gridProductDtoTemplate" IsMasterGrid="true"></GridProductDtoTemplate>
			</DxTabPage>
			<DxTabPage Text="Beszállítók" Visible="@(LoggedInModel.IsAdministrator)">
				<GridPartner @ref="gridPartner" Partners="@Partners" IsMasterGrid="true"></GridPartner>
			</DxTabPage>
			<DxTabPage Text="Fuvarozók" Visible="@(LoggedInModel.IsAdministrator)">
				<GridCargoPartner @ref="gridCargoPartner" CargoPartners="CargoPartners" IsMasterGrid="true"></GridCargoPartner>
			</DxTabPage>
			<DxTabPage Text="Szállítmányok">
				<GridShipping @ref="gridShipping" Shippings="@Shippings" Partners="@Partners" IsMasterGrid="true"></GridShipping>
			</DxTabPage>
			<DxTabPage Text="Szállítólevelek">
				<GridShippingDocument @ref="gridShippingDocument" ShippingDocuments="ShippingDocuments" Shippings="Shippings" Partners="@Partners"></GridShippingDocument>
			</DxTabPage>
			<DxTabPage Text="Szállítólevél tételek">
				<GridShippingItemTemplate @ref="gridShippingItemTemplate" ShippingItems="ShippingItems" ShippingDocuments="ShippingDocuments"></GridShippingItemTemplate>
			</DxTabPage>
			<DxTabPage Text="Mérések">
				<GridShippingItemPallets @ref="gridShippingItemPallet" IsMasterGrid="true" ShippingItemPallets="ShippingItemPallets"></GridShippingItemPallets>
			</DxTabPage>
		</DxTabs>
	</DxLoadingPanel>
</div>