Add project files.

This commit is contained in:
2025-05-01 15:18:30 +03:00
parent e058ab8015
commit 774d695414
3094 changed files with 1336814 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.EntityLayer.Entities;
using ConstructorAppUI.ViewModels;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
namespace ConstructorAppUI.ViewComponents.AdminLayoutComponents
{
public class _AdminLayoutNavbarPartialComponent : ViewComponent
{
private readonly string _signalRHubBaseUrl;
private readonly ConstructorContext _context;
private readonly UserManager<AppUser> _userManager;
public _AdminLayoutNavbarPartialComponent(IConfiguration configuration, ConstructorContext context, UserManager<AppUser> userManager)
{
_signalRHubBaseUrl = configuration["SignalRHubSettings:BaseUrl"];
_context = context;
_userManager = userManager;
}
public async Task<IViewComponentResult> InvokeAsync()
{
ViewBag.SignalRHubBaseUrl = _signalRHubBaseUrl;
var user = await _userManager.GetUserAsync(HttpContext.User);
var model = new UserProfileViewModel
{
UserName = user.UserName
};
return View(model);
}
}
}