@using PantheonRA.BackOffice.Models;

@Html.Partial("~/Views/Shared/_TabNavigation.cshtml", new TabNavigationViewModel {
    Tabs = new List<NavigationtabViewModel>
    {
        new NavigationtabViewModel(Loc.Subjects, Url.Action("Index", "Subjects"),
            Html.IsActive("Index", "Subjects") || Html.IsActive("Create", "Subjects") || Html.IsActive("Edit", "Subjects") ||
            Html.IsActive("ImportSubjects", "Subjects"),
            !PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.CODELISTS_SUBJECTS)),
         new NavigationtabViewModel(Loc.Products, Url.Action("Index", "Products"),
            Html.IsActive("Index", "Products") || Html.IsActive("Create", "Products") || Html.IsActive("Edit", "Products") ||
            Html.IsActive("ImportProducts", "Products") || Html.IsActive("ImportProductContractPrices", "Products") ||
            Html.IsActive("Index", "ProductClassif") || Html.IsActive("Create", "ProductClassif") ||
            Html.IsActive("Edit", "ProductClassif") ||
            Html.IsActive("Index", "ProductTypes") || Html.IsActive("Create", "ProductTypes") || Html.IsActive("Edit", "ProductTypes") ||
            Html.IsActive("Index", "MeasurementUnits") || Html.IsActive("Create", "MeasurementUnits") || Html.IsActive("Edit", "MeasurementUnits") ||
            Html.IsActive("Index", "CustTariff") || Html.IsActive("Create", "CustTariff") || Html.IsActive("Edit", "CustTariff"),
            !PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.CODELISTS_ARTICLES)),
         new NavigationtabViewModel(Loc.TaxRates, Url.Action("Index", "Taxes"), Html.IsActive("Index", "Taxes") ||  Html.IsActive("Edit", "Taxes") || Html.IsActive("Create", "Taxes"),
            !PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.CODELISTS_TAXES)),
         new NavigationtabViewModel(Loc.PaymentTypes, Url.Action("Index", "PaymentTypes"),
            Html.IsActive("Index", "PaymentTypes") || Html.IsActive("Create", "PaymentTypes") || Html.IsActive("Edit", "PaymentTypes"),
            !PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.CODELISTS_PAYMENTMETHODS)),
         new NavigationtabViewModel(Loc.Texts, Url.Action("Index", "DocumentText"),
            Html.IsActive("Index", "DocumentText") || Html.IsActive("Create", "DocumentText") || Html.IsActive("Edit", "DocumentText"),
            !PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.CODELISTS_DOCUMENTTEXTS)),
         new NavigationtabViewModel(Loc.ZipCodes, Url.Action("Index", "Post"),
            Html.IsActive("Index", "Post") || Html.IsActive("Create", "Post") || Html.IsActive("Edit", "Post"),
            !PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.PA_CONTENT)),
         new NavigationtabViewModel(Loc.DeliveryTypes, Url.Action("Index", "DeliveryType"),
            Html.IsActive("Index", "DeliveryType") || Html.IsActive("Create", "DeliveryType") || Html.IsActive("Edit", "DeliveryType")),
         new NavigationtabViewModel(Loc.Employees, Url.Action("Index", "Jobs"),
            Html.IsActive("Index", "Jobs") || Html.IsActive("Create", "Jobs") || Html.IsActive("Edit", "Jobs") || 
            Html.IsActive("Index", "DailyWages") || Html.IsActive("Create", "DailyWages") || Html.IsActive("Edit", "DailyWages")),
         new NavigationtabViewModel(Loc.FixedAssets, Url.Action("Index", "FixedAssets"),
            Html.IsActive("Index", "FixedAssets") || Html.IsActive("Create", "FixedAssets") || Html.IsActive("Edit", "FixedAssets"))
    }
})
