refactor: Rename TrueCV to RealCV throughout codebase
- Renamed all directories (TrueCV.* -> RealCV.*) - Renamed all project files (.csproj) - Renamed solution file (TrueCV.sln -> RealCV.sln) - Updated all namespaces in C# and Razor files - Updated project references - Updated CSS variable names 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
35
src/RealCV.Application/Helpers/DateHelpers.cs
Normal file
35
src/RealCV.Application/Helpers/DateHelpers.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
namespace RealCV.Application.Helpers;
|
||||
|
||||
public static class DateHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Calculates the number of months between two dates.
|
||||
/// </summary>
|
||||
public static int MonthsBetween(DateOnly start, DateOnly end)
|
||||
{
|
||||
return ((end.Year - start.Year) * 12) + (end.Month - start.Month);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the number of months between two dates.
|
||||
/// </summary>
|
||||
public static int MonthsBetween(DateTime start, DateTime end)
|
||||
{
|
||||
return ((end.Year - start.Year) * 12) + (end.Month - start.Month);
|
||||
}
|
||||
|
||||
public static DateOnly? ParseDate(string? dateString)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(dateString))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (DateOnly.TryParse(dateString, out var date))
|
||||
{
|
||||
return date;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
19
src/RealCV.Application/Helpers/JsonDefaults.cs
Normal file
19
src/RealCV.Application/Helpers/JsonDefaults.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace RealCV.Application.Helpers;
|
||||
|
||||
public static class JsonDefaults
|
||||
{
|
||||
public static readonly JsonSerializerOptions CamelCase = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
PropertyNameCaseInsensitive = true
|
||||
};
|
||||
|
||||
public static readonly JsonSerializerOptions CamelCaseIndented = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
PropertyNameCaseInsensitive = true,
|
||||
WriteIndented = true
|
||||
};
|
||||
}
|
||||
21
src/RealCV.Application/Helpers/ScoreThresholds.cs
Normal file
21
src/RealCV.Application/Helpers/ScoreThresholds.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace RealCV.Application.Helpers;
|
||||
|
||||
public static class ScoreThresholds
|
||||
{
|
||||
public const int High = 70;
|
||||
public const int Medium = 50;
|
||||
|
||||
public static string GetScoreClass(int score) => score switch
|
||||
{
|
||||
> High => "score-high",
|
||||
>= Medium => "score-medium",
|
||||
_ => "score-low"
|
||||
};
|
||||
|
||||
public static string GetBadgeClass(int score) => score switch
|
||||
{
|
||||
> High => "bg-success",
|
||||
>= Medium => "bg-warning text-dark",
|
||||
_ => "bg-danger"
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user