Отчет по вакансиям (#20)
Tests / frontend-test (push) Successful in 47s
Tests / backend-test (push) Successful in 4m55s

Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz>
Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/tnsu-approval-route/pulls/20
This commit was merged in pull request #20.
This commit is contained in:
2026-08-31 11:00:09 +00:00
parent 95d460c80a
commit e2b6227015
16 changed files with 2198 additions and 0 deletions
@@ -0,0 +1,35 @@
using System.Text.Json;
namespace Tnsu.ApprovalRoute.Application.Reports;
/// <summary>
/// Строка списка «Прием на работу — данные» в том объёме, в каком она нужна отчёту:
/// на какую заявку на подбор ссылается, кого и когда приняли.
/// </summary>
internal sealed record HireLinkRow(
int SelectionRequestId,
string? SelectionRequestListId,
string Status,
string? CandidateName,
string? ReplacedEmployee,
DateOnly? HireDate)
{
public const string Select =
"$select=Id,RequestStatus,SelectionRequestId,SelectionRequestListId," +
"CandidateName,ReplacedEmployee,HireDate&$top=5000";
/// <summary>Заявка на приём без ссылки на подбор отчёту бесполезна — её отбрасываем.</summary>
public static HireLinkRow? TryParse(JsonElement item)
{
var selectionId = SharePointJson.Int(item, "SelectionRequestId");
if (selectionId is null or <= 0) return null;
return new HireLinkRow(
selectionId.Value,
SharePointJson.String(item, "SelectionRequestListId"),
SharePointJson.String(item, "RequestStatus") ?? string.Empty,
SharePointJson.String(item, "CandidateName"),
SharePointJson.String(item, "ReplacedEmployee"),
SharePointJson.Date(item, "HireDate"));
}
}