This commit is contained in:
Николай 2023-04-02 13:47:04 +04:00
parent 9ab410c5af
commit 410ee5cb9f
2 changed files with 1 additions and 20 deletions

View File

@ -43,7 +43,6 @@ namespace HardwareShopClientApp.Controllers
public IActionResult Index()
{
//return RedirectToAction("MainWorker", "Worker");
if (APIClient.User == null)
{
return Redirect("~/Home/Enter");
@ -83,8 +82,7 @@ namespace HardwareShopClientApp.Controllers
}
if ((int)APIClient.User.Role == 1)
{
//TempData["UserId"] = APIClient.User.Id;
return RedirectToAction("WorkerReport", "Worker");
return RedirectToAction("MainWorker", "Worker");
}
else
{

View File

@ -17,8 +17,6 @@ namespace HardwareShopClientApp.Controllers
_logger = logger;
}
public IActionResult Comments()
{
return View();
@ -37,18 +35,12 @@ namespace HardwareShopClientApp.Controllers
[HttpGet]
public IActionResult Purchases()
{
//return View();
//string login = (string)TempData["UserId"];
return View(APIClient.GetRequest<List<PurchaseViewModel>>($"api/client/getpurchases?UserId={APIClient.User.Id}"));
}
[HttpPost]
public void Purchases(int id)
{
//return View();
//string login = (string)TempData["UserId"];
Response.Redirect("Purchase");
}
@ -56,9 +48,6 @@ namespace HardwareShopClientApp.Controllers
[HttpGet]
public IActionResult Purchase()
{
//return View();
//string login = (string)TempData["UserId"];
return View();
}
@ -76,18 +65,12 @@ namespace HardwareShopClientApp.Controllers
[HttpPost]
public void Builds(int id)
{
//return View();
//string login = (string)TempData["UserId"];
Response.Redirect("Build");
}
[HttpGet]
public IActionResult Build()
{
//return View();
//string login = (string)TempData["UserId"];
return View();
}