Fix taken space display for teams [SCI-4479]

This commit is contained in:
Oleksii Kriuchykhin 2020-03-23 16:32:05 +01:00
parent 122edf7cca
commit 4db810c18f
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>