diff --git a/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToPdfWorker.cs b/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToPdfWorker.cs index b67fe78..c676894 100644 --- a/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToPdfWorker.cs +++ b/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToPdfWorker.cs @@ -25,10 +25,10 @@ namespace BeatySalonBusinesLogic.OfficePackage Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Center }); - CreateTable(new List { "2cm", "6cm", "3cm" }); + CreateTable(new List { "2cm", "4cm", "3cm", "3cm", "3cm", "3cm", "3cm" }); CreateRow(new PdfRowParameters { - Texts = new List { "Номер", "Услуга", "Процедура", "Косметика", "Сумма", "Статус" }, + Texts = new List { "Номер заказа", "Услуга", "Процедура", "Косметика", "Сумма", "Статус" }, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center }); @@ -37,7 +37,7 @@ namespace BeatySalonBusinesLogic.OfficePackage { CreateRow(new PdfRowParameters { - Texts = new List { (view.Id).ToString(), "", "" }, + Texts = new List { (view.Id).ToString(), "", "", "", (view.OrderAmount).ToString(), (view.Status).ToString() }, Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Left }); @@ -74,18 +74,18 @@ namespace BeatySalonBusinesLogic.OfficePackage CreateRow(new PdfRowParameters { - Texts = new List { "", service, procedure, cosmetic }, + Texts = new List { "", service, procedure, cosmetic, "", "" }, Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Left }); - } - CreateParagraph(new PdfParagraph - { - Text = $"Итого: {info.Orders.Sum(x => x.OrderAmount)}\t", - Style = "Normal", - ParagraphAlignment = PdfParagraphAlignmentType.Right - }); - } + } + } + CreateParagraph(new PdfParagraph + { + Text = $"Итого: {info.Orders.Sum(x => x.OrderAmount)}\t", + Style = "Normal", + ParagraphAlignment = PdfParagraphAlignmentType.Right + }); SavePdf(info); } diff --git a/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs b/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs index e73371a..984cb53 100644 --- a/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs +++ b/BeautySalonView/BeautySalonBusinesLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs @@ -23,27 +23,27 @@ namespace BeatySalonBusinesLogic.OfficePackage JustificationType = WordJustificationType.Center } }); - foreach (var cp in info.CosmeticProcedures) + CreateParagraph(new WordParagraph { - CreateParagraph(new WordParagraph + Texts = new List<(string, WordTextProperties)> { + ("Косметика" +" - " + "Процедура", new WordTextProperties { Size = "24", Bold = true, }), + }, + TextProperties = new WordTextProperties { - Texts = new List<(string, WordTextProperties)> { - (cp.CosmeticName + " : ", new WordTextProperties { Size = "24", Bold = true, }), - }, - TextProperties = new WordTextProperties - { - Size = "24", - JustificationType = WordJustificationType.Both - } - }); + Size = "24", + JustificationType = WordJustificationType.Both + } + }); + int i = 1; + foreach (var cp in info.CosmeticProcedures) + { foreach (var procedure in cp.Procedures) { CreateParagraph(new WordParagraph { - Texts = new List<(string, WordTextProperties)> - { - (" " + procedure, new WordTextProperties { Size = "24" }) // Добавляем отступ в виде Tab - }, + Texts = new List<(string, WordTextProperties)> { + (i + ". " + cp.CosmeticName + " - " + procedure, new WordTextProperties { Size = "24", Bold = false, }), + }, TextProperties = new WordTextProperties { Size = "24", @@ -51,6 +51,7 @@ namespace BeatySalonBusinesLogic.OfficePackage } }); } + i++; } SaveWord(info); } diff --git a/BeautySalonView/BeautySalonContracts/BindingModels/ReportServiceBindingModel.cs b/BeautySalonView/BeautySalonContracts/BindingModels/ReportServiceBindingModel.cs index c120fff..e4c2f35 100644 --- a/BeautySalonView/BeautySalonContracts/BindingModels/ReportServiceBindingModel.cs +++ b/BeautySalonView/BeautySalonContracts/BindingModels/ReportServiceBindingModel.cs @@ -9,8 +9,6 @@ namespace BeautySalonContracts.BindingModels public class ReportServiceBindingModel { public string FileName { get; set; } = string.Empty; - public DateTime? DateFrom { get; set; } = DateTime.Now; - public DateTime? DateTo { get; set; } = DateTime.Now; public int? StorekeeperId { get; set; } public string? Email { get; set; } } diff --git a/BeautySalonView/BeautySalonDatabaseImplement/Models/Order_.cs b/BeautySalonView/BeautySalonDatabaseImplement/Models/Order_.cs index 1d518e8..d4b53dd 100644 --- a/BeautySalonView/BeautySalonDatabaseImplement/Models/Order_.cs +++ b/BeautySalonView/BeautySalonDatabaseImplement/Models/Order_.cs @@ -63,7 +63,7 @@ namespace BeautySalonDatabaseImplement.Models return _orderProcedures; } } - [ForeignKey("ServiceId")] + [ForeignKey("OrderId")] public virtual List Procedures { get; set; } = new();//представляет список процедур для данного заказа. diff --git a/BeautySalonView/ClientWebApp/Controllers/HomeController.cs b/BeautySalonView/ClientWebApp/Controllers/HomeController.cs index dfad42b..a1a0f7a 100644 --- a/BeautySalonView/ClientWebApp/Controllers/HomeController.cs +++ b/BeautySalonView/ClientWebApp/Controllers/HomeController.cs @@ -18,17 +18,14 @@ namespace WorkerWebApp.Controllers private readonly ILogger _logger; private readonly IWorkerLogic _logic; - private readonly IProcedureLogic _procedureLogic; - private readonly IReportLogicWorker _reportLogic; private readonly AbstractMailWorker _mailLogic; - public HomeController(ILogger logger, IWorkerLogic workerLogic, IProcedureLogic procedureLogic, IReportLogicWorker reportLogic, AbstractMailWorker mailLogic) + public HomeController(ILogger logger, IWorkerLogic workerLogic, IReportLogicWorker reportLogic, AbstractMailWorker mailLogic) { _logger = logger; _logic = workerLogic; - _procedureLogic = procedureLogic; _reportLogic = reportLogic; _mailLogic = mailLogic; } @@ -159,11 +156,6 @@ namespace WorkerWebApp.Controllers return Redirect("~/Home/Enter"); } - ViewBag.Procedures = _procedureLogic.ReadList(new ProcedureSearchModel - { - WorkerId = APIWorker.Worker.Id - }); - return View(); } [HttpPost] @@ -184,14 +176,7 @@ namespace WorkerWebApp.Controllers DateFrom = dateFrom, DateTo = dateTo, WorkerId = APIWorker.Worker.Id - }); - - ViewBag.Procedures = _procedureLogic.ReadList(new ProcedureSearchModel - { - WorkerId = APIWorker.Worker.Id - }); - return View(data); } diff --git a/BeautySalonView/ClientWebApp/Views/Home/Index.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Index.cshtml index 962697c..1d61f98 100644 --- a/BeautySalonView/ClientWebApp/Views/Home/Index.cshtml +++ b/BeautySalonView/ClientWebApp/Views/Home/Index.cshtml @@ -1,7 +1,7 @@ @{ ViewData["Title"] = "Home Page"; } - +

Салон красоты "Вы ужасны". Работник

- logo + logo
\ No newline at end of file diff --git a/BeautySalonView/ClientWebApp/Views/Home/Reports.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Reports.cshtml index e0f91d6..fb418e2 100644 --- a/BeautySalonView/ClientWebApp/Views/Home/Reports.cshtml +++ b/BeautySalonView/ClientWebApp/Views/Home/Reports.cshtml @@ -9,25 +9,13 @@

Отчеты

-
+ -
+
- -
-
Косметика по процедурам:
-
- -
-
diff --git a/BeautySalonView/ClientWebApp/Views/Order/CreateOrders.cshtml b/BeautySalonView/ClientWebApp/Views/Order/CreateOrders.cshtml index 1b2682a..8173245 100644 --- a/BeautySalonView/ClientWebApp/Views/Order/CreateOrders.cshtml +++ b/BeautySalonView/ClientWebApp/Views/Order/CreateOrders.cshtml @@ -52,7 +52,7 @@
Услуги:
- @foreach (var cosmetic in ViewBag.Cosmetics) - { - - } - -
-
-
+
-
- -
-
- - -
-
- - -
-
- - -
- -
+ +
- -
+
- - +
- -
- +
+
+

Список услуг:

+
diff --git a/BeautySalonView/StaffMemberWebApp/Views/Shared/_Layout.cshtml b/BeautySalonView/StaffMemberWebApp/Views/Shared/_Layout.cshtml index 40746ea..7f75088 100644 --- a/BeautySalonView/StaffMemberWebApp/Views/Shared/_Layout.cshtml +++ b/BeautySalonView/StaffMemberWebApp/Views/Shared/_Layout.cshtml @@ -3,7 +3,7 @@ - @ViewData["Title"] - BeutySalonStaffMemberApp + @ViewData["Title"] - BeutySalonStorekeeperApp @@ -14,7 +14,7 @@
Вы Ужасны -
StaffMemberApp
+
StorekeeperApp
mdo @@ -56,7 +56,7 @@
- © 2023 - BeutySalonStaffMemberApp - Privacy + © 2024 - BeutySalonStorekeeperApp
diff --git a/BeautySalonView/StaffMemberWebApp/appsettings.json b/BeautySalonView/StaffMemberWebApp/appsettings.json index 74b76ed..b009a38 100644 --- a/BeautySalonView/StaffMemberWebApp/appsettings.json +++ b/BeautySalonView/StaffMemberWebApp/appsettings.json @@ -6,11 +6,10 @@ } }, "AllowedHosts": "*", - "SmtpClientHost": "smtp.gmail.com", "SmtpClientPort": "587", "PopHost": "pop.gmail.com", "PopPort": "995", - "MailLogin": "lablablablab777@gmail.com", - "MailPassword": "qvca dfzi mkaa gina" + "MailLogin": "theredguy13@gmail.com", + "MailPassword": "gcok utyv qyce qfre" }