Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.directive('alertsConfig', ($uibModal, $templateCache, $compile, $translat
emailAlert = _.find($scope.kpi.alerts, (alert) -> alert.service == 'email')
if emailAlert && $scope.members
emailAlertRecipients = emailAlert.recipients.map((recipient) -> recipient.id)
_.forEach($scope.members, (member) -> member.active = true if emailAlertRecipients.includes(member.id))
_.forEach($scope.members, (member) -> member.active = true if _.includes(emailAlertRecipients, member.id))
else if $scope.members
defaultActiveMember = _.find($scope.members, (member) -> member.email == config.userData.email) || $scope.members[0]
defaultActiveMember.active = true if defaultActiveMember
Expand Down
1 change: 1 addition & 0 deletions src/components/widget/widget.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
.content-template-wrapper {
height: 100%;
overflow: auto;
overflow-x: hidden;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ module.component('chartThreshold', {
ctrl.chart = chart
validateHistParameters()
Highcharts.addEvent(chart.container, 'click', onChartClick)
thresholdSeries = _.select(chart.series, (s)-> s.name.toLowerCase().includes('threshold'))
thresholdSeries = _.filter(chart.series, (s) -> _.includes(s.name.toLowerCase(), 'threshold'))
_.each(thresholdSeries, (t)->
Highcharts.addEvent(t, 'click', (event)-> onThresholdClick(t))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
outline: none;
}
input[type="range"] {
height: 20px;
height: auto;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tested this does not impact the other widgets that already use a range input?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the other widgets are good to go in both IE and chrome.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

width: 100%;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module = angular.module('impac.components.widgets.accounts-expense-weight',[])

module.controller('WidgetAccountsExpenseWeightCtrl', ($scope, $q, ChartFormatterSvc, $filter, $translate) ->
module.controller('WidgetAccountsExpenseWeightCtrl', ($scope, $q, ChartFormatterSvc, $filter, $translate, $timeout) ->

w = $scope.widget

Expand Down Expand Up @@ -44,7 +44,7 @@ module.controller('WidgetAccountsExpenseWeightCtrl', ($scope, $q, ChartFormatter

$scope.displayAccount = ->
$scope.updateSettings(false).then ->
w.format()
$timeout -> (w.format())

# Chart formating function
# --------------------------------------
Expand Down Expand Up @@ -75,8 +75,8 @@ module.controller('WidgetAccountsExpenseWeightCtrl', ($scope, $q, ChartFormatter
showXLabels: false,
currency: "(ratio)"
}
# chartData = ChartFormatterSvc.lineChart(lineData,lineOptions, true)
chartData = ChartFormatterSvc.combinedBarChart(lineData,lineOptions, false, true)
# chartData = ChartFormatterSvc.lineChart(lineData, lineOptions, true)
chartData = ChartFormatterSvc.combinedBarChart(lineData, lineOptions, false, true)

else
companies = _.map w.content.summary, (s) -> s.company
Expand All @@ -88,30 +88,29 @@ module.controller('WidgetAccountsExpenseWeightCtrl', ($scope, $q, ChartFormatter

inputData = {labels: companies, values: ratios}


options = {
# scaleOverride: true,
# scaleSteps: 4,
# scaleStepWidth: 25,
# scaleStartValue: 0,
scales: { yAxes: [
{ ticks: {
suggestedMin: 0
suggestedMax: 100
maxTicksLimit: 5
scales:
yAxes: [
{
ticks:
suggestedMin: 0
suggestedMax: 100
maxTicksLimit: 5
}
}
]}
]
showXLabels: false
pointDot: false
currency: '%'
}
chartData = ChartFormatterSvc.lineChart([inputData],options)
chartData = ChartFormatterSvc.lineChart([inputData], options)

# calls chart.draw()
$scope.drawTrigger.notify(chartData)


# Widget is ready: can trigger the "wait for settings to be ready"
# --------------------------------------
$scope.widgetDeferred.resolve(settingsPromises)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@
text-align: center;
}
}
.chart-container {
max-height: 125px;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.analytics .widget-item .content.hr-salaries-summary {
.expandable-filterable-widget();
}
.analytics .widget-item {
.content.hr-salaries-summary {
.expandable-filterable-widget();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h4 translate>impac.widget.hr_salaries_summary.settings.title</h4>
<div ng-class="widget.isExpanded() ? 'col-md-6' : 'col-md-12'">
<div setting-width parent-widget="widget" min="3" max="6" class="settings width" deferred="::widthDeferred" />

<h3 class="left" translate>impac.widget.hr_salaries_summary.average_rate</h3>
<h3 class="left" ng-class="widget.isExpanded() ? 'left' : 'reduced-left'" translate>impac.widget.hr_salaries_summary.average_rate</h3>
<div class="price">
{{widget.content.total.average_rate | mnoCurrency : widget.content.total.currency}}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.analytics .widget-item .content.hr-workforce-summary {
.expandable-filterable-widget();
.analytics .widget-item {
.content.hr-workforce-summary {
.expandable-filterable-widget();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h4 translate>impac.widget.hr_workforce_summary.settings.title</h4>
<div ng-class="widget.isExpanded() ? 'col-md-6' : 'col-md-12'">
<div setting-width parent-widget="widget" min="3" max="6" class="settings width" deferred="::widthDeferred" />

<h3 class="left" translate>impac.widget.hr_workforce_summary.total_workforce</h3>
<h3 class="left" ng-class="widget.isExpanded() ? 'left' : 'reduced-left'" translate>impac.widget.hr_workforce_summary.total_workforce</h3>
<div class="price">
{{getTotalWorkforce() | mnoCurrency : getCurrency()}}
</div>
Expand All @@ -27,7 +27,7 @@ <h3 class="left" translate>impac.widget.hr_workforce_summary.total_workforce</h3
</div>
</div>

<div class="right-panel" ng-class="{'col-md-12': !widget.isExpanded(), 'col-md-6': widget.isExpanded()}">
<div class="right-panel" ng-class="widget.isExpanded() ? 'col-md-6' : 'col-md-12'">
<h3 class="right">{{'impac.widget.hr_workforce_summary.filter' | translate}} <span setting-param-selector parent-widget="widget" param="filter" options="filterOptions" selected="filter" deferred="::paramSelectorDeferred2"/></h3>
<div class="chart-container">
<div impac-chart draw-trigger="::drawTrigger.promise" deferred="::chartDeferred"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ angular
return if _.isEmpty(@hc)
# Remove existing thresholds
for s in @hc.series
s.remove() if s? && s.name.toLowerCase().includes('threshold')
s.remove() if s? && _.includes(s.name.toLowerCase(), 'threshold')

return @hc if _.isEmpty(options.thresholds)

Expand Down
4 changes: 4 additions & 0 deletions src/stylesheets/widget-master-styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
@media (min-width: @screen-md-min) { margin-top: 69px; }
text-align: center;
}
h3.reduced-left {
@media (min-width: @screen-md-min) { margin-top: 10px; }
text-align: center;
}
h3.right {
margin-bottom: 10px;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion workspace/app/services/dev-user.svc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ angular.module('impacWorkspace').service('DevUser', function ($log, $http, $q, A
return _self.getUserData(mnoeUrl).then(
function (user) {
var orgs = (user.organizations || []);
var orga = orgs.find(function(orga) { return orga.uid == orgUid });
var orga = _.find(orgs, function (orga) { return orga.uid == orgUid });
var orgId = (orga && orga.id) || orgs[0].id || null;

return { organizations: orgs, currentOrgId: orgId };
Expand Down