feature/apply-filter (#18)
Co-authored-by: Maxime Adler <madler@sqli.com> Reviewed-on: #18
This commit was merged in pull request #18.
This commit is contained in:
@@ -4,7 +4,7 @@ namespace GameIdeas.BlazorApp.Helpers;
|
||||
|
||||
public static class GameHelper
|
||||
{
|
||||
public static void WriteTrackingDto(GameDto game)
|
||||
public static void WriteTrackingDto(GameDetailDto game)
|
||||
{
|
||||
game.CreationUserId = 100000;
|
||||
game.CreationDate = DateTime.Now;
|
||||
@@ -22,4 +22,19 @@ public static class GameHelper
|
||||
_ => "--yellow",
|
||||
};
|
||||
}
|
||||
|
||||
public static string GetFormatedStorageSpace(double? storageValue)
|
||||
{
|
||||
if (storageValue == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return storageValue switch
|
||||
{
|
||||
>= 1000000 => $"{storageValue / 1000000:f1} To",
|
||||
>= 1000 => $"{storageValue / 1000:f1} Go",
|
||||
_ => $"{storageValue:f1} Mo"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user