mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
6165441c30
refs https://github.com/TryGhost/Team/issues/715 Adds new modal and component to handle managing a list of products(tiers) in Admin behind the developer experiments flag. Also adds a new helper for stripe prices to convert amount from decimal value.
14 lines
326 B
JavaScript
14 lines
326 B
JavaScript
import {helper} from '@ember/component/helper';
|
|
|
|
export function ghPriceAmount(amount) {
|
|
if (amount) {
|
|
return Math.round(amount / 100);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// like {{pluralize}} but formats the number according to current locale
|
|
export default helper(function ([amount]) {
|
|
return ghPriceAmount(amount);
|
|
});
|