mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: optimize sidebar and datatable expandable rows.
This commit is contained in:
@@ -136,10 +136,12 @@ export const defaultExpanderReducer = (tableRows, level) => {
|
||||
return expended;
|
||||
}
|
||||
|
||||
|
||||
export function formattedAmount(cents, currency) {
|
||||
const { symbol, decimal_digits: precision } = Currency[currency];
|
||||
const amount = cents / Math.pow(10, precision);
|
||||
|
||||
return accounting.formatMoney(amount, { symbol, precision });
|
||||
}
|
||||
}
|
||||
|
||||
export const ConditionalWrapper = ({ condition, wrapper, children }) =>
|
||||
condition ? wrapper(children) : children;
|
||||
Reference in New Issue
Block a user