mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
Fixed issue when you create plan with 0 team members amount
This commit is contained in:
@@ -94,10 +94,15 @@ class UserLimitation extends Model
|
||||
$totalUsedEmails = $memberEmails->merge($InvitationEmails)
|
||||
->unique();
|
||||
|
||||
// Get usage in percent
|
||||
$percentage = (int) $this->max_team_members === 0
|
||||
? 100
|
||||
: ($totalUsedEmails->count() / $this->max_team_members) * 100;
|
||||
|
||||
return [
|
||||
'use' => $totalUsedEmails->count(),
|
||||
'total' => (int) $this->max_team_members,
|
||||
'percentage' => ($totalUsedEmails->count() / $this->max_team_members) * 100,
|
||||
'percentage' => $percentage,
|
||||
'meta' => [
|
||||
'allowed_emails' => $totalUsedEmails,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user