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 00:29:12 +04:00
commit c871854d3e
6 changed files with 114 additions and 22 deletions

View File

@ -90,6 +90,34 @@ namespace PolyclinicWebAppImplementer.Controllers
return View(); return View();
} }
[HttpGet]
[HttpPost]
public IActionResult AddRecipeToCourse()
{
if (HttpContext.Request.Method == "POST")
{
return Redirect("~/");
}
else
{
return View();
}
}
[HttpGet]
[HttpPost]
public IActionResult GetMedicamentsByDiagnoses()
{
if (HttpContext.Request.Method == "POST")
{
return View();
}
else
{
return View();
}
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error() public IActionResult Error()
{ {

View File

@ -12,10 +12,12 @@
public static (string Url, string Title) Login = ("Login", "Вход"); public static (string Url, string Title) Login = ("Login", "Вход");
public static (string Url, string Title) Register = ("Register", "Регистрация"); public static (string Url, string Title) Register = ("Register", "Регистрация");
public static (string Url, string Title) Privacy = ("Privacy", "Политика приватности"); 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 List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)> public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)>
{ {
Index, Courses, Diagnoses, Symptomes, Login, Register Index, Courses, Diagnoses, Symptomes, Login, Register, AddRecipeToCourse, GetMedicamentsByDiagnoses
}; };
} }
} }

View File

@ -0,0 +1,41 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.AddRecipeToCourse;
}
<h4>Привязка рецепта к курсу</h4>
<form id="addrecipetocourse" method="post">
<div class="row mb-2">
<div class="col-3 d-flex align-content-center">
<h5 class="me-2">Рецепт</h5>
<select id="recipeId" name="recipeId" class="me-2">
<option value="">Выберите рецепт</option>
@{
for (int i = 0; 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="courseId" name="courseId" class="me-2">
<option value="">Выберите курс</option>
@{
for (int i = 0; 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

@ -15,29 +15,13 @@
<div class="col-3">Коментарий:</div> <div class="col-3">Коментарий:</div>
<div class="col-8"><textarea id="comment" name="comment"></textarea></div> <div class="col-8"><textarea id="comment" name="comment"></textarea></div>
</div> </div>
<div class="row mb-5">
<div class="col-3">Рецепт:</div>
<div class="col-8">
<select id="recipeId" name="recipeId">
<option value="">Выберите рецепт</option>
@{
int count = 10;
for (int i = 0; i < count; i++)
{
<option value="@i">Какой-то рецепт @i</option>
}
}
</select>
</div>
</div>
<div class="row mb-5"> <div class="row mb-5">
<div class="col-3 d-flex align-content-center"> <div class="col-3 d-flex align-content-center">
<h5 class="me-2">Болезни</h5> <h5 class="me-2">Болезни</h5>
<select id="diagnoseId" name="diagnoseId" class="me-2"> <select id="diagnoseId" name="diagnoseId" class="me-2">
<option value="">Выберите болезнь</option> <option value="">Выберите болезнь</option>
@{ @{
count = 10; for (int i = 0; i < 10; i++)
for (int i = 0; i < count; i++)
{ {
<option value="@i">Какая-то противная болезнь @i</option> <option value="@i">Какая-то противная болезнь @i</option>
} }
@ -51,8 +35,7 @@
<div class="row mb-5 overflow-auto" style="max-height: 100px; max-width: 500px;"> <div class="row mb-5 overflow-auto" style="max-height: 100px; max-width: 500px;">
<ol> <ol>
@{ @{
count = 7; for (int i = 0; i < 7; i++)
for (int i = 0; i < count; i++)
{ {
<li class="mb-2 ps-1 ms-1"> <li class="mb-2 ps-1 ms-1">
<a asp-action="Course" class="text-decoration-none"> <a asp-action="Course" class="text-decoration-none">

View File

@ -14,7 +14,6 @@
<th scope="col">Количество дней</th> <th scope="col">Количество дней</th>
<th scope="col">Количество препаратов в день</th> <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> </tr>
</thead> </thead>
@ -28,7 +27,6 @@
<td>12</td> <td>12</td>
<td>3</td> <td>3</td>
<td>Очень хороший курс приема</td> <td>Очень хороший курс приема</td>
<td>Рецепт отличный</td>
<td class="d-flex"> <td class="d-flex">
<a class="btn btn-danger me-1" title="Удалить"> <a class="btn btn-danger me-1" title="Удалить">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash-fill" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash-fill" viewBox="0 0 16 16">

View File

@ -0,0 +1,40 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.GetMedicamentsByDiagnoses;
}
<h4>Список лекарств по болезням</h4>
<form class="d-flex flex-column mt-2">
<h5>Выберите болезни</h5>
<div class="mb-3 overflow-auto" style="max-width: 500px; max-height: 300px;">
<ul>
@{
for(int i = 0; i < 10; i++)
{
<li class="d-flex mb-2">
<input class="me-2" name="diagnose-@i" type="checkbox" id="diagnose-@i"/>
<label for="diagnose-@i">Название болезни @i</label>
</li>
}
}
</ul>
</div>
<fieldset class="mb-3">
<h5>Укажите формат файла</h5>
<div class="d-flex">
<div class="d-flex me-3">
<input class="me-2" type="radio" name="fileFormat" value="docx" id="radio-docx"/>
<label for="radio-docx">DOCX</label>
</div>
<div class="d-flex me-3">
<input class="me-2" type="radio" name="fileFormat" value="xlsx" id="radio-xlsx" />
<label for="radio-xlsx">XLSX</label>
</div>
</div>
</fieldset>
<div class="mb-3">
<h5>Укажите название файла</h5>
<input type="text" id="fileName"/>
</div>
<button class="btn btn-primary col-2" type="submit">
Скачать отчет
</button>
</form>