Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'In percent' per category in the summary #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions client/components/list-summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<span class="lpCell">
Weight
</span>
<span class="lpCell">
In percents
</span>
</li>
<li v-for="category in categories" :key="category.id" :class="{'hover': category.activeHover, 'lpTotalCategory lpRow': true}">
<span class="lpCell lpLegendCell">
Expand All @@ -40,6 +43,9 @@
<span class="lpCell lpNumber">
<span class="lpDisplaySubtotal" :mg="category.subtotalWeight">{{ category.subtotalWeight | displayWeight(library.totalUnit) }}</span> <span class="lpSubtotalUnit">{{ library.totalUnit }}</span>
</span>
<span class="lpCell lpNumber">
<span class="lpDisplayProcent" :mg="category.subtotalWeight / list.totalPackWeight * 100">{{ category.subtotalWeight / list.totalPackWeight * 100 }} %</span>
</span>
</li>
<li class="lpRow lpFooter lpTotal">
<span class="lpCell" />
Expand Down