Installation
ember install etison-delta-currency
Live Demo
git clone <repository-url>
this repository- change into the new directory
npm install
bower install
ember server
- Visit the app at http://localhost:4200.
Required Configuration
This addon uses the ember-intl addon which requires you to:
- set a
locale
property in your consuming application. See https://github.com/yahoo/ember-intl/blob/master/README.md#configure-application-wide-locale_format for details on how to do. - configure the Intl.js-Polyfill implementation
Usage
The currency
, currentLabel
, and previousLabel
properties must be set when using the etison-delta-currency
component, otherwise the "no data" view will be displayed.
Setting the isFeatured
property to true
will result in the rendered etison-delta-currency
component having additional visual treatment applied to it. This property defaults to false
and does not need to be passed to the component if not indicating it is featured.
Example usage:
{{etison-delta-currency
currentLabel="Today so far"
currentValue=totalRevenueToday
previousLabel="vs. yesterday"
previousValue=totalRevenueYesterday
currency="USD"
isFeatured=true
}}
AWARENESS regarding architecture of company offerings
cents-to-dollars helper
Consider extracting this into a shared addon as it begins being used by other addons and applications. If https://github.com/SuccessEtcllc/etison-delta-currency/issues/2 hasn't been addressed by this time make sure it is not overlooked.
Please list current applications/addons using it here so we can track such references:
ember-intl dependency
Consider creating our own addon to wrap the ember-intl
addon so that duplicated configuration can be avoided. Such
configuration includes, but is not limited to:
- Needing to set a
locale
in the consuming application - The value of this
locale
and eventual support of localization - The Intl.js Polyfill
- any default entries in app/formats.js
https://github.com/yahoo/ember-intl/pull/284/files is a PR to auto inject polyfill into the head of index.html which can be used for reference when working the above as well as to have an eye kept on it for when included in the released addon.
Please list current applications/addons using it here so we can track such references:
- etison-delta-currency addon
- Ember application not yet pushed to Git that is used by the Affiliates Ruby application to show snapshot data
- clickfunnels-launchpad