2024-11-18 23:37:50 +04:00
|
|
|
|
@using CandidateReviewContracts.ViewModels
|
|
|
|
|
@model CompanyViewModel
|
|
|
|
|
|
|
|
|
|
@{
|
|
|
|
|
ViewData["Title"] = "Профиль компании";
|
2024-11-23 21:39:18 +04:00
|
|
|
|
var userRole = (APIClient.User?.Role == CandidateReviewDataModels.Enums.RoleEnum.Сотрудник || APIClient.User?.Role == CandidateReviewDataModels.Enums.RoleEnum.Администратор) ? true : false;
|
2024-11-18 23:37:50 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div class="container mt-5">
|
|
|
|
|
<div class="row g-4">
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<div class="card">
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<img src="@(Model.LogoFilePath ?? "https://static.thenounproject.com/png/2504969-200.png")" style="max-width: 150px; max-height: 150px;" class="card-img-top img-fluid rounded-circle mx-auto d-block" alt="Логотип компании">
|
2024-11-18 23:37:50 +04:00
|
|
|
|
<div class="card-body">
|
|
|
|
|
<h5 class="card-title">@Model.Name</h5>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
<p class="card-text">@(Model.Description == null ? "Описание отсутствует" : Model.Description) </p>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<a href="@(Model.Website ?? "#")" target="_blank" class="btn btn-primary mt-2">@(Model.Website != null ? "Официальный сайт" : "Веб-сайт отсутствует")</a> </a>
|
2024-11-18 23:37:50 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-8">
|
2024-11-19 16:45:59 +04:00
|
|
|
|
<div class="card mb-4">
|
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
2024-11-18 23:37:50 +04:00
|
|
|
|
<h2>Информация о компании</h2>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
@if (userRole)
|
|
|
|
|
{
|
|
|
|
|
<a asp-action="EditCompanyProfile" asp-controller="Company" asp-route-id="@Model.Id" class="btn btn-primary">Редактировать</a>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<dl class="row">
|
|
|
|
|
<dt class="col-sm-3">Адрес:</dt>
|
|
|
|
|
<dd class="col-sm-9">@(Model.Address?.ToString() ?? "Адрес не указан")</dd>
|
|
|
|
|
|
|
|
|
|
<dt class="col-sm-3">Контакты:</dt>
|
|
|
|
|
<dd class="col-sm-9">@(Model.Contacts?.ToString() ?? "Контакты не указаны")</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
|
|
|
<h2>Вакансии компании</h2>
|
|
|
|
|
@if (userRole)
|
|
|
|
|
{
|
|
|
|
|
<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
|
|
|
|
{
|
|
|
|
|
<table class="table table-striped">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Название</th>
|
|
|
|
|
<th>Тип занятости</th>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<th>Статус</th>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
<th>Действия</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
@foreach (var vacancy in Model.Vacancies)
|
2024-11-19 16:45:59 +04:00
|
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>@vacancy.JobTitle</td>
|
|
|
|
|
<td>@vacancy.JobType</td>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<td>@vacancy.Status</td>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
<td>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<a asp-action="VacancyDetails" asp-controller="Vacancy" asp-route-id="@vacancy.Id" class="text-info" title="Просмотр">
|
|
|
|
|
<i class="bi bi-eye"></i>
|
|
|
|
|
</a>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
@if (userRole)
|
|
|
|
|
{
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<a asp-action="EditVacancy" asp-controller="Vacancy" asp-route-id="@vacancy.Id" class="text-warning" title="Редактировать">
|
|
|
|
|
<i class="bi bi-pencil"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a asp-action="Delete" asp-controller="Vacancy" asp-route-id="@vacancy.Id" class="text-danger" title="Удалить" onclick="return confirm('Вы уверены, что хотите удалить вакансию?');">
|
|
|
|
|
<i class="bi bi-trash"></i>
|
|
|
|
|
</a>
|
2024-11-19 16:45:59 +04:00
|
|
|
|
}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<p>Вакансий нет.</p>
|
|
|
|
|
}
|
2024-11-18 23:37:50 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-23 21:39:18 +04:00
|
|
|
|
<br />
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
|
|
|
<h2>Сотрудники компании</h2>
|
|
|
|
|
@if (userRole)
|
|
|
|
|
{
|
|
|
|
|
<a asp-action="UserProfileEdit" asp-controller="User" asp-route-companyId="@Model.Id" class="btn btn-success">Добавить сотрудника</a>
|
|
|
|
|
}
|
|
|
|
|
</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>@employee.Email</td>
|
|
|
|
|
<td>
|
|
|
|
|
<a asp-action="UserProfile" asp-controller="User" asp-route-id="@employee.Id" class="text-info" title="Просмотр">
|
|
|
|
|
<i class="bi bi-eye"></i>
|
|
|
|
|
</a>
|
|
|
|
|
@if (userRole)
|
|
|
|
|
{
|
|
|
|
|
<a asp-action="UserProfileEdit" asp-controller="User" asp-route-id="@employee.Id" class="text-warning" title="Редактировать">
|
|
|
|
|
<i class="bi bi-pencil"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a asp-action="DeleteEmployee" asp-controller="User" asp-route-id="@employee.Id" class="text-danger" title="Удалить" onclick="return confirm('Вы уверены, что хотите удалить сотрудника?');">
|
|
|
|
|
<i class="bi bi-trash"></i>
|
|
|
|
|
</a>
|
|
|
|
|
}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
@* <nav>
|
|
|
|
|
<ul class="pagination justify-content-center">
|
|
|
|
|
@for (int i = 1; i <= pageCount; i++)
|
|
|
|
|
{
|
|
|
|
|
<li class="page-item @(i == pageNumber ? "active" : "")">
|
|
|
|
|
<a class="page-link" asp-action="CompanyProfile" asp-controller="Company" asp-route-id="@Model.Id" asp-route-pageNumber="@i">
|
|
|
|
|
@i
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
</nav> *@
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<p>Сотрудников нет.</p>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-18 23:37:50 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|