diff --git a/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs b/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs
index 1460932..9bcadf7 100644
--- a/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs
+++ b/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs
@@ -152,7 +152,7 @@ namespace HardwareShopContracts.BusinessLogicsContracts
///
public void SendByMailPurchaseReport(ReportBindingModel model)
{
- byte[] file = _saveToPdf.GetEquipmentReportFile(new()
+ byte[] file = _saveToPdf.GetPurchaseReportFile(new()
{
FileName = model.FileName,
Title = "Отчет по покупкам",
diff --git a/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
index 0c04751..f5fefac 100644
--- a/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
+++ b/HardwareShop/HardwareShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs
@@ -7,7 +7,7 @@ namespace HardwareShopBusinessLogic.OfficePackage
{
public abstract class AbstractSaveToPdf
{
- public byte[] GetEquipmentReportFile(PdfInfo info)
+ public byte[] GetPurchaseReportFile(PdfInfo info)
{
CreatePdf(info);
@@ -26,11 +26,11 @@ namespace HardwareShopBusinessLogic.OfficePackage
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
- CreateTable(new List { "5cm", "5cm", "5cm" });
+ CreateTable(new List { "5cm", "5cm", "5cm", "5cm", "5cm" });
CreateRow(new PdfRowParameters
{
- Texts = new List { "Комплектация", "Автомобили", "Работы" },
+ Texts = new List { "Покупка", "Дата покупки", "Цена", "Комментарии", "Комплектующие" },
Style = "NormalTitle",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
diff --git a/HardwareShop/HardwareShopRestApi/Controllers/WorkerReport.cs b/HardwareShop/HardwareShopRestApi/Controllers/WorkerReport.cs
deleted file mode 100644
index dbbf344..0000000
--- a/HardwareShop/HardwareShopRestApi/Controllers/WorkerReport.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using HardwareShopContracts.BindingModels;
-using HardwareShopContracts.BusinessLogicsContracts;
-using HardwareShopContracts.SearchModels;
-using HardwareShopContracts.ViewModels;
-using Microsoft.AspNetCore.Mvc;
-
-namespace HardwareShopRestApi.Controllers
-{
- [Route("api/[controller]/[action]")]
- [ApiController]
- public class WorkerReport : Controller
- {
- private readonly ILogger _logger;
-
- private readonly IWorkerReportLogic _workerReportLogic;
-
- public WorkerReport(IWorkerReportLogic workerReportLogic, ILogger logger)
- {
- _logger = logger;
- _workerReportLogic = workerReportLogic;
- }
- }
-}
\ No newline at end of file
diff --git a/HardwareShop/HardwareShopWorkerApp/Controllers/HomeController.cs b/HardwareShop/HardwareShopWorkerApp/Controllers/HomeController.cs
index 1110ed2..484b7bf 100644
--- a/HardwareShop/HardwareShopWorkerApp/Controllers/HomeController.cs
+++ b/HardwareShop/HardwareShopWorkerApp/Controllers/HomeController.cs
@@ -562,6 +562,7 @@ namespace HardwareShopWorkerApp.Controllers
return;
}
reportModel.UserId = APIClient.User.Id;
+ reportModel.UserEmail = APIClient.User.Email;
APIClient.PostRequest("api/report/SendByMailPurchaseReport", reportModel);
}
}