From e4e9447a0b007c4677943903ec8be817ca29ea25 Mon Sep 17 00:00:00 2001 From: dasha Date: Fri, 19 May 2023 22:07:03 +0400 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=D0=B8=2013?= =?UTF-8?q?=20=D1=8D=D1=82=D0=B0=D0=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficePackage/AbstractSaveToExcel.cs | 1 - .../Controllers/StorekeeperController.cs | 10 +++++++ .../Views/Storekeeper/LinkBuilds.cshtml | 28 +++++++++++++++++-- .../HardwareShopDatabase.cs | 2 +- .../Implements/Worker/PurchaseStorage.cs | 23 +++++++++------ .../Controllers/BuildController.cs | 1 + .../Controllers/CommentController.cs | 19 ++++++++++++- .../Controllers/PurchaseController.cs | 16 ++++++++++- .../Controllers/HomeController.cs | 5 ++-- .../Views/Home/Comments.cshtml | 6 +--- .../Views/Home/LinkPurchase.cshtml | 2 +- .../Views/Home/listComponents.cshtml | 2 +- 12 files changed, 92 insertions(+), 23 deletions(-) diff --git a/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToExcel.cs b/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToExcel.cs index 10da8a0..a4b6f26 100644 --- a/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToExcel.cs +++ b/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToExcel.cs @@ -129,7 +129,6 @@ namespace HardwareShopBusinessLogic.OfficePackage } } - rowIndex++; } SaveExcel(info); diff --git a/HardwareShop/HardwareShopClientApp/Controllers/StorekeeperController.cs b/HardwareShop/HardwareShopClientApp/Controllers/StorekeeperController.cs index 2010afc..be11702 100644 --- a/HardwareShop/HardwareShopClientApp/Controllers/StorekeeperController.cs +++ b/HardwareShop/HardwareShopClientApp/Controllers/StorekeeperController.cs @@ -443,5 +443,15 @@ namespace HardwareShopStorekeeperApp.Controllers reportModel.UserEmail = APIClient.User.Email; APIClient.PostRequest("api/report/componentsreportsendonmail", reportModel); } + + [HttpGet] + public List GetCommentsOnBuild(int buildId) + { + if (APIClient.User == null) + { + throw new Exception("Вы как сюда попали? Сюда вход только авторизованным"); + } + return APIClient.GetRequest>($"api/comment/GetCommentsOnBuild?buildId={buildId}")!; + } } } diff --git a/HardwareShop/HardwareShopClientApp/Views/Storekeeper/LinkBuilds.cshtml b/HardwareShop/HardwareShopClientApp/Views/Storekeeper/LinkBuilds.cshtml index b8c9e6c..95e60d1 100644 --- a/HardwareShop/HardwareShopClientApp/Views/Storekeeper/LinkBuilds.cshtml +++ b/HardwareShop/HardwareShopClientApp/Views/Storekeeper/LinkBuilds.cshtml @@ -41,6 +41,9 @@