108 lines
4.6 KiB
Plaintext
108 lines
4.6 KiB
Plaintext
@using CandidateReviewContracts.ViewModels
|
|
@model List<VacancyViewModel>
|
|
|
|
@{
|
|
ViewData["Title"] = "Вакансии";
|
|
}
|
|
|
|
<div class="container mt-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-12">
|
|
<h1 class="mb-4 text-center">Вакансии</h1>
|
|
<div class="mb-4 text-end">
|
|
<a asp-action="EditVacancy" asp-controller="Vacancy" asp-route-companyId="@APIClient.Company?.Id" class="btn btn-success">
|
|
<i class="bi bi-plus-circle me-2"></i> Добавить вакансию
|
|
</a>
|
|
</div>
|
|
@if (Model != null)
|
|
{
|
|
@if (Model.Any())
|
|
{
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover align-middle">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Название вакансии</th>
|
|
<th>Тип занятости</th>
|
|
<th>Зарплата</th>
|
|
<th>Статус</th>
|
|
<th>Тэги</th>
|
|
<th>Действия</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var vacancy in Model)
|
|
{
|
|
<tr>
|
|
<td>@vacancy.JobTitle</td>
|
|
<td>@vacancy.JobType</td>
|
|
<td>@vacancy.Salary</td>
|
|
<td>@vacancy.Tags</td>
|
|
<td>@vacancy.Status</td>
|
|
<td>
|
|
<div class="d-flex justify-content-center">
|
|
<a asp-action="VacancyDetails" asp-controller="Vacancy" asp-route-id="@vacancy.Id"
|
|
class="btn btn-info btn-sm me-2" title="Просмотр">
|
|
<i class="bi bi-eye"></i> Просмотр
|
|
</a>
|
|
<a asp-action="EditVacancy" asp-controller="Vacancy" asp-route-id="@vacancy.Id"
|
|
class="btn btn-warning btn-sm me-2" title="Редактировать">
|
|
<i class="bi bi-pencil-square"></i> Редактировать
|
|
</a>
|
|
<a asp-action="Delete" asp-controller="Vacancy" asp-route-id="@vacancy.Id"
|
|
class="btn btn-danger btn-sm" title="Удалить"
|
|
onclick="return confirm('Вы уверены, что хотите удалить вакансию?');">
|
|
<i class="bi bi-trash"></i> Удалить
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<p class="text-center text-muted">Вакансий нет.</p>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<p class="text-center text-danger">Произошла ошибка при получении данных.</p>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.table-hover tbody tr:hover {
|
|
background-color: #f1f1f1;
|
|
}
|
|
|
|
.btn-info, .btn-warning, .btn-danger {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn-info i, .btn-warning i, .btn-danger i {
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.btn {
|
|
background-color: #0A1128;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 10px;
|
|
padding: 12px;
|
|
font-size: 16px;
|
|
transition: background-color 0.3s ease, transform 0.2s ease;
|
|
}
|
|
|
|
.btn:hover {
|
|
background-color: #1C3273;
|
|
transform: scale(1.05);
|
|
}
|
|
</style>
|