вливаю всё, что было создано на 5, 6, 7 этапах в ветку main #12

Merged
ekallin merged 180 commits from stage7_user_web_interface_prototype into main 2024-05-01 19:15:20 +04:00
4 changed files with 171 additions and 1 deletions
Showing only changes of commit f13feb133c - Show all commits

View File

@ -58,6 +58,26 @@ namespace PolyclinicWebAppSuretor.Controllers
return View();
}
public IActionResult AddSymptomToMedicament()
{
return View();
}
[HttpGet]
[HttpPost]
public IActionResult ProceduresReport()
{
if (HttpContext.Request.Method == "POST")
{
ViewData["ShowReport"] = true;
return View();
}
else
{
return View();
}
}
[HttpGet]
[HttpPost]
public IActionResult Login()

View File

@ -9,11 +9,13 @@
public static (string Url, string Title) Users = ("Users", "Пользователи");
public static (string Url, string Title) Login = ("Login", "Вход");
public static (string Url, string Title) Register = ("Register", "Регистрация");
public static (string Url, string Title) AddSymptomToMedicament = ("AddSymptomToMedicament", "Привязка симптома к лекарству");
public static (string Url, string Title) ProceduresReport = ("ProceduresReport", "Отчет по процедурам");
public static (string Url, string Title) ListCoursesByProcedures = ("ListCoursesByProcedures", "Список курсов приема препаратов");
public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)>
{
Index, Medicaments, Procedures, Recipes, Users, ListCoursesByProcedures, Login, Register
Index, Medicaments, Procedures, Recipes, Users, ListCoursesByProcedures, Login, Register, AddSymptomToMedicament, ProceduresReport
};
}
}

View File

@ -0,0 +1,42 @@
@using PolyclinicContracts.ViewModels
@{
ViewData["Title"] = "AddSymptomToMedicament";
}
<h4>Привязка симптома к лекарству</h4>
<form class="form-add-symptom-to-medicament" method="post">
<div class="row mb-2">
<div class="col-3 d-flex align-content-center">
<h5 class="me-2">Симптом: </h5>
<select id="symptomId" name="symptomId" class="me-2">
<option value="">Выберите симптом</option>
@{
for (int i = 1; i <= 10; i++)
{
<option value="@i">Симптом номер @i</option>
}
}
</select>
</div>
</div>
<div class="row mb-2">
<div class="col-3 d-flex align-content-center">
<h5 class="me-2">Лекарство: </h5>
<select id="medicamentId" name="medicamentId" class="me-2">
<option value="">Выберите лекарство</option>
@{
for (int i = 1; i <= 10; i++)
{
<option value="@i">лекарство @i</option>
}
}
</select>
</div>
</div>
<div class="row mb-2">
<div class="col-3">
<button class="btn btn-primary" type="submit">
Привязать
</button>
</div>
</div>
</form>

View File

@ -0,0 +1,106 @@
@using PolyclinicContracts.ViewModels
@{
ViewData["Title"] = "ProceduresReport";
}
<div class="d-flex flex-column">
<form method="post" class="form-procedures-report 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>
}
}
</tbody>
</table>
}
</div>