вливаю всё, что было создано на 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
3 changed files with 57 additions and 1 deletions
Showing only changes of commit f807bea098 - Show all commits

View File

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

View File

@ -12,10 +12,11 @@
public static (string Url, string Title) Login = ("Login", "Вход");
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 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
};
}
}

View File

@ -0,0 +1,41 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Course;
}
<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>