[IMPAC-618] Better time management for cashflow widgets#397
Conversation
xaun
left a comment
There was a problem hiding this comment.
Looks good, just a few comments.
| } | ||
| span { | ||
| outline: none; | ||
| } |
There was a problem hiding this comment.
I fixed this in feature/threshold-tooltips (cbdf27b). I think I prefer my changes, but I guess you'll be resolving the conflicts so you can pick :)
There was a problem hiding this comment.
👍
cherry-picked your commit
| # Widget histParams are YTD by default (when undefined on metadata), | ||
| # therefore in the past by default | ||
| ctrl.disabled = _.isEmpty(widgetHistParams) || moment(widgetHistParams.to) <= moment().startOf('day') | ||
| ctrl.disabled = widgetHistParams? && moment(widgetHistParams.to) <= moment.utc().startOf('day') |
There was a problem hiding this comment.
if widgetHistParams is equal to undefined or null, ctrl.disabled will equal false. Is this intended?
There was a problem hiding this comment.
yes: I disable it only if I have hist parameters defined so that the time period is in the past.
the default time period is no longer YTD but -3m / +1m
| chartConfig = angular.merge({}, @template(), @formatters(), @todayMarker()) | ||
| if _.isEmpty(@hc) | ||
| @hc = Highcharts.chart(@id, chartConfig) | ||
| @hc = Highcharts.stockChart(@id, chartConfig) |
There was a problem hiding this comment.
Will all Impac! angular charts use StockChart now?
There was a problem hiding this comment.
If I'm not wrong, stockChart is just like highCharts with more options, so I think this should be ok?..
Goes with https://github.com/maestrano/impac-finance-bolt/pull/44
TODO