fix: update storage quota checks to use 'meets or exceeds' logic for better clarity

This commit is contained in:
2025-12-05 06:31:54 -05:00
parent 0ba669340e
commit 2a07fe78fc
2 changed files with 7 additions and 7 deletions

View File

@@ -1084,9 +1084,9 @@ class Storage extends Component
}
// The drive being reattached is already counted in totalAllocatedStorage (which includes unused drives)
// So we just need to check if the total exceeds the max
if ($this->totalAllocatedStorage > $this->maxAllowedStorage && $this->maxAllowedStorage > 0) {
$this->notify('Storage quota exceeded. Total storage (' . number_format($this->totalAllocatedStorage, 1) . ' GB) exceeds your plan allocation (' . number_format($this->maxAllowedStorage, 1) . ' GB). Please upgrade your service or delete drives to allow this configuration.', 'error');
// So we just need to check if the total meets or exceeds the max
if ($this->totalAllocatedStorage >= $this->maxAllowedStorage && $this->maxAllowedStorage > 0) {
$this->notify('Storage quota reached. Total storage (' . number_format($this->totalAllocatedStorage, 1) . ' GB) meets or exceeds your plan allocation (' . number_format($this->maxAllowedStorage, 1) . ' GB). Please upgrade your service or delete drives to allow this configuration.', 'error');
return;
}