Add progress bar to the stats tables

This commit is contained in:
Ildar Kamalov 2018-10-12 16:02:01 +03:00
parent 1233901822
commit 6ca881ee86
8 changed files with 233 additions and 71 deletions
client/src/helpers

View file

@ -75,4 +75,9 @@ export const normalizeFilteringStatus = (filteringStatus) => {
return { enabled, userRules: newUserRules, filters: newFilters };
};
export const getPercent = (amount, number) => round(100 / (amount / number));
export const getPercent = (amount, number) => {
if (amount > 0 && number > 0) {
return round(100 / (amount / number), 2);
}
return 0;
};