2024-11-18 23:37:50 +04:00
|
|
|
|
@using CandidateReviewContracts.ViewModels
|
|
|
|
|
@model CompanyViewModel
|
|
|
|
|
|
|
|
|
|
@{
|
|
|
|
|
ViewData["Title"] = "Профиль компании";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div class="container mt-5">
|
|
|
|
|
<div class="row g-4">
|
|
|
|
|
<div class="col-md-4">
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<div class="card shadow-sm">
|
|
|
|
|
<img src="@(Model.LogoFilePath ?? "https://static.thenounproject.com/png/2504969-200.png")"
|
|
|
|
|
class="card-img-top img-fluid rounded-circle mx-auto d-block" alt="Логотип компании"
|
|
|
|
|
style="max-width: 150px; max-height: 150px;">
|
|
|
|
|
<div class="card-body text-center">
|
2024-11-18 23:37:50 +04:00
|
|
|
|
<h5 class="card-title">@Model.Name</h5>
|
2024-12-09 02:10:45 +04:00
|
|
|
|
<input type="hidden" name="id" value="@Model?.Id" />
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<p class="card-text">@((Model.Description ?? "Описание отсутствует"))</p>
|
|
|
|
|
<a href="@(Model.Website ?? "#")"
|
|
|
|
|
target="_blank"
|
|
|
|
|
class="btn btn-primary mt-2 @(Model.Website == null ? "disabled" : "")"
|
|
|
|
|
@(Model.Website == null ? "aria-disabled=\"true\"" : "")>
|
|
|
|
|
@(Model.Website != null ? "Официальный сайт" : "Веб-сайт отсутствует")
|
|
|
|
|
</a>
|
2024-11-18 23:37:50 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
|
2024-11-18 23:37:50 +04:00
|
|
|
|
<div class="col-md-8">
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<div class="card mb-4 shadow-sm">
|
2024-11-19 16:45:59 +04:00
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
2024-11-18 23:37:50 +04:00
|
|
|
|
<h2>Информация о компании</h2>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<a asp-action="EditCompanyProfile" asp-controller="Company" asp-route-id="@Model.Id"
|
|
|
|
|
class="btn btn-warning">Редактировать</a>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<dl class="row">
|
|
|
|
|
<dt class="col-sm-3">Адрес:</dt>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<dd class="col-sm-9">@((Model.Address?.ToString() ?? "Адрес не указан"))</dd>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
|
|
|
|
|
<dt class="col-sm-3">Контакты:</dt>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<dd class="col-sm-9">@((Model.Contacts?.ToString() ?? "Контакты не указаны"))</dd>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
</dl>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<div class="card mb-4 shadow-sm">
|
2024-11-19 16:45:59 +04:00
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
|
|
|
<h2>Вакансии компании</h2>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<a asp-action="EditVacancy" asp-controller="Vacancy" asp-route-companyId="@Model.Id"
|
|
|
|
|
class="btn btn-success">Добавить вакансию</a>
|
2024-11-18 23:37:50 +04:00
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
2024-11-23 21:39:18 +04:00
|
|
|
|
@if (Model.Vacancies != null && Model.Vacancies.Any())
|
2024-11-19 16:45:59 +04:00
|
|
|
|
{
|
2024-12-09 02:10:45 +04:00
|
|
|
|
@await Html.PartialAsync("_VacanciesTable", Model.Vacancies.Take(5))
|
2024-12-12 01:54:07 +04:00
|
|
|
|
@if (Model.Vacancies.Count() > 5)
|
2024-12-09 02:10:45 +04:00
|
|
|
|
{
|
|
|
|
|
<button id="showAllVacanciesBtn" class="btn btn-primary" onclick="toggleVacancies()">Показать все</button>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div id="allVacancies" style="display:none;">
|
|
|
|
|
@await Html.PartialAsync("_VacanciesTable", Model.Vacancies)
|
|
|
|
|
</div>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<p>Вакансий нет.</p>
|
|
|
|
|
}
|
2024-11-18 23:37:50 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
|
|
|
|
|
<div class="card shadow-sm">
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
|
|
|
<h2>Сотрудники компании</h2>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<a asp-action="UserProfileEdit" asp-controller="User" asp-route-companyId="@Model.Id"
|
|
|
|
|
class="btn btn-success">Добавить сотрудника</a>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
@if (Model.Employees != null && Model.Employees.Any())
|
|
|
|
|
{
|
|
|
|
|
<table class="table table-striped">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Фамилия</th>
|
|
|
|
|
<th>Имя</th>
|
|
|
|
|
<th>Эл. почта</th>
|
|
|
|
|
<th>Действия</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach (var employee in Model.Employees)
|
|
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>@employee.Surname</td>
|
|
|
|
|
<td>@employee.Name</td>
|
|
|
|
|
<td>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
<a asp-action="UserProfile" asp-controller="User" asp-route-id="@employee.Id" class="btn btn-info btn-sm rounded-pill" title="Просмотр">
|
|
|
|
|
<i class="bi bi-eye"></i> Просмотр
|
2024-11-23 21:39:18 +04:00
|
|
|
|
</a>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
|
|
|
|
|
<a asp-action="UserProfileEdit" asp-controller="User" asp-route-id="@employee.Id" class="btn btn-warning btn-sm rounded-pill" title="Редактировать">
|
|
|
|
|
<i class="bi bi-pencil"></i> Редактировать
|
2024-12-09 02:10:45 +04:00
|
|
|
|
</a>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
|
|
|
|
|
<a asp-action="DeleteEmployee" asp-controller="User" asp-route-id="@employee.Id" class="btn btn-danger btn-sm rounded-pill" title="Удалить" onclick="return confirm('Вы уверены, что хотите удалить сотрудника?');">
|
|
|
|
|
<i class="bi bi-trash"></i> Удалить
|
2024-12-09 02:10:45 +04:00
|
|
|
|
</a>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<p>Сотрудников нет.</p>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-12-12 01:54:07 +04:00
|
|
|
|
</div>
|
2024-11-18 23:37:50 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-12-09 02:10:45 +04:00
|
|
|
|
|
|
|
|
|
@section Scripts {
|
|
|
|
|
<script>
|
|
|
|
|
function toggleVacancies() {
|
|
|
|
|
var allVacancies = document.getElementById('allVacancies');
|
|
|
|
|
var button = document.getElementById('showAllVacanciesBtn');
|
|
|
|
|
|
|
|
|
|
if (allVacancies.style.display === 'none') {
|
|
|
|
|
allVacancies.style.display = 'block';
|
|
|
|
|
button.innerText = 'Скрыть';
|
|
|
|
|
} else {
|
|
|
|
|
allVacancies.style.display = 'none';
|
|
|
|
|
button.innerText = 'Показать все';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
}
|