Merge pull request #2482 from okriuchykhin/ok_SCI_4479

Fix taken space display for teams [SCI-4479]
This commit is contained in:
Alex Kriuchykhin 2020-03-23 16:53:47 +01:00 committed by GitHub
commit c09ef36f52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -5,6 +5,10 @@ module Api
class TeamSerializer < ActiveModel::Serializer
attributes :id, :name, :description, :space_taken
belongs_to :created_by, serializer: UserSerializer
def space_taken
object.storage_used.to_i
end
end
end
end

View file

@ -50,7 +50,7 @@
<div class="space-usage grid-block">
<span class="fas fa-hdd"></span>
<span class="hidden-xs hidden-sm"><%= t("users.settings.teams.edit.header_space_taken") %></span>
<b data-hook="team-space-taken"><%= "#{number_to_human_size(@team.space_taken)}" %></b>
<b data-hook="team-space-taken"><%= "#{number_to_human_size(@team.storage_used)}" %></b>
</div>
</div>