@using PantheonRA.WebApi.Contracts.Enums
@using PantheonRA.BackOffice.Enums

@if (!PantheonRA.BackOffice.CurrentUser.HasGranules() && PantheonRA.BackOffice.CurrentUser.CanAccess(Permissions.PRODUCTION))
{
<li data-list-item-id="@Loc.Manufacturing"
    class="dropdown @Html.IsSelected("Index", "Manufacturing") @Html.IsSelected("Edit", "Manufacturing") @Html.IsSelected("WorkOrderMaterials", "Manufacturing") 
                    @Html.IsSelected("IssuingMaterial", "Manufacturing") @Html.IsSelected("WorkOrderOperations", "Manufacturing") @Html.IsSelected("Receive", "Manufacturing") 
                    @Html.IsSelected("InputCompletedWork", "Manufacturing")">
    <a href="@Url.Action((PantheonRA.BackOffice.CurrentUser.ManufacturingType == DocTypeWorkOrderType.Both || 
                         PantheonRA.BackOffice.CurrentUser.ManufacturingType == DocTypeWorkOrderType.MF ? "IndexMF" : "IndexSE"), "Manufacturing")">
        <i class="fas fa-industry-alt"></i> <span class="nav-label">@Loc.Manufacturing</span>
    </a>
    <ul class="dropdown-menu dropdown-menu-right">
        @if (PantheonRA.BackOffice.CurrentUser.ManufacturingType == DocTypeWorkOrderType.Both || PantheonRA.BackOffice.CurrentUser.ManufacturingType == DocTypeWorkOrderType.MF)
        {
            <li><a href="@Url.Action("IndexMF", "Manufacturing")">@Loc.WorkOrdersMF.SetMenuNameLength()</a></li>
        }
        @if (PantheonRA.BackOffice.CurrentUser.ManufacturingType == DocTypeWorkOrderType.Both || PantheonRA.BackOffice.CurrentUser.ManufacturingType == DocTypeWorkOrderType.SE)
        {
            <li><a href="@Url.Action("IndexSE", "Manufacturing")">@Loc.WorkOrdersSE.SetMenuNameLength()</a></li>
        }

    </ul>
</li>
}