From 8669559928d09d90034b2b63c30d42f3ec5f0323 Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Wed, 11 Dec 2024 13:32:59 +0100 Subject: [PATCH] [PM-6201] Fix creation of organizations no longer working after merging #5130 --- src/Admin/AdminConsole/Models/OrganizationsModel.cs | 2 ++ src/Admin/AdminConsole/Views/Organizations/Index.cshtml | 3 +-- src/Core/AdminConsole/Entities/Organization.cs | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Admin/AdminConsole/Models/OrganizationsModel.cs b/src/Admin/AdminConsole/Models/OrganizationsModel.cs index 147c5275f837..a98985ef015a 100644 --- a/src/Admin/AdminConsole/Models/OrganizationsModel.cs +++ b/src/Admin/AdminConsole/Models/OrganizationsModel.cs @@ -10,4 +10,6 @@ public class OrganizationsModel : PagedModel 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; } diff --git a/src/Admin/AdminConsole/Views/Organizations/Index.cshtml b/src/Admin/AdminConsole/Views/Organizations/Index.cshtml index 3dc6801490c8..d42d0e8aa206 100644 --- a/src/Admin/AdminConsole/Views/Organizations/Index.cshtml +++ b/src/Admin/AdminConsole/Views/Organizations/Index.cshtml @@ -81,8 +81,7 @@ } } - + @if(org.Enabled) { ExpirationDate.HasValue && ExpirationDate.Value <= DateTime.UtcNow; - /// - /// Used storage in gigabytes. - /// - public double StorageGb => Storage.HasValue ? Math.Round(Storage.Value / 1073741824D, 2) : 0; - public long StorageBytesRemaining() { if (!MaxStorageGb.HasValue)