fix: update storage quota checks to use 'meets or exceeds' logic for better clarity
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user