Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-6201] Fix creation of organizations no longer working after mergi… #5142

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Admin/AdminConsole/Models/OrganizationsModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ public class OrganizationsModel : PagedModel<Organization>
public bool? Paid { get; set; }
public string Action { get; set; }
public bool SelfHosted { get; set; }

public double StorageGB(Organization org) => org.Storage.HasValue ? Math.Round(org.Storage.Value / 1073741824D, 2) : 0;
}
3 changes: 1 addition & 2 deletions src/Admin/AdminConsole/Views/Organizations/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
<i class="fa fa-smile-o fa-lg fa-fw text-body-secondary" title="Freeloader"></i>
}
}
<i class="fa fa-hdd-o fa-lg fa-fw"
title="Used Storage, @org.StorageGb GB"></i>
<i class="fa fa-hdd-o fa-lg fa-fw" title="Used Storage, @Model.StorageGB(org) GB"></i>
@if(org.Enabled)
{
<i class="fa fa-check-circle fa-lg fa-fw"
Expand Down
5 changes: 0 additions & 5 deletions src/Core/AdminConsole/Entities/Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@ public string SubscriberType()

public bool IsExpired() => ExpirationDate.HasValue && ExpirationDate.Value <= DateTime.UtcNow;

/// <summary>
/// Used storage in gigabytes.
/// </summary>
public double StorageGb => Storage.HasValue ? Math.Round(Storage.Value / 1073741824D, 2) : 0;

public long StorageBytesRemaining()
{
if (!MaxStorageGb.HasValue)
Expand Down
Loading