- - @{ - var subscriptionDaysRemaining = Context.Items["SubscriptionDaysRemaining"] as int?; - var subscriptionPlanValue = Context.Items["SubscriptionPlan"] as int?; - var bannerIsCompanyAdmin = User.FindFirst("CompanyRole")?.Value == "CompanyAdmin" - || User.IsInRole("SuperAdmin"); - } - @if (subscriptionDaysRemaining != null && bannerIsCompanyAdmin) - { - var daysAbs = Math.Abs(subscriptionDaysRemaining.Value); - var isGracePeriod = subscriptionDaysRemaining.Value < 0; - - } - - @{ - var _impersonatingName = Context.Session.GetString("ImpersonatingCompanyName"); - } - @if (_impersonatingName != null) - { -
- - Impersonating: @_impersonatingName  —  - All data is scoped to this company. -
- @Html.AntiForgeryToken() - -
-
- } - -
-
- -
- @if (ViewData["PageIcon"] != null) - { - - } -

@ViewData["Title"]

- @if (ViewData["PageHelpContent"] != null) - { - - - - } -
- - @* Multi-tenancy: Display current company *@ - @if (User.Identity?.IsAuthenticated == true) - { - var companyName = User.FindFirst("CompanyName")?.Value; - if (!string.IsNullOrEmpty(companyName)) - { - - @companyName - - } - } -
- -
- - - - - - @if (User.Identity?.IsAuthenticated == true) - { - - - } - @if (User.Identity?.IsAuthenticated == true) - { - var gearCompanyRole = User.FindFirst("CompanyRole")?.Value; - var gearIsSuperAdmin = User.IsInRole("SuperAdmin"); - var gearIsAdmin = gearCompanyRole == "CompanyAdmin" || gearIsSuperAdmin; - if (!isPlatformAdmin && (gearIsAdmin || isImpersonating)) - { - - } - - - } - else - { - - Login - - } -
-
- - - -
- @RenderBody() -
- - - @{ - var _appVersion = System.Reflection.Assembly - .GetEntryAssembly()? - .GetName().Version; - var _versionString = _appVersion != null - ? $"v{_appVersion.Major}.{_appVersion.Minor}.{_appVersion.Build}" - : "v2.1.0"; - } - -