Merge branch 'stage7_user_web_interface_prototype' of https://git.is.ulstu.ru/ns.potapov/PIbd-21_CourseWork_Polyclinic_BeSick into stage7_user_web_interface_prototype

This commit is contained in:
Елена Бакальская 2024-05-01 14:47:51 +04:00
commit 0eddc7ca9a
6 changed files with 118 additions and 8 deletions

View File

@ -106,7 +106,7 @@ namespace PolyclinicWebAppImplementer.Controllers
[HttpGet]
[HttpPost]
public IActionResult GetMedicamentsByDiagnoses()
public IActionResult MedicamentsByDiagnoses()
{
if (HttpContext.Request.Method == "POST")
{
@ -123,6 +123,7 @@ namespace PolyclinicWebAppImplementer.Controllers
{
if (HttpContext.Request.Method == "POST")
{
ViewData["ShowReport"] = true;
return View();
}
else

View File

@ -13,12 +13,12 @@
public static (string Url, string Title) Register = ("Register", "Регистрация");
public static (string Url, string Title) Privacy = ("Privacy", "Политика приватности");
public static (string Url, string Title) AddRecipeToCourse = ("AddRecipeToCourse", "Привязка рецепта");
public static (string Url, string Title) GetMedicamentsByDiagnoses = ("GetMedicamentsByDiagnoses", "Лекарства по болезням");
public static (string Url, string Title) MedicamentsByDiagnoses = ("MedicamentsByDiagnoses", "Лекарства по болезням");
public static (string Url, string Title) DiagnosesReport = ("DiagnosesReport", "Отчет по болезням");
public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)>
{
Index, Courses, Diagnoses, Symptomes, Login, Register, AddRecipeToCourse, GetMedicamentsByDiagnoses, DiagnosesReport
Index, Courses, Diagnoses, Symptomes, Login, Register, AddRecipeToCourse, MedicamentsByDiagnoses, DiagnosesReport
};
}
}

View File

@ -1,3 +1,113 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Diagnose;
ViewBag.SelectedSiteMenuItem = SiteMenuItems.DiagnosesReport;
}
<div class="d-flex flex-column">
<form id="diagnosesReportForm" method="post" class="d-flex mb-4">
<div class="me-5">
<label for="dateFrom">
Дата начала
</label>
<input type="date" id="dateFrom" name="dateFrom" />
</div>
<div class="me-5">
<label for="dateTo">
Дата завершения
</label>
<input type="date" id="dateTo" name="dateTo" />
</div>
<div class="me-5">
<fieldset class="d-flex">
<div class="me-4">
<label for="radioreportTypeEmail">Отправить на почту</label>
<input id="radioreportTypeEmail" type="radio" name="reportType" value="email" />
</div>
<div>
<label for="radioreportTypeForm">Показать на форме</label>
<input id="radioreportTypeForm" type="radio" name="reportType" value="form" />
</div>
</fieldset>
</div>
<button class="btn btn-primary btn-sm" type="submit">
Сформировать
</button>
</form>
@if (ViewData.ContainsKey("ShowReport"))
{
<table class="table mt-3 caption-top table-hover">
<caption>Отчет по болезням с 01.01.2023 по 31.12.2023</caption>
<thead>
<tr>
<th scope="col">
#
</th>
<th scope="col">
Болезнь
</th>
<th scope="col">
Дата начала
</th>
<th scope="col">
Дата завершения
</th>
<th scope="col">
Курсы
</th>
<th scope="col">
Симптомы
</th>
</tr>
</thead>
<tbody>
@{
for (int i = 0; i < 5; i++)
{
<tr>
<th scope="row">
@(i + 1)
</th>
<td>
Лихорадка Эбола
</td>
<td>
16.03.2023
</td>
<td>
20.10.2023
</td>
<td>
Курс приема топорина<sup>&reg;</sup>
</td>
<td>
Лихорадка
</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Курс приема четвертина<sup>&reg;</sup></td>
<td>Покрасения</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Курс приема колесовина<sup>&reg;</sup></td>
<td>Головокружение</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Курс электрофореза</td>
<td></td>
</tr>
}
}
</tbody>
</table>
}
</div>

View File

@ -3,6 +3,5 @@
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://learn.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
<h1 class="display-4">кабинет Исполнителя</h1>
</div>

View File

@ -1,5 +1,5 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.GetMedicamentsByDiagnoses;
ViewBag.SelectedSiteMenuItem = SiteMenuItems.MedicamentsByDiagnoses;
}
<h4>Список лекарств по болезням</h4>
<form class="d-flex flex-column mt-2">

View File

@ -54,7 +54,7 @@
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2024 - PolyclinicWebView - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; 2024 - Поликлиника БудьтеБольны - <a asp-area="" asp-controller="Home" asp-action="Privacy">Политика конфиденциалности</a>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>