From 689a7932afc9929b20f009ad2c7a92ecffd8605f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=91=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D1=81=D0=BA=D0=B0=D1=8F?= Date: Sun, 5 May 2024 17:21:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B0=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20=D0=B2=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D0=BB=D0=B5=D1=80=20=D0=B2=D0=B5?= =?UTF-8?q?=D0=B1=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B8=20=D0=B2=20=D0=BB=D1=8D=D0=B9=D0=B0=D1=83=D1=82?= =?UTF-8?q?=20=D0=B5=D0=B3=D0=BE=20=D1=82=D0=BE=D0=B6=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SushiBarClientApp/Controllers/HomeController.cs | 13 +++++++++++++ SushiBarClientApp/Views/Shared/_Layout.cshtml | 3 +++ 2 files changed, 16 insertions(+) diff --git a/SushiBarClientApp/Controllers/HomeController.cs b/SushiBarClientApp/Controllers/HomeController.cs index 07ba9b2..0b8589c 100644 --- a/SushiBarClientApp/Controllers/HomeController.cs +++ b/SushiBarClientApp/Controllers/HomeController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using SushiBarClientApp.Models; using SushiBarContracts.BindingModel; using SushiBarContracts.ViewModels; @@ -136,5 +137,17 @@ namespace SushiBarClientApp.Controllers ); return count * (prod?.Price ?? 1); } + + [HttpGet] + public IActionResult Mails() + { + if (APIClient.Client == null) + { + return Redirect("~/Home/Enter"); + } + return + View(APIClient.GetRequest>($"api/client/getmessages?clientId ={ APIClient.Client.Id}")); +} + } } diff --git a/SushiBarClientApp/Views/Shared/_Layout.cshtml b/SushiBarClientApp/Views/Shared/_Layout.cshtml index a6faae0..98ea206 100644 --- a/SushiBarClientApp/Views/Shared/_Layout.cshtml +++ b/SushiBarClientApp/Views/Shared/_Layout.cshtml @@ -32,6 +32,9 @@ +